cancel
Showing results for 
Search instead for 
Did you mean: 

FPM - Roadmap help

farooq_basha
Active Participant
0 Kudos

Hi Experts,

Here we have existing application in which Roadmap has configure through FPM

In 3rd step of roadmap

There are 4 mandatory input field available in which 2 radio button and 2 text edit

For this validation has written in WDDOBEFOREACTION method

When enduser select for one radio button its thrown error to Select or enter other 3 inputs as radio button is action, so validation code is writtem in WDDOBEFOREACTION it executes.

My requirement is :

When enduser click on SAVE or NEXT or PREVIOUS button this validation should happen

If i replace my code in SAVE it working fine for validation. But i don't know how to write code in NEXT and PREVIOUS because its configure in FPM

Please can any one suggest me how to acheive this

Regards,

Farooq

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have a method called process_event in component controller. This method get the FPM events. Do your mandatory checks here as well.

farooq_basha
Active Participant
0 Kudos

Hi Baskaran,

Thanks for quick respond

Can you please tell me how to add code for NEXT and PREVIOUS action for my logic.

Regards,

Farooq

saravanan_narayanan
Active Contributor
0 Kudos

Hello Farooq,

in the PROCESS_EVENT method of the respective component controller (in that step) you can write the following case statement to check for the event that is triggered


case io_event->mv_event_id.
      when cl_fpm_event=>GC_EVENT_NEXT_STEP.
           "Your logic for next step validation
     when cl_fpm_event=>GC_EVENT_PREVIOUS_STEP.
           "your logic for previous step validation
endcase.

BR, Saravanan

farooq_basha
Active Participant
0 Kudos

Hi Saravana,

If i write condition like which you suggested,

I am writing my condition in COMPONENT CONTROLLER Process_event method.

In 1st road map step when i enter my data and click on next or previous button then it will check for 3rd step validation which not filled yet . Validation should be done in that particular VIEW.

Next and Previous is available in all VIEW i.e., all roadmap step.

Regards,

Farooq

saravanan_narayanan
Active Contributor
0 Kudos

Hello Farooq,

The Process_event method has another parameter IT_INTERFACE_VIEWS. you can restrict your validations to particular interface view.

BR, Saravanan

farooq_basha
Active Participant
0 Kudos

Hi Saravana,

Can you please help me with peace of code, how to restrict with this parameter.

Thanks and regards,

Farooq

saravanan_narayanan
Active Contributor
0 Kudos

Hello Farooq,

you can do like this

{code{

read table it_interface_views with key table_line = <YOUR_INTERFACE_VIEW_NAME> transporting no fields.

"INTERFACE VIEW NAME is same as the window name that is embedded in the step. in the GAF Comp. configuration its called View.

if sy-subrc = 0.

case io_event->mv_event_id.

when next.

when previous.

endif.

{code}

BR, Saravanan

farooq_basha
Active Participant
0 Kudos

Hi Saravana,

<<<read table it_interface_views with key table_line = <YOUR_INTERFACE_VIEW_NAME> transporting no fields.

"INTERFACE VIEW NAME is same as the window name that is embedded in the step. in the GAF Comp. configuration its called View.>>

I am write my code as like this

read table it_interface_views with key table_line = Z_FP transporting no fields. " Z_FP my window name

if sy-subrc = 0.

case io_event->mv_event_id.

when cl_fpm_event=>GC_EVENT_NEXT_STEP.

wd_this->check_fp_view( ).

when cl_fpm_event=>GC_EVENT_PREVIOUS_STEP.

wd_this->check_fp_view( ).

endcase.

endif.

endmethod.

When i am checking the syntax i am getting ERROR message as Z_FP field is unknown. It is neither define in one the table or define 'DATA' statement

For this what have to do.

Regards,

farooq

saravanan_narayanan
Active Contributor
0 Kudos

Hello Farooq,

if Z_FP is your interface name then give it in single quotes like 'Z_FP'.

BR, Saravanan

farooq_basha
Active Participant
0 Kudos

Thanks for your help saravana it working now

Answers (0)