Class InvalidItemException

All Implemented Interfaces:
OperationResult, XMLMarshallable, IChargingResultHolderException, Serializable

public class InvalidItemException extends OperationFailureException implements IChargingResultHolderException
Exception thrown when the rating and charging context is invalid in the connected SAP CC system when processing a business operation. This exception relates to a problem between:
  • the transactional data sent in the chargeable item coming from your client application (mediation system, CRM, ERP, provisionning system)
  • the business configuration in a master data managed by the running SAP CC system: the chargeable item class defined in the identified pricing catalog of the digital service delivered by the service provider.

Important Notes

Reasons

The possible reasons are:

Failure Reason Code Reason Code (HCI) Customizing and Integration Troubleshooting (Next Steps)
Bad configuration 0 badConfiguration

Note

To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section in this topic.

Refer to the information available in the Customizing subsection of each failure to develop your integration code.

Note

For troubleshooting investigations, see the Field Detail section in this topic.

Refer to the information available in the Next Steps subsection of each failure.

Wrong property type 1 wrongPropertyType
Property not found 2 propertyNotFound
Division by zero 4 divisionByZero
Incompatible currencies 5 incompatibleCurrencies
Chargeable item (CI) null 6 nullChargeableItem
Invalid property 7 invalidPropertyValue
Unrated (deprecated and now revoked) 3 unrated

Consider the detailed information in the Field Detail section in this topic.

Tip

For troubleshooting during the implementation of SAP Convergent Charging, see the SAP CC Error Code Reference in the SDK or in SAP Help Portal.

Implementation in Your Client Application

Exception and Error Handling

Depending on your business requirements, design and develop the handling functions in your client application.

See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="invalidItemFault">
   <xs:complexType>
    <xs:sequence>
       <xs:element ref="cause" minOccurs="0" maxOccurs="1"/>  <!-- Due to legacy use of this exception, no error may be provided -->
       <xs:element ref="causedBy" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="error" type="InvalidItemFaultErrorType"/>
    <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
  </xs:element>
  <xs:simpleType name="InvalidItemFaultErrorType">
   <xs:restriction base="xs:string">
      <xs:enumeration value="notAuthorized"/>
      <xs:enumeration value="badConfiguration"/>
      <xs:enumeration value="wrongPropertyType"/>
      <xs:enumeration value="propertyNotFound"/>
      <xs:enumeration value="unrated"/>  <!-- deprecated -->
      <xs:enumeration value="divisionByZero"/>
      <xs:enumeration value="incompatibleCurrencies"/>
      <xs:enumeration value="nullChargeableItem"/>
      <xs:enumeration value="invalidPropertyValue"/>
   </xs:restriction>
  </xs:simpleType>

  • Field Details

    • NOT_AUTHORIZED

      public static final int NOT_AUTHORIZED
      -1: Error when a no access is raised when executing a price plan in a charge configured in master data.
      See Also:
    • BAD_CONFIGURATION

      public static final int BAD_CONFIGURATION
      0: Error when the price plan is badly configured in the pricing catalog (in master data) configured in the connected SAP CC system.
      Next Steps

      Use the same inputs in the rating context that generates such error and use the trial run tool in the SAP CC Core Tool user interface to detect the price plan component in error and correct the configuration accordingly.

      See Also:
    • WRONG_PROPERTY_TYPE

      public static final int WRONG_PROPERTY_TYPE
      1: Error when a property in the rating context of the charging operation request does not have the right type.
      Detailed Information

      This kind of error might come when there is a mismatch between the type of the property declared in the chargeable item class and the one sent in the chargeable item.

      Next Steps

      • Verify the properties transmitted from mediation system to SAP CC and their types. It can be done through the logs of mediation system by checking the chargeable item data sent to SAP CC for rating.
      • For each property declared in the chargeable item class, check if it has the same type than the one transmitted in the chargeable item using the previous step.
      • Update the mediation system to send the right type of each property included in the chargeable item.
      • Use the same inputs in the rating context that generates such error and use the trial run tool of SAP CC graphical interface in order to detect the component in error and correct the configuration accordingly.
      See Also:
    • PROPERTY_NOT_FOUND

      public static final int PROPERTY_NOT_FOUND
      2: Error when a property is not found in the rating context.
      See Also:
    • UNRATED

      @Deprecated public static final int UNRATED
      Deprecated.
      This reason code is deprecated and can no longer be returned
      3: Error when the input chargeable item (CI) is not rated by executing the price plan.
      See Also:
    • DIVISION_BY_ZERO

      public static final int DIVISION_BY_ZERO
      4: Error when a division by zero occured during the processing.
      See Also:
    • INCOMPATIBLE_CURRENCIES

      public static final int INCOMPATIBLE_CURRENCIES
      5: Error when currencies are not compatible; This kind of error happens when there is a mismatch between the currency of the account and the currency declared at the charge level.
      Next Steps
      • Detect which account is raising this error by checking chargeable item data
      • Cancel the prepaid account and create a new one using the correct currency
      See Also:
    • CI_NULL

      public static final int CI_NULL
      6: Error when the chargeable item (CI) is null or its name is null.
      See Also:
    • INVALID_PROPERTY_VALUE

      public static final int INVALID_PROPERTY_VALUE
      7: Error when a property of the rating context has an invalid value.
      See Also:
  • Constructor Details

    • InvalidItemException

      public InvalidItemException()
      Constructs an empty exception.
    • InvalidItemException

      public InvalidItemException(int reason, String message)
      Constructs an exception with an error code and a message; The message contains a human readable text.
      Parameters:
      message - The message
      reason - The error
    • InvalidItemException

      public InvalidItemException(int reason, String message, ChargingResult chargingResult)
      Constructs an exception with an error code and a message; The message contains a human readable text. It explains the reason why the charge process is forbidden, and it provides a structured information in the ChargingResult.
      Parameters:
      message - The message
      reason - The error
      chargingResult - The ChargingResult which provides structured information about the exception
    • InvalidItemException

      public InvalidItemException(int reason, String message, IError error)
      Constructs an exception with an error code and a message; The message contains a human readable text.
      Parameters:
      message - The message
      reason - The reason
      error - The error associated to this exception
    • InvalidItemException

      public InvalidItemException(int reason, String message, IError error, ChargingResult chargingResult)
      Constructs an exception with a cause, a message, an error, and a ChargingResult that explain why the charging is forbidden. The message contains a human readable text. It explains the reason why the charge process is forbidden, and it provides a structured information in the ChargingResult.
      Parameters:
      reason - The reason
      message - The message
      error - The error code
      chargingResult - The ChargingResult which provides structured information about the exception
  • Method Details