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: 

What is the best way to create fieldcatalog or to use a structure in ALV?

former_member205645
Participant
0 Kudos

Hello Gurus, i have created a transparent table that contains 40 fields. I need to edit the data in this table using an ALV. Not all the fields suppose to be editable or even be shown. I find it very time consuming to write the fieldcatalog options for all 40 fields, including search help, data type and so on.

What do you think the best solution is ?? Should i create a structure containing the fields i want with search help and everything. Does anyone have a very good tutorial or something.

I tried to design a class to do the work for me, but again its time consuming and i don`t have the time write now.

How do you guys do it when you have many fields that you have to use in the ALV.

Thanks in advance for any advice.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

You dont need to create a structure , you can use the table name to generate the catalog automatically using the FM REUSE_ALV_FIELDCATALOG_MERGE or LVC_FIELDCATALOG_MERGE.

Once you have the catalog , you can either remove the feilds you dont want from the catalog ot set the field NO_OUT as X :

Hope this helps-

Regards

Arun

5 REPLIES 5

Former Member
0 Kudos

Hello,

Please, read this: [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907].

This tutorial explain three ways to create a field catalog Manually, Semi-autimatically (I think that it applies for you) and automatically.

Regards,

Sm1tje
Active Contributor
0 Kudos

In the past, I once created a customizing table holding the most important (for me at that time) fields from the fieldcatalog. The key was the name of the report (optionally you can also take the user, but I would not recommend that).

In this customizing table (table maintenance view) you can maintain all the settings for the fieldcatalog per report. So after setting up this table all the user (or me) had to do is enter the data into this table and you're of to go.

BTW: I almost always use a DB structure, this way I don't have to maintain fields like the small, medium and long text for column headings or data type etc.

Maybe anyone else has other / better suggestion. Would love to hear all about it.

Former Member
0 Kudos

Hi ,

You dont need to create a structure , you can use the table name to generate the catalog automatically using the FM REUSE_ALV_FIELDCATALOG_MERGE or LVC_FIELDCATALOG_MERGE.

Once you have the catalog , you can either remove the feilds you dont want from the catalog ot set the field NO_OUT as X :

Hope this helps-

Regards

Arun

0 Kudos

Hello Ioan

If you define an output itab consisting of fields from different DDIC structures or tables simply call the fm LVC_FIELDCATALOG_MERGE repeatedly for each structure or table.

The field LVC_S_FCAT-REF_TABLE shows you from which structure the field was derived. And as Arun said either hide obsolete columns using NO_OUT = 'X' or TECH = 'X' or delete the entries from the fieldcatalog.

Regards

Uwe

former_member205645
Participant
0 Kudos

Thanks for the replys.