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: 

ALV field catalog with DD structure using built-in types

lee_haire3
Discoverer
0 Kudos

Hi,

I am building an ALV field catalog by referencing a Data Dictionary structure that I have defined. However, some of the fields do not use data elements - instead they are "built-in types" (i.e. where you enter the data type, length, and description directly instead of specifying a data element). Is there any way to get the field catalog to automatically use the direct field description of these fields? I am looking for a dynamic solution here that automatically leverages the field descriptions maintained directly in my structure.

I realize one solution is to call one of the data dictionary functions to read in the definition of my structure and then I could set the column heading according to the information I get back, but I was hoping instead that there was a setting or field I could use in the field catalog to simply tell it to use the field description as directly maintained in data dictionary for the column heading.

<<text removed>>

Thanks,

Lee

Edited by: Matt on Dec 17, 2008 8:38 PM - removed text perilously close to offering points

2 REPLIES 2

Former Member
0 Kudos

Hi Lee,

You can use FM REUSE_ALV_FIELDCATALOG_MERGE

First, you need to have a structure to get its attributes directly to the fieldcatalog

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = '<name of the structure>'

CHANGING

ct_fieldcat = i_fieldcat[]

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

Thanks,

M

0 Kudos

Ok, I thought that was obvious... I should have been clearer and stated that I am using 'REUSE_ALV_FIELDCATALOG_MERGE'; however, for those fields in the structure that are defined using "built-in types" I have not found a way to get the manually entered field descriptions automatically used as column headers. Of course, for the other fields that reference data elements in my structure the field labels are used as column headers.