cancel
Showing results for 
Search instead for 
Did you mean: 

Require help in showing Status details on HCM Process and forms ( Adobe )

Former Member
0 Kudos

Hello Experts,

I am new to HCM Process and forms.

I have requirement in the Adobe form layout where I need to show Status details ( Processed by, Rejected by etc ) in the layout.

It should get updated based on the stage of the process the form is in.

I have taken the logic suggested from the below blog.In Do_operations and Initialization method of the custom back end service .

http://scn.sap.com/community/erp/hcm/blog/2012/09/03/hcm-processes-forms-how-to-get-approval-data

I see in debugg mode that after I submit the request ( After request number is generated ).

The UBL for the approver ( Workflow agent ) when clicked upon. The Do_operations and initialization method getts triggered and the values into the field which I have linked in the Adobe layout also get updated but in the subsequent standard process the new values get over written with old values.

Could you please suggest any alternate approach to fulfill this requirement.

Regards,

Murthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Murthy,

As stated correctly you will have to fetch the data from these three tables: T5ASRPROCESSES, T5ASRSCENARIOS and T5ASRSTEPS.

Is your requirement that if your Process contains five steps and your Form is at 4th step then you want to display the status details of all the initial three steps??

And the issue you are facing is that you are able to populate the values for one step only?? At each step the values are getting replaced by the latest one??

If this is what you want then you can achieve this in below two ways:

1) you can use a dynamic table in which rows get added as the steps are completed and display the details in that table.

2) You can create different variables for each stage and bind them to the values corresponding to their stages. You can hide the fields if they are not relevant to any stage using scripts.

hope that helps.

Regards,

Mayank

Former Member
0 Kudos

Hello Mayank,

Thank you very much for your inputs.

You got my requirement correct.

I have only single step approval scenario. So after I initiate the process ( After submission ) when the trying to open the UWL from approvers inbox, the status does not show me processed by information ( Which is already updated in the standard table ) and the changing parameter Service_Datasets of DO_OPERATION method gets updated with when I check in Debugg mode. but after that the new values are over written with the old ones. I dont know why.....

The variable I have declared in HRASR_DT is treated as table at the Adobe end.

So I just have to append the values to that fileld incrementing the field of the SERVICE_DATASETS field fieldindex.

Regards,

Murthy

sahirn
Active Contributor
0 Kudos

Add the debug screenshots of the values and process config for these fields in design time too.

You might have missed setting record index to *.

Regards,

Sahir.

Former Member
0 Kudos

Hi Murthy,

You have only one step approval process, i.e. there will be an initiator of the Form, and then the form will flow to the approver, and once approved your process will be completed. Is that correct?

I am not able to understand what do you mean by "the new values are over written with the old ones".

Can you please explain with an example?

Is it that when you open the Form at approval step you are not able to see who was the initiator??
What values are you able to view then??

Additionally you have debugged and checked the Do-Operation at which step?? The initial step or the approval step?

Please answer so that i can understand what exactly is happening?

Regards,

Mayank

Former Member
0 Kudos

Hello Mayank,

Thank for responding.

Yes we have only single step approval process.

I have written the logic mentioned in the blog mentioned earlier in the DO_OPERATION method.

I see that this method DO_OPERATIONS gets triggered when we click on the UBL at the approve reject step in approvers inbox. Hence I have writtent the logic to read entries from T5ASRSTEPS database table. In debugg mode I see that this method ( DO_OPERATION ) getts triggered and the lates process steps are updated into the field aswell . But in the subsequent standard code the old entries ( Values which were present before the DO_OPERATION method gets triggered ) are over mapped instead of the updated ones.

For Example : At the time of initiation of process the Status field should show in the Adobe layout

                     " Process not started "

                     After submission of request ( After reference no is generated ) . When the process goes to Approver and the approver clicks on the UWL. The status should read "Processed my MURTHY", here though DO_OPERATIONS method gets triggered and the new values get updated in the respective field after this method the old values are replacing the new ones. Hence showing the status " Process not started".

Regards,

Murthy

Former Member
0 Kudos

Hi Murthy,

Check in HRASR_DT that the default value of your field must be from the Service in whose do-operation you have written the code for fetching the value of that field.
If it is not so please change the configuration accordingly.

Have you added you fields in other backend services/Form scenarios as well?
If yes, what is the value you are getting at those places and make sure that you are not modifying the value of your field at any other place.

Regards,

Mayank

Former Member
0 Kudos

Hi Mayank,

I have checked the settings in HRASR_DT every thing is fine. I see it is the standard framework behaviour to over write the updated values with old one's.

I have trying changing values of other fields as well at runtime ( Debugg mode ) but only old values keep showing up.

For now I have met my requirement by writing my logic in the implicit enhancement section of the standard class method mentioned below.

CL_IM_HRASR00ISR->SET_REF_NUM_IN_ISR_TABLES .

Request you to please let me know if you have any more suggesions.

Regards,

Murthy

Former Member
0 Kudos

Hi Murthy,

              I understand your Scenario. This can be controlled using Scenario stages.

Create 2 scenario stages/steps.

1. initiator.

2. approver.

pass scenario stages to Back end services class.

In do operations method.

write a condition like

if scenario stage = 'initiator'.

 

write all codes inside that.

endif.

Assign 'approver' scenario stage on bindings of approver step.

on approval Do operations method will trigger. but scenario stage value will be 'approver'. so we have written a condition to trigger code at 'initiator' level only.. so values wont change..

hope it helps you.

regards,

Arun

Former Member
0 Kudos

Hello Arun,

I tried you option as well based on the form scenario stage ( Approval ) I have written the new logic .

But still it did not work.

I have enclosed the solution which worked for me.

Thank you Arun and Mayank for sharing your thoughts.

I will close this tread on this note.

Regards,

Murthy

Answers (1)

Answers (1)

sahirn
Active Contributor
0 Kudos

You would have to fetch the values from t5asrsteps based on the process status.

Regards,

Sahir.