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

urgent: CHARACTER STRING(CS)

Former Member
0 Likes
835

Hi all sap gurus,

in sap4.7 they used this code and in 6.0 it is showing the error msg that part_delim must be c,d, n, t, string.

DATA: BEGIN OF part_delim,

1d(1) TYPE x VALUE '1D',

p(1) TYPE c VALUE 'P',

END OF part_delim.

IF rec_tab-STRING CS part_delim.

start = sy-fdpos + 2.

ENDIF.

Please help me,

thanks in advance,

Hi all sap gurus,

in sap4.7 they used this code and in 6.0 it is showing the error msg that part_delim must be c,d, n, t, string.

DATA: BEGIN OF part_delim,

1d(1) TYPE x VALUE '1D',

p(1) TYPE c VALUE 'P',

END OF part_delim.

IF rec_tab-STRING CS part_delim.

start = sy-fdpos + 2.

ENDIF.

Please help me,

thanks in advance,

5 REPLIES 5
Read only

Former Member
0 Likes
809

Hi,

This is because it's unicode compliant in 6.0

What you can do is to create a variable and fill the values by concatenating the Hex value and the char value and then do the same operation.

Hope this helps

regards

Nishant

Read only

0 Likes
809

hi nishant,

thanx. will u pls send me code for this.

thanks in advance.

Read only

Former Member
0 Likes
809

Hi

the structure part_delim contains a X type field in it

hence it says that the char related commands like CS and CO can only be used with the data types C,D,T and N

Change it and use

Regards

Anji

Read only

Former Member
0 Likes
809

Hi ,

In 6.0 type x and type c are not compatible . so u have to use the character equivalent of the hexadecimal value ... U can make use of abap_character_utilities class attributes for getting the character equivalent of the hexadecimal value...

Hope the reply will be helpful.Reward points

Read only

Former Member
0 Likes
809

This line is not correct

1d(1) TYPE x VALUE '1D',

instead try using 1d(1) TYPE c length 2 VALUE '1D',

Probly den it ll work out

Reward points if it does

Regards