Select ... For All Entries in ABAP/4
You can specify condition of where clause using intenal table using option "FOR ALL ENTRIES IN
Example
DATA: itab TYPE TABLE OF vbak WITH HEADER LINE,
itab2 TYPE TABLE OF vbap WITH HEADER LINE.
SELECT * INTO TABLE itab FROM vbak
WHERE vbeln BETWEEN ’1000000000’ AND ’4999999999’.
IF NOT itab[] is initial.
SELECT * INTO TABLE itab2 FROM vbap
FOR ALL ENTRIES IN itab
WHERE vbeln = itab-vbeln
AND matnr LIKE ’F%’.
ENDIF.
- thitima's blog
- 11751 reads
Post new comment