SAP /SAPAPO/DM_PO_MAINTAIN Function Module for Interfaces-Inbound: Purchase Orders









/SAPAPO/DM_PO_MAINTAIN is a standard /sapapo/dm po maintain SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Interfaces-Inbound: Purchase 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 po maintain FM, simply by entering the name /SAPAPO/DM_PO_MAINTAIN into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SAPAPO/DM_PURCHASE
Program Name: /SAPAPO/SAPLDM_PURCHASE
Main Program: /SAPAPO/SAPLDM_PURCHASE
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function /SAPAPO/DM_PO_MAINTAIN 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_PO_MAINTAIN'"Interfaces-Inbound: Purchase Orders
EXPORTING
* IV_SIMVERS = GC_ACTIVE_VERSION "Planversion (operativ oder eine Simulationsversion)
IT_OUTPUTX = "
IT_INPUT_CUS = "Tabelle von Kundenerweiterungen zu Bestelleinteilungen
IT_OUTPUT_CUS = "Tabelle von Kundenerweiterungen zu Bestelleinteilungen
* IT_ATPFIELD = "Kontingente/Regeln: Merkmalswerte einer Position (extern)
* IT_TEXT = "Texte für Fremdbeschaffungsaufträge
* IS_CONTROL_PARAMETER = "Control parameter for transfer technology
* IV_CIF_FCS_CSP_STORE = "Dummy Data Element for Boolean Fields
* IV_APPLICATION = GC_RRP_CIF "RRP-Anwendung: (B)ackground, (A)tp, C(I)F, Default Dialog
* IV_TRANSSIM = ' ' "GUID zur Identifikation transaktionale Simulations-Session
IV_LOGSYS = "Logisches System
IV_OBJECTTYPE = "
* IV_ORDKEY_APPLI_SNP = "Feld zum Ankreuzen
IT_INPUT = "
IT_INPUTX = "
IT_OUTPUT = "

TABLES
ET_RET = "
* ET_ORDER_MAPPING = "Mappinginformationen zu angelegten/geänderten Aufträgen

EXCEPTIONS
OBJECT_LOCKED = 1 INTERNAL_ERROR = 2
.



IMPORTING Parameters details for /SAPAPO/DM_PO_MAINTAIN

IV_SIMVERS - Planversion (operativ oder eine Simulationsversion)

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

IT_OUTPUTX -

Data type: /SAPAPO/CIF_PU_DOC_X_TAB
Optional: No
Call by Reference: Yes

IT_INPUT_CUS - Tabelle von Kundenerweiterungen zu Bestelleinteilungen

Data type: /SAPAPO/CIF_PU_DOC_CUS_TAB
Optional: No
Call by Reference: Yes

IT_OUTPUT_CUS - Tabelle von Kundenerweiterungen zu Bestelleinteilungen

Data type: /SAPAPO/CIF_PU_DOC_CUS_TAB
Optional: No
Call by Reference: Yes

IT_ATPFIELD - Kontingente/Regeln: Merkmalswerte einer Position (extern)

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

IT_TEXT - Texte für Fremdbeschaffungsaufträge

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

IS_CONTROL_PARAMETER - Control parameter for transfer technology

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

IV_CIF_FCS_CSP_STORE - Dummy Data Element for Boolean Fields

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

IV_APPLICATION - RRP-Anwendung: (B)ackground, (A)tp, C(I)F, Default Dialog

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

IV_TRANSSIM - GUID zur Identifikation transaktionale Simulations-Session

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

IV_LOGSYS - Logisches System

Data type: LOGSYS
Optional: No
Call by Reference: No ( called with pass by value option)

IV_OBJECTTYPE -

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

IV_ORDKEY_APPLI_SNP - Feld zum Ankreuzen

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

IT_INPUT -

Data type: /SAPAPO/CIF_PU_DOC_TAB
Optional: No
Call by Reference: Yes

IT_INPUTX -

Data type: /SAPAPO/CIF_PU_DOC_X_TAB
Optional: No
Call by Reference: Yes

IT_OUTPUT -

Data type: /SAPAPO/CIF_PU_DOC_TAB
Optional: No
Call by Reference: Yes

TABLES Parameters details for /SAPAPO/DM_PO_MAINTAIN

ET_RET -

Data type: BAPIRET2
Optional: No
Call by Reference: Yes

ET_ORDER_MAPPING - Mappinginformationen zu angelegten/geänderten Aufträgen

Data type: BAPIAPOORDMAPRET
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

OBJECT_LOCKED -

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

INTERNAL_ERROR -

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

Copy and paste ABAP code example for /SAPAPO/DM_PO_MAINTAIN 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_iv_simvers  TYPE /SAPAPO/VRSIOID, "   GC_ACTIVE_VERSION
lv_object_locked  TYPE /SAPAPO/VRSIOID, "   
lv_it_outputx  TYPE /SAPAPO/CIF_PU_DOC_X_TAB, "   
lv_it_input_cus  TYPE /SAPAPO/CIF_PU_DOC_CUS_TAB, "   
lv_it_output_cus  TYPE /SAPAPO/CIF_PU_DOC_CUS_TAB, "   
lv_it_atpfield  TYPE /SAPAPO/TBL_EXTATPFIELD, "   
lv_it_text  TYPE /SAPAPO/CIF_PO_TEXT_TAB, "   
lv_is_control_parameter  TYPE /SAPAPO/CIF_CTRLPARAM, "   
lv_iv_cif_fcs_csp_store  TYPE /SAPAPO/BOOLEAN, "   
lv_internal_error  TYPE /SAPAPO/BOOLEAN, "   
lv_iv_application  TYPE /SAPAPO/RRP_APPLICATION, "   GC_RRP_CIF
lt_et_order_mapping  TYPE STANDARD TABLE OF BAPIAPOORDMAPRET, "   
lv_iv_transsim  TYPE /SAPAPO/OM_SIMSESSION, "   SPACE
lv_iv_logsys  TYPE LOGSYS, "   
lv_iv_objecttype  TYPE /SAPAPO/CIF_OBJTYP, "   
lv_iv_ordkey_appli_snp  TYPE BAPIYESNO, "   
lv_it_input  TYPE /SAPAPO/CIF_PU_DOC_TAB, "   
lv_it_inputx  TYPE /SAPAPO/CIF_PU_DOC_X_TAB, "   
lv_it_output  TYPE /SAPAPO/CIF_PU_DOC_TAB. "   

  CALL FUNCTION '/SAPAPO/DM_PO_MAINTAIN'  "Interfaces-Inbound: Purchase Orders
    EXPORTING
         IV_SIMVERS = lv_iv_simvers
         IT_OUTPUTX = lv_it_outputx
         IT_INPUT_CUS = lv_it_input_cus
         IT_OUTPUT_CUS = lv_it_output_cus
         IT_ATPFIELD = lv_it_atpfield
         IT_TEXT = lv_it_text
         IS_CONTROL_PARAMETER = lv_is_control_parameter
         IV_CIF_FCS_CSP_STORE = lv_iv_cif_fcs_csp_store
         IV_APPLICATION = lv_iv_application
         IV_TRANSSIM = lv_iv_transsim
         IV_LOGSYS = lv_iv_logsys
         IV_OBJECTTYPE = lv_iv_objecttype
         IV_ORDKEY_APPLI_SNP = lv_iv_ordkey_appli_snp
         IT_INPUT = lv_it_input
         IT_INPUTX = lv_it_inputx
         IT_OUTPUT = lv_it_output
    TABLES
         ET_RET = lt_et_ret
         ET_ORDER_MAPPING = lt_et_order_mapping
    EXCEPTIONS
        OBJECT_LOCKED = 1
        INTERNAL_ERROR = 2
. " /SAPAPO/DM_PO_MAINTAIN




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

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_iv_simvers) = GC_ACTIVE_VERSION.
 
 
 
 
 
 
 
 
 
 
DATA(ld_iv_application) = GC_RRP_CIF.
 
 
DATA(ld_iv_transsim) = ' '.
 
 
 
 
 
 
 


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!