2007 Mar 14 6:50 AM
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.
2007 Mar 14 7:20 AM
2007 Mar 14 7:25 AM
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
2007 Mar 15 3:31 PM
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.
2007 Mar 23 7:11 AM
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.