‎2008 Dec 03 12:22 PM
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
‎2008 Dec 04 11:04 AM
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
‎2008 Dec 05 2:35 AM
Are you able to see any update to your segment?
‎2008 Dec 05 4:26 AM
Thanks guys for your interest . I will test & get back to you
‎2008 Dec 10 12:53 PM