cancel
Showing results for 
Search instead for 
Did you mean: 

C4C: Replication from ERP to C4C

siwei_yang
Participant
0 Kudos

Hi there,

we have implemented our validation logic for address by enhancing the BO AddressSnapshot. It will prevent saving an address if the address input by user is not valid.

But now we do not want to execute this part of logic in case of replication of an account from ERP to C4C, because It will make the replication failed.

However , I have no idea how to check if the current processing is triggered by a replication or just data inputing of user.

Is there any global or system variable like sy-uname in ABAP world ?

Can any one give some ideas ?

Thank you

Peter

View Entire Topic
michael-schulz
Participant
0 Kudos

Hello Peter,

with the Context ReuseLibrary you can get the user details, who is doing a change and triggering the script. If that's a UI user you'll find an employee for that Identity which Context gives you.

Hope that helps, Michael

siwei_yang
Participant
0 Kudos

Hi Michael,

thank you for your quick answer.

so it means that I will use the following code to get the current employee who is triggering the current script.

var cur_user =Context.GetCurrentIdentityUUID();
var emp = Employee.Retrieve(cur_user);

On the other hand, the variable emp will be initial, if the script is triggered by replication.

Am I right?

Best wishes

Peter