SAP /SAPAPO/DM_ALLOCATION_RP Function Module for Consumption of Sales Orders, Reservations, and Dependent Reqs
/SAPAPO/DM_ALLOCATION_RP is a standard /sapapo/dm allocation rp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Consumption of Sales Orders, Reservations, and Dependent Reqs 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 /sapapo/dm allocation rp FM, simply by entering the name /SAPAPO/DM_ALLOCATION_RP into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/DEMA
Program Name: /SAPAPO/SAPLDEMA
Main Program: /SAPAPO/SAPLDEMA
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_ALLOCATION_RP 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 '/SAPAPO/DM_ALLOCATION_RP'"Consumption of Sales Orders, Reservations, and Dependent Reqs.
EXPORTING
* IMP_PEGAREA_FC = "
* IMP_STORE = ' ' "Dummy Datenlement für Boolean-Felder
* IMP_IGNORE_COM3 = ' ' "Ignore com error 2 and 3
* IMP_PEGAREA = "
IMP_ITEM_TAB = "Tabelle Pruefung gegen Vorplanung
* IMP_DEMAND_TAB = "
* IMP_SIMSESSION = ' ' "
* IMP_SIMID = "Nummer der Version im InfoCube
* IMP_CSP = "Arbeitsstruktur Vorplanungsverrechnung
* IMP_EXCLUDE_REQ = "
* IMP_UNLOCK = ' ' "Dummy Data Element for Boolean Fields
IMPORTING
ET_PEGID_FC = "Tabelle aus Daten zu prüfenden PEGID's
ET_ORDER = "Tabelle mit Einteilungen für Bestell-/ Kundenaufträge
ET_INPUTS = "Tabelle mit zu ändernden I/O-Knoten
TABLES
* ET_RET = "Returnparameter
EXCEPTIONS
CONNECT_FAILED = 1 COM_ERROR = 2 APPL_ERROR = 3 MATERIAL_NOT_SUPPLIED = 4 LOCATION_NOT_SUPPLIED = 5 ACCOUNT_NOT_SUPPLIED = 6 MATID_NOT_FOUND = 7 LOCATION_NOT_FOUND = 8 PEGID_LOCK_NOT_EXECUTABLE = 9
IMPORTING Parameters details for /SAPAPO/DM_ALLOCATION_RP
IMP_PEGAREA_FC -
Data type: /SAPAPO/TBL_CHKPEGOptional: Yes
Call by Reference: No ( called with pass by value option)
IMP_STORE - Dummy Datenlement für Boolean-Felder
Data type: /SAPAPO/BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: Yes
IMP_IGNORE_COM3 - Ignore com error 2 and 3
Data type: /SAPAPO/BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: Yes
IMP_PEGAREA -
Data type: /SAPAPO/TBL_CHKPEGOptional: Yes
Call by Reference: No ( called with pass by value option)
IMP_ITEM_TAB - Tabelle Pruefung gegen Vorplanung
Data type: /SAPAPO/TBL_DMCHKREQOptional: No
Call by Reference: Yes
IMP_DEMAND_TAB -
Data type: /SAPAPO/TBL_CHKREQITMOptional: Yes
Call by Reference: Yes
IMP_SIMSESSION -
Data type: /SAPAPO/OM_SIMSESSIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IMP_SIMID - Nummer der Version im InfoCube
Data type: /SAPAPO/VRSIOIDOptional: Yes
Call by Reference: Yes
IMP_CSP - Arbeitsstruktur Vorplanungsverrechnung
Data type: /SAPAPO/STR_SCONSOptional: Yes
Call by Reference: Yes
IMP_EXCLUDE_REQ -
Data type: /SAPAPO/TBL_FCS_EXCLUDE_REQOptional: Yes
Call by Reference: Yes
IMP_UNLOCK - Dummy Data Element for Boolean Fields
Data type: /SAPAPO/BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for /SAPAPO/DM_ALLOCATION_RP
ET_PEGID_FC - Tabelle aus Daten zu prüfenden PEGID's
Data type: /SAPAPO/TBL_CHKPEGOptional: No
Call by Reference: Yes
ET_ORDER - Tabelle mit Einteilungen für Bestell-/ Kundenaufträge
Data type: /SAPAPO/OM_TAB_PUR_SCHEDOptional: No
Call by Reference: Yes
ET_INPUTS - Tabelle mit zu ändernden I/O-Knoten
Data type: /SAPAPO/OM_IO_ATTR_TABOptional: No
Call by Reference: Yes
TABLES Parameters details for /SAPAPO/DM_ALLOCATION_RP
ET_RET - Returnparameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
CONNECT_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COM_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
APPL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MATERIAL_NOT_SUPPLIED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCATION_NOT_SUPPLIED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACCOUNT_NOT_SUPPLIED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MATID_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCATION_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PEGID_LOCK_NOT_EXECUTABLE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/DM_ALLOCATION_RP 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: | ||||
| lt_et_ret | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_et_pegid_fc | TYPE /SAPAPO/TBL_CHKPEG, " | |||
| lv_connect_failed | TYPE /SAPAPO/TBL_CHKPEG, " | |||
| lv_imp_pegarea_fc | TYPE /SAPAPO/TBL_CHKPEG, " | |||
| lv_imp_store | TYPE /SAPAPO/BOOLEAN, " SPACE | |||
| lv_imp_ignore_com3 | TYPE /SAPAPO/BOOLEAN, " SPACE | |||
| lv_et_order | TYPE /SAPAPO/OM_TAB_PUR_SCHED, " | |||
| lv_com_error | TYPE /SAPAPO/OM_TAB_PUR_SCHED, " | |||
| lv_imp_pegarea | TYPE /SAPAPO/TBL_CHKPEG, " | |||
| lv_et_inputs | TYPE /SAPAPO/OM_IO_ATTR_TAB, " | |||
| lv_appl_error | TYPE /SAPAPO/OM_IO_ATTR_TAB, " | |||
| lv_imp_item_tab | TYPE /SAPAPO/TBL_DMCHKREQ, " | |||
| lv_imp_demand_tab | TYPE /SAPAPO/TBL_CHKREQITM, " | |||
| lv_material_not_supplied | TYPE /SAPAPO/TBL_CHKREQITM, " | |||
| lv_imp_simsession | TYPE /SAPAPO/OM_SIMSESSION, " SPACE | |||
| lv_location_not_supplied | TYPE /SAPAPO/OM_SIMSESSION, " | |||
| lv_imp_simid | TYPE /SAPAPO/VRSIOID, " | |||
| lv_account_not_supplied | TYPE /SAPAPO/VRSIOID, " | |||
| lv_imp_csp | TYPE /SAPAPO/STR_SCONS, " | |||
| lv_matid_not_found | TYPE /SAPAPO/STR_SCONS, " | |||
| lv_imp_exclude_req | TYPE /SAPAPO/TBL_FCS_EXCLUDE_REQ, " | |||
| lv_location_not_found | TYPE /SAPAPO/TBL_FCS_EXCLUDE_REQ, " | |||
| lv_imp_unlock | TYPE /SAPAPO/BOOLEAN, " SPACE | |||
| lv_pegid_lock_not_executable | TYPE /SAPAPO/BOOLEAN. " |
|   CALL FUNCTION '/SAPAPO/DM_ALLOCATION_RP' "Consumption of Sales Orders, Reservations, and Dependent Reqs |
| EXPORTING | ||
| IMP_PEGAREA_FC | = lv_imp_pegarea_fc | |
| IMP_STORE | = lv_imp_store | |
| IMP_IGNORE_COM3 | = lv_imp_ignore_com3 | |
| IMP_PEGAREA | = lv_imp_pegarea | |
| IMP_ITEM_TAB | = lv_imp_item_tab | |
| IMP_DEMAND_TAB | = lv_imp_demand_tab | |
| IMP_SIMSESSION | = lv_imp_simsession | |
| IMP_SIMID | = lv_imp_simid | |
| IMP_CSP | = lv_imp_csp | |
| IMP_EXCLUDE_REQ | = lv_imp_exclude_req | |
| IMP_UNLOCK | = lv_imp_unlock | |
| IMPORTING | ||
| ET_PEGID_FC | = lv_et_pegid_fc | |
| ET_ORDER | = lv_et_order | |
| ET_INPUTS | = lv_et_inputs | |
| TABLES | ||
| ET_RET | = lt_et_ret | |
| EXCEPTIONS | ||
| CONNECT_FAILED = 1 | ||
| COM_ERROR = 2 | ||
| APPL_ERROR = 3 | ||
| MATERIAL_NOT_SUPPLIED = 4 | ||
| LOCATION_NOT_SUPPLIED = 5 | ||
| ACCOUNT_NOT_SUPPLIED = 6 | ||
| MATID_NOT_FOUND = 7 | ||
| LOCATION_NOT_FOUND = 8 | ||
| PEGID_LOCK_NOT_EXECUTABLE = 9 | ||
| . " /SAPAPO/DM_ALLOCATION_RP | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_ALLOCATION_RP
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.| DATA(ld_imp_store) | = ' '. | |||
| DATA(ld_imp_ignore_com3) | = ' '. | |||
| DATA(ld_imp_simsession) | = ' '. | |||
| DATA(ld_imp_unlock) | = ' '. | |||
Search for further information about these or an SAP related objects