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: 

Field catalog Merge

Former Member
0 Kudos

Hi

I have an internal table which include one DDIC structure and some extra fields.

To craete field catalog for this internal table I am using Reuse_fieldcatalog_mege.

'OBJECT_TAB': Is the internal table name with extra fields in it.

tabname: Is the DDIC structure

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = g_repid

i_internal_tabname = 'OBJECT_TAB'

i_structure_name = tabname

i_client_never_display = ' '

CHANGING

ct_fieldcat = g_fieldcat_tab[]

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

Now this g_fieldcat_tab[] table contains only fieldcatalog for tabname other fields of internal table 'OBJECT_TAB' is not comming.

can I append those extra fields to g_fieldcat_tab[]?

Provide some sample code.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use a sepearte internal table for the OBJECT_TAB and the other extra fields.

and pass that internal table to the function module

data: begin of itab occurs 0.

include structure object_tab.

data: f1 like ...

f2 like....

end of itab.

pass this iTab to field_catalog_merge fun module.

you will get all fields.

reward if useful

regards,

ANJI

0 Kudos

what should be my : i_structure_name= ?

0 Kudos

hi,...

You need not to give structure name every time .You can just give your field catalog that is enough for display of alv.For multiple fields to be displayed on your alv you can append those fields to field catalog and then pass it .

regards,

veeresh

null

Former Member
0 Kudos

Hi...

the function module reuse_alv_fieldcatalog_merge is used to create a field catalog. it will take a dictionary structure name as inport and it will return the field catalog as output in changing parameter

if you want aditional fields you can append manually..

Reward points if useful......

Suresh......