cancel
Showing results for 
Search instead for 
Did you mean: 

how to invisible some fields in a table?

KiranJ
Active Participant
0 Kudos

Hai Experts,

in my view i hav one table based in Dropdown by key value some fileds in my table is not visible how do it.

thanks in adv.

Accepted Solutions (0)

Answers (4)

Answers (4)

KiranJ
Active Participant
0 Kudos

thank qu .

KiranJ
Active Participant
0 Kudos

if lv_ib_ob_indicator = 'I'.

  • set single attribute

lo_el_in_ob->set_attribute(

name = `DELIVERED_TIME`

value = abap_false ).

  • set single attribute

lo_el_in_ob->set_attribute(

name = `DELIVERED_DATE`

value = abap_false ).

ENDIF.

thank qu for reply.

Former Member
0 Kudos

Compare your code with the below code:

  • set the visiblity

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_visible TYPE wd_this->element_context-visible.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

At this position lo_el_context don't get any value in your case. Check it out why

lv_visible = abap_true.

  • get single attribute

lo_el_context->set_attribute(

EXPORTING

name = `VISIBLE`

value = lv_visible ).

ChrisPaine
Active Contributor
0 Kudos

Hi,

I'd suggest that your lead selection is not set in your context - in your context definition set "Initalization Lead Selection" as checked.

Also - I'd be tempted rather than using a boolean to use a type WDUI_VISIBILITY.

It seems people have forgotten that visibility can have three states!

None (UI element is not considered in any layout)

Blank (space is left in layout for UI element)

Visible

Then set your visibility using values

wdyn_ui_visibility_none

wdyn_ui_visibility_visible

and

wdyn_ui_visibility_blank

Cheers,

Chris

KiranJ
Active Participant
0 Kudos

hai ,

i did the same thing but it gives the error Null object reference is not possible.

any help.

Former Member
0 Kudos

Can you please send us the code for the same, so that we can find the problem.

Former Member
0 Kudos

Hi Sree,

You can set the visiblity of the table column by setting the visible property of the table column. To do this, you can take an attribute type WDY_BOOLEAN and bind this attribute with table column and set the value ABAP_TRUE/ABAP_FALSE based on your requirement.

Hope it helps you.