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

reg : warning message when using subroutines

Former Member
0 Likes
305

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
285

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

1 REPLY 1
Read only

Former Member
0 Likes
286

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