Skip to Content
avatar image
Former Member

BADI AC_DOCUMENT- CHANGE INITIAL not updating BSEG custom field

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers