cancel
Showing results for 
Search instead for 
Did you mean: 

Add a Transparent Container dynamically in wddomodifyview

Former Member
0 Kudos

Hi All,

I have added UI Elements to views before. Now, I am trying to add a Transparent Container to a Group, which does not work. I am using the same procedure as I have used it for other UI Elements before, but I keep receiving the dump:

The following error text was processed in the system JIL : Access via 'NULL' object reference not possible. 
The error occurred on the application server SV-SAP-2_JIL_01 and in the work process 0 . 
The termination type was: RABAX_STATE 
The ABAP call stack was: 
Method: CREATE_NW7_BY_VIEW_ELEMENT of program CL_NW7_VIEW_ELEMENT_ADAPTER===CP

My code is as follows:

lo_group ?= view->get_element( 'GROUP' ).

    lo_tc = cl_wd_transparent_container=>new_transparent_container( id = 'TC_SECOND_ELEMENT' ).
    cl_wd_matrix_head_data=>new_matrix_head_data( element = lo_tc ).
    lo_group->add_child( the_child = lo_tc ).

Why does the coding above not work?? How is the proper coding to add a Transparent Container to my group?

THANKS, Johannes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Your coding seems to me fine. Though i am not sure if this line causes the error.

cl_wd_matrix_head_data=>new_matrix_head_data( element = lo_tc ).

I normally get this error when the UI element property is not binded correctly. How sure are you that this error is coming because of this TransparentContainer ?.

You can comment out the whole and check if this is working.

Then enable one by one and see if you get it worked.

gill367
Active Contributor
0 Kudos

Go to ST22.

Check the dump generated by this error and then go to source code extract and then check where null exception is coming

in the code.

thanks

sarbjeet

Former Member
0 Kudos

I know that. I have checked this before.. It doens't tell me anything...

gill367
Active Contributor
0 Kudos

so for which line it is giving the null exception.