cancel
Showing results for 
Search instead for 
Did you mean: 

How to make WD ALV Editable Fields (Cell) Mandatory (Obligatory) ?

ChandraMahajan
Active Contributor
0 Kudos

Hello Friends,

I have requirement where I need to make WD ALV editable inputfield as Mandatory fields. I found out that there is no method available to do this.

If anybody has any solution then please reply to this thread.

Thanks,

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandrasekhar

To make particular input field mandatory

DATA lr_inputui1 TYPE REF TO cl_salv_wd_fe_input_field.

CREATE OBJECT lr_inputui1

EXPORTING

value_elementname = 'CARRID'.

lr_inputui2->set_state( 01 ).

Thanks and Regards

Tulasi Palnait

Answers (3)

Answers (3)

ChandraMahajan
Active Contributor
0 Kudos

Hello Friends,

Thanks for your reply. I just wanted to elaborate more on this so that others will benefit from this thread.

I used method SET_STATE from class CL_SALV_WD_UIE_A_INPUT which is super class for class CL_SALV_WD_UIE_INPUT_FIELD.

The code looks as below,

Data: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.

CALL METHOD lr_input_field->set_state

EXPORTING

value = cl_wd_abstract_input_field=>e_state-required.

well, I just forgot to check super class and its available methods...But got clear hint from Tulasi.

Thanks to all.

Chandra

Former Member
0 Kudos

Hi Chandra,

I don't think there is direct way to achieve the same,However you can use following approach to achieve it.

1.Set Table Cell editor(Input Field) property "state" to required so that you will get mandatory symbol(*) for that field

2.check the value of input field in the event handler of "ON_DATA_CHECK" event.if the value is initial,display appropriate message on screen.

Hope this helps..

Thanks,

Balaram

Former Member
0 Kudos

>

> Hello Friends,

>

> I have requirement where I need to make WD ALV editable inputfield as Mandatory fields. I found out that there is no method available to do this.

>

> If anybody has any solution then please reply to this thread.

>

> Thanks,

> Chandra

Hallo Chandra,

yes there is no method for it. You can set the field property required set to true to indicate visually it is mandatory. On server side you need to do the control if it is empty or valid value is filled in.