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: 

Not able to copy Data Dictionary reference Label as Column Header for Table Control in Screen Programming

Former Member
0 Kudos

Hello All ,

I am creating a Table Control and for data to be populated in the Table Control am declaring a Work Area with reference to Data Dictionary object , so containing all valid Label text for each fields in their corresponding Data Elements.

But when I am referencing this Work Area to this Table Control using "Get from Program" button , Text radiobutton is showing deactivated.

So for this reasons I am not able to use Data Elements Label as Column heading.

Table is active in DDIC , an earlier Screen Program has also been done the same way , in that program DDIC label is picking.

I am not able to figure out whats wrong.

Helpful views required.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

I suppose G_TC_GRP_CD is declared it in your program, it's not defined in dictionary, so you should use the dictionary structure instead of G_TC_GRP_CD in order to import all properties from dictionary (so labels too).

After importing data from dictionary you can replace the name of dictionary strcture/table with G_TC_GRP_CD in the fields of your table control

Max

6 REPLIES 6

Former Member
0 Kudos

Hi

I suppose G_TC_GRP_CD is declared it in your program, it's not defined in dictionary, so you should use the dictionary structure instead of G_TC_GRP_CD in order to import all properties from dictionary (so labels too).

After importing data from dictionary you can replace the name of dictionary strcture/table with G_TC_GRP_CD in the fields of your table control

Max

0 Kudos

Very thanks for your very prompt reply 

Yeah its declared as a Global variable.

But its working in another program.

The above screen has been coded by another programmer and the Work Area here used is

G_TC_TRANSF_WA of type  /sapXX/XXX_lotr which is a table defined in DDIC.

Now when I double click on the header I am getting the following properties

It is fetching from DB and even the name is coming as that of DB.

Presently I am doing my task by manually adding a Header but its not satisfactory

I am even trying add header manually and Check From dict. option shown above but its also not working .

0 Kudos

I suppose the data are imported from dictinary

For example I've declared a table in my program:


DATA: BEGIN OF ITAB OCCURS 0,

         BUKRS LIKE T001-BUKRS,

         BUTXT LIKE T001-BUTXT,

       END   OF ITAB.

So if I wan to use it as headerline of table control in order to get the attributies of dictionary, if I try to import data from ITAB, i can't insert the label

So I can use directly T001:

and so I replace the name:

In this way the field points to ITAB, but the header still points to T001 (so dictionary):

0 Kudos

Yeah you are correct

I just now confirmed the same with my Lead.

Experience speaks

Thanks Again for your time.

0 Kudos

Actually I thought when we take it from "Get from Program" and use a Work Area which has been declared to Dictionary structure , system takes care of header automatically.

0 Kudos

Yes I know....

I thought so too......