cancel
Showing results for 
Search instead for 
Did you mean: 

field symbol - unicode warning

Former Member
0 Kudos

data:

begin of z,

txtmg(11) type c,

ladpt(06) type p decimals 3,

zprun_o(06) type p decimals 3,

end of z.

field-symbols:

<menge>. "(even tried type any here)

assign table field (z-txtmg) to <menge> .

....

z-ladpt = <menge>.

....

z-zprun_oo = <menge>.

When i run ucchceck i get a warning in static anlysis for the following reason: because of the use of untyped or generic datatypes there is no evaluation for this operation available. Can only be validated at runtime.

When i use

assign (z-txtmg) to <menge> casting type P (Without the table field,because it gives error of not allowing casting)

it does not work, still gives the warning to me.

what can i do instead to get rid of the unicode warning?

Best regards & points will be awarded!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this :

data:

begin of z,

txtmg(11) type c,

ladpt(06) type p decimals 3,

zprun_o(06) type p decimals 3,

end of z.

field-symbols:

<menge> type c.

assign table field (z-txtmg) to <menge> .

....

try.

z-ladpt = <menge>.

....

z-zprun_oo = <menge>.

catch cx_root.

    • Error handling here if above assignments fail*

endtry.

Regards,

Joy.

Former Member
0 Kudos

thx for the help, the warnings disappeared.

Why should the assignement fail?

Can you give an example when it happens (with example values?)

points for solution rewarded

Former Member
0 Kudos

I donot how the field txtmg is getting populated..but for example say it is getting populated from a file and in file instead of numeric value somebody puts alphanumeric value by mistake in that case ur assignments will fail and exceptions will be raised so to catch that exception I have used try..catch..endtry block.

Regards,

joy.

Answers (0)