SAP Knowledge Base Article - Public

2924772 - You receive an error "Amount not valid; it must be a positive value" on Opportunity while entering negative value from your code logic in SDK

Symptom

You have written a code logic in Opportunity XBO to fill negative revenue(DistributionAmount) in ItemRevenuePlanReporting.

Environment

SAP Cloud For Customer

SAP Cloud Application Studio

Reproducing the Issue

Pre-requisite: You have PDI solution where Opporuntiy XBO (extension business object) is created.

  1. Login to Cloud Application Studio
  2. Open PDI solution 
  3. Open Opportunity XBO 
  4. Write a code logic to fill negative revenue(DistributionAmount) in itemrevenueplanreporting

You can see error message "Amount not valid; it must be a positive value" on Opportunity screen as well as in debugging your code in Output window from SDK.

Cause

Revenue is the income generated from normal business operations and includes discounts and deductions for returned merchandise. Hence it should not be negative value.

Resolution

As per the current application designed the amount must be positive for Revenue. The message cannot be configured.

See Also

You can also refer Split Revenue Help Document for Split revenue and Schedule Revenue .

Keywords

SDK, OPP XBO, Event-BeforeSave.absl, ABSL code logic, Forecast , C4C , KBA , opportunity xbo , amout not valid , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem

Product

SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications 2005