cancel
Showing results for 
Search instead for 
Did you mean: 

Set state in a table column (not ALV) dinamically

0 Kudos

Hi,

I have a table where the obligatory columns should appear with the red "*" that says it's obligatory.

Some columns are not obligatory always, it depends on some options the user have choosen in some other fields.

I'm trying to do it with the STATE attribute of the input field of the column. So I assign the value I have in the context to it.



  data ls_ui  type dpr_ts_fc_ui.

   ls_ui-state = '01'.

I send this information to the context to GSBER_UI and then I bind this context to the attribute in the view:


V_SENDER.BP_0002.GSBER_UI.STATE 

But it doesn't work, and I don't know why because I'm doing the same for the VISIBLE and READONLY attributes and it works.

And I'm able to set the STATE attribute to a normal (not in a table) input_field element.

Could anyone help me?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>

> Hi,

>

> I have a table where the obligatory columns should appear with the red "*" that says it's obligatory.

> Some columns are not obligatory always, it depends on some options the user have choosen in some other fields.

>

> I'm trying to do it with the STATE attribute of the input field of the column. So I assign the value I have in the context to it.

>

>


> 
>   data ls_ui  type dpr_ts_fc_ui.
> 
>    ls_ui-state = '01'.
> 

>

> I send this information to the context to GSBER_UI and then I bind this context to the attribute in the view:

>

>


> V_SENDER.BP_0002.GSBER_UI.STATE 
> 

>

> But it doesn't work, and I don't know why because I'm doing the same for the VISIBLE and READONLY attributes and it works.

> And I'm able to set the STATE attribute to a normal (not in a table) input_field element.

>

> Could anyone help me?

>

> Thank you!

Hi,

You logic seems to be okay. Normally the for the inputfield we use WDUI_STATE type. Ofcourse the domain values are 00 and 01.

I am not sure how the binding of the UI element with the context node.

Are you sure that you have a attribute (state ) inside your node that is bind to the table, and this state attribute bind to the inputfield cell editor property state ?

Answers (1)

Answers (1)

0 Kudos

Hi,

Thank you very much! I have solved the problem thanks to your help!

I had everything properly informed in the context and the binding was properly done too, but in my binding I used the type

WDY_MD_STATE instead of WDUI_STATE.

I was using the structure DPR_TS_FC_UI.

I have change the type and now it works!

But I still don't understand because both are a NUMC 2 with the same values ( 00, 01).

thanks again,

Ainara