Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Tray Error

Hello All

I am creating Dynamic tray with following code in WDMODIFYVIEW Method in the View.

But it giving error "Access via 'NULL' object reference not possible."

What is wrong in below code please let me know.

data lr_cntr type REF TO cl_wd_uielement_container. .

data lr_tray type REF TO cl_wd_tray.

lr_cntr ?= VIEW->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER').

lr_tray = cl_wd_tray=>NEW_TRAY(

CONTEXT_MENU_BEHAVIOUR = cl_wd_tray=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

DESIGN = cl_wd_tray=>E_DESIGN-TRANSPARENT

id = 'MYTRAY'

width = '100'

ENABLED = 'X'

EXPANDABLE = 'X'

EXPANDED = 'X'

HAS_CONTENT_PADDING = 'X'

SCROLLING_MODE = cl_wd_tray=>E_SCROLLING_MODE-NONE

VISIBLE = cl_wd_tray=>E_VISIBLE-VISIBLE

).

cl_wd_flow_data=>new_flow_data( element = lr_tray ).

cl_wd_matrix_layout=>new_matrix_layout( container = lr_tray ).

lr_cntr->add_child( lr_tray ).

BR

-CW

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question