2007 Apr 23 10:12 AM
hi, i just want to test simple ALV program, and following is my code, but error occurs said that no fieldcat defined, how to solve that ?
And i really need some underling concept about such kind ALV. thank you !!
REPORT ZZKTEST .
TYPE-POOLS: slis.
TABLES sflight.
DATA: data_sflight LIKE TABLE OF sflight,
lt_fieldcat TYPE slis_t_fieldcat_alv.
INITIALIZATION.
SELECT * FROM sflight INTO TABLE data_sflight.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = data_sflight.
2007 Apr 23 10:17 AM
well you are giving an empty field cat to the ALV.
HJe doesnt like that. either build your field cat before sending it to the FM, or forget about that fieldcat and use the parameter I_STRUCTURE of the FM.
give the structure of your data to that parameter ( the structure of the table your data is beeing stored in).
hi, i just want to test simple ALV program, and following is my code, but error occurs said that no fieldcat defined, how to solve that ?
And i really need some underling concept about such kind ALV. thank you !!
REPORT ZZKTEST .
TYPE-POOLS: slis.
TABLES sflight.
DATA: data_sflight LIKE TABLE OF sflight,
lt_fieldcat TYPE slis_t_fieldcat_alv.
INITIALIZATION.
SELECT * FROM sflight INTO TABLE data_sflight.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = data_sflight.
2007 Apr 23 10:14 AM
2007 Apr 23 10:14 AM
u have to maintain field catalog or u have to pass ref structure name for this FM.
check i_structure parameter.
Regards
prabhu
2007 Apr 23 10:17 AM
well you are giving an empty field cat to the ALV.
HJe doesnt like that. either build your field cat before sending it to the FM, or forget about that fieldcat and use the parameter I_STRUCTURE of the FM.
give the structure of your data to that parameter ( the structure of the table your data is beeing stored in).
2007 Apr 23 10:17 AM
u had not maintained the field catalog for it,
just check the sample programs in package SLIS.
regrds
anjali
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |