Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

User Update to SAP HCM

ASA
Regular Contributor II
Regular Contributor II

We have to write some identity attributes that are generated on EIC side back to the source system SAP HCM.

I see there is no UPDATEUSERJSON in the SAP connector like e.g. in the REST connector. Can anyone advise with a best practice how to achieve this?

Thanks beforehand!

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

You can use actionable report/rule


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Swathi
Saviynt Employee
Saviynt Employee

Hello,

You cannot write back to SAP HCM through the connector. This can be achieved through a custom java class. Use the "Custom Action" option in the update rule and call your java class from there. You can create a JCoDestination & execute your function module by passing the required arguments to your method. 

Sample method (just for reference): 

public String callHCMFunctionModule(JCoDestination ABAP_AS, String personID, String sapID, String startdate) throws Exception {
System.out.println("Calling HCM Function Module BAPI.............");

// Connect
JCoFunction function = ABAP_AS.getRepository().getFunction("ZM_FUNCTION_MODULE");
System.out.println("get function..........");

// Set params
function.getImportParameterList().setValue("PERNR",personID);
function.getImportParameterList().setValue("SAPID", sapID);

System.out.println("Getting date..........");

function.getImportParameterList().setValue("BEGDA", startdate);

// Execute
function.execute(ABAP_AS);
System.out.println("getting export parameters.............");
System.out.println(function.getExportParameterList().getFieldCount()+".............");
if (function.getExportParameterList().getFieldCount()==0)
throw new Exception("Error in data");

String message = "";

return message;

}

Thank you and regards,
Swathi Hari 

ASA
Regular Contributor II
Regular Contributor II

Hi Swathi,

that helps a lot, much appreciated.

Thank you

André