Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

badi ac_document

Former Member
0 Kudos

Hi ,

Im using badi ac_document for updating segment. Im using following code to update the segment. Kinldy let me know if im doing it correctly,

METHOD if_ex_ac_document~change_after_check.

DATA: imtab TYPE accit.

DATA: extab TYPE accit_sub.

LOOP AT im_document-item INTO imtab.

CLEAR extab.

extab-mandt = imtab-mandt.

extab-awtyp = imtab-awtyp.

extab-awref = imtab-awref.

extab-aworg = imtab-aworg.

extab-posnr = imtab-posnr.

extab-segment = '10'. "segment hard coded to 10

APPEND exTab TO ex_document-item.

endloop.

ENDMETHOD.

Bye

4 REPLIES 4

former_member206396
Active Participant
0 Kudos

hi,

i think you need to modify the already table ex_document , Please check in debug mode...

LOOP AT im_document-item INTO imtab.

CLEAR extab.

extab-mandt = imtab-mandt.

extab-awtyp = imtab-awtyp.

extab-awref = imtab-awref.

extab-aworg = imtab-aworg.

extab-posnr = imtab-posnr.

extab-segment = '10'. "segment hard coded to 10

MODIFY ex_document from exTab.

endloop.

Ram

former_member181995
Active Contributor
0 Kudos

Are you able to see any update to your segment?

0 Kudos

Thanks guys for your interest . I will test & get back to you

Former Member
0 Kudos

thnx guys it worked