03-30-2016 1:46 PM
Hi Experts,
I am having as issue regarding export to spreadsheet menu in standard status that i have copied.
it is appearing as grayed out, but it is showing from where i had copied it. I didn't get any solution regarding this issue please help me asap.
I have also tried to write it separately but it is in same condition, even i had tried to attach the push button in application toolbar it doesn't appear in application toolbar also.
Following is the code i have written for PF Status.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = git_final.
CATCH cx_salv_msg INTO DATA(lv_msg).
lv_string = lv_msg->get_text( ).
MESSAGE lv_string TYPE lc_i.
CATCH cx_salv_object_not_found INTO DATA(lv_onf_msg).
lv_string = lv_onf_msg->get_text( ).
MESSAGE lv_string TYPE lc_i.
ENDTRY.
DATA: lo_column TYPE REF TO cl_salv_column_table,
lo_funcs TYPE salv_t_ui_func.
CALL METHOD lo_alv->set_screen_status(
pfstatus = 'SALV_TABLE_STANDARD'
report = sy-repid ).
03-30-2016 1:55 PM
I used to copy the PF status to my custom program as well, but nowadays I use the followig statement. With this no copy of standard status necessary:
DATA: gr_table TYPE REF TO cl_salv_table,
gr_functions TYPE REF TO cl_salv_functions,
lcx_salv_msg TYPE REF TO cx_salv_msg,
lcx_salv_not_found TYPE REF TO cx_salv_not_found,
lcx_salv_data_error TYPE REF TO cx_salv_data_error.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = lt_data.
CATCH cx_salv_msg INTO lcx_salv_msg.
ENDTRY.
TRY.
* set standard buttons and function codes
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( 'X' ).
CATCH: cx_salv_not_found INTO lcx_salv_not_found,
cx_salv_data_error INTO lcx_salv_data_error.
ENDTRY.
Maybe this will help ?
03-30-2016 1:55 PM
I used to copy the PF status to my custom program as well, but nowadays I use the followig statement. With this no copy of standard status necessary:
DATA: gr_table TYPE REF TO cl_salv_table,
gr_functions TYPE REF TO cl_salv_functions,
lcx_salv_msg TYPE REF TO cx_salv_msg,
lcx_salv_not_found TYPE REF TO cx_salv_not_found,
lcx_salv_data_error TYPE REF TO cx_salv_data_error.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = lt_data.
CATCH cx_salv_msg INTO lcx_salv_msg.
ENDTRY.
TRY.
* set standard buttons and function codes
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( 'X' ).
CATCH: cx_salv_not_found INTO lcx_salv_not_found,
cx_salv_data_error INTO lcx_salv_data_error.
ENDTRY.
Maybe this will help ?
03-30-2016 6:17 PM
Thanks for your help I really appreciate.But, there was some other issue that has been resolved. Actually i was passing the data element type werks for plant field which is a structure type and passing that field to table was creating a nested internal table thus i was not able to download the ALV into excel.Actual data element is werks_d for sites.