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

Uni-code syntax error

Former Member
0 Likes
817

Hello Experts-

I am migration my code from 4.7 to ECC6.0.

The code is working fire in 4.7 but in ECC6.0 it is giving me compilation error. I think it is becuase of Uni-code but not sure how to fix it.

Following code id giving me error.

DATA: BEGIN OF l_program_tab OCCURS 50.

INCLUDE STRUCTURE textpool.

DATA: program_flag(1) type c,

END OF l_program_tab.

The error is "The line type of "l_program_tab" must be compatible with one of the types "TEXTPOOL" ".

The TEXTPOOL structure is

ID TEXTPOOLID CHAR 1

KEY TEXTPOOLKY CHAR 8

ENTRY TEXTPOOLTX CHAR 255

LENGTH TEXTPOOLLN INT4 10

Can idea why this piece of code is working in 4.7 and giving error in ECC6.0?

Thanks,

7 REPLIES 7
Read only

Former Member
0 Likes
786

Try to replace the statement the "data" statment with "types"

and then use data to define internal table

bye

Read only

Former Member
0 Likes
786

As far as my undersdtanding u r getting a warning when compiling u r program and u can ignore it.Just activate it,it will activate w/o any error.

Read only

Former Member
0 Likes
786

hi,

Check out in this way ..


TYPES: BEGIN OF w_program_tab.
INCLUDE STRUCTURE textpool.
TYPES: program_flag(1) type c,
END OF w_program_tab.

data : i_program_tab type standard table of w_program_tab.

Regards,

Santosh

Read only

0 Likes
786

Hello Mr.A & Santosh Kumar-

Your answeres were really helpful I will definately give some points.

I am getting next syntax error on my code

DATA: l_db_tab like l_program_tab OCCURS 50 WITH HEADER LINE.

the error is "When using 'WITH HEADER LINE', the line type cannot be a table type

Please let me know if I have to make any changes in my above code too?

Thanks for helping me, I am not good in data declaration of abap.

Also if you have a good document to change existing abap code in to unicode, please provide me.

Thanks,

Read only

Former Member
0 Likes
786

Hi,

Comment your line

*DATA: BEGIN OF l_program_tab occurs 50 with header line.

and try this line

DATA: BEGIN OF l_program_tab occurs 50.

both means the same...

Regards

Adil

Read only

0 Likes
786

Hi Adil- I did not understand your reply.

I do not have any error on DATA: BEGIN OF l_program_tab occurs 50 with header line.

???

Thanks,

Read only

Former Member
0 Likes
786

Hi,

Have you tried something like...

DATA: l_db_tab like line of l_program_tab OCCURS 50 WITH HEADER LINE.

?

Hope this helps, Andy