on 11-20-2014 4:55 PM
Hi All,
I have created a custom FPM based process and form and need to add validation message for certain field(highlighting the field), can you please guide how I can add the custom message if incorrect values are entered by user.
Do we need to use feeder class for this. Please reply with details.
Thanks,
Shilpa,\
Hi Shilpa,
Yes, you can add the validation message also you can highlight the field.
In the form feeder, when you call validate action, the process goes to IF_FPM_GUIBB_FORM~PROCESS_EVENT, there you can add the validate message.
You can take the reference structure FPMGB_S_T100_MESSAGE.
Set the message id, message no, severity for the message.
Also set the ref_name field in order the highlight the filed.
Add the message to the ET_MESSAGES table.
Hope this helps you.
Regards,
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shilpa,
You can only set the error message in the get_data() method.
If you want to stop the saving you should call it in process_event() method where you have to set the EV_RESULT field as failed whenever you get any error on save event.
If you want the data in process_event() you can set the global structure of type data (or you structure too) in the class attribute and in the get_data() method assign the cs_data to the global structure. Now you can get the data in process_event().
Regards,
Jitendra Sahu
Thanks for your reply!!
I already did the same.
When I chnage the date, the get_data does not have the current data when the save button is clicked. hence the global variable also does not have the new value. Is there any way that I can get the current UI field data in PROCESS_EVENT method.
Thanks,
SHilpa
Hi Shilpa,
You can use the flush() method.
In the flush method you can update the global structure with the new values by using the parameter IT_CHANGE_LOG. In this parameter you have the old and new values. Update the value global structure with the new values.
Now the updated values will be shown in process_event() method.
Regards,
Jitendra Sahu
Hi Shilpa,
Whenever you changed in the UI field and then call any action at that time the flush contain the changed values in the IT_CHANGE_LOG table. Next time any event fire then the IT_CHANGE_LOG is blank if nothing is changed.
Also the is_data contains the modified data.
Kindly check the events fired.
Regards,
Jitendra Sahu
Hey Jitendra,
Thanks for your replies.
I change the date on the screen and then click on Save button but in the flush method IS_DATA has the previous date (not the changed one), also IT_CHANGE_LOG is empty
But If I press enter, then i click SAVE (then two events are getting triggered), so right data is there.
But User may not click enter after entering the value.
PLease advice.
Thanks,
SHilpa..
Hey Jitendra,
I have understood the reason as y it is not getting the correct data.
Since the date comes from the component HRPAO_PAOM_VALIDITY. If I change any other field other than this field , I am gettng the changed value in FLUSH() method.
Now , I have to see how to get data from this component.
Thanks,
SHilpa
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.