Saturday, August 10, 2013
When you create ALV report in Web dynpro ABAP, By default you will get buttons like Print Version, Export. If you do not want to have Print Version button, you need to use the following piece of coding.

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( ).
  "Shows/Hides Pushbutton / Tab Page "PDF"
  LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_PDF_ALLOWED( ABAP_FALSE ).
ENDMETHOD.

0 comments:

Post a Comment

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.