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

Function module to create FIELD CATALOG

Former Member
0 Likes
18,702

I am displaying data through ALV using SET_TABLE_FOR_FIRST_DISPLAY method of class CL_GUI_ALV_GRID.

is there any function module available to create the field catalog for that??

the F.M. "REUSE_ALV_FIELDCATALOG_MERGE" is giving some error for that. any other function moudle is available or not??

how to use above function module for that??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,351

Hi ,

use can use the FM 'LVC_FIELDCATALOG_MERGE' to create field catalog .

regards,

gowri

3 REPLIES 3
Read only

Former Member
0 Likes
7,351

Hi ,

Use can use FM 'REUSE_ALV_FIELDCATALOG_MERGE' for fieldcatolgue display .

try to pass by creating a structure .for ex..

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = g_repid

I_INTERNAL_TABNAME = 'HEADER'

I_STRUCTURE_NAME = 'Z9I_STK_LISTE1_H'

CHANGING

CT_FIELDCAT = lt_fcat.

regards,

gowri

Read only

Former Member
0 Likes
7,352

Hi ,

use can use the FM 'LVC_FIELDCATALOG_MERGE' to create field catalog .

regards,

gowri

Read only

0 Likes
7,351

Hi,

There are many ways in which to build a field catalog, some of which can be found below:

Building a fieldcatalog based on a dictionary structure/table

  • This Method requires you to create a dictionary structure via

  • SE11 and pass that in the 'I_STRUCTURE_NAME' parameter.

  • The below example will be for all of EKKO but you could create a new

  • structure containing only the fields you require.

*For Function module ALV (report)

DATA: it_fieldcat TYPE slis_t_fieldcat_alv,

wa_fieldcat LIKE LINE OF it_fieldcat.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'EKKO'

CHANGING

ct_fieldcat = it_fieldcat

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

*For object ALV (Screen)

DATA: gd_fieldcat2 type LVC_T_FCAT.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

I_BUFFER_ACTIVE =

I_STRUCTURE_NAME = 'EKKO'

I_CLIENT_NEVER_DISPLAY = 'X

I_BYPASSING_BUFFER =

CHANGING

ct_fieldcat = gd_fieldcat2

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

Regards,

Shyamala

Edited by: Shyamala S on May 25, 2009 3:21 PM