Skip to Content
avatar image
-1
Former Member

i want to send Report ALV Output to user via spool if its taking More time for output.

i want to send Report ALV Output to user via spool if the time taken to display output is taking more than 15 seconds ,how can i set timer and send this data to user via spool via object oriented ALV . If less than 15 seconds output can be shown then it will be shown with Object oriented ALV . Also Docking container will be good or custom container ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 10, 2017 at 10:14 PM

    IMHO if it takes more than 15 seconds to display ALV output then there is something seriously wrong with your system.

    Most time is usually spent selecting data from the database (pre-HANA at least). Considering that, I'm not sure how exactly you're going to accomplish this design. Like "select half of the data, oops 16 seconds, ah screw this, I'm scheduling myself in a background job"? And how would you "send via spool"? The users normally don't have access to SP01 and it's sure as heck much less convenient than ALV on screen. Not to mention you might run into the notorious 255 characters per line problem.

    I wouldn't be pleased with this at all if I was a user. Might want to look into the ways to improve the performance or guide the users to enter better selection criteria. Some standard SAP transactions (e.g. ST05) start with checking number of records and then ask for confirmation. It's a bit lame but still looks like a better option IMHO.

    With HANA I guess this will be redundant anyway.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2017 at 07:23 AM
    -1

    Hi Kaustubh,

    You can use :

    DATA time1 TYPE i.

    GET RUN TIME FIELD time1.

    If you are using OOPS write the above statement twice :

    Once before the data selection and once just before the display (set_table_for_first_display).

    Now substract the two times.

    total_time_taken = time(after_execution) - Time(before_execution)

    If this is greater than 15sec then you can bypass the call to method 'set_table_for_first_display'.

    Regards,

    Ankit Mahajan

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 10, 2017 at 10:37 PM
    -1

    Hi Kaustubh

    From what I understand you are trying to find the run time of your program Check this link I had used it to display my run-time of the program earlier as I had users complaining that the program is too slow and I updated that to a table. https://wiki.scn.sap.com/wiki/display/Snippets/ABAP+-+Program+to+get+run+time+for+a+given+code

    You can use this after the select program and however what I did not understand what will you show as output and not sure the way to stop it in between. Right way is probably to incorporate

    - Join statement to avoid multiple select

    - Use parallel processing

    - Read the code inspector result and see how you could optimize

    Below are some web link which I found useful ;

    https://archive.sap.com/discussions/thread/312137

    https://wiki.scn.sap.com/wiki/display/ABAP/Code+Inspector

    https://wiki.scn.sap.com/wiki/display/ABAP/Parallel+Processing

    Let me know if this helps.

    Regards

    Vinita

    Add comment
    10|10000 characters needed characters exceeded