Skip to Content
0
Former Member
Jan 21, 2011 at 04:23 AM

get fieldcatalog for ALV

2135 Views

Hi experts,

i get doubts about getting fieldcatalog via function module LVC_FIELDCATLOG_MERGE & REUSE_ALV_FIELDCATALOG_MERGE.

declare one internal table like below:

DATA:BEGIN OF it_alv_data OCCURS 100,

project LIKE proj-pspnr,

plan_cost LIKE cosb-wog001,

END OF it_alv_data.

DATA:it_fieldcat1 TYPE LVC_T_FCAT,

it_fieldcat2 TYPE SLIS_T_FIELDCAT_ALV.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

I_INTERNAL_TABNAME = 'IT_ALV_DATA'

CHANGING

CT_FIELDCAT = GT_FIELDCAT1[] .

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = sy-cprog

i_inclname = sy-cprog

i_internal_tabname = 'IT_ALV_DATA'

changing

ct_fieldcat = gt_fieldcat2[].

GT_FIELDCAT1[] can not get records while gt_fieldcat2[] can be filled.

Can you please kindly explain why different results for the two fieldcat internal table.

and what should be noticed if we want get fieldcat via internal table.

thanks,

Aumas.