Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BADI AC_DOCUMENT

Hi guys: Please help me....

i am trying to substitute the internal order on a line item if a vendor master has the internal order stored in a special field. the BADI doesnt seem to substitue it...here is my code

method IF_EX_AC_DOCUMENT~CHANGE_AFTER_CHECK.

break bdaniells.

DATA: ex_item type ACCIT,

wa_ex_item type ACCIT_SUB,

w_KONZS type lfa1-KONZS,

w_lifnr type lfa1-lifnr.

LOOP AT im_document-item INTO ex_item.

if ex_item-koart eq 'K'.

move ex_item-lifnr to w_lifnr.

endif.

if ex_item-koart eq 'S'.

select single KONZS into w_KONZS from lfa1

WHERE lifnr eq w_lifnr.

wa_ex_item-aufnr = w_KONZS.

APPEND wa_ex_item to ex_document-item.

endif.

endloop.

endmethod.

Former Member
Not what you were looking for? View more on this topic or Ask a question