‎2006 May 16 8:34 AM
Hi Friends.
How to use where condition with dynamic internal table ?
Regards,
Amit Raut
‎2006 May 16 8:36 AM
‎2006 May 16 8:38 AM
Hai Amit
REPORT ZDYNAMIC_SELECT .
TABLES: VBAK.
DATA: CONDITION TYPE STRING.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
CONCATENATE 'VBELN' 'IN' 'S_VBELN.'
INTO CONDITION SEPARATED BY SPACE.
SELECT VBELN POSNR FROM VBAP INTO TABLE ITAB
WHERE (CONDITION).
LOOP AT ITAB.
WRITE 'hello'.
ENDLOOP.
Thanks & Regards
Sreenivasulu P
‎2006 May 16 8:44 AM
Hi Amit,
is the above thread is not sufficient for you, take a string variable and concatenate your where your where clause to that string and pasas it to where clause.
Regards
vijay
‎2006 May 16 9:47 AM
you cannot use where calss with dynamic internal table.
somethid like below is not possible.
loop at <ltable> assigning <l_line> where field1 eq 'ABC' .
endloop .
youhave to live with a if statement within the loop .
Regards
Raja
i hope i understand the question - where condition with dynamic internal table and not DYNAMIC WHERE CONDITION