Read an existing Time Sheet Policy object in PPM.

Note: This operation supports the Day in Days option and Period in Days option, which were introduced since PPM Center version 8.00 Service Pack 1. For more information, see the Time Sheet Update Service section in Project and Portfolio Management Center Version 8.00.01 (Service Pack 1) Release Notes.


This operation reads an existing Time Sheet Policy object, identified by the unique time sheet policy name in PPM.


A String value of the name of an existing time sheet policy


An object of TimeSheetPolicyBean

Java Interface

GetTimeSheetPolicyResponseDocument getTimeSheetPolicy(GetTimeSheetPolicyDocument in)




Wrapper for a String value which holds the policy name.

See the following example for the construction.


Wrapper for a TimeSheetPolicyBean.

See the following example for retrieving the bean and its fields.

Each bean includes the following fields:

  • kkkkLong timeSheetPolicyId

  • kkkkString timeSheetPolicyName

  • String bucketShowLevel

  • String bucketReportMethod

  • String periodHoursCalcTypeCode

  • Double hoursPerPeriod

  • Double workdayHours

  • Boolean allowMultipleTimeSheets

  • String hoursInPeriodType

  • Double maximumHoursPerDay

  • Double maximumHoursPerTimeSheet

  • Double minimumHoursPerTimeSheet

  • Double maximumPercentPerTimeSheet

  • Double minimumPercentPerTimeSheet

  • Boolean notifyDelinquentTimeSheet

  • Boolean reqActivitiesRequiredFlag

  • Boolean tskActivitiesRequiredFlag

  • Boolean prjActivitiesRequiredFlag

  • Boolean pkgActivitiesRequiredFlag

  • Boolean miscActivitiesRequiredFlag

  • Boolean reqWorkItemEnabledFlag

  • Boolean tskWorkItemEnabledFlag

  • Boolean prjWorkItemEnabledFlag

  • Boolean pkgWorkItemEnabledFlag

  • Boolean mscWorkItemEnabledFlag

  • Boolean enforcementLevelError

Java Examples

Example: read an existing time sheet policy.

public void testGetTimeSheetPolicy() {
        System.out.println("testGetTimeSheetPolicy started
        try {
            TimeServiceStub stub = new TimeServiceStub(ctx,
          GetTimeSheetPolicyDocument getTimeSheetPolicyDocument
= GetTimeSheetPolicyDocument.Factory.newInstance();
Name("Semi-Monthly - Day - Hours");
             GetTimeSheetPolicyResponseDocument response =
             final TimeSheetPolicyBean returntimesheetPolicy =
           System.out.println("Time Sheet Policy was found " +
        catch(Exception e) {
        System.out.println("testGetTimeSheetPolicy completed");

Errors and Exceptions

When an error occurs on this operation, you will receive a description of the root cause in the log or in the response message.

The server log file content is similar to the following:

Exception in thread "main" org.apache.axis2.AxisFault: [root cause description] 

Response message:

<exception:exceptionDetails xmlns:exception="http://">
<exception:detail>[root cause description] </exception:detail>

Possible root cause descriptions:

Message Code



Possible Corrective Action


Policy does not exist with name {0}

Policy does not exist, or corrupt database.

Check the validity of the policy name (must be unique in PPM Center)

* All the following operations are convenience helper methods to change the status of a time sheet or a time sheet line:

Since status change can occur only from a specific existing status, you must perform a validity check for this existing status first. If the existing status does not accord with the functionality you want to achieve (for example, you try to submit an approved time sheet), an exception is thrown.

Note: If you want to update a time sheet or a time sheet line within the existing TimeSheetBean, you must input the whole TimeSheetBean. For example, if time sheet contains 100 lines, you must input all 100 lines by using Web service, not only the one that you want to update. Otherwise, all the lines that you did not input will be missing from the time sheet.