Professional Documents
Culture Documents
Many times, we need to use BAPI to create Purchase Orders (PO). The need to use BAPI
for PO creation arises when businesses want to automate PO creation or SAP is
interfaced with a third-party application. When creating a PO we have BAPI’s
like BAPI_PO_CREATE1 and BAPI_PO_CREATE, for amending a PO we have
BAPI_PO_CHANGE. For these BAPIs to work the minimum required data has to be
provided. This document focuses on PO creation using BAPI BAPI_PO_CREATE1 & hopes
to be useful to those who are new to using BAPIs.
The BAPI is designed to populate various data which is used during PO creation. The
data needs to be filled in different tables created in
BAPI. POHEADER, POITEM, POADDRDELIVERY, POSCHEDULE, POACCOUNT, etc are
among the tables in the BAPI. We need to fill data in these tables as per requirement.
The minimum information required to create a PO is to populate below tables:
– POHEADER
– POHEADERX
– POITEM
– POITEMX
– POSCHEDULE
– POSCHEDULEX
Apart from these, different other tables can be used as required, for example POCOND
for entering conditions or POCOMPONENTS for entering components in a subcontracting
PO.
– POHEADER
– POITEM
In POITEM, we need to enter details such as PO_ITEM (Item No), MATERIAL, PLANT,
STGE_LOC, QUANTITY, NET_PRICE, TAX_CODE, FUNDS_CTR (Funds Center). Additional
information such as ACCTASSCAT, ITEM_CAT (In case of special procurement, this is
mandatory), AGREEMENT (Contract) etc can be entered.
– POSCHEDULE
In case conditions are required to be maintained, then populate the POCOND table with
details such as ITM_NUMBER (PO Item No), COND_TYPE, COND_VALUE, CALCTYPCON
(Calculation Type), CHANGE_ID (I for inserting new condition, U for updating existing
condition & D for deleting).
We need to set the indicator in the corresponding change parameter table for each of
the fields in every table where we are passing the data. for example, once we have
populated data in the POHEADER table, then the same fields need to be set in the
POHEADERX table. similarly, in all the change parameter tables (POITEMX,
POSCHEDULEX, POCONDX), indicators have to be set for each field where we want to
populate the data.
Please note: Once the BAPI_PO_CREATE1 is executed, to commit the changes, another
BAPI – BAPI_TRANSACTION_COMMIT needs to be executed simultaneously, there in
the WAIT field we can put the value as X.
9. Select POITEM
10. Enter the values in the fields
18. After Executing it will redirect to the Test Function Module window
19. Select Goto – Test Data Directory
20. Select your Test Data