‎2008 Mar 31 5:49 PM
hi experts,
i am using perform statements for fieldcatlog.
data : t_fieldcat type slis_t_fieldcat_alv.
perform fieldcatlog tables t_fieldcat.
form fieldcatlog tables FORM li_fieldcat LIKE i_fieldcat.
FORM msg_fill_fieldcatalog TABLES li_fieldcat LIKE i_fieldcat.
*local declarations
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
populate fieldcatalog
ls_fieldcat-fieldname = 'MATNR'.
ls_fieldcat-tabname = 'I_FINAL_OUTPUT'.
ls_fieldcat-seltext_m = text-001.
APPEND ls_fieldcat TO li_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERKS'.
ls_fieldcat-tabname = 'I_FINAL_OUTPUT'.
ls_fieldcat-seltext_m = text-002.
APPEND ls_fieldcat TO li_fieldcat.
CLEAR ls_fieldcat.
ENDFORM.
i am getting warning as li_fieldcat stands for 2 fields for table and the table header line. field string li_fieldcat is not referenced statically in the program.
so can u people help me regarding this
thanks
‎2008 Mar 31 5:56 PM
Check the below code.
data : t_fieldcat type slis_t_fieldcat_alv.
perform fieldcatlog tables t_fieldcat.
form fieldcatlog using lt_fieldcat type slis_t_fieldcat_alv.
...
...
endform.
Hope this helps.
Thanks,
Balaji
‎2008 Mar 31 5:56 PM
Check the below code.
data : t_fieldcat type slis_t_fieldcat_alv.
perform fieldcatlog tables t_fieldcat.
form fieldcatlog using lt_fieldcat type slis_t_fieldcat_alv.
...
...
endform.
Hope this helps.
Thanks,
Balaji