04-17-2014 2:42 PM
As i am picking file from application server As it is having only two records right now
so i am using DO 2 TIMES . loop
but is case if i don't know exactly how much record it posses how to use the logic.
please see the image uploaded
04-17-2014 2:50 PM
Hi Sachin.
Try this way...
OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc EQ 0.
* DO 2 TIMES.
DO.
READ DATASET gv_file INTO li_strng.
IF sy-subrc EQ 0.
APPEND li_strng TO it_strng.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
Rewardful points if useful.
Regards,
João
04-17-2014 2:50 PM
Hi Sachin.
Try this way...
OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc EQ 0.
* DO 2 TIMES.
DO.
READ DATASET gv_file INTO li_strng.
IF sy-subrc EQ 0.
APPEND li_strng TO it_strng.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
Rewardful points if useful.
Regards,
João
04-17-2014 3:58 PM