Skip to Content
0
Former Member
Aug 01, 2007 at 10:45 AM

REGARDING SELECT

14 Views

Hi experts,

is it feasible to use 4-5 select statements in a nested select statement.if no then what would be the alternative..i could not use join as well bcz i am using BSEG TABLE which is a cluster table..i am sending you the code.

when i try to execute it,it gives a short dump with error 'time limit exceeds'..plz solve it by giving right code

SELECT BUDAT BELNR FROM BKPF INTO (WBUDAT, WBELNR) WHERE BUDAT IN P_DATE.

SELECT BUKRS VBELN FROM VBRK INTO (WBUKRS, WVBELN) WHERE BUKRS = CMP_CD.

SELECT BUKRS BELNR KOART SHKZG DMBTR FROM BSEG INTO CORRESPONDING FIELDS OF ITAB

WHERE BUKRS = WBUKRS

AND BELNR = WBELNR

AND LIFNR IN VENDOR.

SELECT NAME1 ORT01 PSTLZ STRAS FROM LFA1 INTO (ITAB-NAME1,ITAB-ORT01,ITAB-PSTLZ,ITAB-STRAS) WHERE LIFNR = ITAB-LIFNR.

SELECT VBELN FROM VBRK INTO ITAB-VBELN WHERE BUKRS = ITAB-BUKRS.

APPEND ITAB.

ENDSELECT.

ENDSELECT.

ENDSELECT.

ENDSELECT.

ENDSELECT.

LOOP AT ITAB.

WRITE:/ ITAB-NAME1,ITAB-ORT01,ITAB-VBELN,ITAB-BELNR.

ENDLOOP.

regards,

raman.