Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

NEED ONE HELP

Former Member
0 Likes
432

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
412

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

3 REPLIES 3
Read only

GuyF
Active Participant
0 Likes
412

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.

Read only

varma_narayana
Active Contributor
0 Likes
412

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>

Read only

Former Member
0 Likes
413

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