Application Development 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: 

Unicode type incompatible

Former Member
0 Kudos
210

Hi,

I am facing a problem in unicode. Could you please help me on that. I will appreciate your help. I am pretty new to Unicode ABAP.

I have a strcuture as follows :

DATA: BEGIN OF special_dates,

dar LIKE p0041-dar01,

dat LIKE p0041-dat01,

END OF special_dates.

I am using this structure in the program as follows:

DO 12 TIMES VARYING special_dates

FROM special_dates-dar01

NEXT special_dates-dat01.

I am getting error as follows:

"P0041-DAR01" and "SPECIAL_DATES" are type-incompatible.

I am also getting the following error.

In Unicode programs, the "-" character cannot appear in names, as it

does here in the name "PNP-SW-FOUND".

I will be greatful for your help and time.

Thanks-a-lot.

Raj.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
110

Hi Raj

DO like this.

DO 12 TIMES VARYING special_dates-DAR FROM P0041-DAR01 NEXT P0041-DAR02

VARYING special_dates-DAT FROM P0041-DAT01

NEXT P0041-DAT02.

enddo.

Let me know if you need anything.

Suresh B Mannem

5 REPLIES 5

former_member583013
Active Contributor
0 Kudos
110

You should do...


DO 12 TIMES VARYING special_dates-dar01

or

DO 12 TIMES VARYING special_dates-dat01

Greetings,

Blag.

0 Kudos
110

Hi Alvaro,

I tried to do like that, but it gave another error :

Erroe: FROM, NEXT expected.

Please verify that.

Thanks however.

former_member186741
Active Contributor
0 Kudos
110

the complaint about the '-' will be resolved if you change sw-found in the data or type declaration to sw_found.

Former Member
0 Kudos
111

Hi Raj

DO like this.

DO 12 TIMES VARYING special_dates-DAR FROM P0041-DAR01 NEXT P0041-DAR02

VARYING special_dates-DAT FROM P0041-DAT01

NEXT P0041-DAT02.

enddo.

Let me know if you need anything.

Suresh B Mannem

0 Kudos
110

Oh Suresh Kudos to you. Problem vanished in no time. Thanks-a-lot ya. Just today I am doing this stupid Unicode work, It was so frustuating. Now my problem is resolved.

Please give me your personal mail id, I can ask you if I need anything.

Thanks--a-lot.

Raj