FOR ALL ENTRIES IN sickness..

Some notes on using FOR ALL ENTRIES IN in Abap..



A.) Make sure the internal table you use for the FOR ALL ENTRIES command is not empty..

or else, you will pick up all the records from the table you had a SQL command..



SELECT * FROM PA0001

INTO CORRESPONDING FIELDS OF LI_PA0001

FOR ALL ENTRIES IN li_pernr

WHERE pernr EQ li_pernr-pernr.



Solution :

Have the table checked first.



CHECK li_pernr IS NOT INITIAL.



B.) Duplicate records retrieved by a SQL statement that used the FOR ALL ENTRIES IN

command are removed.



Solution :

On your SQL statement retrieve the key fields of the table, this will guarantee you that records are always unique..

C.) my friend said there was 3rd issue on the FOR ALL ENTRIES IN command,, but he can't remember it.. I will post it when I know it..

No comments:

Post a Comment