‎2011 Jun 20 3:47 PM
Hi Friends,
I need to replace FM HR_DISPLAY_BASIC_LIST, as it is obsolete in ECC 6.0.
Some people suggested that I should use REUSE_ALV_GRID_DISPLAY for the replacement, but I have 3 table parameters being passed to the FM HR_DISPLAY_BASIC_LIST. Whereas in REUSE_ALV_GRID_DISPLAY there is only one table parameter.
My code looks as below,
DATA : BEGIN OF i_list_of_unix_files OCCURS 0,
file(150) TYPE c, "Name of directory (possibly truncated)
rcomp LIKE t880-rcomp,
name1 LIKE t880-name1,
mod_date(12) TYPE c,
END OF i_list_of_unix_files.
DATA : BEGIN OF i_selected_files OCCURS 0,
unix_path(350) TYPE c.
DATA : END OF i_selected_files.
DATA : BEGIN OF i_record_unix_file OCCURS 0,
record(350) TYPE c.
DATA : END OF i_record_unix_file.
CALL FUNCTION 'HR_DISPLAY_BASIC_LIST'
EXPORTING
file_name = 'ZUNIRB02'
head_line1 = sy-title
dyn_pushbutton_text1 = 'Download file'
TABLES
data_tab = i_list_of_unix_files
fieldname_tab = i_fieldnametab
select_tab = i_selected_files
EXCEPTIONS
download_problem = 1
no_data_tab_entiries = 2
table_mismatch = 3
print_problems = 4
OTHERS = 5.
Please suggest.
‎2011 Jun 20 4:08 PM
If you have a look at the FM code, you could see that the fieldname table is transformed into the IT_FIELDCAT parameter structure of the REUSE_ALV_GRID_DISPLAY as the SELECT_TAB is for what i can see the selected record in case of ALV with mark field, which in ALV is handle by data_changed event. So, basically it's a matter of doing the same that is done in code line 102 in DISPLAY_GRID_LIST FM ( PERFORM DGL_BUILD_FIELDCAT TABLES T_FIELDCAT FIELDNAME_TAB.) for the field catalog and do some coding for the data_changed event. There are lots of examples with this FM in ABAP repository. Look for BCALV_GRID*.