Create Customer Quotation (BAPI_QUOTATION_CREATEFROMDATA2) with BAPI Extension

By Amit Shetwal, Mahindra Satyam

Our client had a requirement to create customer quotation using BAPI  function module BAPI_QUOTATION_CREATEFROMDATA2 with reference to Container process  by using custom dialog program .

This BAPI is mapped with standard SAP Transaction VA21. The client requirement is to map all standards quotation fields and need to add 4 customize fields Plug in Date(DATS) , Plugin Time(TIMS) , Plug out Date(DATS), Plug out time (TIMS) which are added at line item level by creating extra tab Additional data B.

Standard quotation field we can easily mapped using BAPI but as per requirement we need to do extension of BAPI BAPI_QUOTATION_CREATEFROMDATA2 for 4 customize fields.

Steps for BAPI Extension:

1.       Append Z structure in VBAP table with 4 customize fields.

2.       In BAPI BAPI_QUOTATION_CREATEFROMDATA2  we need to use EXTENSIONIN parameter for BAPI extension

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

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

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

6.       Adjust the following structures for customer enhancements to table VBAP:

a)       VBAPKOZ

b)       VBAPKOZX

c)       BAPE_VBAP

d)       BAPE_VBAPX

7.       Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).

8.       If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.

9.       Added logic for BAPI extension in customized dialog program as below

   Value Proposition to Customer :  We can create customer quotation using BAPI and additional we can extend standard Customer Quotation Create  BAPI for the additional customized fields as per customer’s requirement.

Sales order: Create Sales Order (BAPI_SALESORDER_CREATEFROMDAT2 ) with BAPI Extension

Our client has requirement to create Sales Order using BAPI  function module BAPI BAPI_SALESORDER_CREATEFROMDAT2 with reference to Container process by using customized dialog program .

This BAPI is mapped with standard SAP Transaction VA01. The client requirement is to map all standards sales order  fields and need to add 4 customize fields Plug in Date(DATS) , Plugin Time(TIMS) , Plug out Date(DATS), Plug out time (TIMS) which are added at line item level by creating extra tab Additional data B.

 Repeat all steps for BAPI Extension used in Create Customer Quotation as above.

The same steps for extending sales order, can be done as we have done it for create quotation BAPI.

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