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

What is the syntax of SPLIT method?

Former Member
0 Likes
1,125

Hi,

What is the syntax of SPLIT method?

Is there any other keyword useful to split the string into required fields?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
883

Hi,

split <var> at ',' into target1

target2

target3.

You can split the string at separator.

Plzz reward points if it helps..

6 REPLIES 6
Read only

Former Member
0 Likes
883

SPLIT <STRING> AT <DELIMITER>.

Read only

Former Member
0 Likes
884

Hi,

split <var> at ',' into target1

target2

target3.

You can split the string at separator.

Plzz reward points if it helps..

Read only

Former Member
0 Likes
883

hi

good

split p0_source at con_tm into p0_left p0_right.

SPLIT XSTRING AT '-' INTO AREA_CODE TEL_NO1 TEL_NO2.

thanks

mrutyun^

Read only

former_member386202
Active Contributor
0 Likes
883

Hi,

Refer this

data : lv_string type string,

lv_var1 type string,

lv_var2 type string.

lv_string = 'SAP.ABAP'.

split lv_string at '.' into lv_var1 lv_var2.

Reagrds,

Prashant

Read only

Former Member
0 Likes
883

syntax:

SPLIT c AT <del> INTO c1 ... cn.

or

SPLIT c AT <del> INTO table <internal table>.

where, del = delimeter

data: begin of wa,

text type string,

end of wa.

data: itab like table of wa.

data: st type string value 'I am new to ABAP'.

data: st1 type string,

st2 type string,

st3 type string,

st4 type string,

st5 type string.

split st at space into st1 st2 st3 st4 st5.

split st at space into table itab.

Read only

Former Member
0 Likes
883

Hello ,

If you have certain values in a work area say GF_INPUT seprated by ; then you do so using the following statement :

SPLIT gf_input AT ';' INTO

gt_file_header-date

gt_file_header-time

gt_file_header-origin

gt_file_header-country.

Thanks,

Lalit Kabra