Skip to Content

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

Placing of transparrent container in a group

Hello Experts,

I have created group and place transparent container dynamically to this group, within this container i have created text view dynamically but the real problem now is the way data is getting appeared.

Group1:

Transparent container: 1

Textview1: u2018XXu2019 u2018yyu2019 u2018ZZu2019

Transparent container: 2

Textview1: u2018llu2019 u2018ppu2019 u2018qqu2019

Appearance:

XX yy ZZ ll pp qq

Everything appear horizontally, well I want them to appear vertically as shown below

XX yy ZZ

ll pp qq

and I feel this can happen If transparent container are placed vertically in the group but that is not happening

Code:

Group:

lr_group ?= view->get_element( 'INFO' ).

loop at u2026..

lv_tabix = sy-tabix .

shift lv_tabix left deleting leading space .

lv_index = lv_tabix .

lr_trans_cont ?= cl_wd_transparent_container=>new_transparent_container( id = lv_transid ).

CALL METHOD CL_WD_GRID_LAYOUT=>NEW_GRID_LAYOUT

EXPORTING

CELL_PADDING = '3'

CELL_SPACING = '5'

COL_COUNT = '10'

CONTAINER = lr_trans_cont

RECEIVING

CONTROL = lr_grid_layout .

lr_trans_cont->set_layout( lr_grid_layout ).

cl_wd_grid_data=>new_grid_data( ELEMENT = lr_trans_cont ).

lr_group->add_child( index = lv_index THE_CHILD

= lr_trans_cont ) .

lr_textview1 = cl_wd_text_view=>new_text_view(

id = lv_id1

text = lv_str

wrapping = 'X'

).

lr_textview2 = cl_wd_text_view=>new_text_view(

id = lv_id1

text = lv_str

wrapping = 'X'

).

lr_textview3 = cl_wd_text_view=>new_text_view(

id = lv_id1

text = lv_str

wrapping = 'X'

).

lr_horizontal = cl_wd_horizontal_gutter=>new_horizontal_gutter( visible = '01' ) .

lr_grid_data = cl_wd_grid_data=>new_grid_data( element = lr_textview1

COL_SPAN = 1

).

lr_grid_data = cl_wd_grid_data=>new_grid_data( element = lr_textview2

COL_SPAN = 2

).

lr_grid_data = cl_wd_grid_data=>new_grid_data( element = lr_textview3

COL_SPAN = 3

lr_trans_cont->add_child( lr_textview1 ) .

lr_trans_cont->add_child( lr_textview2 ) .

lr_trans_cont->add_child( lr_textview3 ) .

lr_trans_cont->add_child( lr_horizontal ) .

endloop

Edited by: Sanju Joseph on Oct 2, 2008 9:43 PM

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