Application Development 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: 

To pick the particular content from the text file.

Former Member
0 Kudos

Hi,

My text file look like this.

//·¢Æ±Ò»£º

0~001306981140<b>00010004</b>11998051205<b>96110002</b>76233.350.17~

0~²ÆÎñÈí¼þÌ×ËÄÄ£¿é176233.350.1711076.6676233.350~1510

//·¢Æ±¶þ£º

0~001306981140<b>00010007</b>21998051205<b>96110004</b>40482.00~

0~²ÆÎñÈí¼þÌ×°ËÄ£¿é139780.000.175780.0039780.000~1510

0~Èí´ÅÅ̺Ð3.5"//10702.000.17102.00<b>00010002</b>0~1510

~404<b>96110003</b>39780.00~0.17

Specific requirement(for the first case) is to pick the number(00010004) exactly next to fourth tilt

and ,the number(00010004),exactly next to eigth tilt has to put it into an internal table.

This process has to continue for all the items after every double slash.

for example my internal table should look like,

Column1 Column2

00010004 96110002

00010007 96110004

00010002 96110003

........ ........

........ ........

Pls help me reg this.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI Bala..

just take this Entire text into a character string as ws_text(600)

and

create a table with field string of char(15) then split this string at ~~.

use this type of code.

<b>

data:
 ws_text(600),
 ws_single(15),
 ws_col1(15),
 ws_col2(15).

data:
  t_value like standard table 
               of ws_single.

**upload the text file and move the entire text into ws_text until double  // **

  split ws_text at '~~' into table t_value.
 
  read table t_value into w_col1 index 5.
  read table t_value into w_col2 index 9.

</b>

if it helps reward with points

Regards Rk

1 REPLY 1

Former Member
0 Kudos

HI Bala..

just take this Entire text into a character string as ws_text(600)

and

create a table with field string of char(15) then split this string at ~~.

use this type of code.

<b>

data:
 ws_text(600),
 ws_single(15),
 ws_col1(15),
 ws_col2(15).

data:
  t_value like standard table 
               of ws_single.

**upload the text file and move the entire text into ws_text until double  // **

  split ws_text at '~~' into table t_value.
 
  read table t_value into w_col1 index 5.
  read table t_value into w_col2 index 9.

</b>

if it helps reward with points

Regards Rk