on 08-14-2013 1:19 PM
Hello,
I have an odd issue. I am trying to set a couple of fields on a check event in P&F using a generic service in the DO_OPERATIONS part of the generic service. When I loop through and set the field values the field values do get set but that change isn't reflected back on to the screen. I know that the correct information is in the field value because I have a validation that runs on it and it is passing that validation.
Any ideas?
Thank you,
Ryan
This can be due to a FEW things. What is the field you are trying to change during "check"?
Some things that often cause this....
1. you have an issue in ANOTHER service that is making your service fail too. This one is HARD to catch at times because as you saw, in debugging, you see the field has changed. However, if ANY other backend service fails or has some unhandled error, your change gets "backed out" too...it is an "all or nothing" type deal. You need to make sure NONE of your services has problems,
2. If you are changing an infotype field (say one that is mapped to SAP_PA) you MUST look at the "decoupled infotype" configuration. The field you want to use from some infotype may be set as "read only" in configuration for decoupled infotypes (and HCM P&F folks don't often look/work over there).
3. you have set the field in HCM P&F config as "read only" (this is possible now and more strictly controlled than in the past).
If you check those two and all is well, then we can move on to some of the other things to check. But my guess is that it is one of those three.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
1. All other services are working.
2. This one is tricky to answer. I am changing a field that is from an infotype but I haven't mapped it to SAP_PA (I am having the user type an email and bringing in pernr, last name, first name). I was just using a select statement to load the field but not mapping it in PA.
3. Set to "Can Be Edited".
Thank you for the help!
Hi Chris,
Figured it out today with the help of a coworker. I ended up using something I learned from your blog talking about user events and thought you may be interested in the solution.
After investigation I decided to make my event a user event rather than a check event (but all the same reasoning will apply).
Basically what was happening is I have a 2nd service that runs validations that uses message_handler to give the user any relevant messages. The generic service that contained my validations was listed before my generic service to populate values. The operations that were tied to my fields were run in order and when it got to the validations service it hit a message, completed that service, ran the next service, and then tried to apply all the changes. But because a message existed the sap variable is_ok was false which caused the form fields to not update.
So in conclusion be very careful with messages.
Hello Ryan,
If you are using an user event of type CHECK, ensure the fields that you are setting are included in the field group corresponding to the event.
If you still continue to face the issue, please share screenshots of the process config.
Hope this helps.
With regards,
Sahir.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Can you please help to test this?
Use tcode hrasr_test_process, plug in all the values for application, process, personnel number, role of initiator and run it.
If this is at approval stage, get put in work item from your workflow log; else ignore Execute Dialog Step of Process section
You should able to see value that is passing from backend services / generic services without form involvement. You can similate initialize event using "Initialize" button, whereby form is first loaded or "Check" button to trigger DO_OPERATIONS
By doing this, just to narrow the scope to track the root cause; whether it is at form level or generic services.
I found this tcode is useful this to test the functionality of your generic service / backend service without form involvement, during start of development or to do debugging .
Thanks. Hope to hear you will get something out of this test.
regards,
Xiang Li
Hi Ryan,
That's fine. Field group will come into picture only if you are using user events.
If the fields are included and not mapped any of the standard services - the config should work. Debug the generic service do operations method. Ensure that the fields are not op excluded.
Regards,
Sahir.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Might be caused by few things.
Can you please cehck you have append the same field in IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS method , SPECIAL_FIELDS table?
As if it is one of the special field you can never change the field value in initialize/do_operation method.
Hope this helps.
Thanks.
regards,
Xiang Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Okay.
Please check if i understand your issue correctly.
IN DO_OPERATION, you changed couples of fields value in SERVICE_DATASETS.
On form you don't see the value get changed, but you did some client scripting on form to validate the value, it passes.
Am I right?
So, meaning to say those values are already passed to the form, somehow form is still displaying the form first loaded value instead of latest value from bound field(s)?
regards,
Xiang Li
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
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.