01-16-2009 11:26 AM
Hi ,
I am trying to update the profit center ( prctr ) through the BADI AC_DOCUMENT.
I have written the below code but its not posting and is giving me an error that document saved but not posted . Below is the code
In the variable I am passing the profit center which I am getting from Z table
_________________________________________________________________
DATA: ex_item type ACCIT,
wa_ex_item type ACCIT_SUB.
LOOP AT im_document-item INTO ex_item.
wa_ex_item-mandt = ex_item-mandt.
wa_ex_item-awtyp = ex_item-awtyp.
wa_ex_item-awref = ex_item-awref.
wa_ex_item-aworg = ex_item-aworg.
wa_ex_item-posnr = ex_item-posnr.
wa_ex_item-prctr = l_prctr.
APPEND wa_ex_item to ex_document-item.
endloop.
__________________________________________________________________
01-16-2009 11:41 AM
Hi,
Check that for which condition the message is triggering.
Try to check the condition.
Regards
Sandipan
01-17-2009 7:49 AM
The issue got resolved using the User Exit EXIT_SAPLV60B_008