Skip to Content
0

BAPI_INCOMINGINVOICE_CREATE extension

Jul 08, 2017 at 10:24 AM

695

avatar image

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 bapi
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Elzkie La Jul 10, 2017 at 08:23 AM
0

i 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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi,

OP said: "I have added a custom field in MIRO line item"

would your answer (Header) be valid too for line item?.

Best regards,

Pablo

0

Yes you can. My point is extension not working in that BAPI if you will not do enhancement. Try to debug bapi and check where is passing the data to RSEG then it will solve your issue.

0

Hi Guys,

I want to add PERNR field at accounting data level in BAPI_INCOMINGINVOICE_CREATE.

Can someone help me

0