Skip to Content
Author's profile photo Alexandre Kaminagakura

Getting started with C4C web services.

INTRODUCTION

 

In this document I’ll try to explain the basics of the web services usage giving essential information that are valid for all of them. Each webservice has its own peculiarities and if you need more specific details have a look in Web Service APIs in SAP Cloud for Customer 1511 – November 2015.

In C4C, you can find the webservice list in: “Application and User Management > Input and Output Management > Service Explorer”.

This topic is important for developers and analysts that are planning some custom integration or are just looking for another way of query and manipulate information in C4C. You can create the requests using tools like SOAPUI.

Basically, I’ll explain how to use Query*In and Manage*In webservices and its main concepts.

My knowledge is still insufficient and I’m sorry if I wrote something wrong and for my english grammar mistakes =P. I hope you like it and, if necessary, please leave a post to correct me, so we can learn together.

 

QUERY*IN

 

When you download a webservice .wsdl file and open its definition, you will find the available methods that can be used, such as FindByElements, FindByIdentification, FindByCommunicationData etc, that vary from which webservice you are using. Despite of it, all of them work exactly the same way, but for different purposes. In this example, I’ll use the QueryCustomerIn webservice and its FindByElements method.

 

First of all, lets understand the basic request structure tags.

  • Selection by elementsEach tag SelectionBy<FieldName> filters the query by a field and all of them have the following sub tags:
    • InclusionExclusionCode 
      • Excluding
      • Including
    • IntervalBoundaryTypeCode
      • 1: Equal to
      • 2: Between (excl. upper boundary)
      • 3: Between
      • 4: Between (excl. both boundaries)
      • 5: Between (excl. lower boundary)
      • 6: Less Than
      • 7: Less Than or Equal to
      • 8: Greater Than
      • 9: Greater Than or Equal to
    • LowerBoundary<FieldName>
      • Used to specify the initial value.
    • UpperBoundary<FieldName>
      • Used to specify the upper value. It’s not mandatory when the IntervalBoundaryTypeCode is ‘1’.

 

  • Processing conditions: This tag is not mandatory. It’s used to filter the result size.
    • QueryHitsMaximumNumberValue:
      • Number of records that will be send in the response. By default, only 100 records are returned.
    • QueryHitsUnlimitedIndicator:
      • If true, it blocks the response if exists more records than the number specified in QueryHitsMaximumNumberValue.
    • LastReturnedObjectID:
      • All responses that returns at least one record contains the last returned object ID. I’ll show the use of it in the example 6 .

 

  • Requested elements: This tag is used to filter the response. You can use it to hide response tags you don’t need and, consequently, reduce the message size. I’ll show the use of it in the example 4. The table below shows a simplified options descriptions.
1 Complete Structure The node element and all its elements, its child node elements and all their elements will be returned.
2 Complete Node The node element and all its elements will be returned.
3 Node with Key Elements The node element and its key elements will be returned (not supported by all web service interfaces.
4 Excluded Node The node element and its child node elements will not be returned.

 

  • Example 1: Query customer with ID 1000012.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerByElementsQuery_sync>
      <CustomerSelectionByElements>
        <SelectionByInternalID>
          <InclusionExclusionCode>I</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000012</LowerBoundaryInternalID>
        </SelectionByInternalID>
      </CustomerSelectionByElements>
    </glob:CustomerByElementsQuery_sync>
  </soap:Body>
</soap:Envelope>
  • Example 2: Query customers with ID between 1000000 and 1000012.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerByElementsQuery_sync>
      <CustomerSelectionByElements>
        <SelectionByInternalID>
          <InclusionExclusionCode>I</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>
          <UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>
        </SelectionByInternalID>
      </CustomerSelectionByElements>
    </glob:CustomerByElementsQuery_sync>
  </soap:Body>
</soap:Envelope>
  • Example 3: Query customers with ID between 1000000 and 1000012 excluding 1000011.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerByElementsQuery_sync>
      <CustomerSelectionByElements>
        <SelectionByInternalID>
          <InclusionExclusionCode>I</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>
          <UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>
        </SelectionByInternalID>
        <SelectionByInternalID>
          <InclusionExclusionCode>E</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>
        </SelectionByInternalID>
      </CustomerSelectionByElements>
    </glob:CustomerByElementsQuery_sync>
  </soap:Body>
</soap:Envelope>

* It’s possible to use the same selection tag more than once \o/

 

  • Example 4: Query customers with ID between 1000000 and 1000012 excluding 1000011. The response must contain only the customer node with key elements but the address information must exists.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerByElementsQuery_sync>
      <CustomerSelectionByElements>
        <SelectionByInternalID>
          <InclusionExclusionCode>I</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>
          <UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>
        </SelectionByInternalID>
        <SelectionByInternalID>
          <InclusionExclusionCode>E</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>
        </SelectionByInternalID>
      </CustomerSelectionByElements>
      <RequestedElements customerTransmissionRequestCode="3">
        <Customer addressInformationTransmissionRequestCode="1"/>
      </RequestedElements>
    </glob:CustomerByElementsQuery_sync>
  </soap:Body>
</soap:Envelope>
  • Example 5: Query customers with ID between 1000000 and 1000012 excluding 1000011. The response must contain only the customer node with key elements but the address information must exists. Only the first customer is needed.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerByElementsQuery_sync>
      <CustomerSelectionByElements>
        <SelectionByInternalID>
          <InclusionExclusionCode>I</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000000</LowerBoundaryInternalID>
          <UpperBoundaryInternalID>1000012</UpperBoundaryInternalID>
        </SelectionByInternalID>
        <SelectionByInternalID>
          <InclusionExclusionCode>E</InclusionExclusionCode>
          <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
          <LowerBoundaryInternalID>1000011</LowerBoundaryInternalID>
        </SelectionByInternalID>
      </CustomerSelectionByElements>
      <ProcessingConditions>
        <QueryHitsMaximumNumberValue>1</QueryHitsMaximumNumberValue>
        <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
      </ProcessingConditions>
      <RequestedElements customerTransmissionRequestCode="2">
        <Customer addressInformationTransmissionRequestCode="1"/>
      </RequestedElements>
    </glob:CustomerByElementsQuery_sync>
  </soap:Body>
</soap:Envelope>

* If QueryHitsUnlimitedIndicator is true the request will show an error because I want only one customer but there are more than one for the specified conditions. If you want all customers in the specified conditions, the processing conditions must be:

<ProcessingConditions>
  <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
</ProcessingConditions>

* Be carefull with timeout and response message size =]

 

  • Example 6: Query the next customer from the previous query.

 

All responses contains the following tag, that shows how many records have returned, whether there are more records available and the last record node ID:

 

<ProcessingConditions>
  <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue>
  <MoreHitsAvailableIndicator>true</MoreHitsAvailableIndicator>
  <LastReturnedObjectID>00163E162F981ED5B6FCD7D58739E476</LastReturnedObjectID>
</ProcessingConditions>

Considering this, if you want the next record, in the request, specify the LastReturnedObjectID.

<ProcessingConditions>
  <QueryHitsMaximumNumberValue>1</QueryHitsMaximumNumberValue>
  <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
  <LastReturnedObjectID>00163E0924E61EE5B49B609769B5146E</LastReturnedObjectID>
</ProcessingConditions>

It’s usefull if you wat to “page” the query results.

 

MANAGE*IN

 

The Manage*In webservices are used to create and maintain information and they always have the CheckMaintainBundle and MaintainBundle methods. The CheckMaintainBundle method is equal to the MaintainBundle but not persists the data in C4C, so, can be used to simulate the real request. In this document I’ll use the ManageCustomerIn webservice for explanation.

Important request structure tags/attributes:

Most of the nodes have the following attributes/tags:

    • ActionCode: Attribute to specify the operation. Below, the simplified description is shown:
      • 01: Create
      • 02: Change
      • 03: Delete
      • 04: Save (Create if not exists, otherwise, update the record)
      • 05: Remove
      • 06: No action (check)
    • CompleteTransmissionIndicators: Attributes to specify if the node is complete or not. If you set it to true, all existing nodes that exists in C4C but aren’t in the request will be removed from C4C.
    • ObjectNodeSenderTechnicalID: This tag contains a custom ID that represents the node (many nodes have this tag) and is set by the sender. As these webservices accepts many records in the same request (bundle), and considering that if one of them fails then the whole request fails too, this tag is very important to identify which record has failed. The response will return this ID, then you can handle it properly.

 

  • Example 1: Create a customer with address.
<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerBundleMaintainRequest_sync_V1>
      <BasicMessageHeader/>
      <Customer actionCode="01" addressInformationListCompleteTransmissionIndicator="true">
        <ObjectNodeSenderTechnicalID>SENDER_CUSTOMER_1</ObjectNodeSenderTechnicalID>
        <CategoryCode>2</CategoryCode>
        <ProspectIndicator>false</ProspectIndicator>
        <CustomerIndicator>true</CustomerIndicator>
        <LifeCycleStatusCode>2</LifeCycleStatusCode>
        <Organisation>
          <CompanyLegalFormCode>14</CompanyLegalFormCode>
          <FirstLineName>COMPANY NAME</FirstLineName>
        </Organisation>
        <ContactAllowedCode>1</ContactAllowedCode>
        <AddressInformation actionCode="01">
          <ObjectNodeSenderTechnicalID>SENDER_ADDRESS_1</ObjectNodeSenderTechnicalID>
          <AddressUsage actionCode="01">
            <AddressUsageCode>XXDEFAULT</AddressUsageCode>
            <DefaultIndicator>true</DefaultIndicator>
          </AddressUsage>
          <Address actionCode="01">
            <CorrespondenceLanguageCode>PT</CorrespondenceLanguageCode>
            <PostalAddress>
              <CountryCode>BR</CountryCode>
              <RegionCode>PR</RegionCode>
              <CountyName>BRASIL</CountyName>
              <CityName>Curitiba</CityName>
              <DistrictName>CENTRO</DistrictName>
              <StreetPostalCode>80000-000</StreetPostalCode>
              <StreetName>R TEST</StreetName>
              <AdditionalStreetSuffixName/>
              <HouseID>225</HouseID>
            </PostalAddress>
          </Address>
        </AddressInformation>
      </Customer>
    </glob:CustomerBundleMaintainRequest_sync_V1>
  </soap:Body>
</soap:Envelope>

 

  • Example 2: Adding a new main address, without modifying the customer and its existing address in C4C.

* The customer information won’t change (actionCode=”06″)
* The address previously created won’t be removed (addressInformationListCompleteTransmissionIndicator=”false”).

* Now it’s mandatory to specify the customer key.

<soap:Envelope>
  <soap:Header/>
  <soap:Body>
    <glob:CustomerBundleMaintainRequest_sync_V1>
      <BasicMessageHeader/>
      <Customer actionCode="06" addressInformationListCompleteTransmissionIndicator="false">
        <InternalID>1000058</InternalID>
        <AddressInformation actionCode="01">
          <ObjectNodeSenderTechnicalID>SENDER_ADDRESS_2</ObjectNodeSenderTechnicalID>
          <AddressUsage actionCode="01">
            <AddressUsageCode>XXDEFAULT</AddressUsageCode>
            <DefaultIndicator>true</DefaultIndicator>
          </AddressUsage>
          <Address actionCode="01">
            <CountryCode>BR</CountryCode>
            <RegionCode>PR</RegionCode>
            <CountyName>BRASIL</CountyName>
            <CityName>Curitiba</CityName>
            <DistrictName>CENTRO</DistrictName>
            <StreetPostalCode>80000-000</StreetPostalCode>
            <StreetName>R TEST 2</StreetName>
            <AdditionalStreetSuffixName/>
            <HouseID>225</HouseID>
          </Address>
        </AddressInformation>
      </Customer>
    </glob:CustomerBundleMaintainRequest_sync_V1>
  </soap:Body>
</soap:Envelope>

 

COMMON ERRORS

In this section I’ll describe common error when using webservices. If someone knows some document that explains it better (what are the types, categories etc), I’d be pleased if you post a comment =)

 

  • Some errors are shown in: “Application and User Management > Input and Output Management > Web Service Message Monitoring”.

 

  • Gerneral errors: A general error in one of the customers in the request to illustrate the importance of the ObjectNodeSenderTechnicalID. The customer with sender ID ‘SENDER_CUSTOMER_1’ was rejected, but all the others were ok:
<env:Envelope>
  <env:Header/>
  <env:Body>
    <n0:CustomerBundleMaintainConfirmation_sync_V1>
      <Log>
        <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
        <Item>
          <TypeID>286(//APBP/R1/)</TypeID>
          <CategoryCode>INC.BOI</CategoryCode>
          <SeverityCode>3</SeverityCode>
          <ReferenceObjectNodeSenderTechnicalID>SENDER_CUSTOMER_1</ReferenceObjectNodeSenderTechnicalID>
          <Note>Business partner 1000058 already exists</Note>
        </Item>
      </Log>
    </n0:CustomerBundleMaintainConfirmation_sync_V1>
  </env:Body>
</env:Envelope>
  • Web service processing error: Apparently, it’s related to some error in the xml structure. Review your request and check for mandatory fields.
<env:Envelope>
  <env:Header/>
  <env:Body>
    <env:Fault>
      <env:Code>
        <env:Value>env:Receiver</env:Value>
      </env:Code>
      <env:Reason>
        <env:Text xml:lang="en">Web service processing error; more details in the web service error log on provider side (UTC timestamp 20160512004624; Transaction ID 00163E162F571EE685FB5E7780150450)</env:Text>
      </env:Reason>
      <env:Detail/>
    </env:Fault>
  </env:Body>
</env:Envelope>
  • Authorization role missing for service: Some issue with the user permissions. Possibly, you’ll have to create a communication arrangement for this service:
<env:Envelope>
  <env:Header/>
  <env:Body>
    <env:Fault>
      <env:Code>
        <env:Value>env:Receiver</env:Value>
      </env:Code>
      <env:Reason>
        <env:Text xml:lang="en">Authorization role missing for service "ServiceInterface http://sap.com/xi/A1S/Global ReadSalesPriceListIn &lt;default> &lt;default>", operation "Operation http://sap.com/xi/A1S/Global Read" (UTC timestamp 20160509191431; Transaction ID 00163E19BB2F1EE685C3483BF5E6CB73)</env:Text>
      </env:Reason>
      <env:Detail/>
    </env:Fault>
  </env:Body>
</env:Envelope>

 

  • Authentication error: Check the user and password.

 

 

Best regards,

Alexandre Kaminagakura

Assigned Tags

      27 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Alexandre

      thanks for this great tutorial. Right now I have a requirement where I don't have a solution yet. I need to load all good recipient (Name, address) for a customer. Technically this is modelled by relationships. Unfortunately I haven't found a Service yet for loading this data. Do you have any idea?

      Best regards

      Mario

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hello Mario,

      Sorry for the delay, have u found the service? Where this information is located in the screen/node?

      Regards,

      Alexandre.

      Author's profile photo Mengxue LI
      Mengxue LI

      Hello Alexandre,

      Thanks for sharing, this is great!

      Currently we are trying to understand more about the web service messages especially to understand the errors. I tried your path to find the web service list: Application and User Management > Input and Output Management > Service Explorer

      However, I only have inbound operations (even if I have 2 queries, they are both on Inbound Operations).

      Do you have any idea how I can find more explanations on Outbond web services please?

      Thank you for your help ?

      Best regards,
      Mengxue

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Mengxue!

      I think you are right. You can only see inbound webservices. Outbound webservices are consumed by C4C and the webservice information should be provided by your external system. You just configure the system and the arrangements in C4C to use them. In case of standard integration with ECC/CRM, when you activate it in scope the arrangements may appear automatically and you just configure it.

      Best regards!

      Alexandre.

      Author's profile photo Former Member
      Former Member

      Hello Alexandre,
      very helpful tutorial,

      Can you tell me about Getting Leads from C4C. using c4c web services?

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Santosh!

      There are the webservices named "QueryLeadIn" (sales leads) and "QueryMarketingLeadIn" (marketing leads). Your external application can use them to get leads from C4C.

      Best regards.

      Alexandre

      Author's profile photo Former Member
      Former Member

      Hello alexandre,

      I have done the same and its working fine.

      Thank you

      Santosh K

      Author's profile photo Former Member
      Former Member

      Hello Alexandre,

      Can we create employee from  XML Payload using Soap UI tool?

      If yes, Could you please tell me what is the web service for downloading WSDL file.

      Thank you

      Santosh K

       

       

       

      Author's profile photo Former Member
      Former Member

      Hello Alexandre,

      I am able to get all leads from QueryMarketingLeadIn webservice.

      But now I want to query by owner of that lead.

      can you tell me how to achieve this.

      provide some sample XML payload.

      Thank you

      Santosh K

      Author's profile photo Robin Hartmann
      Robin Hartmann

      Hello Alexandre,

       

      thanks for this easy introduction.

      At the moment I build up an QueryCustomerIn request and I like to add an OR-operation to this query. Is this possible?

      All current queries I build up are combined in standard via AND-operation

       

      For example:

      I´d like to get all customer which haven an mail-adress containing “*sap.de” OR “SAP” in the Name. Alexandre you help me?

       

      Attached you find the request with an AND-operation

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
         <soapenv:Header/>
         <soapenv:Body>
            <glob:CustomerByCommunicationDataQuery_sync>
               <CustomerSelectionByCommunicationData>
                  <SelectionByEmailURI>
                     <InclusionExclusionCode>I</InclusionExclusionCode>
                     <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
                     <LowerBoundaryEmailURI>*sap.de</LowerBoundaryEmailURI>
                  </SelectionByEmailURI>
                  <SelectionByBusinessPartnerName>
                     <InclusionExclusionCode>I</InclusionExclusionCode>
                     <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
                     <LowerBoundaryBusinessPartnerName>SAP*</LowerBoundaryBusinessPartnerName>
                  </SelectionByBusinessPartnerName>
               </CustomerSelectionByCommunicationData>
               <ProcessingConditions>
                  <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue>
                  <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
               </ProcessingConditions>
               <RequestedElements/>
               <RequestedElements customerTransmissionRequestCode='2'>
                  <Customer addressInformationTransmissionRequestCode='1'/>            
               </RequestedElements>
            </glob:CustomerByCommunicationDataQuery_sync>
         </soapenv:Body>
      </soapenv:Envelope>
      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Robin!

      It’s been a while since I don’t work with webservices but I think that it's not possible =/.

      You can try:

      1) Use Odata webservice instead of soap webservices.

      2) Add some logic (beforeSave event) to flag the customer when this condition is true. Then add this flag (field) in the webservices and query for it.

      3) Query twice and merge the results in your external system.

      What do you think?

      Best regards.

      Alexandre.

      Author's profile photo Robin Hartmann
      Robin Hartmann

      Hi Alexandre,

       

      thanks your fast reply =).

      We will check the different possibilities in detail.

       

      Kind regards

      Robin

       

      Author's profile photo Former Member
      Former Member

      Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best.

       

      <a href="https:/imagiacian.com/">web developement services</a>

      Author's profile photo Eduardo Cardona
      Eduardo Cardona

      Hello Alexandre,

       

      Great blog, I'm having trouble with the ManageMaterialIn Service when I try to update, I was wondering if you could post an example.

       

      Regards.

       

      Ed.

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Eduardo,

       

      Could you solve your issue? Here is an example. I think that all of these fields are mandatory.

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a28="http://sap.com/xi/AP/CustomerExtension/BYD/A286W" xmlns:glob1="http://sap.com/xi/AP/Globalization">
         <soap:Header/>
         <soap:Body>
            <glob:MaterialBundleMaintainRequest_sync_V1>
               <BasicMessageHeader>
               </BasicMessageHeader>
               <Material actionCode="04">
                  <InternalID>AP_101</InternalID>
                  <ProductCategoryID>EMP_01</ProductCategoryID>
                  <Status>2</Status>
                  <BaseMeasureUnitCode>ZAP</BaseMeasureUnitCode>
                  <Description actionCode="04">
                     <Description languageCode="PT">BLA BLA 101</Description>
                  </Description>
               </Material>
            </glob:MaterialBundleMaintainRequest_sync_V1>
         </soap:Body>
      </soap:Envelope>

       

      Author's profile photo Former Member
      Former Member

      Hi All,

      I am facing the below issue when I use Manage service WSDL from SOAP UI:

      Here, I am trying to create a Lead for Existing BP in the system.

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:yh2="http://0003865926-one-off.sap.com/YH27FMJUY_">
         <soapenv:Header/>
         <soapenv:Body>
            <glob:MarketingLeadBundleMaintainRequest_sync>
               <!--1 or more repetitions:-->
               <MarketingLead actionCode="01">
                  <!--Optional:-->
                  <ObjectNodeSenderTechnicalID>SOAP_Lead_Test</ObjectNodeSenderTechnicalID>
      		  <!--Optional:-->
                  <Name>SOAP Lead Test</Name>
                  <!--Optional:-->
                  <ProcessingTypeCode></ProcessingTypeCode>
                  <!--Optional:-->
                  <!--<OriginTypeCode listID="?" listVersionID="?" listAgencyID="?" listAgencySchemeID="?" listAgencySchemeAgencyID="?">?</OriginTypeCode>
      -->
                  <!--Optional:-->
                  <GroupCode>Z3</GroupCode>
                  <!--Optional:-->
                  <PriorityCode>3</PriorityCode>
                  <!--Optional:-->
                  <StatusCode></StatusCode>
                  <!--Optional:-->
                  <EmployeeInternalID>8000000196</EmployeeInternalID>
                  <!--Optional:-->
                  <!--<Note>?</Note>
      -->
                  <!--Optional:-->
                  <!--<UseExistingAccountContactIndicator>?</UseExistingAccountContactIndicator>
      -->
                  <!--Optional:-->
                  <PersonFirstName>Lead History check</PersonFirstName>
                  <!--Optional:-->
                  <PersonLastName>Lead History check</PersonLastName>
                  <!--Optional:-->
                  <PersonMiddleName>Lead History check</PersonMiddleName>
                  <!--Optional:-->
                  <IndividualCustomerGivenName>Lead History check</IndividualCustomerGivenName>
                  <!--Optional:-->
                  <IndividualCustomerFamilyName>Lead History check</IndividualCustomerFamilyName>
                  <!--Optional:-->
                  <IndividualCustomerMiddleName>Lead History check</IndividualCustomerMiddleName>
                  <!--Optional:-->
                  <IndividualCustomerInitialsName>Lead History check</IndividualCustomerInitialsName>
                  <!--Optional:-->
                  <ProspectParty actionCode="06" >
                     <!--Optional:-->
                     <AccountInternalID></AccountInternalID>
                     <!--Optional:-->
                     <InactiveAccountInternalID></InactiveAccountInternalID>
                     <!--Optional:-->
                     <MainContactPersonInternalID></MainContactPersonInternalID>
                     <!--Optional:-->
                     <InactiveMainContactPersonInternalID></InactiveMainContactPersonInternalID>
                     <!--Optional:-->
                     <AccountExternalKey>
                        <!--Optional:-->
                        <!--<CommunicationSystemID schemeID="?" schemeAgencyID="?">?</CommunicationSystemID>
      -->
                        <!--Optional:-->
                        <RemoteObjectID schemeID="?" schemeVersionID="?" schemeAgencyID="?" >7000001439</RemoteObjectID>
                     </AccountExternalKey>
                     <!--Zero or more repetitions:-->
                     <!--<ContactParty actionCode="06">
                        <ObjectNodeSenderTechnicalID></ObjectNodeSenderTechnicalID>
                        <ContactPersonInternalID></ContactPersonInternalID>
        			   <ContactExternalKey>
                           <CommunicationSystemID schemeID="?" schemeAgencyID="?">?</CommunicationSystemID>
                           <RemoteObjectID schemeID="?" schemeVersionID="?" schemeAgencyID="?">?</RemoteObjectID>
                        </ContactExternalKey>
                     </ContactParty>
      -->
                     <!--Optional:-->
                     <DefaultContactExternalKey>
                        <!--Optional:-->
                        <!--<CommunicationSystemID schemeID="?" schemeAgencyID="?">?</CommunicationSystemID>
      -->
                        <!--Optional:-->
                        <!--<RemoteObjectID schemeID="?" schemeVersionID="?" schemeAgencyID="?">?</RemoteObjectID>
      -->
                     </DefaultContactExternalKey>
                  </ProspectParty>
                  <!--Optional:-->
                  <yh2:DeclineDateEx></yh2:DeclineDateEx>
                  <!--Optional:-->
                  <yh2:LeadContractAccountIDEx>900010848071</yh2:LeadContractAccountIDEx>
                  <!--Optional:-->
                  <yh2:TransferDateEx></yh2:TransferDateEx>
                  <!--Optional:-->
                  <yh2:PoliciesCancelled></yh2:PoliciesCancelled>
               </MarketingLead>
            </glob:MarketingLeadBundleMaintainRequest_sync>
         </soapenv:Body>
      </soapenv:Envelope>

       

      I am getting the error:

      <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <soap-env:Header/>
         <soap-env:Body>
            <n0:MarketingLeadBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LP4:/1SAI/TAEC08D44E1498DB2599D27:804">
               <Log>
                  <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                  <Item>
                     <TypeID>039(/MBF_A2X_CORE/)</TypeID>
                     <CategoryCode>BPR.PUR</CategoryCode>
                     <SeverityCode>3</SeverityCode>
                     <ReferenceObjectNodeSenderTechnicalID>SOAP_Lead_Test</ReferenceObjectNodeSenderTechnicalID>
                     <Note>Action code 01 in segment LEAN_LEAD contradicts action code 06 in segment LEAN_LEAD-PROSPECT_PARTY</Note>
                  </Item>
               </Log>
            </n0:MarketingLeadBundleMaintainConfirmation_sync>
         </soap-env:Body>
      </soap-env:Envelope>

      Please suggest.

       

      Thanks,

      Srihari.

       

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hello!

      This error means that you are creating a lead (using action code 01) and you are using the action 06 in a child node. This is not possible! Try to use 01 or 04 instead. Also, remove the blank Id nodes and properties with value "?".

      Best regards,

      Alexandre.

      Author's profile photo Benny Huang
      Benny Huang

      Hi Alexandre,

      I use the webservice:ManageAttachmentFolderIn

      but the common communication user, hasn't authority to run it. when I run in soapUI, it raise:

      <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <soap-env:Header/>
      <soap-env:Body>
      <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">Authorization role missing for service "ServiceInterface http://sap.com/xi/DocumentServices/Global ManageAttachmentFolderIn &lt;default> &lt;default>", operation "Operation http://sap.com/xi/DocumentServices/Global MaintainAttachmentFolderFile" (UTC timestamp 20180104070122; Transaction ID 00163E0F423E1ED7BCA3A244F29701DE)</faultstring>
      <detail/>
      </soap-env:Fault>
      </soap-env:Body>
      </soap-env:Envelope>

      How can I config the communication user to run the webservice? Thanks a lot.

      Best Regards,

      Benny Huang

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Benny,

       

      Try to create a communication system and a communication arrangement for this service. Make the request using SOAPUI passing the same user defined in the arrangement.

       

      Best regards,

      Alexandre.

      Author's profile photo Kenji Nicolás Nakano Toro
      Kenji Nicolás Nakano Toro

      Hi Alexadre,

      Do you know If its possible to make an order query returning the last order of a customer?

      Thanks in advice

      Best regards

      Author's profile photo Alexandre Kaminagakura
      Alexandre Kaminagakura
      Blog Post Author

      Hi Kenji,

      I'm afraid that it isn't possible. One alternative is to filter the orders by customer, status and completion date, then, you get the last one in the system that is consuming the service. Or, use Odata services.

      Best regards,

      Alexandre.

      Author's profile photo Kenji Nicolás Nakano Toro
      Kenji Nicolás Nakano Toro

      Hi Alexandre,

      Thank you for your reply!
      Can you give an example of that way of filtering?

      And also, I'm trying to get the orders from an specific customer by RequestedDateTime, but I'm not getting any results and I've ensured that the customer has order in the date I asked.

      (I'm very new into this)

      This is what I've made:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a20="http://sap.com/xi/AP/CustomerExtension/BYD/A20X2">
      <soapenv:Header/>
      <soapenv:Body>
      <glob:CustomerOrderByElementsQuery_sync_V1>
      <CustomerOrderSelectionByElements>
      <SelectionByBusinessPartnerInternalID>
      <InclusionExclusionCode>I</InclusionExclusionCode>
      <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
      <LowerBoundaryPartyIdentifier>10003815</LowerBoundaryPartyIdentifier>
      </SelectionByBusinessPartnerInternalID>
      <SelectionByRequestedDateTime>
      <InclusionExclusionCode>I</InclusionExclusionCode>
      <IntervalBoundaryTypeCode>2</IntervalBoundaryTypeCode>
      <LowerBoundaryDateTime>2018-04-03T00:00:00Z</LowerBoundaryDateTime>
      <UpperBoundaryDateTime>2018-04-04T00:00:00Z</UpperBoundaryDateTime>
      </SelectionByRequestedDateTime>
      </CustomerOrderSelectionByElements>
      </glob:CustomerOrderByElementsQuery_sync_V1>
      </soapenv:Body>
      </soapenv:Envelope>

      Is it correct the data in the lower and upper fields?

      Will wait for your answer

      Thanks in advice

      Best regards

      Author's profile photo Rasha Elsayed
      Rasha Elsayed

      Hi Alexadre

      Thanks for the nice tutorial. I am using the ManageCustomerIn Webservice, and when I try to add a contact person to an existing account, two contacts are created in c4c, one with the account reference and one with no account.

       

      I have to use actionCode = 4 for both <Customer> and <ContactPerson> because I don't know, what exists in c4c and what not. I had also to set contactPersonListCompleteTransmissionIndicator to true, because otherwise I get the error that

      Only list complete transmission (LCTI) allowed for CUSTOMER-CONTACT_PERSON - CONTACT_PERSON_CTI

      Below is my SOAP message

       

      Any ideas?

      Thanks in advance

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
            <ns6:CustomerBundleMaintainRequest_sync_V1 xmlns:ns6="http://sap.com/xi/SAPGlobal20/Global">
               <BasicMessageHeader />
               <Customer actionCode="04" contactPersonListCompleteTransmissionIndicator="true">
                  <InternalID>xxx</InternalID>
                  <CategoryCode>2</CategoryCode>
                  <CustomerIndicator>true</CustomerIndicator>
                  <LifeCycleStatusCode>2</LifeCycleStatusCode>
                  <Organisation>
                     <FirstLineName>name1 name2</FirstLineName>
                     <SecondLineName />
                  </Organisation>
                  <ContactPerson actionCode="04">
                     <GivenName>name1</GivenName>
                     <FamilyName>name2</FamilyName>
                     <BirthName>name1</BirthName>
                     <LifeCycleStatusCode>2</LifeCycleStatusCode>
                  </ContactPerson>
               </Customer>
            </ns6:CustomerBundleMaintainRequest_sync_V1>
         </soapenv:Body>
      </soapenv:Envelope>
      Author's profile photo Rasha Elsayed
      Rasha Elsayed

      Actually I noticed that this happens when the contact person already exists in the account. What actually happens is that the exsting one gets removed from the account and a new one is inserted and attached to the account.

       

      is there a way to just update the existing account? as mentioned changing contactPersonListCompleteTransmissionIndicator to false is not working

       

      Best regards

      Rasha

      Author's profile photo Hemanth Gowda
      Hemanth Gowda

       

      Hi Alaxendre,

       

      Please help me on the issue

      This is the reaponce i got after triggering from soup Ui

      <TypeID>016(/CL_QC_PRD_MESSAGES/)</TypeID>
      <CategoryCode>INC.BOI</CategoryCode>
      <SeverityCode>3</SeverityCode>
      <Note>Quantity Type ZTA cannot be used for Product</Note>--- i know that the quantity conversion is not maintained so it is showing the error

      In my payload i have about 200 line items, as i checked using the CheckMaintainBundle in soup ui for managesupplierinvoice, How can i know for which line item

      i am not able to know for which line item i need to do change the ZTA(UOM quantity conversion) become of huge data(about 200 line items in payload)

      what is <TypeID>016(/CL_QC_PRD_MESSAGES/)</TypeID>

      Author's profile photo sanjay barik
      sanjay barik

      hi,

      please send sample codes for query using web services ,sap cloud app studio.

       

      thanks:

      sanjay barik

       

      Author's profile photo Andy Suryawan
      Andy Suryawan

      Hi Alexandre,

      Thank you very much for your great introduction.

      I have an issue on updating the mobile phone in the customer address with the existing specific type of address

      and using web service Mange account with link https://myxxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/managecustomerin1

      with the following payload :

      <ns6:CustomerBundleMaintainRequest_sync_V1
      	xmlns:ns6="http://sap.com/xi/SAPGlobal20/Global">
      	<BasicMessageHeader></BasicMessageHeader>
      	<Customer actionCode="04">
      		<UUID>00163eab-6b5c-1edc-85a2-4c159ec8ad69</UUID>
      		<InternalID>1000843578</InternalID>
      		<Person>
      			<FamilyName>DZUL MARCO 3</FamilyName>
      			<BirthDate>1984-08-12</BirthDate>
      		</Person>
      		<AddressInformation actionCode="04" addressUsageListCompleteTransmissionIndicator="true">
      			<AddressUsage actionCode="04">
      				<AddressUsageCode>XXDEFAULT</AddressUsageCode>
      			</AddressUsage>
      			<Address actionCode="04" telephoneListCompleteTransmissionIndicator="true">
      				<Email>
      					<URI>dzul@mail.com</URI>
      				</Email>
      				<PostalAddress>
      					<CountryCode>ID</CountryCode>
      					<RegionCode>01</RegionCode>
      					<CityName>Jakarta Selatan Administration City</CityName>
      					<StreetPostalCode>15416</StreetPostalCode>
      					<StreetName>Jl Madrasah</StreetName>
      				</PostalAddress>
      				<Telephone>
      					<FormattedNumberDescription>+62881944455</FormattedNumberDescription>
      					<MobilePhoneNumberIndicator>true</MobilePhoneNumberIndicator>
      				</Telephone>
      			</Address>
      		</AddressInformation>
      	</Customer>
      </ns6:CustomerBundleMaintainRequest_sync_V1>
      

      but the payload above is not updating the mobile phone on the existing data, it is creating the new type of address with the new data given in the payload.

      Kindly need your advice 🙂

       

      Many thanks,

      BR,

      Andy