Skip to Content

Function Module time out

Hello expert

I have faced a problem with my function module that prints an account report for a web service.

When running my function module, it gives me the error Dump timeout, through analysis I realized that it is taking a long time to read a table. however I didn't have this problem before with the same function module it took around 1 to 3 minutes to load the data, but now it does around 10 to 15 minutes.
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Aug 27 at 10:08 AM

    Hello Jose Lopes

    Please use "Comment" when adding additional information to question. "Answer" is for solution proposal only.

    You're probably reading the BSAK without using the primary key or any index, that's why it takes so long. But that's just a guess. You need to show your logic.

    Kind regards,
    Mateusz
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27 at 11:26 AM

    You already called SE30 (you could call SAT as SE30 is nearly obsolete)

    Could you also execute a SQL trace with ST05 and analyze the SQL statements that hinder your program. (look for bad performance access or even full table scan)

    I also suspect you have some SELECT embeded in some LOOP, could you try to remove those, either changing the previous access to database, or using some FOR ALL ENTRIES as a lowe problem.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27 at 10:04 AM
    -1

    yes i did the trace in se30

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27 at 10:06 AM
    -1

    se30 trace


    imagem.jpg (71.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • It doesn't look complex to adapt. But of course you'll need to re-test the selection logic.

      The first thing I see is that one of the first rules in ABAP is to not use SELECT * (unless there are few columns or you use more than given % of columns).

      I don't see the SELECT ... FROM bsik.

      You can do things like that, either using join via EXISTS, or via GTT, or pseudo joins (less efficient than previous solutions) via FOR ALL ENTRIES, or AMDP:

      SELECT columns FROM bkpf
          WHERE EXISTS ( SELECT * FROM bsik " or NOT EXISTS, depends what theoretically returns less records
              WHERE " here the same selections as your original SELECT ... FROM BSIK
                AND ...
                AND bkpf~bukrs = bsik-bukrs
                AND bkpf~belnr = bsik-belnr
                AND bkpf~gjahr = bsik-gjahr )
            AND stblg NE space
          INTO TABLE @DATA(bkpf_lines).

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.