2007 Apr 03 5:03 PM
Folkes
Could some explain the LOOP ..ENDLOOP structure. why this is basically used?
if I have sum thing like this
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZVAR1'.
< logic x>
ENDLOOP
I am assuming "logic x " will be executed only when VNAM = 'ZVAR1'. am I Correct?
Thanks
Raj
2007 Apr 03 5:05 PM
hi,
Yes...you are very much correct....
to know more refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/loop.htm
Regards,
Santosh
Hi,
LOOP AT ..is used to process the records of the internal table...And the WHERE clause is used to filter the records..
So in your case..The internal table I_T_VAR_RANGE is processed and it will process the records where the column VNAM has got the value ZVAR1.
Thanks,
Naren
2007 Apr 03 5:05 PM
hi,
Yes...you are very much correct....
to know more refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/loop.htm
Regards,
Santosh
2007 Apr 03 5:05 PM
Hi,
LOOP AT ..is used to process the records of the internal table...And the WHERE clause is used to filter the records..
So in your case..The internal table I_T_VAR_RANGE is processed and it will process the records where the column VNAM has got the value ZVAR1.
Thanks,
Naren
2007 Apr 03 5:06 PM
Hi
You are correct it will logic x when it satisfies the where condition.
Regards
Haritha.
2007 Apr 03 5:06 PM
hi
Loop is generally used to perform operations on all the records being fetched from the internal table.
in ur case logic x will be performed for all the records that satisfy the VNAM = 'ZVAR1'
condition.
regards,
madhu
2007 Apr 03 5:12 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |