Hi,
The following code gives the Time_out run time error.
LOOP AT i_outtab.
IF p_cust = 'X'.
Select single kunnr from vbak into sales_cust
where kunnr = i_outtab-kunnr
and ERDAT GE date.
IF sy-subrc NE 0.
DELETE i_outtab INDEX sy-tabix.
CONTINUE.
ENDIF.
ENDIF.
i_outtab1-kunnr = i_outtab-kunnr.
i_outtab1-name1 = i_outtab-name1.
i_outtab1-land1 = i_outtab-land1.
i_outtab1-ernam = i_outtab-ernam.
i_outtab1-vkorg = i_outtab-vkorg.
i_outtab1-vtweg = i_outtab-vtweg.
i_outtab1-spart = i_outtab-spart.
APPEND i_outtab1.
CLEAR i_outtab1.
ENDLOOP.
However, if the select query is omitted when the condition fails, the performance of the program is fast. Only because of this select query, it goes to run time error.
What is the issue?
Thanks,
Ezhil