on 2018 Jan 31 8:56 AM
Hi!
How I can set "Who was nearly injured?" list in "Report Near Miss" in EHSM as mandatory field or make a check on save and cancel saving if list is empty. I need presence of at least one record in it. I check tons of SAP boards and still in panic. Some said about IMG settings some about BADI some about FPM feeders etc and all of it very confusive.
Please make me clear.
Request clarification before answering.
Hello Alexandr,
There is something called Field Control configuration using which you can make the fields mandatory, visible and disable so on like making plant mandatory or like similar fields. Now coming to the field which you have referred is not falling as a individual field rather it is a section named " Who was nearly injured" it is actually a field for inputting the employee or external person, which is not just a field rather it is a BADI which pops up the screen and gives you option to enter the data. I believe it is not a field level control rather it is a BAdI along with field control option (Optional if you want to use control using IMG).
On the other note if you make the section as mandatory you always needs to enter the person information, so most likely the company reports near miss only when a person is nearly injured.
Thanks and Regards
Jayakumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexandr
In this case you should not tag the mandatory check against a check rather you make the Item mandatory based on Incident Category. So you need to enable to check and enhance so that your form is enabled with checking if that field is maintained or not during the "Save" check, while the user is creating and saving the incident.
You can enhance the code with the following
- Make the field mandatory ( I am not sure if you can show the red asterisk) as it is not field level control
- Check if the values are maintained during the incident save which is active only for this type of incident category
Thanks and Regards
Jayakumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayakumar.
Can you point me please which method of which class I must enhance for bring that check or how I can find the right one? For test I tried to set just unconditional
WHEN cl_fpm_event=>gc_event_save.
ev_result = 'FAILED'.
in PROCESS_EVENT method of EHHSSWDC_INC_QAF_INVPER / COMPONENTCONTROLLER which used in this form but Incident Report is created as if nothing happened. Looks like FPM engine drop the intermediate status of FPM_SAVE event. Even if I can check persons here I still can not break FPM_SAVE event and Report will created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello i.jayakumar.
Many thanks for your answer. Always enter person information is exactly what I need. I'm sure that you are right about the fact that this is not an ordinary field which I can configure in IMG. You said I need a BADI which pops up the screen but for screen pop up user must press a one of buttons, which he can not do.
It turns out that my question boils down to "how I can check before saving that at least one person is selected an prevent saving if not".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
2 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.