2008 Jun 03 1:00 PM
hi ,
when we are using 2 internal tables in program, we have decided to use for all entries statement to retrieve data but unfortunately there are no records in the first internal table. what will be the result ? ( 2nd internal table contains records).
regards
Raghava
hi ,
when we are using 2 internal tables in program, we have decided to use for all entries statement to retrieve data but unfortunately there are no records in the first internal table. what will be the result ? ( 2nd internal table contains records).
regards
Raghava
2008 Jun 03 1:02 PM
Hi,
The SELECT query will retrieve all the records into 2nd internal table.
Rgds,
Bujji
2008 Jun 03 1:04 PM
hi,
The total record wil be fetched in to second internal table.
Regards
Sandeep Reddy
Edited by: Sandeep Reddy on Jun 3, 2008 2:04 PM
2008 Jun 03 1:08 PM
Hi...
If there's no record in the first internal table, then it will retrieve all the records from the Database table mentioned in the SELECT Query .
For that purpose only, It was asked to do some prerequiste check before using the FOR ALL ENTRIES..
Sort the internal table..
check internal table is not initial.
Reward Maximum Points if useful..
2008 Jun 03 1:09 PM
HI.
it will give dump only.so u sholud chck first table has record or not.if yes then put your second select statment,
refer this code.
IF it_bill_data[] IS NOT INITIAL.
SELECT vbeln
kunnr
tzonis
FROM likp
INTO TABLE it_deli_data1
FOR ALL ENTRIES IN it_bill_data
WHERE vbeln = it_bill_data-vgbel.
endif.
REward all helpfull answers
regards.
Jay
2008 Jun 03 1:13 PM
WHENEVER U USE FOR ALL ENTRIES
ALWAYS DO A CHECK WHETHER THE FIRST INTERNAL TABLE IS INITIAL OR NOT
EQ
SELECT MATNR
MTART
MATKL
MBRSH
MEINS FROM MARA INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR
AND MTART IN S_MTART
AND MATKL IN S_MAKTL.
IF IT_MARA IS NOT INITIAL.
SELECT MATNR
MAKTX
FROM MAKT INTO TABLE IT_MAKT
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR EQ IT_MARA-MATNR
AND SPRAS EQ SY-LANGU.
ENDIF.IF SUPPOSE IF WE DON'T USE THE IF CONDITION HERE ALL THE ALL THE RECORDS OF THE SECOND SELECT STATEMENT WILL BE SELECTED IT IGNORES THE WHERE CONDITION.
SO IT IS MANDATORY TO CHECK THIS CONDITION WHENEVER U USE FOR ALL ENTRIES
REWARD POINTS IF HELPFUL
2008 Jun 03 1:21 PM
hi ragavendra,
we have to use for all entries in the case if we want to selct data from more than two tables but u said that there is no data in the first internal table and also so there is no need to use for all entries if you use select query we can get the details form only the second table.
rewards if usefull,
thanks,
kalyan.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |