Skip to Content
avatar image
Former Member

bapi extension for BAPI_PO_CREATE1

I have added 2 fields in EKPO table now i want update the same using bapi BAPI_PO_CREATE1 please guide me with bapi extension or a sample program will be of great help

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 11 at 11:47 AM

    So information i can give , I did it for Purchase indent, at me51n. Have a look on below code.


    DATA : wa_te_meqitem TYPE bapi_te_mereqitem,
    wa_te_meqitemx TYPE bapi_te_mereqitemx . " in this structure i was added the custom z fields. so, line level fields , Hope you know in me51 there is header.

    wa_te_meqitem-preq_item = '10' "Line number i am passing.

    wa_te_meqitem-zz1 = 'value1'.
    wa_te_meqitem-zz2 = 'value2.

    wa_te_meqitemx-preq_item = 'X'.
    wa_te_meqitem-zz1 = 'X'.
    wa_te_meqitem-zz2 = 'X.

    wa_extensionin-structure = 'BAPI_TE_MEREQITEM'. "In this structure i was added the z fiedls.
    wa_extensionin+30 = wa_te_meqitem.
    APPEND wa_extensionin TO it_extensionin.

    wa_extensionin-structure = 'BAPI_TE_MEREQITEMX'.
    wa_extensionin+30 = wa_te_meqitemx.
    APPEND wa_extensionin TO it_extensionin.

    Passing to Bapi function module. hope You understood.


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11 at 12:07 PM

    See the following SAP-KBA's on practices, FAQ and Unicode-Issues that might pop up :

    • SAP-KBA 1895028 "Custom fields are not been transferred when using BAPI" : link
    • SAP-KBA 582221 "FAQ: BAPIs for purchase orders" (Question 15) : link
    • SAP-KBA 509898 "BAPI enhancement concept and Unicode : link


    A Sample is provided here (.doc) : link or in this SAP-Blog : link

    Add comment
    10|10000 characters needed characters exceeded