Hi Experts,
So I am using FM_REUSE_ALV_GRID_DISPLAY to display the ALV data into my report output. The internal table that contains data to be displayed is not initial which means it actually has data(per debugging). However, 'No Data' is displayed in the ALV output. Sy-subrc after going through the FM is 0, so also no program error there.
Can you please point out what's wrong with my code? I have also tried using cl_salv_table but still 'No Data' is shown. Also, I have tried manually adding data by passing strings to lt_final and passed it to the FM instead of lt_results and it worked but if data is real data obtained from program processing, 'No Data' is displayed.
ls_final-hyper_team = 'LOGISTICS'.
ls_final-hyper_task = 'DDL'.
ls_final-results = 'THIS IS ONLY A TEST PLS'.
APPEND ls_final TO lt_final.
Below is only a snippet of my code I didn't show how lt_results was populated because it was only an exporting parameter from a class I also made but here's a screenshot from the debugger.
TYPES: BEGIN OF ty_data, hyper_team TYPE /txn/t_hyper_cls-hyper_team, hyper_task TYPE /txn/t_hyper_cls-hyper_task, results(300), END OF ty_data. DATA: lt_results TYPE STANDARD TABLE OF ty_data lt_final TYPE STANDARD TABLE OF ty_data, ls_final TYPE ty_data, DATA: lt_field_catalog TYPE slis_t_fieldcat_alv. DATA: ls_field_catalog TYPE slis_fieldcat_alv. ls_field_catalog-fieldname = 'HYPER_TEAM'. ls_field_catalog-seltext_l = 'Team'. APPEND ls_field_catalog TO lt_field_catalog. ls_field_catalog-fieldname = 'HYPER_TASK'. ls_field_catalog-seltext_l = 'Class'. APPEND ls_field_catalog TO lt_field_catalog. ls_field_catalog-fieldname = 'RESULTS'. ls_field_catalog-seltext_l = 'Result'. APPEND ls_field_catalog TO lt_field_catalog. CALL FUNCTION 'FM_REUSE_ALV_GRID_DISPLAY' EXPORTING it_fieldcat = lt_field_catalog TABLES t_outtab = lt_results EXCEPTIONS program_error = 1 OTHERS = 2. IF sy-subrc EQ 0. "Do Nothing ENDIF.