Application Development and Automation 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: 
Read only

badi ac_document

Former Member
0 Likes
1,807

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
Read only

former_member206396
Active Participant
0 Likes
1,106

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

Read only

Former Member
0 Likes
1,106

Are you able to see any update to your segment?

Read only

0 Likes
1,106

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

Read only

Former Member
0 Likes
1,106

thnx guys it worked