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

ABAP - UNICODE ERRORS

Former Member
0 Likes
465

Hi All,

We have non-unicode system and we will be in the process of changing existing ABAP's to become unicode compliant. I am getting errors for following sentences.

Can anyone let me know what could be the possible alternatives for this?

NUMB LIKE TVARVC-TYPE VALUE '0000',

CONSTANTS : C_CMDRET(3) TYPE C VALUE 'ZRES',

F5 TYPE VBTYP VALUE 'F5'

F8 TYPE VBTYP VALUE 'F8',

CASH_SALE VALUE 'BV', " this equals = 'B' !!!!!!!!!!

MKT_REPLEN_INV VALUE 'Z2'," this equals 'Z' !!!!!!!!!!!!

Thanks

Yogesh

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
382

The values are longer than the field lengths. Either specify the field lengths correctly, or adjust the values.




constants: numb(4) type c VALUE '0000'.
constants : c_cmdret(4) TYPE c VALUE 'ZRES',
            f5(2) type c VALUE 'F5',
            f8(2) type c VALUE 'F8',
cash_sale(2) type c VALUE 'BV', " this equals = 'B' !!!!!!!!!!
mkt_replen_inv(2) type c VALUE 'Z2'." this equals 'Z' !!!!!!!!!!!!

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
383

The values are longer than the field lengths. Either specify the field lengths correctly, or adjust the values.




constants: numb(4) type c VALUE '0000'.
constants : c_cmdret(4) TYPE c VALUE 'ZRES',
            f5(2) type c VALUE 'F5',
            f8(2) type c VALUE 'F8',
cash_sale(2) type c VALUE 'BV', " this equals = 'B' !!!!!!!!!!
mkt_replen_inv(2) type c VALUE 'Z2'." this equals 'Z' !!!!!!!!!!!!

Regards,

Rich Heilman

Read only

Former Member
0 Likes
382

Hi Yogesh,

Out of the two alternatives Rich has suggested, i think it is better to

change the values only.

NUMB LIKE TVARVC-TYPE VALUE '0000',

CONSTANTS : C_CMDRET(3) TYPE C VALUE 'ZRES',

F5 TYPE VBTYP VALUE 'F'

F8 TYPE VBTYP VALUE 'F',

CASH_SALE VALUE 'B',

MKT_REPLEN_INV VALUE 'Z',

Because, the 5 if F5 , 8 in F8 V in BV and 2 in Z2 are not used even though it was declared in the earlier versions of the programs.

Regards,

Ravi