Create Sales Order (BAPI_SALESORDER_CREATEFROMDAT2) with BAPI Extension

By Ugur Baris Turkeli, Istanbul

Our client had a requirement to create customer sales orders using BAPI function module BAPI_SALESORDER_CREATEFROMDAT2 with using custom fields (ZZ* or YY* fields) which are appended on VBAP table with using append structure.

We can easily create sales order with using standard fields via BAPI but as per requirement we need to use extension of BAPI_SALESORDER_CREATEFROMDAT2 for 13 customize fields.

Steps for BAPI Extension:

Append ZAVBAP structure in VBAP table with 13 customize fields. Fields must begin with ZZ* or YY* naming .

In BAPI_SALESORDER_CREATEFROMDAT2 we need to use EXTENSIONIN parameter for BAPI extension

You can use this parameter to transfer user-specific enhancements to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure. You can use also this extension VBAK, VBAP, VBEP tables.

Because the BAPIs work with checkboxes, you must also define a customize structure (ZABAPE_VBAPX) checkbox for the customer structure. It should be structured like this

Define these customer structures in the structures VBAPKOZ and VBAPKOZX using INCLUDE or APPEND.

Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image