cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a action of a button based on the condition of the input field ?

Former Member
0 Kudos

Hi All,

What are the procedure to trigger a action of a button internally  based on the condition of the input field.For Example If the Material Type is :FERTor COPE or ABF

it should automatically trigger the button and based on the condition i should get the data in the respective field.

Please tell me where should i mentain the code and it's urgent for my project....

Thanks in advance......

Regards,

Biren

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Biren,

You need to follow the below mentioned steps.

1. Create a action in your form feeder and assign it to the Material Type input field in the component configuration.

2.Whenever you give any material type for example : FERT or COPE. You can able to read it in FLUSH method of form feeder.

3. If your condition is true then fire a custom event which you have assigned to the ADD button and pass the Materail Type as a event parameter.

Finally raise the event

lo_fpm       = cl_fpm_factory=>get_instance( ).

lo_fpm_event = cl_fpm_event=>create_by_id( iv_event_id = <ADD_EVENT> ).

lo_fpm_event->mo_event_data->set_value ().

lo_fpm->raise_event( lo_fpm_event ).

4. Catch the same event in your list UIBB and then do the processing and fill the record into your list.

Hope it will help.

Thanks & Regards

Praveen Gupta