‎2007 Aug 14 9:33 AM
1.In flatfile if u find decimals how will u face it?
2.Regarding 'for all entries' keyword: The select stmt which
contains 'for all entries' keyword it compares its internal table
(jtab) with for all entries of internal table(itab) in prior select
stmt . then if suppose itab contains no entries, when we checked with
where condition then what does the for all entries select stmt
compares?
‎2007 Aug 14 9:42 AM
Hi Mohan
if u dont check if itab is initial or nor .
then there is no use in where condition it will select all rows from dbtable
please check with one example if i am wrong.
reward points to all helpful answers
kiran.M
‎2007 Aug 14 9:39 AM
If you use FOR ALL ENTRIES and the table you compare to is empty, then it selects ALL of the entries from the SELECT query. If you selected from MARA, and your itab is empty, it will select the entire MARA table, for example.
Before you use FOR ALL ENTRIES, you MUST check that it's not empty.
IF itab[] IS NOT INITIAL.
SELECT *
FROM MARA
INTO JTAB
FOR ALL ENTRIES IN ITAB
WHERE MATNR = ITAB-MATNR.
ENDIF.
‎2007 Aug 14 9:39 AM
Hi..
These are the solutions.
1.In flatfile if u find decimals how will u face it?
<b>Declare the internal table fields as Character fields while uploading data from Flatfile. Even if there is a Decimal field , Read it into Character field.
After that you can convert into Decimal again.</b>
2.Regarding 'for all entries' keyword: The select stmt which
contains 'for all entries' keyword it compares its internal table
(jtab) with for all entries of internal table(itab) in prior select
stmt . then if suppose itab contains no entries, when we checked with
where condition then what does the for all entries select stmt
compares?
<b>When the Driver table itab contains no Records it will intrepret like All records .
So it will fetch all records from the Table.
That's why we must check whether the driver table is empty before using FOR ALL ENTRIES.</b>
<b>Reward if Helpful.</b>
‎2007 Aug 14 9:42 AM
Hi Mohan
if u dont check if itab is initial or nor .
then there is no use in where condition it will select all rows from dbtable
please check with one example if i am wrong.
reward points to all helpful answers
kiran.M