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: 

Widening Cast

Former Member
0 Kudos

Hi,

I am using wideningcast operation for development purpose. In a particular include iam using two forms.

*&----


*& Form check_row_type

*&----


DATA: lref_meta_data TYPE REF TO xx_meta_data.

CATCH SYSTEM-EXCEPTIONS xxx_xxx_error = 4.

lref_meta_data ?= ps_meta_data_row.

endcatch.

*&----


*& Form check_row_char

*&----


DATA: lref_meta_data TYPE REF TO xx_meta_data.

CATCH SYSTEM-EXCEPTIONS xxx_xxx_error = 4.

lref_meta_data ?= ps_meta_data_row.

endcatch.

While using this two forms in a same include i am getting a warning like no read access to lref_meta_data (in extended program check).

in each form the declaration is needed seperately otherwise it will shows the error that lref_meta_data

is not declared in data.

Is there any ways to remove this warning?

1 REPLY 1

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

I don't think this message refers to the double declaration - it's more about not using the lref_meta_data field after initial definition in the catch/endcatch structure.

Your code example does not show any further parts? Do you (plan to) do something with these variables? If yes, the warning will vanish.

Regards,

Christian