Sunday, December 31, 2017

How to Change ALV Standard toolbar button text in SAP ABAP

Scenario : As per the requirement we need to display SAP ALV standard tool bar export button text as 'SAVE EXCEL' .By default the button text is 'Export'.

Solution :

All ALV standard toolbar buttons (Function Codes ) are available in SAP standard internal table

e_object->mt_toolbar.

here e_object is the one of the importing parameter of ALV TOOLBAR Event ( Toolbar Event : where we add customizing buttons to the ALV standard toolbar using the same internal table).

Customizing the standard text display :

In side the ALV Toolbar event handler , write the below mentioned piece of code .

LOOP AT e_object->mt_toolbar ASSIGNG <fieldsymbol>.

   IF <fieldsymbol>-function EQ '&MB_EXPORT' .  " (&MB_EXPORT is the FCODE of export                                                                                                button)
 
   <fieldsymbol>-text  = 'SAVE EXCEL' .   "User's customizing text

 ENDIF.
ENDLOOP.


No comments:

Post a Comment