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

error when trying to split

Former Member
0 Likes
763

Hi,

DATA: lv_zbnkl(8) TYPE c.

Data: l_chr(15) type c. ß-- NUMBER is SAME AS zbnkl LENGTH

Write i_reguh.-zbnkl to l_chr

IF L_CHR CA '-'.

SPLIT L_CHR AT '-' INTO lv_zbnkl.---->error

endif.

I am using above code but it is throwing an eror saying that unable to interpret lv_zbankl.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
642

hi,

do this way...


data : lv_other(10).

IF L_CHR CA '-'.
SPLIT L_CHR AT '-' INTO lv_zbnkl lv_other.
endif.

write : lv_zbnkl, lv_other. 

4 REPLIES 4
Read only

Former Member
0 Likes
642

U need to have atleast 2 variables .. when U split ..

write as ...

SPLIT L_CHR AT '-' INTO lv_zbnkl lv_zbnkl1.

Read only

Former Member
0 Likes
642

hi prince you r splitting a value into two ...but you specified the variables only one..al the end of the statement

SPLIT L_CHR AT '-' INTO lv_zbnkl and some field is required here..

regards,

venkat.

Read only

Former Member
0 Likes
643

hi,

do this way...


data : lv_other(10).

IF L_CHR CA '-'.
SPLIT L_CHR AT '-' INTO lv_zbnkl lv_other.
endif.

write : lv_zbnkl, lv_other. 

Read only

Former Member
0 Likes
642

Hi,

Correct your code which is highted.

DATA: lv_zbnkl(8) TYPE c.

*DATA: lv_zbnkl_extra(7).*

Data: l_chr(15) type c. ß-- NUMBER is SAME AS zbnkl LENGTH

Write i_reguh.-zbnkl to l_chr

IF L_CHR CA '-'.

SPLIT L_CHR AT '-' INTO lv_zbnkl lv_zbnkl_extra.---->error

endif.