‎2009 Jul 04 9:34 AM
Hi,
I have a string which has values(9) splitted at '#'. Now I want to send the values into one work area of set of fields(9 fields,which is equal to the value present in the string) splitted at at '#$'.Can any one seggest?
Edited by: Julius Bussche on Jul 4, 2009 1:25 PM
Subject title improved.
‎2009 Jul 04 9:44 AM
ya you have declr the two variable
data: name(17) type c ,
temp(8) type c.
data: or_name type c value 'SDN $ COMMUNITY'.
SPLIT ORNAME AT '$' INTO NAME TEMP.
BY
IMUTHU.
‎2009 Jul 04 9:46 AM
Thanks Muthu,
But I have a different structure for my internal table.How to move the splitted values to individual fields dynamically.
‎2009 Jul 04 9:46 AM
ya you have declr the two variable
data: name(17) type c ,
temp(8) type c.
data: or_name type c value 'SDN $ COMMUNITY'.
SPLIT ORNAME AT '$' INTO NAME TEMP.
BY
IMUTHU.
‎2009 Jul 04 9:50 AM
Please be more specific about your requirement.
Give the String example and also how you want your output to be.
Regards
Karthik D
P.S.: Give a more meaningful subject line in the future
‎2009 Jul 04 11:19 AM
Hi Jjammy ,
DATA : BEGIN OF WA_TEMP,
C1(20) TYPE C,
C2(20) TYPE C,
C3(20) TYPE C,
C4(20) TYPE C,
C5(20) TYPE C,
C6(20) TYPE C,
C7(20) TYPE C,
C8(20) TYPE C,
C9(20) TYPE C,
END OF WA_TEMP.
PARAMETERS : P_STRING TYPE STRING DEFAULT 'abc1#abc2#abc3#abc4#abc5#abc6#abc7#abc8#abc9'.
SPLIT P_STRING AT '#' INTO WA_TEMP-C1 WA_TEMP-C2 WA_TEMP-C3 WA_TEMP-C4 WA_TEMP-C5 WA_TEMP-C6 WA_TEMP-C7 WA_TEMP-C8 WA_TEMP-C9.
WRITE : / WA_TEMP-C1 ,
/ WA_TEMP-C2 ,
/ WA_TEMP-C3 ,
/ WA_TEMP-C4 ,
/ WA_TEMP-C5 ,
/ WA_TEMP-C6 ,
/ WA_TEMP-C7 ,
/ WA_TEMP-C8 ,
/ WA_TEMP-C9.check out above code...
now you can move the values in the WA_TEMP work area to any internal table using either MOVE statement or Assign (=).
For Example
var1 = WA_TEMP-C1 .
please be more specific about your requirement...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya