Skip to Content
avatar image
Former Member



i want to create a SO by using bapi BAPI_SALESORDER_CREATEFROMDAT2 .

Table vpap consists of an append structure ZAVBAP that into i put customer fields eg ZXXXXX type char.

How do i fill EXTENSIONIN ?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 23, 2006 at 11:49 AM

    Hi Sezer,

    I think the documentation of the function module helps u a lot for acheiving ur requirement. In that it is clearly given. See the below:

    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.

    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:

    CFIELD1, CHAR 10

    CFIELD2, CHAR 3.

    The customer also requires that these two fields can be maintained with the BAPI.

    1. Maintain structure CUTEST in table VBAP

    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:

    Field name Data element



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

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

    5. Adjust the following structures for customer enhancements to table VBAK:

    a) VBAKKOZ


    c) BAPE_VBAK


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

    a) VBEPKOZ


    c) BAPE_VBEP


    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.

    For example:

    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.

    The following entries are expected:

    Import: BAPIVBELN-VBELN = '0000004711' Document number

    BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header

    Tables: BAPISDITM-ITM_NUMBER = '000020' Item number

    BAPISDITMX-ITM_NUMBER = '000020' Item number


    You must complete the EXTENSION table as follows:

    STRUCTURE VALUEPART1 1234561234567890123

    BAPE_VBAP 0000004711000020 XYZ

    BAPE_VBAPX 0000004711000020 X

    In the above example, it is from scratch, this helps u a lot. Double click on ExtensionIN of the function module documetation and check out.


    Adithya K

    Yash Technologies Pvt. Ltd.

    • Note: Don't forget to reward points if suggestion is useful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2006 at 12:00 PM

    Hi Kaan,

    create the internal table with extention struture

    then assign values as

    extensionin-structure = 'BAPE_VBAP'.

    extensionin-valuepart1 = order_extension_struc.

    APPEND extensionin.

    extensionin-structure = 'BAPE_VBAPX'.

    extensionin-valuepart1 = order_extension_strucx.

    APPEND extensionin.

    here you can change BAPE_VBAP to your desired values

    hope this helps

    Add comment
    10|10000 characters needed characters exceeded