on 07-08-2017 11:24 AM
I have added a custom field in MIRO line item I want it to be get posted thru bapi
BAPI_INCOMINGINVOICE_CREATE
can somebody help me bapi extension process for this particular bapii tried this one by using enhancement.
1. Populate the structure:
DATA: I_EXTNSN TYPE STANDARD TABLE OF BAPIPAREX,
wl_ext TYPE bapiparex.
wl_ext-structure = 'MEPOHEAD'.
wl_ext-valuepart1 = field1
wl_ext-valuepart2 = field2
APPEND wl_ext TO i_extnsn.
CLEAR wl_ext.
2. Pass the table to extension parameter
CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = X_IN_HEADER
IMPORTING
INVOICEDOCNUMBER = L_DOCNO
tables
itemdata = I_IN_ITEM
TAXDATA = it_taxdata
WITHTAXDATA = I_WITHTAXDATA
return = I_RETURN
extensionin = I_EXTNSN
3. Do the following enhancement:
-In include LMRM_BAPIF32 (Form mapping_ivext_park), get the extension from BAPI parameter to your enhancement
it_extension[] = i_extensionin.
-In include LMRM_BAPITOP, declare your internal table/work area.
DATA: it_extension TYPE STANDARD TABLE OF bapiparex,
wa_ext TYPE bapiparex.
-In include LMRM_BAPIF12 (Form rbkpv_fill_from_headerdata) pass the new values to RBKP structure.
READ TABLE it_extension INTO wa_ext WITH KEY structure = 'MEPOHEAD'.
IF sy-subrc EQ 0.
MOVE: wa_ext-valuepart1 TO e_rbkpv-zfield1, "Field1
wa_ext-valuepart2 TO e_rbkpv-zfield2. "Field2
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.