Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Time Limit Exceeded

Former Member
0 Likes
1,018

Hello..

I'm testing my program.. Now when I select all possible options I get the 'Time Limit Exceeded' error.

Now my question. Is there a way to split the action because all it does is write text into a table of variables. when I get the error the table already contains 57000 records.. Thats more than half of them so.. Is there some way to restart the time limit counter after 50000 records or something?

Greets

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
949

Hi,

In your program you mention up to 5000 rows ...

Regards...

I loop for like 3000 persons in 100 tables.

So the code that stands below is executed like 3000 times..

For every row I get I split the row with the help of the table structure.

The splitted part I write to a text variable.

(here's where I think it goes wrong..)


*   get data form internal table tabname into <it>
    SELECT * FROM (tabname) INTO CORRESPONDING FIELDS OF TABLE <it>
    WHERE pernr EQ personellnumber AND begda GE startdate AND begda LE
    enddate.

    LOOP AT <it> ASSIGNING <temp>.
      LOOP AT datafields WHERE infotype = tabname+2.
        ASSIGN COMPONENT datafields-field_name OF STRUCTURE
<temp> TO <wa>.

*       check if the field should be scrambled.
        IF down_scr_flds = 'X'.
          REFRESH cust_scr.
          SELECT * FROM zcustom_scramble INTO cust_scr WHERE
profile_id = profile_id AND infotype = tabname AND field_name =
datafields-field_name.
            MOVE cust_scr-scram_value TO <wa>.
          ENDSELECT.

        ENDIF.

*        check if they want to change the pernr
        IF datafields-field_name EQ 'PERNR' AND down_pernr = 'X'.
          LOOP AT pernrs_oldnew WHERE old_pernr = <wa>.
            MOVE pernrs_oldnew-new_pernr TO <wa>.
          ENDLOOP.
        ENDIF.

        MOVE <wa> TO output_tab-data+datafields-field_start.

      ENDLOOP
      APPEND output_tab.
    ENDLOOP.

5 REPLIES 5
Read only

Former Member
0 Likes
950

Hi,

In your program you mention up to 5000 rows ...

Regards...

Read only

0 Likes
949

Isn't there a better way to solve this problem?

Like execute the program in job mode or something??

Read only

0 Likes
949

Run the program in the background.

Read only

Former Member
0 Likes
949

can u paste ur code here..

Read only

0 Likes
949

I loop for like 3000 persons in 100 tables.

So the code that stands below is executed like 3000 times..

For every row I get I split the row with the help of the table structure.

The splitted part I write to a text variable.

(here's where I think it goes wrong..)


*   get data form internal table tabname into <it>
    SELECT * FROM (tabname) INTO CORRESPONDING FIELDS OF TABLE <it>
    WHERE pernr EQ personellnumber AND begda GE startdate AND begda LE
    enddate.

    LOOP AT <it> ASSIGNING <temp>.
      LOOP AT datafields WHERE infotype = tabname+2.
        ASSIGN COMPONENT datafields-field_name OF STRUCTURE
<temp> TO <wa>.

*       check if the field should be scrambled.
        IF down_scr_flds = 'X'.
          REFRESH cust_scr.
          SELECT * FROM zcustom_scramble INTO cust_scr WHERE
profile_id = profile_id AND infotype = tabname AND field_name =
datafields-field_name.
            MOVE cust_scr-scram_value TO <wa>.
          ENDSELECT.

        ENDIF.

*        check if they want to change the pernr
        IF datafields-field_name EQ 'PERNR' AND down_pernr = 'X'.
          LOOP AT pernrs_oldnew WHERE old_pernr = <wa>.
            MOVE pernrs_oldnew-new_pernr TO <wa>.
          ENDLOOP.
        ENDIF.

        MOVE <wa> TO output_tab-data+datafields-field_start.

      ENDLOOP
      APPEND output_tab.
    ENDLOOP.