SAP RFM_BATCH_PO_PR_ALIGNMENT Function Module for RFC for backgroung PR PO alignment
RFM_BATCH_PO_PR_ALIGNMENT is a standard rfm batch po pr alignment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RFC for backgroung PR PO alignment 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 rfm batch po pr alignment FM, simply by entering the name RFM_BATCH_PO_PR_ALIGNMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: RFM_BATCH_ALIGN
Program Name: SAPLRFM_BATCH_ALIGN
Main Program: SAPLSUGZ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled + BasXML supported
Update:

Function RFM_BATCH_PO_PR_ALIGNMENT 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 'RFM_BATCH_PO_PR_ALIGNMENT'"RFC for backgroung PR PO alignment.
EXPORTING
IV_RUNID = "RunId GUID
IV_SIMULATION = "Simulation Run (No Postings)
* IV_APP_LOG_ID = "Application Log: External ID
IV_GA_GROUPING = "Single-Character Flag
IV_ALIGN_SCHED_LINES = "Align All Schedule Lines of a Sales Order Item
IT_ALIGNMENT_DATA = "Table type for PR-PO alignment
IV_ALIGN_SAME_PO = "Align variants from same PO
IV_LOGHANDLE = "Application Log: Log Handle
IMPORTING
ET_MESSAGES = "MEPO_T_MESSAGES_BAPI
ET_ALIGNMENT_DATA = "Table type for PR-PO alignment
IMPORTING Parameters details for RFM_BATCH_PO_PR_ALIGNMENT
IV_RUNID - RunId GUID
Data type: RFM_RUNIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_SIMULATION - Simulation Run (No Postings)
Data type: FSH_SIMULATION_RUNOptional: No
Call by Reference: No ( called with pass by value option)
IV_APP_LOG_ID - Application Log: External ID
Data type: BALNREXTOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_GA_GROUPING - Single-Character Flag
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
IV_ALIGN_SCHED_LINES - Align All Schedule Lines of a Sales Order Item
Data type: RFM_ALIGN_SCHED_LINESOptional: No
Call by Reference: No ( called with pass by value option)
IT_ALIGNMENT_DATA - Table type for PR-PO alignment
Data type: RFM_ALIGN_PO_PR_TOptional: No
Call by Reference: No ( called with pass by value option)
IV_ALIGN_SAME_PO - Align variants from same PO
Data type: RFM_ALIGN_SAME_POOptional: No
Call by Reference: No ( called with pass by value option)
IV_LOGHANDLE - Application Log: Log Handle
Data type: BALLOGHNDLOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RFM_BATCH_PO_PR_ALIGNMENT
ET_MESSAGES - MEPO_T_MESSAGES_BAPI
Data type: MEPO_T_MESSAGES_BAPIOptional: No
Call by Reference: No ( called with pass by value option)
ET_ALIGNMENT_DATA - Table type for PR-PO alignment
Data type: RFM_ALIGN_PO_PR_TOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RFM_BATCH_PO_PR_ALIGNMENT 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_iv_runid | TYPE RFM_RUNID, " | |||
| lv_et_messages | TYPE MEPO_T_MESSAGES_BAPI, " | |||
| lv_iv_simulation | TYPE FSH_SIMULATION_RUN, " | |||
| lv_et_alignment_data | TYPE RFM_ALIGN_PO_PR_T, " | |||
| lv_iv_app_log_id | TYPE BALNREXT, " | |||
| lv_iv_ga_grouping | TYPE CHAR1, " | |||
| lv_iv_align_sched_lines | TYPE RFM_ALIGN_SCHED_LINES, " | |||
| lv_it_alignment_data | TYPE RFM_ALIGN_PO_PR_T, " | |||
| lv_iv_align_same_po | TYPE RFM_ALIGN_SAME_PO, " | |||
| lv_iv_loghandle | TYPE BALLOGHNDL. " |
|   CALL FUNCTION 'RFM_BATCH_PO_PR_ALIGNMENT' "RFC for backgroung PR PO alignment |
| EXPORTING | ||
| IV_RUNID | = lv_iv_runid | |
| IV_SIMULATION | = lv_iv_simulation | |
| IV_APP_LOG_ID | = lv_iv_app_log_id | |
| IV_GA_GROUPING | = lv_iv_ga_grouping | |
| IV_ALIGN_SCHED_LINES | = lv_iv_align_sched_lines | |
| IT_ALIGNMENT_DATA | = lv_it_alignment_data | |
| IV_ALIGN_SAME_PO | = lv_iv_align_same_po | |
| IV_LOGHANDLE | = lv_iv_loghandle | |
| IMPORTING | ||
| ET_MESSAGES | = lv_et_messages | |
| ET_ALIGNMENT_DATA | = lv_et_alignment_data | |
| . " RFM_BATCH_PO_PR_ALIGNMENT | ||
ABAP code using 7.40 inline data declarations to call FM RFM_BATCH_PO_PR_ALIGNMENT
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.Search for further information about these or an SAP related objects