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

Multiple separators in a file...

aris_hidalgo
Contributor
0 Likes
1,523

Hello Experts,

I have a file which has mutiple kinds of separator like '|', tab, etc. So,

how do I split my string table since I do not the kind of separator the file is using during

runtime.

Thank you guys and take care!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,167

Hi viraylab,

Can you explain the problem in-extenso?

Regards,

Nidhi Kothiyal

7 REPLIES 7
Read only

Former Member
0 Likes
1,168

Hi viraylab,

Can you explain the problem in-extenso?

Regards,

Nidhi Kothiyal

Read only

0 Likes
1,167

The file is generated by a legacy system and I need to uplaod it. The problem is that for some files, they have 2 or more kinds of delimiters like '|' and ','. So I need to do a dynamic checking of delimiter so I can split it correctly.

Read only

0 Likes
1,167

are you using LSMW?

if yes then there you can write your code to convert all separators to one particular type.

if not,

then just after gui_upload you can put your code to replace all type of delimiter by a single type.

Read only

Former Member
0 Likes
1,167

search and replace all separators by a single separator.

then use this separator for all files.

Read only

former_member188827
Active Contributor
0 Likes
1,167

is the file getting generated automatically?is your program running in background?if no provide a separator field on selection screen so that user can enter separator on screen and you can split your text accordingly.

Read only

Former Member
0 Likes
1,167

Firstly,

i think you should you command FIND to find for each separator, then replace each ones by other same separator (for instance replace all |, tab by '#').

Secondly,

split your string to table.

Hope this help

Read only

Former Member
0 Likes
1,167

Hi,

Add, remove all occurences ....

Thanks,

Krishna.