getCostFactors

Purpose

Gets the cost factors that are in PPM.

Function

Gets the cost factors defined in the system. Cost factors are returned in a list with the most significant factor first and the least significant factor last. For more information about the significance of cost factors, refer to the Financial Management User Guide.

Limitations

None

Related Information

setCostFactors sets the cost factors in PPM.

Input

None

Return

An object with an array of WSCostFactorBean.

Java Interface

GetCostRulesResponseDocument getCostRules (GetCostRulesDocument in)

Parameters

Description

GetCostFactorsResponseDocument

Wrapper for the array of cost factor beans (WSCostFactorBean) that the caller obtains by performing this operation.

Java Examples

Example: Read the cost factors that are in PPM.

CostFactor[] getCostFactors() throws Exception {
    FinanceServiceStub FM = new FinanceServiceStub(ctx, WSURL);
    GetCostFactorsDocument getCostFactorsDoc =
GetCostFactorsDocument.Factory.newInstance();
               getCostFactorsDoc.addNewGetCostFactors();
    GetCostFactorsResponseDocument response =
FM.getCostFactors(getCostFactorsDoc);
    return
response.getGetCostFactorsResponse().getCostFactorArray();
    }

Errors and Exceptions

When an error occurs on this operation, you will see 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: 
<exception:exceptionDetails xmlns:exception="http://www.mercury.com/ppm/ws/exception">
<exception:detail>[root cause description] </exception:detail>
</exception:exceptionDetails>

Root Cause Descriptions

Possible root cause descriptions:

Message Code

Message

Cause(s)

Possible Corrective Action

exception.authorization

You do not have the privilege to take this action. Consult your PPM Administrator.

User is not authorized to read the cost factors.

Check the user licenses and privileges (access grants).