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

Read structur field properties

Former Member
0 Likes
405

hy all

i need your help. i have define an structur, for example

 
    types: begin of ts_matnr_inf,
            matnr type matnr,
            maktx type maktx,
            mtart type mtart,
            prdha type prodh_d,
            mstav type mstav,
            zzhwgrp type zzhwgrp,
           end of ts_matnr_inf.

now i want read all properties from this structur in a lvc_t_fcat table like function module LVC_FIELDCATALOG_MERGE.

i can't use this function module, because the structure definition is local not global. I know that RTTI Services that can give me information about structure, i don't give me lvc_t_fcat type return. Later, i wont create a dynamic table wtih a cl_alv_table_create class.

I hope your know want i mean.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
359

Please keep in mind that the field cataog is a table of type LVC_T_FCAT that contains information of the fields that are to be displayed. This table is used by ALV to recognize type of the field,

Not really undestood your requrement...

Regards,

2 REPLIES 2
Read only

Former Member
0 Likes
360

Please keep in mind that the field cataog is a table of type LVC_T_FCAT that contains information of the fields that are to be displayed. This table is used by ALV to recognize type of the field,

Not really undestood your requrement...

Regards,

Read only

Sm1tje
Active Contributor
0 Likes
359

So what seems to be the problem when using RTTI? Determine the structure of your types, next per field determine values like length, type, edit mask etc. This values should be enough to create a field catalog. Just fill the necessary fields from the fieldcatalog with the values from RTTI.