The problem
In the old version of WDR_SELECT_OPTIONS (not v2) there is a general issue with controlling the layout of the create Selection Screen. You can create it dynamically, predefine the layout, but later it's difficult to get access and adjust if it resets. This is for example visible when updating text labels - they need to be removed and recreated and end up last on the element list.
I know that it's an obsolete approach, and V2 should be used with the more unified looks. But in my case the old version fit my needs, so why not.
The idea
Initially I implemented a post-exit on the wddomodify view of the WD WDR_SELECT_OPTIONS, and that would do, but it would mean my enhancement in there needs to know and access the class I created for managing my selection screen.
If I had more usages of that component it would mean a numer of post-exit implementations on that method, each per layout - that is not a clean solution, something better needs to exist.
The solution
lr_root_container ?= ir_view->get_element( 'CONTENT' ).
CHECK lr_root_container->get_child( id = 'BL01' ) IS NOT INITIAL.
lr_matrix = cl_wd_matrix_layout=>new_matrix_layout( container = lr_root_container stretched_horizontally = abap_false ).
lr_root_container->set_width( value = '750px' ).
lr_root_container->set_layout( lr_matrix ).
This way if I ever need to apply a similar solution to another app I don't have to touch that WDR_SELECT_OPTIONS component, but only subscribe to the event of the interface IF_WD_SELECT_OPTIONS and make my layout changes there.
I can keep the labels where i want them, align blocks one to another and control the width as I please like in my attachment - I marked with red some of the changes I was after.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 |