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: 

hi, i have 10 fields, i have to concatenate those fields seperated with til

Former Member
0 Kudos
76

hi, i have 10 fields, i have to concatenate those fields seperated with tilda... and put into the application server...in a single statement,

kindly suggest me hw to write..?

Thanx in Advance.

Akshitha.

4 REPLIES 4

Former Member
0 Kudos
55

U use CONCATENATE option. SEPARATED BY COMMA.

Former Member
0 Kudos
55

Hi Akshitha,

u can use separator of your choice (tilde in your case).

Eg:

DATA: ONE(10) VALUE 'John',

TWO(3) VALUE 'F.',

THREE(10) VALUE 'Kennedy',

NAME(20).

DATA SEPARATOR(4) VALUE 'USA'.

CONCATENATE SPACE ONE TWO THREE INTO NAME

SEPARATED BY SEPARATOR.

Regards,

Vishnu Priya

Former Member
0 Kudos
55

Hi,

check this...

DATA: v_string TYPE string.

CONCATENATE field1

field2

......

field10

INTO v_string SEPARATED BY ','.

  • you can replace the v_string with your required internal table field

And for putting that into application server u can use transfer statement.

DATA rec(80).

OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.

TRANSFER rec TO '/usr/test.dat'.

CLOSE DATASET dsn.

Hope it helps.

Former Member
0 Kudos
55

Actually It depend upon the data how you store and manipulate.

Either u can use Concatenate the fields Or you can use REPLACE statement.

Or

If you want to move Internal table value into appl. server .

Then design your Internal table like.

Begin of t_tab ,

Val1 type <data element> ,

C_tilda type c value '~' ,

Val2 type < data element> ,

C1_tilda type c value '~' ,

End of t_itab .

Hope this will suit your requirements.

Thx

Parthi

If this is helpfull reward points. Thx.