Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

This is a common error 'Null Reference for the update toolbar error is shown in the Webdynpro ALV'.

There will be a requirement in some cases to hide the toolbar of the ALV component.

This is the code to hide the toolbar of the ALV

Data: lo_value type ref to cl_salv_wd_config_table.
if lo_value is not initial.
CALL METHOD lo_value->IF_SALV_WD_FUNCTION_SETTINGS~SET_VISIBLE
  EXPORTING
    VALUE  = CL_WD_TOOLBAR=>E_VISIBLE-NONE.          "Hide toolbar
 endif. 

 once it's set to visible none then we need to make it visible when required to avoid the above null reference errors.

This is the code to unhide/show the toolbar of the ALV

Data: lo_value type ref to cl_salv_wd_config_table.

if lo_value is not initial.
CALL METHOD lo_value->IF_SALV_WD_FUNCTION_SETTINGS~SET_VISIBLE
  EXPORTING
    VALUE  = CL_WD_TOOLBAR=>E_VISIBLE-VISIBLE.          "Show toolbar
 endif.