You are on page 1of 12

Leveraging SOA for Time Recording

Applies to:
Service-Oriented Architecture, cProjects, and Cross Application Time Sheet. For more information, visit the Service - Oriented Architecture homepage.

Summary
By leveraging SOA and enterprise services, you can integrate the Cross Application Time Sheet application with the cProjects portal through ALE. This paper discusses the web service used for recording time and the various parameters that need to be passed on to the web service. Author: Anantharam Subramanian

Company: Infosys Technologies Limited Created on: 24 September 2008

Author Bio
Anantharam Subramanian has 15 years of experience in product development, manufacturing, project management and consulting. He is a certified SAP PP consultant with a Six Sigma green belt and Java Programmer certification from Sun. His SAP expertise includes Resource and Portfolio Management, cProjects, and cFolders.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 1

Leveraging SOA for Time Recording

Table of Contents
Preliminary Activities in cProjects .......................................................................................................................3 Launching the Web Service................................................................................................................................4 Entering Details within the Web Service.............................................................................................................6 Conclusion ........................................................................................................................................................11 Related Content................................................................................................................................................11 Disclaimer and Liability Notice..........................................................................................................................12

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 2

Leveraging SOA for Time Recording

Preliminary Activities in cProjects


As of 4.0, cProjects can be integrated with Cross Application Time Sheet through ALE. Some of the prerequisites include HR integration, where employees from the ERP system are transferred to the cProjects system as business partners. In the project type definition seen below, there are several steps to take before the integration. Select Time Recording under the Confirmation section. Make sure that Accounting Integration is active for the project type. For ALE-related settings, make sure to implement note 954860. Take the following steps inside cProjects: Define a project, tasks and resources. Assign the resource defined to any of the tasks. Change the status of the project to Flag for Transfer and Release.

Note: cProjects and Cross Application Time Sheet are in different systems.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 3

Leveraging SOA for Time Recording

Launching the Web Service


Next, you will have to launch a web service. Log into the ECC system and type the tcode wsadmin. Once inside, you will see the screen shown in the picture below.

Click on SOAP Application for XI proxies. You will see the list of web services available in the system. The web service we will use is ECC_EMPTIMSHEETCHGRC. Launch the service by choosing the web service and clicking on the Web Service Homepage button as shown below.

The web service will be launched in a new browser.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 4

Leveraging SOA for Time Recording

You can continue testing the service by clicking on the Test button. Once done, you will be presented with the following screen.

Now proceed by clicking on the link shown below Operations.

At this point, you need to fill in the relevant entries. In case a particular entry is not relevant, check the SKIP box. Before you proceed further, visit the CAT2 transaction for the employee to whom you assigned a task in cProjects.

In the worklist area, you see the cProjects Project definition and the task along with their descriptions. Now you can see the values that need to be passed to the webservice.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 5

Leveraging SOA for Time Recording

Entering Details within the Web Service

Fill in the fields as follows: Action Code: Enter 1 for creation, 2 for changes, and 3 for deletions. For this example, use 1. WorkAgreementID: Enter the employee number in the field (String). Item -> Category code: Enter 1. TypeCode: Enter the attendance absence type in the field (String) EmployeeTimeValidity-> DatePeriod: Enter the start date and the end date for which you want to record time. Duration: Enter the number of hours in the same format as shown in the next screenshot (1 represents one hour).

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 6

Leveraging SOA for Time Recording

Full working day indicator defaults to the value false. Change it based on the requirement. Activity Allocation and Cost Assignment: Sending Cost CenterID: Enter the sending cost center (mapped cost center of the employee). Resource Class ID: Enter the activity type here. In the example shown above, it is AA10.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 7

Leveraging SOA for Time Recording

WorkBreakDownStructureElementID: Enter the WBS element in the field (String).

Project Task confirmation: ProjectID: Enter the project id in the field (String) Project Element ID: Enter the task in the field (String)

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 8

Leveraging SOA for Time Recording

Enter a value in the field Timeout(seconds) and then press Send. After the data is processed, the results will be displayed under Response as shown below.

Make sure to record the transaction documentid 000000000155. This will help you track the results in the time sheet-related table. Before moving on, make sure to familiarize yourself with the rest of the response. Now move to the CAT2 transaction in the ERP transaction for the employee 1000099. You will notice that the information has been automatically added in the data entry area.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 9

Leveraging SOA for Time Recording

You can also look in the CATSDB table for the id 000000000155 as indicated in the response column after executing the web service.

We can further continue with the process of approval and transfer to cProjects.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 10

Leveraging SOA for Time Recording

Conclusion
We now see how SOA can be leveraged during time recording for tasks. This goes a long way in improving productivity and ensures the portal being the single point of contact during project execution.

Related Content
SAP Help Portal ES Workplace For more information, visit the Service - Oriented Architecture homepage.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 11

Leveraging SOA for Time Recording

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP DEVELOPER NETWORK | sdn.sap.com 2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 12

You might also like