Skip to Content

Memory problem when calling BAPI_ACC_DOCUMENT_POST

Hello,

I'm facing a problem when calling bapi BAPI_ACC_DOCUMENT_POST in a Z program that works in the following way:

1. We select an excel file that comes with 800 lines to be uploaded into an internal table

2. This internal table is processed and then a table with 800 lines is passed to the ACCOUNTGL and CURRENCYAMOUNT of the BAPI_ACC_DOCUMENT_POST structures.

3. When the progam calls the function it takes some minutes before it shows a dump that says runtime error "TSV_TNEW_PAGE_ALLOC_FAILED -- No more memory available to add rows to an internal table."

I checked this problem with the basis team and they found that the heap and extended memory is being completely used causing the memory dump, they suggested me to split the excel file into smaller parts but is not possible cause I have to generate a FI document for all the lines that comes in the Excel file.

Does anyone know if there is a problem when executing this bapi with a big amount of lines, I already tried using the STARTING A NEW TASK command but the dump keeps showing up.

I appreciate your comments and help with this issue.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 09, 2017 at 10:49 PM

    Start from SAP ONE Support :

    • See SAP-KBA 2272065 (link) as a Reference, as some recommendations are made on using "BAPI_ACC_DOCUMENT_POST" in Custom programs ...

    • See the DEMO-Report "ACC_BAPI_TEST_DOCUMENT" which also uses this BAPI ...

      Test the DEMO-Report or possibly integrate some of the code in your Custom Program as Test, and see what happens in terms of Performance / Buffer / ...

    • Test your current code with one or all of the recommendations from SAP-KBA 2272065 :

      "Implementing a 'COMMIT WORK.' after each call of BAPI_ACC_DOCUMENT_POST in your customer program"
      "Make sure that only documents with the same ledger group (in this case also SPACE is a ledger group) are combined into ONE COMMIT WORK bundle ..."

      "Use different 'Commit Levels' ..." Cfr. SAP-KBA 2303549 (link)


    Hope this helps

    Nic T.

    Add comment
    10|10000 characters needed characters exceeded