BAPI_PO_CREATE1 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_PO_CREATE1 into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
2012
Released Date:
06.05.2002
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_PO_CREATE1' "Create Purchase Order
EXPORTING
poheader = " bapimepoheader Header Data
* poheaderx = " bapimepoheaderx Header Data (Change Parameter)
* poaddrvendor = " bapimepoaddrvendor Address of Vendor
* testrun = " bapiflag-bapiflag Test Indicator
* memory_uncomplete = " bapiflag-bapiflag Hold Purchase Order if Faulty
* memory_complete = " bapiflag-bapiflag Hold Purchase Order if NOT Faulty
* poexpimpheader = " bapieikp Export Trade: Header Data
* poexpimpheaderx = " bapieikpx Foreign Trade: Change Bar: Header Data
* versions = " bapimedcm Version Management
* no_messaging = " bapiflag-bapiflag No message determination
* no_message_req = " bapiflag-bapiflag No messages necessary
* no_authority = " bapiflag-bapiflag No Authorization Check
* no_price_from_po = " bapiflag-bapiflag No Adoption of Price from Last Document
* park_complete = " bapiflag-bapiflag Park Document if NOT Faulty
* park_uncomplete = " bapiflag-bapiflag Park Document if Faulty
IMPORTING
exppurchaseorder = " bapimepoheader-po_number Purchasing Document Number
expheader = " bapimepoheader Header Data
exppoexpimpheader = " bapieikp Export Trade: Header Data
* TABLES
* return = " bapiret2 Return Parameter
* poitem = " bapimepoitem Item Data
* poitemx = " bapimepoitemx Item Data (Change Parameter)
* poaddrdelivery = " bapimepoaddrdelivery Addresses for Inward Delivery (Item)
* poschedule = " bapimeposchedule Delivery Schedule
* poschedulex = " bapimeposchedulx Delivery Schedule (Change Parameter)
* poaccount = " bapimepoaccount Account Assignment Fields
* poaccountprofitsegment = " bapimepoaccountprofitsegment Reservation Profitability Segment: BAPI_PROFITABILITY_SEGMENT
* poaccountx = " bapimepoaccountx Account Assignment Fields (Change Parameter)
* pocondheader = " bapimepocondheader Conditions (Header)
* pocondheaderx = " bapimepocondheaderx Conditions (Header, Change Parameter)
* pocond = " bapimepocond Conditions (Items)
* pocondx = " bapimepocondx Conditions (Items, Change Parameter)
* polimits = " bapiesuhc External Services: Limits
* pocontractlimits = " bapiesucc External Services: Contract Limits
* poservices = " bapiesllc External Services: Service Lines
* posrvaccessvalues = " bapiesklc External Services: Account Assignment Distribution for Service Lines
* poservicestext = " bapieslltx External Services: Service Long Text
* extensionin = " bapiparex Customer's Own Fields (Import Parameters)
* extensionout = " bapiparex Customer's Own Fields (Export Parameters)
* poexpimpitem = " bapieipo Foreign Trade: Item Data
* poexpimpitemx = " bapieipox Foreign Trade: Change Parameter: Item Data
* potextheader = " bapimepotextheader Header Texts
* potextitem = " bapimepotext Item Texts
* allversions = " bapimedcm_allversions All Versions (Export Parameter)
* popartner = " bapiekkop Partner
* pocomponents = " bapimepocomponent BAPI Structure for Components
* pocomponentsx = " bapimepocomponentx Update Information for Components in BUS2012 API
* poshipping = " bapiitemship BAPI Shipping Data for Stock Transport Orders
* poshippingx = " bapiitemshipx BAPI Shipping Data Change Parameter
* poshippingexp = " bapimeposhippexp Export Structure for Shipping Data
* serialnumber = " bapimeposerialno Serial Numbers in Purchase Order BAPIs
* serialnumberx = " bapimeposerialnox Change Parameter: Serial Number in Purchase Order BAPIs
* invplanheader = " bapi_invoice_plan_header Invoicing Plan Header Data
* invplanheaderx = " bapi_invoice_plan_headerx Invoicing Plan Header Data (Change Parameter)
* invplanitem = " bapi_invoice_plan_item Invoicing Plan Item Data
* invplanitemx = " bapi_invoice_plan_itemx Invoicing Plan Item Data (Change Parameter)
. " BAPI_PO_CREATE1
The ABAP code below is a full code listing to execute function module BAPI_PO_CREATE1 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_exppurchaseorder | TYPE BAPIMEPOHEADER-PO_NUMBER , |
| ld_expheader | TYPE BAPIMEPOHEADER , |
| ld_exppoexpimpheader | TYPE BAPIEIKP , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return , |
| it_poitem | TYPE STANDARD TABLE OF BAPIMEPOITEM,"TABLES PARAM |
| wa_poitem | LIKE LINE OF it_poitem , |
| it_poitemx | TYPE STANDARD TABLE OF BAPIMEPOITEMX,"TABLES PARAM |
| wa_poitemx | LIKE LINE OF it_poitemx , |
| it_poaddrdelivery | TYPE STANDARD TABLE OF BAPIMEPOADDRDELIVERY,"TABLES PARAM |
| wa_poaddrdelivery | LIKE LINE OF it_poaddrdelivery , |
| it_poschedule | TYPE STANDARD TABLE OF BAPIMEPOSCHEDULE,"TABLES PARAM |
| wa_poschedule | LIKE LINE OF it_poschedule , |
| it_poschedulex | TYPE STANDARD TABLE OF BAPIMEPOSCHEDULX,"TABLES PARAM |
| wa_poschedulex | LIKE LINE OF it_poschedulex , |
| it_poaccount | TYPE STANDARD TABLE OF BAPIMEPOACCOUNT,"TABLES PARAM |
| wa_poaccount | LIKE LINE OF it_poaccount , |
| it_poaccountprofitsegment | TYPE STANDARD TABLE OF BAPIMEPOACCOUNTPROFITSEGMENT,"TABLES PARAM |
| wa_poaccountprofitsegment | LIKE LINE OF it_poaccountprofitsegment , |
| it_poaccountx | TYPE STANDARD TABLE OF BAPIMEPOACCOUNTX,"TABLES PARAM |
| wa_poaccountx | LIKE LINE OF it_poaccountx , |
| it_pocondheader | TYPE STANDARD TABLE OF BAPIMEPOCONDHEADER,"TABLES PARAM |
| wa_pocondheader | LIKE LINE OF it_pocondheader , |
| it_pocondheaderx | TYPE STANDARD TABLE OF BAPIMEPOCONDHEADERX,"TABLES PARAM |
| wa_pocondheaderx | LIKE LINE OF it_pocondheaderx , |
| it_pocond | TYPE STANDARD TABLE OF BAPIMEPOCOND,"TABLES PARAM |
| wa_pocond | LIKE LINE OF it_pocond , |
| it_pocondx | TYPE STANDARD TABLE OF BAPIMEPOCONDX,"TABLES PARAM |
| wa_pocondx | LIKE LINE OF it_pocondx , |
| it_polimits | TYPE STANDARD TABLE OF BAPIESUHC,"TABLES PARAM |
| wa_polimits | LIKE LINE OF it_polimits , |
| it_pocontractlimits | TYPE STANDARD TABLE OF BAPIESUCC,"TABLES PARAM |
| wa_pocontractlimits | LIKE LINE OF it_pocontractlimits , |
| it_poservices | TYPE STANDARD TABLE OF BAPIESLLC,"TABLES PARAM |
| wa_poservices | LIKE LINE OF it_poservices , |
| it_posrvaccessvalues | TYPE STANDARD TABLE OF BAPIESKLC,"TABLES PARAM |
| wa_posrvaccessvalues | LIKE LINE OF it_posrvaccessvalues , |
| it_poservicestext | TYPE STANDARD TABLE OF BAPIESLLTX,"TABLES PARAM |
| wa_poservicestext | LIKE LINE OF it_poservicestext , |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM |
| wa_extensionin | LIKE LINE OF it_extensionin , |
| it_extensionout | TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM |
| wa_extensionout | LIKE LINE OF it_extensionout , |
| it_poexpimpitem | TYPE STANDARD TABLE OF BAPIEIPO,"TABLES PARAM |
| wa_poexpimpitem | LIKE LINE OF it_poexpimpitem , |
| it_poexpimpitemx | TYPE STANDARD TABLE OF BAPIEIPOX,"TABLES PARAM |
| wa_poexpimpitemx | LIKE LINE OF it_poexpimpitemx , |
| it_potextheader | TYPE STANDARD TABLE OF BAPIMEPOTEXTHEADER,"TABLES PARAM |
| wa_potextheader | LIKE LINE OF it_potextheader , |
| it_potextitem | TYPE STANDARD TABLE OF BAPIMEPOTEXT,"TABLES PARAM |
| wa_potextitem | LIKE LINE OF it_potextitem , |
| it_allversions | TYPE STANDARD TABLE OF BAPIMEDCM_ALLVERSIONS,"TABLES PARAM |
| wa_allversions | LIKE LINE OF it_allversions , |
| it_popartner | TYPE STANDARD TABLE OF BAPIEKKOP,"TABLES PARAM |
| wa_popartner | LIKE LINE OF it_popartner , |
| it_pocomponents | TYPE STANDARD TABLE OF BAPIMEPOCOMPONENT,"TABLES PARAM |
| wa_pocomponents | LIKE LINE OF it_pocomponents , |
| it_pocomponentsx | TYPE STANDARD TABLE OF BAPIMEPOCOMPONENTX,"TABLES PARAM |
| wa_pocomponentsx | LIKE LINE OF it_pocomponentsx , |
| it_poshipping | TYPE STANDARD TABLE OF BAPIITEMSHIP,"TABLES PARAM |
| wa_poshipping | LIKE LINE OF it_poshipping , |
| it_poshippingx | TYPE STANDARD TABLE OF BAPIITEMSHIPX,"TABLES PARAM |
| wa_poshippingx | LIKE LINE OF it_poshippingx , |
| it_poshippingexp | TYPE STANDARD TABLE OF BAPIMEPOSHIPPEXP,"TABLES PARAM |
| wa_poshippingexp | LIKE LINE OF it_poshippingexp , |
| it_serialnumber | TYPE STANDARD TABLE OF BAPIMEPOSERIALNO,"TABLES PARAM |
| wa_serialnumber | LIKE LINE OF it_serialnumber , |
| it_serialnumberx | TYPE STANDARD TABLE OF BAPIMEPOSERIALNOX,"TABLES PARAM |
| wa_serialnumberx | LIKE LINE OF it_serialnumberx , |
| it_invplanheader | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADER,"TABLES PARAM |
| wa_invplanheader | LIKE LINE OF it_invplanheader , |
| it_invplanheaderx | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADERX,"TABLES PARAM |
| wa_invplanheaderx | LIKE LINE OF it_invplanheaderx , |
| it_invplanitem | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEM,"TABLES PARAM |
| wa_invplanitem | LIKE LINE OF it_invplanitem , |
| it_invplanitemx | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEMX,"TABLES PARAM |
| wa_invplanitemx | LIKE LINE OF it_invplanitemx . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_exppurchaseorder | TYPE BAPIMEPOHEADER-PO_NUMBER , |
| ld_poheader | TYPE BAPIMEPOHEADER , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| ld_expheader | TYPE BAPIMEPOHEADER , |
| ld_poheaderx | TYPE BAPIMEPOHEADERX , |
| it_poitem | TYPE STANDARD TABLE OF BAPIMEPOITEM , |
| wa_poitem | LIKE LINE OF it_poitem, |
| ld_exppoexpimpheader | TYPE BAPIEIKP , |
| ld_poaddrvendor | TYPE BAPIMEPOADDRVENDOR , |
| it_poitemx | TYPE STANDARD TABLE OF BAPIMEPOITEMX , |
| wa_poitemx | LIKE LINE OF it_poitemx, |
| ld_testrun | TYPE BAPIFLAG-BAPIFLAG , |
| it_poaddrdelivery | TYPE STANDARD TABLE OF BAPIMEPOADDRDELIVERY , |
| wa_poaddrdelivery | LIKE LINE OF it_poaddrdelivery, |
| ld_memory_uncomplete | TYPE BAPIFLAG-BAPIFLAG , |
| it_poschedule | TYPE STANDARD TABLE OF BAPIMEPOSCHEDULE , |
| wa_poschedule | LIKE LINE OF it_poschedule, |
| ld_memory_complete | TYPE BAPIFLAG-BAPIFLAG , |
| it_poschedulex | TYPE STANDARD TABLE OF BAPIMEPOSCHEDULX , |
| wa_poschedulex | LIKE LINE OF it_poschedulex, |
| ld_poexpimpheader | TYPE BAPIEIKP , |
| it_poaccount | TYPE STANDARD TABLE OF BAPIMEPOACCOUNT , |
| wa_poaccount | LIKE LINE OF it_poaccount, |
| it_poaccountprofitsegment | TYPE STANDARD TABLE OF BAPIMEPOACCOUNTPROFITSEGMENT , |
| wa_poaccountprofitsegment | LIKE LINE OF it_poaccountprofitsegment, |
| ld_poexpimpheaderx | TYPE BAPIEIKPX , |
| it_poaccountx | TYPE STANDARD TABLE OF BAPIMEPOACCOUNTX , |
| wa_poaccountx | LIKE LINE OF it_poaccountx, |
| ld_versions | TYPE BAPIMEDCM , |
| it_pocondheader | TYPE STANDARD TABLE OF BAPIMEPOCONDHEADER , |
| wa_pocondheader | LIKE LINE OF it_pocondheader, |
| ld_no_messaging | TYPE BAPIFLAG-BAPIFLAG , |
| ld_no_message_req | TYPE BAPIFLAG-BAPIFLAG , |
| it_pocondheaderx | TYPE STANDARD TABLE OF BAPIMEPOCONDHEADERX , |
| wa_pocondheaderx | LIKE LINE OF it_pocondheaderx, |
| ld_no_authority | TYPE BAPIFLAG-BAPIFLAG , |
| it_pocond | TYPE STANDARD TABLE OF BAPIMEPOCOND , |
| wa_pocond | LIKE LINE OF it_pocond, |
| ld_no_price_from_po | TYPE BAPIFLAG-BAPIFLAG , |
| it_pocondx | TYPE STANDARD TABLE OF BAPIMEPOCONDX , |
| wa_pocondx | LIKE LINE OF it_pocondx, |
| ld_park_complete | TYPE BAPIFLAG-BAPIFLAG , |
| it_polimits | TYPE STANDARD TABLE OF BAPIESUHC , |
| wa_polimits | LIKE LINE OF it_polimits, |
| ld_park_uncomplete | TYPE BAPIFLAG-BAPIFLAG , |
| it_pocontractlimits | TYPE STANDARD TABLE OF BAPIESUCC , |
| wa_pocontractlimits | LIKE LINE OF it_pocontractlimits, |
| it_poservices | TYPE STANDARD TABLE OF BAPIESLLC , |
| wa_poservices | LIKE LINE OF it_poservices, |
| it_posrvaccessvalues | TYPE STANDARD TABLE OF BAPIESKLC , |
| wa_posrvaccessvalues | LIKE LINE OF it_posrvaccessvalues, |
| it_poservicestext | TYPE STANDARD TABLE OF BAPIESLLTX , |
| wa_poservicestext | LIKE LINE OF it_poservicestext, |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX , |
| wa_extensionin | LIKE LINE OF it_extensionin, |
| it_extensionout | TYPE STANDARD TABLE OF BAPIPAREX , |
| wa_extensionout | LIKE LINE OF it_extensionout, |
| it_poexpimpitem | TYPE STANDARD TABLE OF BAPIEIPO , |
| wa_poexpimpitem | LIKE LINE OF it_poexpimpitem, |
| it_poexpimpitemx | TYPE STANDARD TABLE OF BAPIEIPOX , |
| wa_poexpimpitemx | LIKE LINE OF it_poexpimpitemx, |
| it_potextheader | TYPE STANDARD TABLE OF BAPIMEPOTEXTHEADER , |
| wa_potextheader | LIKE LINE OF it_potextheader, |
| it_potextitem | TYPE STANDARD TABLE OF BAPIMEPOTEXT , |
| wa_potextitem | LIKE LINE OF it_potextitem, |
| it_allversions | TYPE STANDARD TABLE OF BAPIMEDCM_ALLVERSIONS , |
| wa_allversions | LIKE LINE OF it_allversions, |
| it_popartner | TYPE STANDARD TABLE OF BAPIEKKOP , |
| wa_popartner | LIKE LINE OF it_popartner, |
| it_pocomponents | TYPE STANDARD TABLE OF BAPIMEPOCOMPONENT , |
| wa_pocomponents | LIKE LINE OF it_pocomponents, |
| it_pocomponentsx | TYPE STANDARD TABLE OF BAPIMEPOCOMPONENTX , |
| wa_pocomponentsx | LIKE LINE OF it_pocomponentsx, |
| it_poshipping | TYPE STANDARD TABLE OF BAPIITEMSHIP , |
| wa_poshipping | LIKE LINE OF it_poshipping, |
| it_poshippingx | TYPE STANDARD TABLE OF BAPIITEMSHIPX , |
| wa_poshippingx | LIKE LINE OF it_poshippingx, |
| it_poshippingexp | TYPE STANDARD TABLE OF BAPIMEPOSHIPPEXP , |
| wa_poshippingexp | LIKE LINE OF it_poshippingexp, |
| it_serialnumber | TYPE STANDARD TABLE OF BAPIMEPOSERIALNO , |
| wa_serialnumber | LIKE LINE OF it_serialnumber, |
| it_serialnumberx | TYPE STANDARD TABLE OF BAPIMEPOSERIALNOX , |
| wa_serialnumberx | LIKE LINE OF it_serialnumberx, |
| it_invplanheader | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADER , |
| wa_invplanheader | LIKE LINE OF it_invplanheader, |
| it_invplanheaderx | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADERX , |
| wa_invplanheaderx | LIKE LINE OF it_invplanheaderx, |
| it_invplanitem | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEM , |
| wa_invplanitem | LIKE LINE OF it_invplanitem, |
| it_invplanitemx | TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEMX , |
| wa_invplanitemx | LIKE LINE OF it_invplanitemx. |
If you have activated the
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_PO_CREATE1 or its description.