This document describes how to use the BAPI_PO_CREATE1 function to create a purchase order in SAP. It initializes header and item data for the purchase order, including company code, document type, purchasing organization, and item details. It then calls the BAPI_PO_CREATE1 function to generate a purchase order number, and either commits or rolls back the transaction depending on if a number was generated.
This document describes how to use the BAPI_PO_CREATE1 function to create a purchase order in SAP. It initializes header and item data for the purchase order, including company code, document type, purchasing organization, and item details. It then calls the BAPI_PO_CREATE1 function to generate a purchase order number, and either commits or rolls back the transaction depending on if a number was generated.
This document describes how to use the BAPI_PO_CREATE1 function to create a purchase order in SAP. It initializes header and item data for the purchase order, including company code, document type, purchasing organization, and item details. It then calls the BAPI_PO_CREATE1 function to generate a purchase order number, and either commits or rolls back the transaction depending on if a number was generated.
DATA: ls_poheader LIKE bapimepoheader, ls_poheaderx LIKE bapimepoheaderx. DATA: ld_ponumber LIKE bapimepoheader-po_number, ls_expheader LIKE bapimepoheader, ls_exppoexpimpheader LIKE bapieikp. DATA: lt_return LIKE TABLE OF bapiret2 WITH HEADER LINE, lt_poitem LIKE TABLE OF bapimepoitem WITH HEADER LINE, lt_poitemx LIKE TABLE OF bapimepoitemx WITH HEADER LINE.