cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HCM P&F - Form Data before Manager approval

former_member206394
Active Participant
0 Kudos

Dear Experts,

I am working on HCM P&F (FPM based).  I need to validate a scenario as explained below:

OT form data is saved in the infotype (custom) only after manager approval.  Now, employee should be restricted to create duplicate requests.

Scenario example:

(Say) An employee has requested for OT from 28.05.2015 23:00:00hrs to 29.05.2015 02:00:00hrs.  (This data will not be saved unless and until the requested is approved by manager).  Before manager approves this request, if employee attempts to request for OT for the same period error message should be displayed.

So, could any one please tell me if there is any standard table that stores form data.

T5ASRPROCESSES, T5ASRSCENARIOS, T5ASRSTEPS, T5ASRSTEPDETAILS these are of no help as this stores only the basic details about the process requested but not the form data.

Please suggest.

Regards,

Shankar

Accepted Solutions (0)

Answers (1)

Answers (1)

ChrisSolomon
Active Contributor
0 Kudos

There is nothing directly available. Via configuration, your options would be:

  • collision : can not have a process initiated while another is in process (like trying to start a "promotion" for someone in a "termination" process.

  • frequency : limit how often a process can be done for an employee (for example, you do not want your "bonus" process to be run for an employee more than once a quarter).

Otherwise, in your own generic service, you would have to build in some validation during "check" for the level of detail you want....and then, you will have your hands full in "pulling" data from the OTHER process.....and keeping in mind, that the other one  has not yet been approved.

If it were me, I would only check before/after the "last" approval step before your "save to database" in your workflow. It could check actual saved data and check for conflict.....if conflict is found, you could then route to the correct person (with same/similar "check"/validation in your own generic service). Then you always know you are checking "real" data and nothing "in process" (and "make believe" until committed). Make sense?

former_member206394
Active Participant
0 Kudos

Dear Christopher,

Greetings!

Thanks for your prompt reply.  What i understand from your solution is to restrict (through generic service/workflow activity) the employee requesting the same kind of process which is already 'In Process' but not based on the data in the already 'In Process' status.

Reason for my question is:

1. First employee requests OT for 28.05.2015 23:00:00 to 29.05.2015 02:00:00. (still in process and not approved by manager, but submitted for approval by employee)

2. Then again employee request OT for a different date;say, 01.06.2015 23:00:00 to 02.06.2015 02:00:00.

If we restrict based on the 'In Process' status of the similar kind of process, though the request in step 2 is valid (as it is for a different date), employee will not be allowed to request.

Because of this step, i want the complete form data of the request that is in 'In Process' status.

Please suggest.

Regards,

Shankar

Former Member
0 Kudos

Hi Shankar,

Read process data using process reference number derived from T5ASRPROCESSES table by passing pernr and process name. Then by reading form data ( parsing form XML string ), compare values with whats been entered on new form.

Thanks,

Chiranjeevi.

ChrisSolomon
Active Contributor
0 Kudos

That is not what he asked....and he will NOT have a "process reference number" at this point....he will have to make a "blind guess" (check) to see if there are ANY other processes of that type out there for the employee. This could be a big performance hit as well as you "scan" all of Case Mgmt to find a "hit".

Again, I suggest you do NOT do it that way. (*see other response)

ChrisSolomon
Active Contributor
0 Kudos

That is NOT what I said. I suggested you do NOT check for other processes "in process". There are all kinds of reasons why that is wrong including the fact that the "in process" one may never get submitted (withdraw....back to author....etc), so you can not count on it.

My suggestion is to wait on your "check" until right before your "save to database". Then in your workflow, have a step (custom method code) that checks for a REAL conflict (ie same data already stored) and then if a problem is found, the workflow can route to someone who can correct/view the issue. That will stop/trap your problem while also not holding up the "normal" flow of your process.

Now if all you really want to check is that two processes have not been requested too soon together, then you could use "frequency" configuration. So for example, let's say you have "Shankar's Wonderful Process" and it was started on 5/28/2015 and has a frequency restriction of 30 days on it. Then if someone else comes along on 6/1/2015 and tries to start the same process for the same employee, they will not be able to....ERROR!.....due to your "frequency" config.

ChrisSolomon
Active Contributor
0 Kudos

This is NOT the correct answer. You will NOT have to do any parsing of the form XML. You can very easily read a process data container and have all form fields (and values) available to you using very standard means. You will also not simply read the "processes" table passing over just the PERNR and process name. An employee could have had multiple entries for the same process (ie. bonus awards over many years) so this will do nothing for you except pass bad data. Again, there are other, correct ways to do this if needed.

Not sure what is going on here (friends giving friends points?) but this answer is WAY off and not really what the OP asked.