Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Populating Employee Responsible on Task in After Modify event

Hi, I have a requirement to code the After Modify event of Task Extended BO. If the Category on the task has some specific value, then the Owner needs to change.

Below is the code I have put in the After Modify event:

import ABSL;

import AP.PC.IdentityManagement.Global;

import AP.FO.BusinessPartner.Global;

import AP.PC.ActivityManagement.Global;

var elActivityParty : elementsof Activity.Party;

if (this.GroupCode.content == "Z001") {

elActivityParty.PartyName = "Sumeet Narang";

elActivityParty.RoleCode = "39"; //Employee Responsible = 39

this.EmployeeResponsibleParty.Create(elActivityParty);

}

I am getting the error "Please enter a party with role Employee Responsible". The Employee Responsible is getting created, but the ID is blank. Also I am not able to change the PartyID as it is a read only field. What else needs to be done in this case? We are using Cloud Application Studio 1408.

Regards,

Sumeet

Former Member
Not what you were looking for? View more on this topic or Ask a question