Description | Calculate Price |
Name | CalculatePriceIn |
Namespace | http://sap.com/xi/AP/FO/PriceAndTax/Global |
Process Component Description | Price Engine |
Process Component Name | PricingEngine |
Process Component Namespace | http://sap.com/xi/AP/FO/PriceAndTax/Global |
Deployment Unit Description | Foundation |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to extract the Price Components (Price , Discount, Surcharge, Freight) information of a given 'Product' along with several other master data. For example, Account, Sales Organization, Distribution channel, Company.
Note: Interface is used for extraction of 'Sales' price components for example, sales order and 'Purchase' price components for example, purchase order.
The Web service interface Calculate Price In enables you to extract the Price Components such as Price , Discount, Surcharge,and Freight information of a given 'Product'.
The term 'Price Components' will be used in this documentation to refer to Price , Discount, Surcharge,and Freight.
The Web service interface Calculate Price In offers the operation Calculate Price.
Here is an example of a simple Web service request to get Base Sales Price of Product:
<n0:CalculatePricesRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CalculatePricesRequest> <Application>2</Application> <CurrencyCode>USD</CurrencyCode> <Item> <ID>1</ID> <ProductID>MCF-0001</ProductID> <ProductTypeCode>1</ProductTypeCode> <Quantity unitCode="EA">1</Quantity> <QuantityTypeCode>EA</QuantityTypeCode> </Item> </CalculatePricesRequest> </n0:CalculatePricesRequest_sync>
Here is an example of a simple Web service response of Base Sales Price of Product:
<n0:CalculatePricesResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAS320A1E78319512398166:804"> <Item> <ID>1</ID> <ProductID>MCF-0001</ProductID> <ProductType>1</ProductType> <NetPrice> <DecimalValue>345.8</DecimalValue> <CurrencyCodeCode>USD</CurrencyCode> </NetPrice> <NetValue> <DecimalValue>345.8</DecimalValue> <CurrencyCodeCode>USD</CurrencyCode> </NetValue> <PriceComponents> <ConditionType>7PR1</ConditionType> <ConditionDescription>List Price</ConditionDescription> <ConditionRate>345.8</ConditionRate> <CurrencyCodeCode>USD</CurrencyCode> <QuantitySymbol unitCode="EA">1.0</QuantitySymbol> <QuantityUnitOfMeasure>EA</QuantityUnitOfMeasure> <ConditionValue>345.8</ConditionValue> </PriceComponents> </Item> <Log> <MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode> <Item> <SeverityCode>1</SeverityCode> <Note>Price Calculation Completed</Note> </Item> </Log> </n0:CalculatePricesResponse_sync>
Here is an example of a simple Web service request to get Customer Specific Sales Price of Product:
<n0:CalculatePricesRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CalculatePricesRequest> <Application>2</Application> <CurrencyCode>USD</CurrencyCode> <AccountID>MC9785</AccountID> <Item> <ID>1</ID> <ProductID>MCF-0001</ProductID> <ProductTypeCode>1</ProductTypeCode> <Quantity unitCode="EA">1</Quantity> <QuantityTypeCode>EA</QuantityTypeCode> </Item> </CalculatePricesRequest> </n0:CalculatePricesRequest_sync>
Here is an example of a simple Web service response of Customer Sprcific Sales Price of Product:
<n0:CalculatePricesResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAS320A1E78319512398166:804"> <Item> <ID>1</ID> <ProductID>MCF-0001</ProductID> <ProductType>1</ProductType> <NetPrice> <DecimalValue>300.85</DecimalValue> <CurrencyCodeCode>USD</CurrencyCode> </NetPrice> <NetValue> <DecimalValue>300.85</DecimalValue> <CurrencyCodeCode>USD</CurrencyCode> </NetValue> <PriceComponents> <ConditionType>7PR1</ConditionType> <ConditionDescription>List Price</ConditionDescription> <ConditionRate>300.85</ConditionRate> <CurrencyCodeCode>USD</CurrencyCode> <QuantitySymbol unitCode="EA">1.0</QuantitySymbol> <QuantityUnitOfMeasure>EA</QuantityUnitOfMeasure> <ConditionValue>345.8</ConditionValue> </PriceComponents> <PriceComponents> <ConditionType>7PR6</ConditionType> <ConditionDescription>Product Discount (%)</ConditionDescription> <ConditionRate>-13.0</ConditionRate> <CurrencyCodeCode>%</CurrencyCode> <ConditionValue>-44.95</ConditionValue> </PriceComponents> </Item> <Log> <MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode> <Item> <SeverityCode>1</SeverityCode> <Note>Price Calculation Completed</Note> </Item> </Log> </n0:CalculatePricesResponse_sync>
Here is an example of a simple Web service request to get Price List with extension fields of Product:
<n0:CalculatePricesRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CalculatePricesRequest> <Application>2</Application> <CurrencyCode>USD</CurrencyCode> <Item> <ID>1</ID> <ProductID>MCF-0001</ProductID> <ProductTypeCode>1</ProductTypeCode> <Quantity unitCode="EA">1</Quantity> <QuantityTypeCode>EA</QuantityTypeCode> <n1:ItemExtension xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/ZZZZZ">String 65</n1:ItemExtension> </Item> <n1:HeaderExtension xmlns:n1="http://sap.com/xi/AP/CustomerExtension/BYD/ZZZZZ">String 66</n1:HeaderExtension> </CalculatePricesRequest> </n0:CalculatePricesRequest_sync>
Note: for the above request with extension field to work, Price Master data should be in place for given extension field in system
Note: Incase, if for a given account ID MC9785 ,if there are no price master data existing (Customer specific Price) for a given product, then the most relevant price(Base price) of the product is selected. It would extract most relevant price (in this case base price, since no other key except product id is passed to service) for 1 ea of material MCF-0001. Note: Incase, if more than one key is passed AccountID , SalesOrganisationID + DistributionChannel Case 1: In the ByDesign system Customer specific and Sales Organisation specific prices are maintained for the given product, then most relevant price is picked , in this case Customer specific price is picked. Case 2: in ByDesign system Customer specific price for given product is not maintained , but Sales Organisation specific prices are maintained for the given product, then most relevant price is picked , in this case Sales Organisation price is picked. Case 3: in ByDesign system Customer specific price and Sales Organisation specific for given product is not maintained ,then most relevant price is picked , in this case Base price is picked. Service works for Extension fields at Header/General and Item level -> for more details refer to Help Center documentation for topic 'Pricing with Extension Fields' |
The following master data is only referenced and will not be created by the service operations. They must exist in the system when the wb service is called:
Price Master data for Product
Business Partners (Buyer)
Sales Organizations
Distribution Channels
Products and Product Categories
Companies
Suppliers
Companies
The Web service interface operation requires the following input request :
h4 Header fields:
Parameters | Description | Global Data Type: ES Name | Mandatory | Comments |
---|---|---|---|---|
APPLICATION | Sales / Procurement | PriceSpecificationElementPropertyDefinitionClassCode | Yes | Determines Sales / Procurement Price components to extract |
CURRENCY | Valid Currency Code | CurrencyCode | Yes | Determines Price Currency used for Price calculation |
GROSS_PRICING | Net / Gross | Indicator | No | If blank, then Net Pricing Procedure is used. it Determines Net / Gross Pricing procedure to be used |
PRICING_DATE | Pricing Date | Date | No | If blank, then todays date is used for price determination. |
BUYER_ID | Account ID | BusinessPartnerInternalID | No | Account used for price determination, if value is passed then Customer/Account specific price is determined |
SALES_ORG_ID | Sales Organisation ID | OrganisationalCentreID | No | Sales Organisation used for price determination, if value is passed then Sales Organisation specific price is determined , SALES_ORG_ID and DISTR_CHANNEL is a composite key and should be passed together |
DISTR_CHANNEL | Distribution Channel | DistributionChannelCode | No | Distribution channel used for price determination, if value is passed then Distribution Channel specific price is determined, SALES_ORG_ID and DISTR_CHANNEL is a composite key and should be passed together |
CAMPGN_ID | Campaing ID | BusinessTransactionDocumentID | No | Campaing ID used for price determination, if value is passed then Campaing specific price is determined |
COMPANY_ID | Comapny ID | OrganisationalCentreID | No | Company ID used for price determination, if value is passed then Compnay specific price is determined |
INCOTERMS1 | Incoterms Classification | IncotermsClassificationCode | No | If blank, then Incoterms1 is determined based on 'Buyer ID + Sales Organisation + Distribution Channel' |
INCOTERMS2 | Incoterms Transfer Location Name | IncotermsTransferLocationName | No | If blank, then Incoterms2 is determined based on 'Buyer ID + Sales Organisation + Distribution Channel' |
Following fields are mandatory: APPLICATION, CURRENCY Following fields values are determined, in case if its not filled in request: GROSS_PRICING (Pricing Procedure), PRICING_DATE, INCOTERMS1(IncotermsClassificationCode), INCOTERMS2(IncotermsTransferLocationNam) |
Note: above fields Data Types are released and belongs to namespace http://sap.com/xi/AP/Common/GDT
Valid APPLICATION values, for more detail refer to the Global Data Type documentation
Application Code | Description |
---|---|
1 | Procurement |
2 | Sales |
Valid CURRENCY value, example values USD, EUR, INR ..., for more detail refer to the Global Data Type documentation
Valid GROSS_PRICING values, for more detail refer to the Global Data Type documentation
Gross Pricing | Description |
---|---|
True | Gross Pricing Procedure |
False | Net Pricing Procedure |
Valid PRICING_DATE values, for more detail refer to the Global Data Type documentation
Pricing Date | Description |
---|---|
2015-12-31 | YYYY-MM-DD |
Valid BUYER_ID values, Account ID of Account master data maintained in ByD system
Valid SALES_ORG_ID values, Sales Organisation ID of Sales Organisation master data maintained in ByD system
Valid DistributionChannel values, for more detail refer to the Global Data Type documentation
Distribution Channel | Description |
---|---|
01 | Direct sales |
02 | Indirect sales |
Valid CampaignID values, Campaign ID maintained in ByD system
Valid COMPANY_ID values, Company ID of Company Organisation master master data maintained in ByD system
h4 Item fields:
Parameters | Description | Global Data Type: ES Name | Mandatory | Comments |
---|---|---|---|---|
ID | Item ID | BusinessTransactionDocumentItemID | Yes | Indicates the Item sequence in request and response , value should be a number |
PRODUCT_ID | Product ID | ProductInternalID | Yes | Product for which price components (price, discount, surcharge, frieght...) to be determined , PRODUCT_ID and PRODUCT_TYPE are composite key and should be passed together |
PRODUCT_TYPE | Product Type | ProductTypeCode | Yes | Indicates Material / Service / Entitelement Product, PRODUCT_ID and PRODUCT_TYPE are composite key and should be passed together |
QUANTITY | Quantity UOM and Quantity Unit | Quantity | No | If blank, Quanity UOM of the Product is used and 1 is used as Quantity unit |
QUANTITY_TYPE_CODE | Quantity Type Code | QuantityTypeCode | No | If blank, Quanity Type Code of the Product is used |
CONTRCT_ITEM_GUID | Contract Item UUID | UUID | No | If passed then contract price is determined, Contract GUID uniquely identifies the Contract Item |
PRD_CAT_ID | Product Category ID | ProductCategoryInternalID | No | If blank, Base Product category of the product is derived from product |
SUPPLIER_ID | Supplier ID | BusinessPartnerInternalID | No | Supplier ID used for purchase price determination, mandatory in case of Purchase price determination |
SERVICE_TYPE | Service Working Conditions | ServiceWorkingConditionsCode | No | Overtime / Holiday / Travel time |
PROCESS_TYPE | Item Processing Type | BusinessTransactionDocumentItemProcessingTypeCode | No | Product - delivery-based / Product - project-based / Service - fixed price without actuals ... |
AC_INDICATOR | Warranty Goodwill Code | WarrantyGoodwillCode | No | Warranty 100% / Goodwill 100% / No warranty/goodwill ... |
Following fields are mandatory: ID, PRODUCT_ID, PRODUCT_TYPE Following fields values are determined, in case if its not filled in request: QUANTITY (Product's Quantity UOM is used), QUANTITY_TYPE_CODE (Product's Quantity Type Code is used), PRD_CAT_ID (base Product catgory of the product) |
In case of Scale based prices are maintained in ByD for Price / Discount List Master data , then Net Weight Gross Weight and Net Volume data is determined from Product to determine the correct scale based price / discount |
Note: above fields Data Types are released and belongs to namespace http://sap.com/xi/AP/Common/GDT
Valid ID values, numberic value ,which can be maximum 16 digits in length, example: 12345.
Valid PRODUCT_ID values, Prodcut ID of Product (Material ,Service, Entitlement Product) master data maintained in ByD system
Valid PRODUCT_TYPE values, for more detail refer to the Global Data Type documentation
Product Type Code | Description |
---|---|
1 | Material |
2 | Service |
6 | Entitlement |
Note: Individual Product and Warranty are not supported
Valid PRD_CAT_ID values, Product Category ID of Base Producut Category master data maintained in ByD system
Valid SUPPLIER_ID values, Supplier ID of Supplier master data maintained in ByD system, mandatory in case of Procurement price (SRM) sceanrio and used in case of Procurement price extraction.
Valid SERVICE_TYPE (Service Working Conditions Code) values, for more detail refer to the Global Data Type documentation
Code | Description |
---|---|
01 | Overtime |
02 | Holiday |
03 | Travel time |
Valid AC_INDICATOR (Warranty Goodwill Code) values, for more detail refer to the Global Data Type documentation
Code | Description |
---|---|
G1 | Goodwill 100% |
G5 | Goodwill 50% |
W0 | No warranty/goodwill |
W1 | Warranty 100% |
W5 | Warranty 50% |
You can find general information about Web services, their structure and consumption in the Web Services documentation. Please open the Web Services document in a new window.
Possible scenarios include the following:
Extract sales specific price of a product
Extract purchase specific price of a product
It is not possible to determine prices based on price key fields in header and item level.
Note: If no key is passed then base price of the product is extracted.
Service works for Extension fields at Header/General and Item level -> for more details refer to Help Center documentation for topic 'Pricing with Extension Fields'
Description | Calculate price operation |
Name | CalculatePrice |
Synchronous | yes |
Release Status | Released |
Price and Tax A2X Service.
User will fire A2X service CalculatePriceIn to extract the Price Components (Price , Discount, Surcharge, Freight …) information of a given Product along with several other master data ( example: Account, Company, Sales Organisation ...) and gets back response.
Possible Usage: Portal where product prices are displayed and Product Price is stored in ByD system . In this scenario the the webservice call is made from external application to ByD to extract the Price details, along with Discount, Surcharge and Frieght information of the Product.
Product Prices master data maintained in ByD system.
Only Product specific prices can be retrieved from Service