04-06-2010 12:34 PM
What am I missing? the alv is not recognising my field catalog
here is my code http://www.copypastecode.com/25895/
04-06-2010 12:39 PM
Hi,
Please post the thread after preview. What problem are you facing?
If simply you want to use the FM then do the following:
DATA: g_tabname_header TYPE slis_tabname.
g_repid = sy-repid.
g_tabname_header = 'ZLS_PROD_ERR_LOG'.
* For detailed view of ALV list
IF rb_dtld EQ c_x.
REFRESH i_fieldcat.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = g_repid
i_structure_name = g_tabname_header
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Thanks & Regards
Rocky
04-06-2010 12:39 PM
Hi,
Please post the thread after preview. What problem are you facing?
If simply you want to use the FM then do the following:
DATA: g_tabname_header TYPE slis_tabname.
g_repid = sy-repid.
g_tabname_header = 'ZLS_PROD_ERR_LOG'.
* For detailed view of ALV list
IF rb_dtld EQ c_x.
REFRESH i_fieldcat.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = g_repid
i_structure_name = g_tabname_header
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Thanks & Regards
Rocky
04-06-2010 12:40 PM
in the variables declaration I have this:
DATA:BEGIN OF tabi OCCURS 0,
vkorg LIKE vbak-vkorg,
name1 LIKE kna1-name1,
vbeln LIKE vbak-vbeln,
audat LIKE vbak-audat,
vbeln_d LIKE likp-vbeln,
wadat_ist LIKE likp-wadat_ist,
vbeln_b LIKE vbrk-vbeln,
fkdat LIKE vbrk-fkdat,
gbstk LIKE vbuk-gbstk,
END OF tabi.
DATA: wa_tabi LIKE tabi,
tabi2 LIKE tabi OCCURS 0.
the thingy with tabi and tabi2 is because 'REUSE_ALV_FIELDCATALOG_MERGE' cant import tabi directly...dont know why
04-06-2010 2:08 PM
In the code snippet you have pasted i cannot see where you have populated your field catalog ?
Anyways i think you had posted a similar question yesterday & marked it as answered: .
Anyways the structure of the fieldcatalog for OO ALV is different than the REUSE* ALV grid. You have to use LVC_FIELDCATALOG_MERGE instead. Check this thread:
04-06-2010 12:40 PM
In Exporting Pass the structure reference like table name or structure name which you are using then it will work definately
i_structure_name = 'NAST'