Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8338

Problem with ALV toolbar

$
0
0

Dear Experts,

 

I have created a table with ALV(using SALV_WD_TABLE) in one of my WDP components. I can able to display ALV table with default "Print version and Export" Buttons.

 

But when i try to enable buttons ( ex: Delete row,PDF), It is not at all showing the buttons in the ALV toolbar.Can anyone help me out where i did wrong?.

 

P.S : I have created two additional buttons in ALV toolbar (Submit and Additional values). PFB the snap shot.

 

Here is the below code for that .

 

  DATA lr_buttonui TYPE REF TO cl_salv_wd_fe_button.
  DATA button1    TYPE REF TO cl_salv_wd_function.
  DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

  lo_cmp_usage wd_this->wd_cpuse_alv( ).
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.
  "get model
  DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
  lo_interfacecontroller wd_this->wd_cpifc_alv( ).

  DATA lv_value TYPE REF TO cl_salv_wd_config_table.
  lv_value = lo_interfacecontroller->get_model(
  ).
*----------Button creation on the alv toolbar---------*
  "Submit Button
  CREATE OBJECT lr_buttonui.
  lr_buttonui->set_text('Submit')."setting the text of the button on alv toolbar
  button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'SUBMIT')."creating the function for alv button
  button1->set_editor( lr_buttonui ).

  "Addtional Values' Selection Button
  CREATE OBJECT lr_buttonui.
  lr_buttonui->set_text('Addtional Values')."setting the text of the button on alv toolbar
  button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'ADDTIONAL_VALUES')."creating the function for alv button
  button1->set_editor( lr_buttonui ).

*--------Delete row and PDF buttons------*
  lv_value->if_salv_wd_std_functions~set_pdf_allowed( abap_true ).
  lv_value->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_true ).

 

Toolbar.jpg

 

 

 

Thanks

Katrice


Viewing all articles
Browse latest Browse all 8338

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>