cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete ID mapping via webservice

dhruv_mehta
Active Contributor
0 Kudos
1,690

Dear Team,


We need to delete an existing ID Mapping once we create id mapping from second system.

For Example,
Account ID ( C4C ) : 239239 Now go to Admin -> ID mapping Select ERP account
Add ID : 239239
System : CRM.1 (Old)
You will get an exteranal id linked to it.

Now just change the System to NewERP. You will get another external id linked to 239239 C4C ID.

The first ID mappiing happened via migration of prospect and second id mapping happens from a non SAP ERP once prospect is turned in to customer.
Hence we want to delete the earlier ID Mapping.

For the above purpose we identified Web service :"CommunicationServicesManagementMaintainObjectIdentifierMappingIn" , However this webservice always gives us error message

: "Query result not unique; BO OBJECT_IDENTIFIER_MAPPING, Node ROOT, Query QUERY_BY_ELEMENTS : = 5368 ; = 147 ; = 00163E32B1001ED798947344C412E685 ; = 00163E2BC5671ED78A9D7A9FB16C5950"

And we are not able to understand the same.

We use another SOAP service to make a Query :
"CommunicationServicesManagementQueryObjectIdentifierMappingIn"

which works fine to get us the desired data but , this WS doesnt have a Delete action code as Maintain ( and rightly so).
Looking forward for your support on how to use WS to delete existing ID mapping.

View Entire Topic
former_member546046
Discoverer

We were able to delete ID mappings with this service:

/sap/bc/srt/scs/sap/communicationservicesmanageme1

Payload below is for create - change the action code to "03" to delete.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:ObjectIdentifierMappingMaintainRequestBundle_sync>
         <BasicMessageHeader>
            <!--Optional:-->
            <UUID>{{$guid}}</UUID>
         </BasicMessageHeader>
         <!--1 or more repetitions:-->
         <ObjectIdentifierMapping actionCode="04"> <!-- 03 == delete -->
            <!--Optional:-->
            <ObjectNodeSenderTechnicalID>X1_1X</ObjectNodeSenderTechnicalID>
            <RemoteIdentifierType>918</RemoteIdentifierType>
            <LocalIdentifierType>888</LocalIdentifierType>
            <RemoteObjectID>an external ID</RemoteObjectID> <!-- The value in the external system -->
            <LocalObjectID>1000001</LocalObjectID> <!-- The value in C4C -->
            <OriginTypeCode>3</OriginTypeCode>
            <RemoteBusinessSystem>
               <ID>ERP_CLNT1</ID>
            </RemoteBusinessSystem>
         </ObjectIdentifierMapping>
      </glob:ObjectIdentifierMappingMaintainRequestBundle_sync>
   </soapenv:Body>
</soapenv:Envelope>
dhruv_mehta
Active Contributor
0 Kudos

Hi Stephen,

UUID : which UUID i need to pass , C4C Transactions UUID?

What is <ObjectNodeSenderTechnicalID>X1_1X</ObjectNodeSenderTechnicalID> X1_1X ( A random external key?)

Thanks a lot for the answer , this looks very promising.

dhruv_mehta
Active Contributor
0 Kudos
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
     <glob:ObjectIdentifierMappingMaintainRequestBundle_sync>
         <BasicMessageHeader>
            <!--Optional:-->
            <UUID>00163E62-DDD3-1ED8-9DA5-8593BCA2AE22</UUID>
         </BasicMessageHeader>
         <!--1 or more repetitions:-->
         <ObjectIdentifierMapping actionCode="03"> <!-- 03 == delete -->
            <!--Optional:-->
            <ObjectNodeSenderTechnicalID>X1_1X</ObjectNodeSenderTechnicalID>
            <RemoteIdentifierType>918</RemoteIdentifierType>
            <LocalIdentifierType>888</LocalIdentifierType>
            <RemoteObjectID>239239</RemoteObjectID> <!-- The value in the external system -->
            <LocalObjectID>239239</LocalObjectID> <!-- The value in C4C -->
            <OriginTypeCode>3</OriginTypeCode>
            <RemoteBusinessSystem>
               <ID>CRMX</ID>
            </RemoteBusinessSystem>
         </ObjectIdentifierMapping>
      </glob:ObjectIdentifierMappingMaintainRequestBundle_sync>
   </soapenv:Body>
</soapenv:Envelope>

I tried testing above payload but still no success, I am getting below response.

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Header/>
   <soap-env:Body>
      <n0:ObjectIdentifierMappingMaintainConfirmationBundle_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LNP:/1SAI/TAS3C450B7CAB762BC2C532:804">
         <Log>
            <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
            <Item>
               <TypeID>036(/MBF_A2X_CORE/)</TypeID>
               <SeverityCode>3</SeverityCode>
               <Note>Query result not unique; BO OBJECT_IDENTIFIER_MAPPING, Node ROOT, Query QUERY_BY_ELEMENTS :  = 5368 ;  = 147 ;  = 00163E62DDD31ED89DA58593BCA2AE22 ;  = 00163E2BC5671ED78EA855CA38BBD364</Note>
            </Item>
         </Log>
      </n0:ObjectIdentifierMappingMaintainConfirmationBundle_sync>
   </soap-env:Body>
</soap-env:Envelope>
dhruv_mehta
Active Contributor
0 Kudos

Funny part of the story is Same BO and its Query WS fetches me unquie ID! ( unlike message shown in above response)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:ObjectIdentifierMappingByElementsQuery_sync>
         <!--Optional:-->
         <ObjectIdentifierMappingByElements>
            <RemoteIdentifierType>918</RemoteIdentifierType>
            <LocalIdentifierType>888</LocalIdentifierType>

            <SelectionByRemoteID>
               <InclusionExclusionCode>I</InclusionExclusionCode>
               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
               <LowerBoundaryRemoteID schemeID="?" schemeVersionID="?" schemeAgencyID="?">239239</LowerBoundaryRemoteID>
             </SelectionByRemoteID>

            <RemoteBusinessSystem>
               <ID schemeID="?" schemeAgencyID="?">CRMX</ID>
               <IntermediateDocumentLogicalSystemID>CRMX</IntermediateDocumentLogicalSystemID>
               <BusinessSystemID>CRMX</BusinessSystemID>
            </RemoteBusinessSystem>

         </ObjectIdentifierMappingByElements>
      </glob:ObjectIdentifierMappingByElementsQuery_sync>
   </soapenv:Body>
</soapenv:Envelope>
former_member546046
Discoverer
0 Kudos

The UUID is unique for this transaction.

I can't work out what the meaning of ObjectNodeSenderTechnicalID is, but it appears to have no influence on the outcome.