cancel
Showing results for 
Search instead for 
Did you mean: 

Visibility properties of an input file

matteo_montalto
Contributor
0 Kudos

Hi all gurus,

in a WDDOMODIFYVIEW method of a standard view in SRM 7, I'm adding some dinamically retrieved custom fields. Here's a sketch of code that shows how I create the couple label and attribute for a field::

LOOP AT lt_header_csf INTO ls_header_csf.
* Concatenate attribute id and label
        CONCATENATE ls_header_csf-field_name '_ATTR'  INTO lv_attr_id.
        CONCATENATE ls_header_csf-field_name '_LABEL' INTO lv_label_id.
        lo_ui_element_attr  ?= view->get_element( lv_attr_id ).
        lo_ui_element_label ?= view->get_element( lv_label_id ).
.....
        lo_container->add_child( the_child = lo_ui_element_label ).
        lo_container->add_child( the_child = lo_ui_element_attr ).


There's a problem with a single field, which is defined as a CHAR(250). By now, the input box for that field is really huge and this mess up the view.

Is there any attribute/property I can change for that lo_ui_element_attr in order to keep it as an input field of 250 c but setting a fixed dimension for the input box ?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If possible try by using TEXT_EDIT UI Element, it might helps you.

Cheers,

Kris.

matteo_montalto
Contributor
0 Kudos

Hi kris,

these are the DATA declaration in the enhancement:

lo_ui_element_attr      TYPE REF TO cl_wd_uielement,
           lo_ui_element_label     TYPE REF TO cl_wd_uielement,

I'd prefer to keep these one as the code that follows use the interface of cl_wd_uielement (and also, this declaration fits all the custom fields in my code). Can I eventually use a downcast for the specific field to a TEXT_EDIT UI element?

I've seen there's a LENGHT attribute for an object of type cl_wd_uielement, does it represents the real lenght o just what's visible on screen?

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Solved using the SET_WIDTH method of the cl_wd_input_field class.