SAP RM_SCRAP_POST Function Module for NOTRANSL: Ausschußmengen für MF40 auf Top-Zählpunkt 999999 fortschreiben
RM_SCRAP_POST is a standard rm scrap post SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Ausschußmengen für MF40 auf Top-Zählpunkt 999999 fortschreiben processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rm scrap post FM, simply by entering the name RM_SCRAP_POST into the relevant SAP transaction such as SE37 or SE38.
Function Group: RMRT
Program Name: SAPLRMRT
Main Program: SAPLRMRT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RM_SCRAP_POST pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RM_SCRAP_POST'"NOTRANSL: Ausschußmengen für MF40 auf Top-Zählpunkt 999999 fortschreiben.
EXPORTING
I_SAUFN = "Run Schedule Header Number
I_BUDAT = "Posting Date
I_AUMNG = "Scrap Quantity
I_MEINH = "Unit of Measure
I_WERKS = "Plant of scrap reason
* I_AGRND = "Scrap Reason
* I_BLDAT = "Document Date
* I_REFBN = "Reference Document Number
IMPORTING
E_BELNR = "Document number of line item
EXCEPTIONS
DATE_ERROR = 1 ERROR_NUMKR = 2
IMPORTING Parameters details for RM_SCRAP_POST
I_SAUFN - Run Schedule Header Number
Data type: SAFK-AUFNROptional: No
Call by Reference: No ( called with pass by value option)
I_BUDAT - Posting Date
Data type: PZPE-BUDATOptional: No
Call by Reference: No ( called with pass by value option)
I_AUMNG - Scrap Quantity
Data type: PZPS-XMVRGOptional: No
Call by Reference: No ( called with pass by value option)
I_MEINH - Unit of Measure
Data type: PZPE-MEINHOptional: No
Call by Reference: No ( called with pass by value option)
I_WERKS - Plant of scrap reason
Data type: PZPE-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
I_AGRND - Scrap Reason
Data type: PZPE-AGRNDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BLDAT - Document Date
Data type: PZPE-BLDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_REFBN - Reference Document Number
Data type: PZPE-REFBNOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RM_SCRAP_POST
E_BELNR - Document number of line item
Data type: PZPE-BELNROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DATE_ERROR - Error in posting date
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_NUMKR - Error in number range PZPE/01
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RM_SCRAP_POST Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_e_belnr | TYPE PZPE-BELNR, " | |||
| lv_i_saufn | TYPE SAFK-AUFNR, " | |||
| lv_date_error | TYPE SAFK, " | |||
| lv_i_budat | TYPE PZPE-BUDAT, " | |||
| lv_error_numkr | TYPE PZPE, " | |||
| lv_i_aumng | TYPE PZPS-XMVRG, " | |||
| lv_i_meinh | TYPE PZPE-MEINH, " | |||
| lv_i_werks | TYPE PZPE-WERKS, " | |||
| lv_i_agrnd | TYPE PZPE-AGRND, " | |||
| lv_i_bldat | TYPE PZPE-BLDAT, " | |||
| lv_i_refbn | TYPE PZPE-REFBN. " |
|   CALL FUNCTION 'RM_SCRAP_POST' "NOTRANSL: Ausschußmengen für MF40 auf Top-Zählpunkt 999999 fortschreiben |
| EXPORTING | ||
| I_SAUFN | = lv_i_saufn | |
| I_BUDAT | = lv_i_budat | |
| I_AUMNG | = lv_i_aumng | |
| I_MEINH | = lv_i_meinh | |
| I_WERKS | = lv_i_werks | |
| I_AGRND | = lv_i_agrnd | |
| I_BLDAT | = lv_i_bldat | |
| I_REFBN | = lv_i_refbn | |
| IMPORTING | ||
| E_BELNR | = lv_e_belnr | |
| EXCEPTIONS | ||
| DATE_ERROR = 1 | ||
| ERROR_NUMKR = 2 | ||
| . " RM_SCRAP_POST | ||
ABAP code using 7.40 inline data declarations to call FM RM_SCRAP_POST
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single BELNR FROM PZPE INTO @DATA(ld_e_belnr). | ||||
| "SELECT single AUFNR FROM SAFK INTO @DATA(ld_i_saufn). | ||||
| "SELECT single BUDAT FROM PZPE INTO @DATA(ld_i_budat). | ||||
| "SELECT single XMVRG FROM PZPS INTO @DATA(ld_i_aumng). | ||||
| "SELECT single MEINH FROM PZPE INTO @DATA(ld_i_meinh). | ||||
| "SELECT single WERKS FROM PZPE INTO @DATA(ld_i_werks). | ||||
| "SELECT single AGRND FROM PZPE INTO @DATA(ld_i_agrnd). | ||||
| "SELECT single BLDAT FROM PZPE INTO @DATA(ld_i_bldat). | ||||
| "SELECT single REFBN FROM PZPE INTO @DATA(ld_i_refbn). | ||||
Search for further information about these or an SAP related objects