SAP BAPI_POEC_CREATE Function Module for
BAPI_POEC_CREATE is a standard bapi poec create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 bapi poec create FM, simply by entering the name BAPI_POEC_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: BBP_BUS2201
Program Name: SAPLBBP_BUS2201
Main Program: SAPLBBP_BUS2201
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_POEC_CREATE 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 'BAPI_POEC_CREATE'".
EXPORTING
I_PO_HEADER = "Header Data Purchase Order (BUS2201-Create)
* I_PO_HEADER_CUST = "
* I_TESTRUN = ' ' "Switch to Simulation Session for Write BAPIs
IMPORTING
E_PO_HEADER = "Header Data Purchase Order (BUS2201- GetDetail)
E_PO_HEADER_CUST = "PO Customer Enhancement (detail)
TABLES
* I_PO_ITEMS = "Item Data Purchase Order (BUS2201-Create)
* I_PO_SDLN = "
* E_PO_ITEMS = "Item Data Purchase Order (BUS2201-GetDetail)
* E_PO_ITEMS_CUST = "
* E_PO_ACCASS = "Account Assignment (GetDetail)
* E_PO_ACCASS_CUST = "
* E_PO_PARTNER = "Business Partner (GetDetail)
* E_PO_ORGDATA = "Org. Data (GetDetail)
* E_PO_LIMIT = "Limit (GetDetail)
* E_PO_SDLN = "
* E_PO_TEXT = "BAPI Structure for Long Text
* I_PO_ITEMS_CUST = "
* E_PO_STATUS = "BAPI Structure Status
* E_PO_ATTACH = "Attachments
* RETURN = "Return Parameters
* I_PO_ACCASS = "Account Assignment (Create)
* I_PO_ACCASS_CUST = "
* I_PO_PARTNER = "Business Partner (Create)
* I_PO_TEXT = "BAPI Structure for Long Text
* I_PO_ATTACH = "Attachments (GetDetail)
* I_PO_ORGDATA = "Org. Data (Create)
* I_PO_LIMIT = "Limit (Create)
IMPORTING Parameters details for BAPI_POEC_CREATE
I_PO_HEADER - Header Data Purchase Order (BUS2201-Create)
Data type: BAPI_PO_HEADER_COptional: No
Call by Reference: No ( called with pass by value option)
I_PO_HEADER_CUST -
Data type: BAPI_PO_HEADER_CUST_COptional: Yes
Call by Reference: No ( called with pass by value option)
I_TESTRUN - Switch to Simulation Session for Write BAPIs
Data type: BBPS_BAPI2091-TESTRUNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_POEC_CREATE
E_PO_HEADER - Header Data Purchase Order (BUS2201- GetDetail)
Data type: BAPI_PO_HEADER_DOptional: No
Call by Reference: No ( called with pass by value option)
E_PO_HEADER_CUST - PO Customer Enhancement (detail)
Data type: BAPI_PO_HEADER_CUST_DOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_POEC_CREATE
I_PO_ITEMS - Item Data Purchase Order (BUS2201-Create)
Data type: BAPI_PO_ITEM_COptional: Yes
Call by Reference: Yes
I_PO_SDLN -
Data type: BAPI_SDLN_COptional: Yes
Call by Reference: Yes
E_PO_ITEMS - Item Data Purchase Order (BUS2201-GetDetail)
Data type: BAPI_PO_ITEM_DOptional: Yes
Call by Reference: Yes
E_PO_ITEMS_CUST -
Data type: BAPI_PO_ITEM_CUST_DOptional: Yes
Call by Reference: Yes
E_PO_ACCASS - Account Assignment (GetDetail)
Data type: BAPI_ACC_DOptional: Yes
Call by Reference: Yes
E_PO_ACCASS_CUST -
Data type: BAPI_ACC_CUST_DOptional: Yes
Call by Reference: Yes
E_PO_PARTNER - Business Partner (GetDetail)
Data type: BAPI_BUP_DOptional: Yes
Call by Reference: Yes
E_PO_ORGDATA - Org. Data (GetDetail)
Data type: BAPI_ORG_DOptional: Yes
Call by Reference: Yes
E_PO_LIMIT - Limit (GetDetail)
Data type: BAPI_LIMIT_DOptional: Yes
Call by Reference: Yes
E_PO_SDLN -
Data type: BAPI_SDLN_DOptional: Yes
Call by Reference: Yes
E_PO_TEXT - BAPI Structure for Long Text
Data type: BAPI_TEXT_IOptional: Yes
Call by Reference: Yes
I_PO_ITEMS_CUST -
Data type: BAPI_PO_ITEM_CUST_COptional: Yes
Call by Reference: Yes
E_PO_STATUS - BAPI Structure Status
Data type: BAPI_BBP_STATUSOptional: Yes
Call by Reference: Yes
E_PO_ATTACH - Attachments
Data type: BAPI_ATT_DOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
I_PO_ACCASS - Account Assignment (Create)
Data type: BAPI_ACC_COptional: Yes
Call by Reference: Yes
I_PO_ACCASS_CUST -
Data type: BAPI_ACC_CUST_COptional: Yes
Call by Reference: Yes
I_PO_PARTNER - Business Partner (Create)
Data type: BAPI_BUP_COptional: Yes
Call by Reference: Yes
I_PO_TEXT - BAPI Structure for Long Text
Data type: BAPI_TEXT_IOptional: Yes
Call by Reference: Yes
I_PO_ATTACH - Attachments (GetDetail)
Data type: BAPI_ATT_COptional: Yes
Call by Reference: Yes
I_PO_ORGDATA - Org. Data (Create)
Data type: BAPI_ORG_COptional: Yes
Call by Reference: Yes
I_PO_LIMIT - Limit (Create)
Data type: BAPI_LIMIT_COptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_POEC_CREATE 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_i_po_items | TYPE STANDARD TABLE OF BAPI_PO_ITEM_C, " | |||
| lv_e_po_header | TYPE BAPI_PO_HEADER_D, " | |||
| lv_i_po_header | TYPE BAPI_PO_HEADER_C, " | |||
| lt_i_po_sdln | TYPE STANDARD TABLE OF BAPI_SDLN_C, " | |||
| lt_e_po_items | TYPE STANDARD TABLE OF BAPI_PO_ITEM_D, " | |||
| lt_e_po_items_cust | TYPE STANDARD TABLE OF BAPI_PO_ITEM_CUST_D, " | |||
| lt_e_po_accass | TYPE STANDARD TABLE OF BAPI_ACC_D, " | |||
| lt_e_po_accass_cust | TYPE STANDARD TABLE OF BAPI_ACC_CUST_D, " | |||
| lt_e_po_partner | TYPE STANDARD TABLE OF BAPI_BUP_D, " | |||
| lt_e_po_orgdata | TYPE STANDARD TABLE OF BAPI_ORG_D, " | |||
| lt_e_po_limit | TYPE STANDARD TABLE OF BAPI_LIMIT_D, " | |||
| lt_e_po_sdln | TYPE STANDARD TABLE OF BAPI_SDLN_D, " | |||
| lt_e_po_text | TYPE STANDARD TABLE OF BAPI_TEXT_I, " | |||
| lt_i_po_items_cust | TYPE STANDARD TABLE OF BAPI_PO_ITEM_CUST_C, " | |||
| lv_e_po_header_cust | TYPE BAPI_PO_HEADER_CUST_D, " | |||
| lv_i_po_header_cust | TYPE BAPI_PO_HEADER_CUST_C, " | |||
| lt_e_po_status | TYPE STANDARD TABLE OF BAPI_BBP_STATUS, " | |||
| lt_e_po_attach | TYPE STANDARD TABLE OF BAPI_ATT_D, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_i_testrun | TYPE BBPS_BAPI2091-TESTRUN, " SPACE | |||
| lt_i_po_accass | TYPE STANDARD TABLE OF BAPI_ACC_C, " | |||
| lt_i_po_accass_cust | TYPE STANDARD TABLE OF BAPI_ACC_CUST_C, " | |||
| lt_i_po_partner | TYPE STANDARD TABLE OF BAPI_BUP_C, " | |||
| lt_i_po_text | TYPE STANDARD TABLE OF BAPI_TEXT_I, " | |||
| lt_i_po_attach | TYPE STANDARD TABLE OF BAPI_ATT_C, " | |||
| lt_i_po_orgdata | TYPE STANDARD TABLE OF BAPI_ORG_C, " | |||
| lt_i_po_limit | TYPE STANDARD TABLE OF BAPI_LIMIT_C. " |
|   CALL FUNCTION 'BAPI_POEC_CREATE' " |
| EXPORTING | ||
| I_PO_HEADER | = lv_i_po_header | |
| I_PO_HEADER_CUST | = lv_i_po_header_cust | |
| I_TESTRUN | = lv_i_testrun | |
| IMPORTING | ||
| E_PO_HEADER | = lv_e_po_header | |
| E_PO_HEADER_CUST | = lv_e_po_header_cust | |
| TABLES | ||
| I_PO_ITEMS | = lt_i_po_items | |
| I_PO_SDLN | = lt_i_po_sdln | |
| E_PO_ITEMS | = lt_e_po_items | |
| E_PO_ITEMS_CUST | = lt_e_po_items_cust | |
| E_PO_ACCASS | = lt_e_po_accass | |
| E_PO_ACCASS_CUST | = lt_e_po_accass_cust | |
| E_PO_PARTNER | = lt_e_po_partner | |
| E_PO_ORGDATA | = lt_e_po_orgdata | |
| E_PO_LIMIT | = lt_e_po_limit | |
| E_PO_SDLN | = lt_e_po_sdln | |
| E_PO_TEXT | = lt_e_po_text | |
| I_PO_ITEMS_CUST | = lt_i_po_items_cust | |
| E_PO_STATUS | = lt_e_po_status | |
| E_PO_ATTACH | = lt_e_po_attach | |
| RETURN | = lt_return | |
| I_PO_ACCASS | = lt_i_po_accass | |
| I_PO_ACCASS_CUST | = lt_i_po_accass_cust | |
| I_PO_PARTNER | = lt_i_po_partner | |
| I_PO_TEXT | = lt_i_po_text | |
| I_PO_ATTACH | = lt_i_po_attach | |
| I_PO_ORGDATA | = lt_i_po_orgdata | |
| I_PO_LIMIT | = lt_i_po_limit | |
| . " BAPI_POEC_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_POEC_CREATE
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 TESTRUN FROM BBPS_BAPI2091 INTO @DATA(ld_i_testrun). | ||||
| DATA(ld_i_testrun) | = ' '. | |||
Search for further information about these or an SAP related objects