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

split command

Former Member
0 Likes
483

hi i have a field ZBARCODE = BCS/MATNR/EXIDV02

i need to extract only MATNR and EXIDV02 sapartely, please let me know

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
458

hi

split zbarcode at '/' into <field1> <fld2> <fld3>.

now u can use fld2 and fld3. values

4 REPLIES 4
Read only

Former Member
0 Likes
459

hi

split zbarcode at '/' into <field1> <fld2> <fld3>.

now u can use fld2 and fld3. values

Read only

Former Member
0 Likes
458

Hi,

use the

split ZBARCODE at '/' into var1 var2 var3.

here the output

is

var1 = BCS

var2 = MATNR

var3 = EXIDV02

thanks & regards,

Venkatesh

Read only

Former Member
0 Likes
458

hi,

data : lv_bsc(10) type c,

lv_matnr(18) type c,

lv_exidv02?(10) type c.

split zbarcode at '/' into lv_bcs lv_matnr lv_exidv02.

Thanks

mahesh

Read only

Former Member
0 Likes
458

With as example

Data: l_str type string value 'Due Date or Amount',

l_var1 type string,

l_var2 type string.

split l_str at 'or' into l_var1 l_var2 in character mode .

If you have unknown number of variables then you can use a internal tables as well. I would suggest that you take the F1 help on the SPLIT command to learn more.