SAP /SAPAPO/DM_ORDER_UPDATE Function Module for Create and Change APO Orders









/SAPAPO/DM_ORDER_UPDATE is a standard /sapapo/dm order update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create and Change APO Orders 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 order update FM, simply by entering the name /SAPAPO/DM_ORDER_UPDATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SAPAPO/DM_UPDATE
Program Name: /SAPAPO/SAPLDM_UPDATE
Main Program: /SAPAPO/SAPLDM_UPDATE
Appliation area: D
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function /SAPAPO/DM_ORDER_UPDATE 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_ORDER_UPDATE'"Create and Change APO Orders
EXPORTING
* IMP_ORDERS_TAB = "Tabelle mit Einteilungen für Bestell-/ Kundenaufträge
IMP_INPUTS_TAB = "Tabelle mit zu ändernden I/O-Knoten
* IMP_FCSTH = "
* IMP_VRSIO = "Planversion (operativ oder eine Simulationsversion)
IMP_SIMSESSION = "
* IMP_TIMESTAMP = "Anfang eines Buckets, auf den sich eine Einteilung bezieht
* IMP_PEGID_TAB = "Tabelle aus Daten zu prüfenden PEGID's

TABLES
* LT_RET = "Returnparameter

EXCEPTIONS
CONNECT_FAILED = 1 COM_ERROR = 2 APPL_ERROR = 3
.



IMPORTING Parameters details for /SAPAPO/DM_ORDER_UPDATE

IMP_ORDERS_TAB - Tabelle mit Einteilungen für Bestell-/ Kundenaufträge

Data type: /SAPAPO/OM_SCHEDULE_LINE_TAB
Optional: Yes
Call by Reference: Yes

IMP_INPUTS_TAB - Tabelle mit zu ändernden I/O-Knoten

Data type: /SAPAPO/OM_IO_ATTR_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

IMP_FCSTH -

Data type: /SAPAPO/SNPFCSTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

IMP_VRSIO - Planversion (operativ oder eine Simulationsversion)

Data type: /SAPAPO/STR_SCONS-VERSION
Optional: Yes
Call by Reference: No ( called with pass by value option)

IMP_SIMSESSION -

Data type: /SAPAPO/OM_SIMSESSION
Optional: No
Call by Reference: No ( called with pass by value option)

IMP_TIMESTAMP - Anfang eines Buckets, auf den sich eine Einteilung bezieht

Data type: /SAPAPO/OM_LINE_BUCKET_START
Optional: Yes
Call by Reference: Yes

IMP_PEGID_TAB - Tabelle aus Daten zu prüfenden PEGID's

Data type: /SAPAPO/TBL_CHKPEG
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for /SAPAPO/DM_ORDER_UPDATE

LT_RET - Returnparameter

Data type: BAPIRET2
Optional: 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)

Copy and paste ABAP code example for /SAPAPO/DM_ORDER_UPDATE 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_lt_ret  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_connect_failed  TYPE BAPIRET2, "   
lv_imp_orders_tab  TYPE /SAPAPO/OM_SCHEDULE_LINE_TAB, "   
lv_com_error  TYPE /SAPAPO/OM_SCHEDULE_LINE_TAB, "   
lv_imp_inputs_tab  TYPE /SAPAPO/OM_IO_ATTR_TAB, "   
lv_imp_fcsth  TYPE /SAPAPO/SNPFCSTH, "   
lv_appl_error  TYPE /SAPAPO/SNPFCSTH, "   
lv_imp_vrsio  TYPE /SAPAPO/STR_SCONS-VERSION, "   
lv_imp_simsession  TYPE /SAPAPO/OM_SIMSESSION, "   
lv_imp_timestamp  TYPE /SAPAPO/OM_LINE_BUCKET_START, "   
lv_imp_pegid_tab  TYPE /SAPAPO/TBL_CHKPEG. "   

  CALL FUNCTION '/SAPAPO/DM_ORDER_UPDATE'  "Create and Change APO Orders
    EXPORTING
         IMP_ORDERS_TAB = lv_imp_orders_tab
         IMP_INPUTS_TAB = lv_imp_inputs_tab
         IMP_FCSTH = lv_imp_fcsth
         IMP_VRSIO = lv_imp_vrsio
         IMP_SIMSESSION = lv_imp_simsession
         IMP_TIMESTAMP = lv_imp_timestamp
         IMP_PEGID_TAB = lv_imp_pegid_tab
    TABLES
         LT_RET = lt_lt_ret
    EXCEPTIONS
        CONNECT_FAILED = 1
        COM_ERROR = 2
        APPL_ERROR = 3
. " /SAPAPO/DM_ORDER_UPDATE




ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_ORDER_UPDATE

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 VERSION FROM /SAPAPO/STR_SCONS INTO @DATA(ld_imp_vrsio).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!