Code :
REPORT ZSOUMYO_DEMO.
types: BEGIN OF ty_str,
id TYPE i,
name TYPE char20,
address TYPE char100,
END OF ty_str.
DATA: it_str TYPE STANDARD TABLE OF ty_str,
wa_str TYPE ty_str.
wa_str-id = '1'.
wa_str-name = 'prasun'.
wa_str-address = 'kolkata'.
APPEND wa_str to it_str.
wa_str-id = '2'.
wa_str-name = 'kalyan'.
wa_str-address = 'delhi'.
APPEND wa_str to it_str.
wa_str-id = '3'.
wa_str-name = 'rita'.
wa_str-address = 'Mumbai'.
APPEND wa_str to it_str.
wa_str-id = '4'.
wa_str-name = 'suman'.
wa_str-address = 'pune'.
APPEND wa_str to it_str.
wa_str = it_str[ lines( it_str ) ].
write:/ wa_str-id,
wa_str-name,
wa_str-address.
types: BEGIN OF ty_str,
id TYPE i,
name TYPE char20,
address TYPE char100,
END OF ty_str.
DATA: it_str TYPE STANDARD TABLE OF ty_str,
wa_str TYPE ty_str.
wa_str-id = '1'.
wa_str-name = 'prasun'.
wa_str-address = 'kolkata'.
APPEND wa_str to it_str.
wa_str-id = '2'.
wa_str-name = 'kalyan'.
wa_str-address = 'delhi'.
APPEND wa_str to it_str.
wa_str-id = '3'.
wa_str-name = 'rita'.
wa_str-address = 'Mumbai'.
APPEND wa_str to it_str.
wa_str-id = '4'.
wa_str-name = 'suman'.
wa_str-address = 'pune'.
APPEND wa_str to it_str.
wa_str = it_str[ lines( it_str ) ].
write:/ wa_str-id,
wa_str-name,
wa_str-address.
Output :
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment