2007 Jul 25 5:28 PM
Hi Sudheer,
Can u please give futher explanation?
You can do 2 loop's sequencialy, or nested loop!
loop itab into wa_itab1.
loop itab into wa_itab2.
...
endloop.
endloop.
Is it this what you are looking for?
Regards,
Marcelo Moreira
2007 Jul 25 5:31 PM
Hi Sudheer,
Can u please give futher explanation?
You can do 2 loop's sequencialy, or nested loop!
loop itab into wa_itab1.
loop itab into wa_itab2.
...
endloop.
endloop.
Is it this what you are looking for?
Regards,
Marcelo Moreira
2007 Jul 25 5:34 PM
actualli i have to read two records from table with where condition..
regards,
2007 Jul 25 5:36 PM
hi,
try to use the below logic.
sort lt_itab.
loop at lt_tab into ls_tab where <cond>
if sy-tabix GT 2.
exit.
endif.
endloop.
2007 Jul 25 5:33 PM
Hi,
Please try this ...
LOOP AT ITAB INTO WA_ITAB
FROM 1 TO 2
WHERE <condition>.
...
ENDLOOP.
Regards,
Ferry Lianto
2007 Jul 25 5:42 PM
if it 2 loop one inside other .
LOOP AT itab1.
LOOP AT itab2 WHERE *** = Itab1-***.
ENDLOOP.
ENDLOOP.
If you want to end the loop pass after the 2nd time
IF sy-index > limit. " sy-tabix > limit.
EXIT.
ENDIF.
or use
DO [n TIMES]
ENDDO.
2007 Jul 25 6:57 PM
Hi,
check the follow code:
DATA: rows type i.
DESCRIBE TABLE itab LINES rows.
LOOP itab from rows.
ENDLOOP.
Regards,
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |