Skip to Content
author's profile photo Former Member
Former Member

Badi AC_DOCUMENT for updating prctr

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.

__________________________________________________________________

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2009 at 11:41 AM

    Hi,

    Check that for which condition the message is triggering.

    Try to check the condition.

    Regards

    Sandipan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2009 at 07:49 AM

    The issue got resolved using the User Exit EXIT_SAPLV60B_008

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.