Skip to Content
0

BADI AC_DOCUMENT- CHANGE INITIAL not updating BSEG custom field

May 04, 2017 at 06:27 PM

140

avatar image

Hi ,

My requirement is to update BSEG custom field (ZMATKL) during Accounting document creation from MIGO.I have implemented BADI AC_DOCUMENT-CHANGE_INITIAL and added below code ,it updated ACCTIT-ZMATKL ,but value is not getting updated in BSEG-ZMATKL.

DATA:it_accit TYPE accit_t.

DATA:wa_accit TYPE accit.

DATA:it_sub_t TYPE accit_sub_t.

DATA:wa_accit_sub TYPE accit_sub.

it_accit = im_document-item[].
LOOP AT it_accit INTO wa_accit.
wa_accit-zmatkl = '12161904'.

MODIFY it_accit FROM wa_accit.

MOVE-CORRESPONDING wa_accit TO wa_accit_sub.

APPEND wa_accit_sub TO it_sub_t.
ENDLOOP.

ex_document-item[] = it_sub_t[].

Please help to understand ,what I am doing incorrect.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers