Wednesday, August 14, 2013
ALV report in Web dynpro ABAP gives by default  buttons like Print Version, Export, Check / Append Row / Insert Row / Delete Row buttons. You can hide Print version button. You can also hide Check / Append Row / Insert Row / Delete Row buttons as shown below.

METHOD HIDE_STD_PRINT_BUTTON .
  "Instantiate Used component
  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.
  "Instantiate Used Controller
  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( ).
  "Hide Check/Append row/Insert/Delete row buttons
  LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_APPEND_ROW_ALLOWED( ABAP_FALSE ).
  LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_INSERT_ROW_ALLOWED( ABAP_FALSE ).
  LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_DELETE_ROW_ALLOWED( ABAP_FALSE ).
 LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_CHECK_AVAILABLE( ABAP_FALSE ).
ENDMETHOD.

2 comments:

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.