SAP SNC not updating

ASA
Regular Contributor
Regular Contributor

Hi,

in SAP we have an UPDATEACCOUNTJSON like this:

{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.customproperty37}"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}

 (Some irrelevant parts redacted)

It works fine but not for updating SNC. When customproperty37 changes on user E_MAIL gets update correctly, but not SNC PNAME.

We also tried this:

"SNC": {
"GUIFLAG": "U",
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}

and can see that GUIFLAG is successfully updated. But not PNAME.

What could be the reason? 

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Does snc is proper format i.e. same as create account json

ASA
Regular Contributor
Regular Contributor

Yes, same format works just fine during create.

Please share create account json

ASA
Regular Contributor
Regular Contributor

Full CREATEACCOUNTJSON:

{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.email}"
},
"PASSWORD": {
"BAPIPWD": "${randomPassword}"
},
"LOGONDATA":{
"ACCNT": "${user.systemUserName}",
"GLTGV": "${user.startdate}",
"GLTGB": "${user.enddate}",
"CLASS":"${user.customproperty27}",
"USTYP": "A"
},
"COMPANY":{
"COMPANY": "REDACTED"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}

 

Full UPDATEACCOUNTJSON

{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.customproperty37}"
},
"LOGONDATA":{
"GLTGV": "${user.startdate}",
"GLTGB": "${user.enddate}",
"CLASS":"${
if(user.customproperty24.equals('Terminated') ){
'Z_LEAVERS'
}else{
user.customproperty27
}
}",
"USTYP": "${
if( user.customproperty24 != null &&
user.customproperty24.equals('Terminated') ){
'L'
} else{
'A'
}
}"
},
"COMPANY":{
"COMPANY": "REDACTED"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}

 

Share any user snc screenshot from sap 

 

( mask confidential info)

ASA
Regular Contributor
Regular Contributor

This is state after create and unsuccessful update atempt:

ASA_0-1671542329496.png

 

What is snc for actual working user?

 

ASA
Regular Contributor
Regular Contributor

You can see it in the screenshot. Just the domain of the mail address is redacted because it's possibly sensitive data. Only thing that will change during update is the mail prefix (before the @) Everything else stays the same.

using service account configure in saviynt are you able to update SNC from SAP directly without saviynt in picture,

ASA
Regular Contributor
Regular Contributor

We can't try directly since it's not a dialog user, but we did an authorisation trace to see if anything is rejected. Everything seems to be fine on authorisation side.

ASA
Regular Contributor
Regular Contributor

We've made it work. Turns out you can't seem to refer to accountName directly (although documented) but have to get it from the task:

"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${task.accountName}"
}