cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Employee webservice integration.

Former Member
0 Kudos

Hi there!

I need to integrate Employees to C4C but I cant use standard webservices.

As far as I know, i cant edit employee informations if external replication is enabled by scope.

So, I'm trying to create a webservice in the app studio for the employee BO. I checked only "Create" operation.

I'm using SOAPUI to test my webservice and I'm facing the following error:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

   <env:Header/>

   <env:Body>

      <n0:EmployeeCreateConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LAW:/1SAI/TAS571E134D8C3DAF4759DA:804">

         <Log>

            <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>

            <Item>

               <TypeID>018(//APBP/SP/)</TypeID>

               <CategoryCode>INC.BOI</CategoryCode>

               <SeverityCode>3</SeverityCode>

               <Note>EMPLOYEE role for business partner 00000000008000000109 missing</Note>

            </Item>

         </Log>

      </n0:EmployeeCreateConfirmation_sync>

   </env:Body>

</env:Envelope>

When I choose the fields to be integrated i didn't find anything related to business partner role.

Anyone knows what could be wrong? Am I missing something?

Is it possible to create an employee and its respective business partner using a custom webservice?

Is there any other option to achieve this (integrate employee and allow employee editing)?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try using the odata explorer to create a simple employee create odata service.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Alexandre,

Looks like you missed the node "EmployeeType" in which the role would be defined.

Bye,

   Horst

Former Member
0 Kudos

Hi Horst!

I really missed it! You're right!

Thank you very much!

Complete request for reference:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

          <soap:Header/>

          <soap:Body>

               <glob:EmployeeCreateRequest_sync>

                    <BasicMessageHeader>

                    </BasicMessageHeader>

                    <Employee>

                         <CurrentCommon>

                              <Person>

                                   <Name>

                                        <GivenName>INTEGRATION</GivenName>

                                        <FamilyName>SOAP UI</FamilyName>

                                   </Name>

                              </Person>

                         </CurrentCommon>

                         <EmployeeType>

                              <InternalEmployeeIndicator>true</InternalEmployeeIndicator>

                                   <ValidityPeriod>

                                        <StartDate>2015-10-01</StartDate>

                                        <EndDate>2015-11-01</EndDate>

                                   </ValidityPeriod>

                         </EmployeeType>

                    </Employee>

               </glob:EmployeeCreateRequest_sync>

          </soap:Body>

</soap:Envelope>

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello again!

I'm working again in the same webservice but now I need to update the employee I've created.

Here is the request example:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soap:Header/>

   <soap:Body>

      <glob:EmployeeUpdateRequest_sync>

         <BasicMessageHeader>

         </BasicMessageHeader>

         <Employee RelationshipListCompleteTransmissionIndicator="false" IdentificationListCompleteTransmissionIndicator="true" EmployeeTypeListCompleteTransmissionIndicator="true">

            <UUID>00163e07-a7ae-1ee5-a5ad-aba56b3347fa</UUID>

            <Identification ActionCode="06">

               <EmployeeID>123457</EmployeeID>

            </Identification>

            <CurrentCommon ActionCode="02">

               <Person>

                  <Name>

                     <GivenName>INTEGRATION 1001</GivenName>

                     <FamilyName>SOAP UI</FamilyName>

                  </Name>

               </Person>

            </CurrentCommon>

            <EmployeeType ActionCode="06">

               <InternalEmployeeIndicator>true</InternalEmployeeIndicator>

               <ValidityPeriod>

                  <StartDate>2015-10-01</StartDate>

                  <EndDate>2015-12-01</EndDate>

               </ValidityPeriod>

            </EmployeeType>

         </Employee>

      </glob:EmployeeUpdateRequest_sync>

   </soap:Body>

</soap:Envelope>

Unfortunately, the following error occurs:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

   <env:Header/>

   <env:Body>

      <n0:EmployeeUpdateConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LAW:/1SAI/TAS0260AB112F39B5A5763E:804">

         <Log>

            <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>

            <Item>

               <TypeID>015(/CSG_RUNTIME/)</TypeID>

               <CategoryCode>SEI.SCV</CategoryCode>

               <SeverityCode>3</SeverityCode>

               <Note>Key for Common node missing in Request Message</Note>

            </Item>

         </Log>

      </n0:EmployeeUpdateConfirmation_sync>

   </env:Body>

</env:Envelope>

I checked the Common node in the webservice businessObjectView but it doesn't appear in Update operation.

Any suggestion?

Thanks in advance.

Alexandre.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Alexandre,

The "CurrentCommon" refers to a specific intstance of the "Common" node (based on the validity).

So you need to provide the key information of the "CurrentCommon" in your message.

HTH,

  Horst

Former Member
0 Kudos

Hello Horst,

Thanks for the response.

I've checked all fields in Common and CurrentCommon nodes in Business Object View but in Service Operations tab there's no key available in CurrentCommon and the Common node doesnt appear. The only key available is UUID in Employee node.

Thanks again,

Alexandre.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Alexandre,

As the validity defines which instance of the Common node instances is the CurrentCommon, please provide a ValidityPeriod.

HTH,

    Horst