Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

# Problem for dynamic structure while opening the dataset

Former Member
0 Likes
351

Hi, I'm facing a problem with # characters when opening a tab delimited file from application server. The split commands can be used when the target structure is known into respective fields, in this case the target structure is chosen dynamically, it's unicode 4.7 system, hence the # is disturbing the sequence of the transfer. Any pointers towards this issue will be rewarded.

OPEN dataset p_file for input in text mode encoding default.

if sy-subrc = 0.

DO.

read dataset p_file into <fs_line>.

if sy-subrc <> 0.

exit.

else.

insert <fs_line> into table <fs_table>.

endif.

ENDDO.

close dataset p_file.

endif.

2 REPLIES 2
Read only

Former Member
0 Likes
306

after u write the data to final table, u can loop and use split at # into fields dynamically...

Read only

0 Likes
306

Hi Ramesh,

The data has been written to the dynamic final table <fs_tab>, I can loop through this assigning the dynamic structure <fs_line> which is in dynamic structure, the field names are unknown as the structure and internal tables are created dynamically, they keep changing everytime.