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

Getting Time Out Dump while Executing Report

0 Likes
575

Hello ABAP Experts,

I am trying to execute a report, but while debugging I am getting time out dump on 2nd SELECT statement.

SELECT vbeln

          matnr

          werks

          lgort

          volum

          lgnum

     FROM lips

     INTO TABLE i_volume

     FOR ALL ENTRIES IN  i_likp

     WHERE vbeln EQ i_likp-vbeln

    AND lgort IN s_lgort

     AND werks IN s_werks.

IF i_volume[] IS INITIAL.

     MESSAGE text-001 TYPE 'I'

     STOP.

   ENDIF.

   SORT i_volume BY vbeln.


SELECT matnr

              meinh

          umrez

          umren

     FROM marm

     INTO TABLE gt_marm

     FOR ALL ENTRIES IN i_volume

     WHERE matnr = i_volume-matnr

       AND meinh = 'ME' OR meinh = 'KG'.

   IF sy-subrc EQ 0.

     SORT gt_marm BY matnr.

     DELETE ADJACENT DUPLICATES FROM gt_marm COMPARING matnr.

   ENDIF.


Can you please help me out there ?


Thanks

Swanand

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
542

Hi Swanand,

try

     WHERE matnr = i_volume-matnr

       AND ( meinh = 'ME' OR meinh = 'KG' ).

you should also filter first materials to a temporary table with only distinct matnr entries and use it instead of i_volume.

regards,

Edgar

3 REPLIES 3
Read only

Former Member
0 Likes
543

Hi Swanand,

try

     WHERE matnr = i_volume-matnr

       AND ( meinh = 'ME' OR meinh = 'KG' ).

you should also filter first materials to a temporary table with only distinct matnr entries and use it instead of i_volume.

regards,

Edgar

Read only

Former Member
0 Likes
542

Hey use a single condition instead of multiple conditions in where clause.

WHERE matnr = i_volume-matnr

       AND meinh IN ( 'ME' , 'KG' ).


Read only

Former Member
0 Likes
542

Hi,

Move i_volume entries to a temporary internal table and delete adjacent duplicates from temp table  before using the 2nd Select statement and also build a range table for MEINH values.

Regards,

Suresh