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

Questions about BAPI_ACC_GL_POSTING_CHECK and BAPI_ACC_GL_POSTING_POST.

Dear Experts,

I'm using BAPI_ACC_GL_POSTING_CHECK and BAPI_ACC_GL_POSTING_POST to post GL accounting documents into SAP. they can do their job successfully, But I have some questions:

1. in BAPI_ACC_GL_POSTING_CHECK, every time it gets an FI document number from number range. No matter it checks OK or not, the number cannot be used anymore.

Can I put the number back if check error? Or should I use another function module?

2. The functions did not check 'amount' field. if amount = 0, it gave me "check successfully" or "post successfully" in return message. But actually, I cannot find any document in BKPF and BSEG. the number is used too.

Do you know any other function modules can give me actual message about the post result?

Thank you for your answer.

Joanne

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Sep 29, 2011 at 09:56 AM

    Hi Joanne,

    In the BAPI use the structure RETURN in the interface, for instance T_RETURN,

    After, do this coding, and for instance, store in a customer table (ztable)

     READ TABLE t_return WITH KEY type   = 'S'
                                   id     = 'RW'
                                   number = '605'.
    
        UPDATE ztable
           SET belnr = t_return-message_v2(10)
               bukrs = t_return-message_v2+10(4)
               gjahr = t_return-message_v2+14(4)
          WHERE ....
    

    Or debug after the BAPI and see the data for T_RETURN.

    I hope this helps you

    Regards

    Eduardo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2011 at 10:18 AM

    Hi

    Something doesn't sound good:

    1. in BAPI_ACC_GL_POSTING_CHECK, every time it gets an FI document number from number range. No matter it checks OK or not, the number cannot be used anymore.

    Can I put the number back if check error? Or should I use another function module?

    The BAPI_ACC_GL_POSTING_CHECK shouldn't get any FI number, this BAPI is for the checking only

    2. The functions did not check 'amount' field. if amount = 0, it gave me "check successfully" or "post successfully" in return message. But actually, I cannot find any document in BKPF and BSEG. the number is used too. 
    Do you know any other function modules can give me actual message about the post result?

    In generally if a single item has amount equal to 0 is ignored, so the document can be posted, the problem can be all items have the amount equal to 0: but this is very strange posting and it should be checked before posting it.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 29, 2011 at 03:04 PM

    like Mr E_HINOJOSA say , need the do the commit before BAPI_ACC_GL_POSTING_POST

    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.