Posts

Showing posts with the label Function Module

MM_HISTORY_POPUP_SHOW - Display PO History for Purchase Order Item.

Image
This function module is used to display Purchase Order Item history in a pop up Window. This function module can be used in reports to display the PO history. This is mentioned as obsolete but still being used widely in standard transactions like MIGO. SYNTAX: CALL FUNCTION 'MM_HISTORY_POPUP_SHOW'    EXPORTING      pi_ebeln = gwa_final-ebeln      pi_ebelp = gwa_final-ebelp. SCREENSHOTS: On Clicking The first Line Item's History icon we get the below pop up using the mentioned Function Module.

Rounding Off - Function Modules (FMs) - SAP ABAP.

Image
There are a lot of options in SAP ABAP for rounding off a particular amount or value. 1.  J_1I6_ROUND_TO_NEAREST_AMT:   - Its a standard SAP function module that performs Rounding off the excise value functionality. This FM is to be used only for Indian Values with 2 decimal digits. For example it will help you to round off a value like 120.49 to 120.00 or 120.51 to 121.00. 2. HR_IN_ROUND_AMT :  It's used to compute the nearest rounded off amount with respect to an index. But again you are not allowed to have a value with ore than 2 decimal digit. Example: Round off amount 47.42 to the nearest five Paise O/P : 47.40 Round off amount 47.42 to the nearest rupee O/P : 47.00 Round Off Amount 47.42 to the nearest 5 Rupee. O/P: 45.00 Round Off Amount 47.51 to the nearest 5 Rupee. O/P: 50.00 3. Using ROUND function:  It's the most simple way of rounding off the values or amount to the required nearest decimal places...

ABAP Date Conversion - YYYYMMDD to DD.MM.YYYY - SAP Function Module

Image
There are two function modules available in SAP. 1. CONVERSION_EXIT_PDATE_OUTPUT 2. CONVERSION_EXIT_SDATE_OUTPUT In SAP both function module shows to be doing the same thing. CONVERSION_EXIT_PDATE_OUTPUT This FM should be used where there is a need to convert the date from YYYYMMDD to DD.MM.YYYY . CONVERSION_EXIT_SDATE_OUTPUT This is the correct function module for date conversion from  YYYYMMDD to DD.MMM.YYYY (For example: 20180305 to 05.MAR.2018)

ABAP Date Conversion - DD.MM.YYYY to YYYYMMDD - SAP Function Module

Image
There are two function modules available in SAP but don't get confused. 1. CONVERSION_EXIT_PDATE_INPUT 2. CONVERSION_EXIT_SDATE_INPUT In SAP both function module shows to be doing the same thing but that's not the case. CONVERSION_EXIT_PDATE_INPUT This FM should be used where there is a need to  validate Date of Birth. So this function module will no doubt convert the date from DD.MM.YYYY to YYYYMMDD, but only for past date. CONVERSION_EXIT_SDATE_INPUT This is the correct function module for date conversion from DD.MM.YYYY to YYYYMMDD. Syntax:  DATA: lv_dd_mm_yyyy(10) type c,             lv_yyyymmdd type sy-datum. CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'         EXPORTING           input  = lv_dd_mm_yyyy         IMPORTING           output = lv_yyyymmdd.