Skip to Content
avatar image
Former Member

help in performance

hi,

i wont to which loop have beterr performence with work area or without work area

like that?

LOOP AT t_tcurr.

MOVE: t_tcurr-gdatu TO ti_date-date ,

t_tcurr-ukurs TO ti_date-exchange_rate.

APPEND ti_date.

ENDLOOP.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 11, 2007 at 12:47 PM

    Hello,

    If the table has a lot of entries LOOP AT TABLE xxx assigning <fs> is faster, but there is a tool, where you can find out by yourself which variant is faster:

    - go to SE30

    - click on 'Tips & Tricks'

    - put the coding for the loop without the workarea in the left window

    - put the coding for the loop with the workarea or <fs> in the right window

    - click on measure runtime

    The tool will execute the coding in both windows ten times and build the avarage runtime. You can directly see which coding is faster based on the actual data in your system.

    Be aware that you have to put all the data declarations into the coding in each window since the coding in each window is 'stand alone'.

    Hope that helps,

    Michael

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 12, 2007 at 06:21 AM

    Hi

    with reference to internal table

    the better way of declaring the internal tbale is ike this

    Define structure with which fields you want

    TYPES : BEGIN OF ST_OBJID_SH,

    OTYPE TYPE HRP1000-OTYPE,

    OBJID TYPE HRP1000-OBJID,

    END OF ST_OBJID_SH.

    declare the internal table body like this

    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

    declare internal table work area like this

    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

    This is the better way to use the internal able with reference to PERFORMANCE

    SAP all ways advises this only

    <b>Reward if usefull</b>

    Add comment
    10|10000 characters needed characters exceeded