cancel
Showing results for 
Search instead for 
Did you mean: 

Short dump while creating transparent container dynamically

Former Member
0 Kudos

Hi experts!

I want to create a transparent container dynamically, but I get a Short Dump (

Note

The following error text was processed in the system NSP : Access via 'NULL' object reference not possible.

The error occurred on the application server Datatrain_NSP_00 and in the work process 0 .

The termination type was: RABAX_STATE

The ABAP call stack was:

Method: CREATE_BY_VIEW_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP)

while doing so. Below my code...

Can somebody please advise I don't know what I did wrong....

Thanks in advance!

Points will be rewarded

METHOD wddomodifyview .

DATA: lr_container TYPE REF TO cl_wd_uielement_container,

lr_matrix_head TYPE REF TO cl_wd_matrix_data,

lv_hlp_str TYPE string VALUE 'DYNCONT_1',

lr_trans_cont TYPE REF TO cl_wd_transparent_container.

lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).

CALL METHOD cl_wd_transparent_container=>new_transparent_container

EXPORTING

enabled = ABAP_TRUE

id = lv_hlp_str

is_layout_container = ABAP_TRUE

receiving

control = lr_trans_cont

.

lr_matrix_head = cl_wd_matrix_head_data=>new_matrix_head_data(

element = lr_trans_cont ).

lr_trans_cont->set_layout_data( lr_matrix_head ).

lr_container->add_child( lr_trans_cont ).

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Felix,

You need to set the layout first and then set the layout data. Use the method cl_wd_matrix_layout=>new_matrix_layout. Do a set_layout on the container and then do set_layout_data. That should solve your problem.

Regards

Nithya

Answers (0)