Skip to Content

SAP Cloud Application Studio Enhancement Implementation

Hi,

I'm trying to put a limitation for replication of Customers from C4C to ERP. I want only user "XXXX" to replicate customers to ERP. If another user creates a customer in C4C i dont want the system to send it to ERP.

I have tried below code but it does not work.

Need your assistance.

Thanks.

import AP.Common.Global;
import AP.FO.BusinessPartner.Global;

var result : BusinessObjectInstanceProcessIntegrationRelevance;
var customer;
var customerUUID;

foreach (customerUUID in InputData.UUID ) {
	customer = Customer.Retrieve(customerUUID);
	var CurrentUser = customer.CreationIdentity.ID.content;

	if (CurrentUser == "XXXX") {
		result.UUID.Add(customerUUID);
	}
}
result.ObjectTypeCode = InputData.ObjectTypeCode;

return result;
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 25, 2018 at 10:27 AM

    Dear Gsoy,

    Could you please debug with breakpoint, check and confirm if the user who is actually performing the save is picked up in the BADI. While creation of the customer or accounts, sometimes the actual data save can be with a technical user, only at the later stage of the processing, the actual business user is updated.

    Set a break point and check what is the runtime value sent for the current user.

    Regards,

    Shivanand B H

    Add comment
    10|10000 characters needed characters exceeded