cancel
Showing results for 
Search instead for 
Did you mean: 

Change the layout data type dynamically in standard webdynpro applications

Former Member
0 Kudos

Hi ,

I am working on standard webdynpro component .My req is

I am having a matrix layout container C1 which consists of two containers c2 and c3 in C1 .

Now individually C2 and C3 are also Matrix layout

And layout data of C2 is matrix head data and C3 is matrix data .

Now I am deleting the c2 by using REMOVE ELEMENT ..But now I am getting an error as c3 should be of matrix head data .

I have done with the following changes in postexit

Please check it and let me know if any problem is there in coding

DATA : LT_MAT_LAY TYPE REF TO CL_WD_MATRIX_LAYOUT.

DATA : LT_MAT_DATA TYPE REF TO CL_WD_MATRIX_DATA.

DATA: LT_MAT_HEAD TYPE REF TO CL_WD_MATRIX_HEAD_DATA.

DATA : LT TYPE REF TO CL_WD_LAYOUT_DATA.

*DATA : VIEW TYPE REF TO IF_WD_VIEW .

DATA : LR_CONT TYPE REF TO cl_wd_TRANSPARENT_container .

LR_CONT ?= VIEW->GET_ELEMENT( 'CONTENT_CONTAINER' ).

Content_container is the C3 container as I discussed in d above case .

As of now I am getting the properties of Content_container properties to lr_cont and even I am manipulating lr_cont .But I want to assign matrix head data to C3 which is now matrix data

This classes are related to matrix layout for ur help

DATA : LT_MAT_LAY TYPE REF TO CL_WD_MATRIX_LAYOUT.

DATA : LT_MAT_DATA TYPE REF TO CL_WD_MATRIX_DATA.

DATA: LT_MAT_HEAD TYPE REF TO CL_WD_MATRIX_HEAD_DATA.

DATA : LT TYPE REF TO CL_WD_LAYOUT_DATA.

Can anyone help me in this .....

Is there is anyother procedure for this ..

Even I checked with configurations which is showing no result for this requirement ..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This behavior is right. c2 and c3 are children of C1. You need to have atleast one Martix head data inside a container. So when you delete c2, you need to change the layout of c3 to Matrix head data.

Easiest way is (assuming lo_tc3 is your c3 and you already have it initialized

data:
   lo_tc3                              TYPE REF TO cl_wd_transparent_container.

 LT_MAT_HEAD = CL_WD_MATRIX_HEAD_DATA=>new_matrix_head_data(
     element = lo_tc3 ).

lo_tc3->set_layout_data(  LT_MAT_HEAD ).

Answers (0)