cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in Approval Process

09-10-2014 7:40 AM
2942 views 17 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

I am working on creating an approval process. To block an account I need it to go through some approval first.

I have followed all the steps as mentioned in the help doc but I am facing some issues.

I have created a custom BO (CustomerBlock.bo) and an EC. I have embedded the EC in Account TI. This contains some fields which need to be filled and then submitted for approval. I have provided a button which invokes submitForApproval action on click.

For the custom BO i have created the approval process, approval and notification tasklist views are added to Account workcenter view.

In submitForApproval action, I am assigning EmployeeIDs to requester and RM approver.

SubmitForApproval action is executed successfully, but on saving the Account I am getting an exception. The exception is not thrown if I remove the tasklist views from the account workcenter view.

Any Idea what could be the issue here? Please help.

Regards,

Ambuja

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Do you have something in the Before-Save event? If not, try to regenerate the approval process for your custom BO

ambuja_prabhudessai
Participant
0 Likes

Hi,

There was some issue with another custom tab in the Account screen, due to which before-save was not getting invoked. Submit and save is working fine now. I am now facing the following issue during approval.

When I click on submit for approval, a task gets created under Application and User management -> Task distribution -> BTM. But it is not assigned to anyone. When I say Assign Item,the list does not return any records. In submitForApproval action, I am assigning the EmployeeID to the approver.

If the approver tries to open the task details and approve/reject, it gives an error saying "You are not authorized to change the data"

If the approver tries to click on the custom Approve button, it gives the following errors.

I have written the following code in Approve.absl. This code is invoked only when the approver clicks on Approve Button and not on click of approve icon in the notification task.



I dynamically want to assign the approval task to requester's reporting manager. Not sure how this can be implemented.


Regards,

Ambuja

Former Member
0 Likes

Hi,

it seems you have some problems on the authorizations to manage the approval process.

Did you do the following steps (replace Contract BO with your custom BO)

Finally the person that receive the notification should have your custom VCView assigned to him, as well the person that starts the approval process.

ambuja_prabhudessai
Participant
0 Likes

I am still not able to assign the task to anyone. I have performed all the steps as mentioned by you. But instead of assigning the tasklist views to Custom BO WCView, I have assigned them to Account_WCV. Is this causing the issue?

Just a query here: Do I manually have to go to BTM and assign the task to Person responsible or will it automatically be assigned once I assign the EmployeeID to the approver in ABSL code?

Former Member
0 Likes

1) Maybe yes: the approval process is on your custom BO, so you need to assign the tasklist views on the custom BO WCVies. Not sure. Try.

2) Should be automatic.

ambuja_prabhudessai
Participant
0 Likes

Hi,

Assigning the tasklists to custom BO WCView works. But the tasks don't get assigned to the approver automatically through code. I have to manually go to the Application and user management -> BTM and click on determine assignment buttons.

After submit, tasks always get created here with no assignments.

Former Member
0 Likes

In you approval process you have to select the field for the automatic assignment. Did you do that? Obviously the field should be filled before you start the approval process.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Ambuja,

After performing all steps mentioned by Alessandro your BO should appear in the BTM.

There you can define (if required) some contrains if the instance needs approval

AND how the approver should be determined:

  • From a field inside your BO (the approver mentioend in the documentation)
  • A direct approver (from the Org. Management)

HTH,

    Horst

ambuja_prabhudessai
Participant
0 Likes

Hi,

I can see the approval process created for my BO in BTM. I have assigned the custom approver field. But on submit, when a task is created, it does not get automatically assigned to the approver.

I have to manually go to BTM -> click on the task and click on Determine Assignment button. I want the task to be assigned automatically to the approver.

Regards,

Ambuja

ambuja_prabhudessai
Participant
0 Likes

Hi,

I have selected the approver field from my BO to whom the task should be assigned. I am populating this field before the approval process is started but still the task does not get assigned automatically.

Regards,

Ambuja

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Ambujy,

And the approver defined by "RM approval" refers to this field inside your BO?

The respective Employee -> User meets the criterion mentioned by Alessandro (UI assigned, ....)?

Bye,

   Horst

ambuja_prabhudessai
Participant
0 Likes

Hi,

Yes it is the field defined in my custom BO. Required UIs have been assigned to the approver.

As soon as I click on Determine Assignment the task gets assigned to the approver and a notification is sent to the approver.

Regards,

Ambuja

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Ambuja,

So, the task is generated and assigned to the approver incl. the notification.

But a dump happens when the approver approves the task?

Bye,

    Horst

ambuja_prabhudessai
Participant
0 Likes

Hi,

The exception issue is resolved. Now everything is working fine. But the task gets assigned to the approver along with notification only when I manually go and select the task in BTM and click on 'Determine Assignment' button. Once I do this, the approver gets notification and is able to take the required action.

Again, once the approver approves/rejects the task, a notification is created in BTM for the requester. Only once i select this notification and click on 'Determine Assignment' button, it is sent to the notification.

I do not want to manually go to BTM and assign the tasks that are created. I want this to be automated.

Regards,

Ambuja

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Ambuja,

Did you ever define a workflow rule?

Goto to the workcenter view "Workflow Rules"

Select an existing workflow and press EDIT or create a new one.

In the step 3 "Define Actions" you can determine a recipient by determination or for a fixed employee.

HTH,

    Horst


ambuja_prabhudessai
Participant
0 Likes

Hi,

I added a workflow rule for my BO for which Approval process is created. But instead of 'Employee', I have filled 'Recipient Determination' because my approvers will not remain the same everytime. The recipient Employee ID is getting filled in my BO script.

Different Employees have different managers and hence I do not want the same person to get all notifications. I do not want to hard code an Employee name for recipient.

After doing this i submitted my approval request and again a notification gets created in BTM work center, but it is not assigned to anybody unless I manually hit 'Determine Assignment' button.

Once I click on 'Determine Assignment', notification task is assigned to the Employee for which I had populated the Employee ID in my BO script.

So what I understand here is, my requester and Approver are determined correctly, but tasks are not assigned to them automatically.

Regards,

Ambuja

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Ambuja,

Did you go to all steps in the workflow rule?

Is the validity date set to a valid value?

Please have a look at the  approval process documentation because I just recapitulate from my memory.

Bye,

   Horst