2017 Sep 10 10:33 AM
i copied one standard pf status when i am using that pf status bu function call alv the send to option of menu working fine and i am also getting all function keys , but when i am using the samr pf status ion alv factory method its only showing some function keys and send to option from menu bar is also grayed out. pls provide the solution
2017 Sep 12 9:05 AM
Technically speaking, the standard GUI status for REUSE_ALV_GRID_DISPLAY and for SALV look the same but are technically distinct (respectively one is from program SAPLKKBL and the other is from SAPLSLVC_FULLSCREEN), so you should better copy the one from SALV and add your own custom buttons, instead of using the one you copied from SAPLKKBL.
But please, which standard GUI status did you originally copy (STANDARD, STANDARD_FULLSCREEN, ...), and which keys/menus are enabled using REUSE_ALV_GRID_DISPLAY, and are disabled/grayed out with SALV?
2017 Sep 11 3:01 AM
2017 Sep 11 1:39 PM
2017 Sep 11 1:43 PM
METHOD display_data.
"object reference for cl_salv_table
DATA : lr_alv TYPE REF TO cl_salv_table,
lv_repid TYPE sy-repid,
gr_functions TYPE REF TO cl_salv_functions,
"object reference for columns and column
l_cols_tab TYPE REF TO cl_salv_columns_table,
l_col_tab TYPE REF TO cl_salv_column_table.
CONSTANTS: lc_pf_status TYPE sypfkey VALUE 'STANDARD_PF1'.
lv_repid = sy-repid.
"alv grid fm, pass your internal table
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = lr_alv
CHANGING
t_table = gt_final.
CATCH cx_salv_msg .
ENDTRY.
lr_alv->get_functions( )->set_all( ).
TRY.
CALL METHOD lr_alv->set_screen_status
EXPORTING
report = sy-repid
pfstatus = 'PF_STATUS'
set_functions = lr_alv->c_functions_all.
ENDTRY.
"field catalog of table
CALL METHOD lr_alv->get_columns
RECEIVING
value = l_cols_tab.
TRY.
l_col_tab ?= l_cols_tab->get_column( 'VBELN' ).
CALL METHOD l_col_tab->set_short_text
EXPORTING
value = gc_vblen_s.
CALL METHOD l_col_tab->set_long_text
EXPORTING
value = gc_vblen_l.
CALL METHOD l_col_tab->set_output_length
EXPORTING
value = 30.
CATCH cx_salv_not_found .
ENDTRY.
"call display method of lr_alv
lr_alv->display( ).
ENDMETHOD.
2017 Sep 13 10:01 AM
It should work (tested on 7.31 system). Make sure you have activated everything. Make sure there's no corrective SAP note for such symptom.
2017 Sep 25 8:55 AM
with PF_STATUS copied from GUI status STANDARD of SAPLKKBL, and this complete executable code:
REPORT.
DATA gt_final TYPE TABLE OF sflight.
CLASS lcl_app DEFINITION.
PUBLIC SECTION.
CLASS-METHODS display_data.
ENDCLASS.
CLASS lcl_app IMPLEMENTATION.
METHOD display_data.
"object reference for cl_salv_table
DATA : lr_alv TYPE REF TO cl_salv_table,
lv_repid TYPE sy-repid,
gr_functions TYPE REF TO cl_salv_functions,
"object reference for columns and column
l_cols_tab TYPE REF TO cl_salv_columns_table,
l_col_tab TYPE REF TO cl_salv_column_table.
CONSTANTS: lc_pf_status TYPE sypfkey VALUE 'STANDARD_PF1'.
lv_repid = sy-repid.
"alv grid fm, pass your internal table
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = lr_alv
CHANGING
t_table = gt_final.
CATCH cx_salv_msg .
ENDTRY.
lr_alv->get_functions( )->set_all( ).
TRY.
CALL METHOD lr_alv->set_screen_status
EXPORTING
report = sy-repid
pfstatus = 'PF_STATUS'
set_functions = lr_alv->c_functions_all.
ENDTRY.
"field catalog of table
CALL METHOD lr_alv->get_columns
RECEIVING
value = l_cols_tab.
TRY.
l_col_tab ?= l_cols_tab->get_column( 'CARRID' ).
CALL METHOD l_col_tab->set_short_text
EXPORTING
value = 'gc_vblen_s'.
CALL METHOD l_col_tab->set_long_text
EXPORTING
value = 'gc_vblen_l'.
CALL METHOD l_col_tab->set_output_length
EXPORTING
value = 30.
CATCH cx_salv_not_found .
ENDTRY.
"call display method of lr_alv
lr_alv->display( ).
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
PERFORM main.
FORM main.
SELECT * FROM sflight INTO TABLE gt_final.
lcl_app=>display_data( ).
ENDFORM.
2017 Sep 12 9:05 AM
Technically speaking, the standard GUI status for REUSE_ALV_GRID_DISPLAY and for SALV look the same but are technically distinct (respectively one is from program SAPLKKBL and the other is from SAPLSLVC_FULLSCREEN), so you should better copy the one from SALV and add your own custom buttons, instead of using the one you copied from SAPLKKBL.
But please, which standard GUI status did you originally copy (STANDARD, STANDARD_FULLSCREEN, ...), and which keys/menus are enabled using REUSE_ALV_GRID_DISPLAY, and are disabled/grayed out with SALV?
2017 Sep 13 4:51 AM
I have used STANDARD pf-status. and 'SEND to' option of list menu is grayed out. when i am using salv
2017 Sep 13 10:02 AM
I did a test, based on SALV_TEST_TABLE_FUNCTIONS program. No issue (tested on 7.31 system). Make sure you have activated everything. Make sure there's no corrective SAP note for such symptom.