Description | Query Price Lists |
Name | QuerySalesPriceListIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Price Master Data Management |
Process Component Name | PriceMasterDataManagement |
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 to query for price lists and discount lists.
The web service interface, 'QuerySalesPriceListIn' enables you to connect external applications to your SAP Business ByDesign system and to query for sales price list and discount lists by TypeCode, PropertyID and PropertyValue.
It has one operation called FindByTypeCodeAndPropertyIDAndPropertyValue.
For more information about Pricing, see Help Center documentation in the Business ByDesign application: SAP Business ByDesign -> Business Areas -> Customer Relationship Management -> Service -> Field Service and Repair -> Service Confirmations View -> Business Background -> Pricing in Customer Relationship Management
In the following example the user wants to find a Customer Specific Price list maintained for a Material, Customer combination.
<n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <SalesPriceList> <!-- <SalesPriceList> element contains the search parameters for a price list or discount list--> <TypeCode>7PL0</TypeCode> <!-- <TypeCode> defines the type of list; i.e. pricelist or discount list --> <PropertyValuationPriceSpecificationElementPropertyValuation1> <!-- <PropertyValuationPriceSpecificationElementPropertyValuation[1,2,...10]> are used to pass 'Key" and 'Value' pairs at the header level, to search price/discount list --> <IdentifyingIndicator>true</IdentifyingIndicator> <!-- <IdentifyingIndicator> has to be set to 'true', to use the <PropertyValuationPriceSpecificationElementPropertyValuation> as a query parameter for search--> <PriceSpecificationElementPropertyReference> <!-- '<PriceSpecificationElementPropertyReference> element contains the key, value pairs --> <!-- Header key 'CND_BUYER_ID' determines the type of price list to be queried for. 'CND_BUYER_ID' is the header key for 'Customer specific pricelist'--> <PriceSpecificationElementPropertyID>CND_BUYER_ID</PriceSpecificationElementPropertyID> <!-- <PriceSpecificationElementPropertyID>' element contains the 'key' used as a parameter for search of price/discount list --> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <!-- <PriceSpecificationElementPropertyValue>' element contains the 'value' for the chosen 'key'(In this case, CND_BUYER_ID)used as a parameter for search of price/discount list--> <!-- Please refer _Constraints and Integrity Conditions_ section to decide on <code> or <identifier> to be used--> <ID>MC9785</ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> <!-- <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation[1,2,...10]> contains the 'Key' and 'Value' pairs at the item level; i.e. search for a pricelist with material 'MCF-0002'--> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator>true</IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID>CND_PRODUCT_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID>MCF-0002</ID> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator>true</IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <!-- CND_PRODUCT_TYPE_CODE has to be used with CND_PRODUCT_ID--> <PriceSpecificationElementPropertyID>CND_PRODUCT_TYPE_CODE</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <!-- Please refer _Constraints and Integrity Conditions_ section to decide on <code> or <identifier> to be used--> <code>1</code> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> <IdentifyingIndicator>true</IdentifyingIndicator> <!-- CND_PRODUCT_ID_TYPE_CODE has to be used with CND_PRODUCT_ID--> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID>CND_PRODUCT_ID_TYPE_CODE</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <code>1</code> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> </SalesPriceList> </n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync>
<nm:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueResponse_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ASL:/1SAI/TAS448975E609129A738F5A:804"> <SalesPriceList> <!--<SalesPriceList> element contains the information about a price list. If multiple price lists are part of the result, then information about each pricelist will be present in <SalesPriceList> element--> <UUID>00000000-0001-02dc-ae9c-27fa57855ded</UUID> <!-- tag <UUID> exists due to technical and future usage --> <ID>PRICES SILVERSTAR</ID> <!--<ID> element contains the name of pricelist--> <Status> <!--<Status> element contains various status of pricelist like Release Status, Consistency Status, Approval Status, --> <ReleaseStatusCode>3</ReleaseStatusCode> <!-- Release status of pricelist. For details refer to Global Data Type 'ReleaseStatusCode'--> <PriceSpecificationListReleaseStatusCode>3</PriceSpecificationListReleaseStatusCode> <!-- Release status of the price specification. For details, refer to Global Data Type 'ReleaseStatusCode'--> <ConsistencyStatusCode>3</ConsistencyStatusCode> <!-- Consistency Status of price list. i.e. pricelist is consistent or inconsistent. For details refer to Global Data Type 'ConsistencyStatusCode' --> <ApprovalStatusCode>2</ApprovalStatusCode> <!-- Approval status of price list. For details refer to Global Data Type 'ApprovalStatusCode' --> </Status> <TypeCode listID="2">7PL0</TypeCode> <!-- <TypeCode> defines the type of list; i.e. pricelist or discount list --> <CurrencyCode>USD</CurrencyCode> <!-- Currency maintained in the header of price list. For details refer to Global Data Type 'CurrencyCode' --> <ValidityPeriod> <!-- Validity period , for details refer to Global Data Type 'TimePointPeriod' documentation --> <IntervalBoundaryTypeCode /> <StartTimePoint> <TypeCode>1</TypeCode> <Date>2007-01-01</Date> </StartTimePoint> <EndTimePoint> <TypeCode>1</TypeCode> <Date>9999-12-31</Date> </EndTimePoint> </ValidityPeriod> <SystemAdministrativeData> <!-- <SystemAdministrativeData> contains the administrative information of the pricelist like, 'creation date and time', 'last changed date and time', 'created by' and 'last changed by'--> <CreationDateTime>2009-02-18T10:10:16Z</CreationDateTime> <CreationIdentityUUID>00163e02-870c-1ed2-97cb-68746bec5aec</CreationIdentityUUID> <!-- <CreationIdentityUUID> element contains the employee Id of person created the pricelist in internal representation --> <LastChangeDateTime>2009-02-18T10:10:16Z</LastChangeDateTime> <LastChangeIdentityUUID>00163e02-870c-1ed2-97cb-68746bec5aec</LastChangeIdentityUUID> <!-- <LastChangeIdentityUUID> element contains the employee Id of person changed the pricelist in internal representation --> </SystemAdministrativeData> <NotReleasedPriceSpecificationElementsIntegerValue>0</NotReleasedPriceSpecificationElementsIntegerValue> <!-- <NotReleasedPriceSpecificationElementsIntegerValue> contains the number of items with 'not released' release status in the price list --> </SalesPriceList> </nm:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueResponse_sync>
In the following example the user wants to find a Customer Specific Pricelist maintained for a Customer.
<n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <SalesPriceList> <TypeCode>7PL0</TypeCode> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator>true</IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <!-- Header key 'CND_BUYER_ID' determines the type of price list to be queried for. 'CND_BUYER_ID' is the header key for 'Customer specific pricelist'--> <PriceSpecificationElementPropertyID>CND_BUYER_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID>MC9785</ID> <!-- Search for a 'Customer Specific Pricelist' with customer ID as 'MC9785' --> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> </SalesPriceList> </n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync>
In the following example the user wants to find Overall Customer Discount maintained in the system.
<n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <SalesPriceList> <TypeCode>7PL1</TypeCode> <!-- 7PL1 refers to Overall Customer Discount--> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator>true</IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID>CND_BUYER_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID>MC9785</ID> <!-- Search for a 'Overall Customer Discount', where 'MC9785' is item key--> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> </SalesPriceList> </n0:SalesPriceListFindByTypeCodeAndPropertyIDAndPropertyValueQuery_sync>
The user should know valid key combinations for different use cases. For example: Base Price List, Distribution Chain Price List, Customer Specific Price List, Overall Customer Discount, Customer Specific Discount Products, Overall Customer Group Discount, Customer Specific Discount Product Category.
Type Code | Description | Header Key Name | Item Key Name |
---|---|---|---|
7PL0 | Base Price List | CND_PRODUCT_ID | |
7PL0 | Base Price List by Product Category | CND_PRD_CAT_ID | CND_PRODUCT_ID |
7PL0 | Distribution Chain Price List | CND_SLSORG_ID, DISTR_CHANNEL | CND_PRODUCT_ID |
7PL0 | Distribution Chain Price List by Product Category | CND_SLSORG_ID, DISTR_CHANNEL, CND_PRD_CAT_ID | CND_PRODUCT_ID |
7PL0 | Customer Specific Price List | CND_BUYER_ID | CND_PRODUCT_ID |
7PL0 | Customer Group Specific Price List | CND_SLSORG_ID, DISTR_CHANNEL, CDA_CUST_GROUP | CND_PRODUCT_ID |
7PL1 | Overall Customer Discount | CND_BUYER_ID | |
7PL2 | Customer Specific Discount Products | CND_BUYER_ID | CND_PRODUCT_ID |
7PL3 | Overall Customer Group Discount | CDA_CUST_GROUP | |
7PL4 | Customer Specific Discount Product Category | CND_BUYER_ID | CND_PRD_CAT_ID |
Detailed examples for each Key combination along with Request and Response xml documents is mentioned in the operation FindByTypeCodeAndPropertyIDAndPropertyValue documentation |
The different type codes that can be used are as follows:
Type Code | Description |
---|---|
7PL0 | Base Price List, Distribution Chain Price List, Customer Specific Price List, Base Price List by Product Category, Distribution Chain Price List by Product Category, Customer Group Specific Price List |
7PL1 | Overall Customer Discount |
7PL2 | Customer Specific Discount Products |
7PL3 | Overall Customer Group Discount |
7PL4 | Customer Specific Discount Product Category |
(These belong to maintenance group = PLALL1)
Maintenance group is the coded representation of a group of price, discount or surcharge specifications
For details on maintenance group refer to the Global Data Type PriceSpecificationGroupCode documentation
You can query for the following parameters:
This table contains the backend technical name for the price specification key fields and can be used in the request xml for <PriceSpecificationElementPropertyID> element.
Parameters | Description | Data Type |
---|---|---|
CND_SALES_ORG_ID | Sales organisation | Identifier |
DISTR_CHANNEL | Distribution channel | Code |
CND_BUYER_ID | Customer | Identifier |
CND_PRODUCT_ID | Product | Identifier |
CND_PRODUCT_ID_TYPE_CODE | Type of product id. 1 means internal id. It has to be used with CND_PRODUCT_ID. | Code |
CND_PRODUCT_TYPE_CODE | Type of product. It has to be used with CND_PRODUCT_ID | Code |
CDA_CUST_GROUP | Customer group | Code |
CND_PRD_CAT_ID | Product category | Identifier |
CND_PRD_CAT_HIER_ID | Product category hierarchy. This has to be used with product category | Identifier |
Product type code value | Description |
---|---|
1 | Material |
2 | Service |
3 | Individual Material |
4 | Warranty |
6 | Entitlement Product |
Similarly, for the code list values, please refer the data type as given below,
Item Key | Data Type |
---|---|
DISTR_CHANNEL | APC_S_DIST_CHANNEL_CODE |
CDA_CUST_GROUP | APC_S_CUSTOMER_GROUP_CODE |
CND_PRODUCT_ID_TYPE_CODE | APC_V_PRODUCT_IDENTIFIER_T_C |
CND_PRODUCT_TYPE_CODE | APC_V_PRODUCT_TYPE_CODE |
To search price lists or discount lists for header level values such as customer ID you would need to use the following elements:
<PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <PropertyValuationPriceSpecificationElementPropertyValuation3> <PropertyValuationPriceSpecificationElementPropertyValuation4> <PropertyValuationPriceSpecificationElementPropertyValuation5> <PropertyValuationPriceSpecificationElementPropertyValuation6> <PropertyValuationPriceSpecificationElementPropertyValuation7> <PropertyValuationPriceSpecificationElementPropertyValuation8> <PropertyValuationPriceSpecificationElementPropertyValuation9 <PropertyValuationPriceSpecificationElementPropertyValuation10>
To search price lists or discount lists for for item level values such as product ID you would need to use the following elements:
<PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation4> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation5> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation6> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation7> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation8> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation9> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation10>
Let us look at the child elements of PropertyValuationPriceSpecificationElementPropertyValuation1.
All the others, for example, PropertyValuationPriceSpecificationElementPropertyValuation2 to PropertyValuationPriceSpecificationElementPropertyValuation10 and PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1 to PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation10 have the same structure |
<PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator></IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID></PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <Code></Code> <ID></ID> <IntegerValue></IntegerValue> <Date></Date> <Time></Time> <Indicator></Indicator> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1>
The <IdentifyingIndicator>true</IdentifyingIndicator> means it will be used for querying. The <PriceSpecificationElementPropertyID> indicates which parameter (for example, CND_BUYER_ID) will be used for the query. Depending on whether the parameter is an identifier (ID) or a CODE you have to use <ID></ID> or <Code></Code> to pass the corresponding value. Let us supposed that you wish to query for price lists of a customer whose ID is 123 (CND_BUYER_ID=123) then the XML snippet would be as follows:
<PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_BUYER_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> 123 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1>
If you wish to query for all customer specific price lists then the XML snippet would be as follows. Note that no ID is passed only the empty tags - <ID></ID>. The empty tags have to be there.
<PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_BUYER_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1>
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Request
<Input> <SalesPriceList> <ID /> <RelreaseStatusCode /> <PriceSpecificationListReleaseStatusCode /> <ApprovalStatusCode /> <ConsistencyStatusCode /> <ValidityPeriod> <CreationDateTimeInterval> <LastChangedDatetimeInterval> <TypeCode /> <PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <PropertyValuationPriceSpecificationElementPropertyValuation3> <PropertyValuationPriceSpecificationElementPropertyValuation4> <PropertyValuationPriceSpecificationElementPropertyValuation5> <PropertyValuationPriceSpecificationElementPropertyValuation6> <PropertyValuationPriceSpecificationElementPropertyValuation7> <PropertyValuationPriceSpecificationElementPropertyValuation8> <PropertyValuationPriceSpecificationElementPropertyValuation9> <PropertyValuationPriceSpecificationElementPropertyValuation10> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation4> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation5> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation6> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation7> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation8> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation9> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation10> </SalesPriceList>
Response
<Output> <SalesPriceList> <UUID /> <ID /> <Status> <ReleaseStatusCode /> <PriceSpecificationListReleaseStatusCode /> <ConsistencyStatusCode /> </Status> <TypeCode /> <CurrencyCode /> <ValidityPeriod /> <SystemAdministrativeData /> <NotReleasedPriceSpecificationElementsIntegerValue/> <SalesPriceList> <Log> <Item /> </Log>
Description | Find price lists using property valuation |
Name | FindByTypeCodeAndPropertyIDAndPropertyValue |
Synchronous | yes |
Release Status | Released |
To find a sales price list by its type code and property ID as well as property value.
This is the only operation of the web service and is used to query for both price lists and discount lists.
ID is the ID of the price list.
Type Code specifies the type of price list or discount list and has the following values:
7PL0 | Base Price List, Distribution Chain Price List, Customer Specific Price List |
7PL1 | Overall Customer Discount |
7PL2 | Customer Specific Discount Products |
7PL3 | Overall Customer Group Discount |
7PL4 | Customer Specific Discount Product Category |
ReleaseStatusCode* indicates whether the price list has been released or not and is relevant for price calculation.
Code List | Description |
---|---|
1 | Not Released |
2 | Partially Released |
3 | Released |
5 | Release Canceled |
PriceSpecificationListReleaseStatusCode indicates whether the items of a price list have been released.
Code List | Description |
---|---|
1 | Not Released |
2 | Partially Released |
3 | Released |
5 | Release Canceled |
7 | Release Cancellation Requested |
ApprovalStatusCode – This indicates whether the price list has been approved or not.
Code List | Description |
---|---|
1 | Not Started |
2 | Approval not Necessary |
3 | In Approval |
4 | Approved |
6 | In Revision |
ConsistencyStatusCode indicates whether the price list is consistent or not.
Code List | Description |
---|---|
2 | Inconsistent |
3 | Consistent |
Validity Period
You can search within a particular period. TypeCode=1 means date. The sample XML shows a search for the period 1st Jan 2001 to to 31st December 2012.
<ValidityPeriod> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode>1</TypeCode> <Date>2001–01–01</Date> </StartTimePoint> <EndTimePoint> <TypeCode>1</TypeCode> <Date>2012–12–31</Date> </EndTimePoint> <Duration /> </ValidityPeriod>
Creation Date Time
You can query by creation date time as follows:
<CreationDateTimeInterval> <LowerBoundaryDateTime>2001-01-01T00:00:00Z</LowerBoundaryDateTime> <UpperBoundaryDateTime>2012-12-31T23:59:59Z</UpperBoundaryDateTime> </CreationDateTimeInterval>
LastChangedDatetimeInterval
You can query by last changed date time as follows:
<LastChangedDatetimeInterval> <LowerBoundaryDateTime>2010-01-01T00:00:00Z</LowerBoundaryDateTime> <UpperBoundaryDateTime>2011-07-31T23:59:59Z</UpperBoundaryDateTime> </LastChangedDatetimeInterval>
PropertyValuationPriceSpecificationElementPropertyValuation1 to PropertyValuationPriceSpecificationElementPropertyValuation10 and PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1 to PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation10
The response has the following
To get all the details of the price list or discount list you’ve to use the Read operation of web-service ManageSalesPriceListIn.
In the SAP Business ByDesign user interface, price lists and discount lists are maintained in the Work Center Product and Service Portfolio.The view Pricing has 2 subviews – Price Lists and Discount Lists. Each of these OWLs have some pre-defined query options such as Base Price List, Customer Specific Price Lists, and so on. The sample XMLs below shows you how to obtain those results using the web-service.
The query options you see in your OWL depend on what you’ve scoped in Business Configuration. |
The following request will return all base price lists within a given validity period:
<SalesPriceList> <ReleaseStatusCode> 3 </ReleaseStatusCode> <!–Released:—> <ApprovalStatusCode> 4 </ApprovalStatusCode> <!–Approved:—> <ConsistencyStatusCode> 3 </ConsistencyStatusCode> <!–Consistent:—> <TypeCode> 7PL0 </TypeCode><!–Base Price List, Distribution Chain Price List, Customer Specific Price List :—> <ValidityPeriod> <IntervalBoundaryTypeCode> 1 </IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode> 1 </TypeCode> <!—Date:—> <Date> 2001-01-01 </Date> </StartTimePoint> <EndTimePoint> <TypeCode> 1 </TypeCode> <!—Date:—> <Date> 9999-12-31 </Date> </EndTimePoint> <Duration /> </ValidityPeriod> </SalesPriceList>
This request will get all the base price lists defined for product categories.
In the request no value is assigned to the category id (CND_PRD_CAT_ID) which means it will search for all categories.
Note that category hierarchy ID (CND_PRD_CAT_HIER_ID) has to be in the XML whenever you search for a category.
<SalesPriceList> <ReleaseStatusCode> 3 </ReleaseStatusCode> <!–Released:—> <ApprovalStatusCode> 4 </ApprovalStatusCode> <!–Approved:—> <ConsistencyStatusCode> 3 </ConsistencyStatusCode> <!–Consistent:—> <TypeCode> 7PL0 </TypeCode><!–Base Price List, Distribution Chain Price List, Customer Specific Price List :—> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRD_CAT_ID </PriceSpecificationElementPropertyID> <PriceSpecificationElementPropertyValue> <ID /> <!—can have a value or be empty:—> </PriceSpecificationElementPropertyValue> </PriceSpecificationElementPropertyReference> </PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRD_CAT_HIER_ID </PriceSpecificationElementPropertyID> <PriceSpecificationElementPropertyValue> <ID /> <!—can have a value or be empty:—> </PriceSpecificationElementPropertyValue> </PriceSpecificationElementPropertyReference> </PropertyValuationPriceSpecificationElementPropertyValuation2> </SalesPriceList>
To fetch customer specific price lists for customer C123 that contain a particular product P1 you may use the following XML.
<PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation1>, <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2>, <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3>, CND_PRODUCT_ID, CND_PRODUCT_TYPE_CODE, and CND_PRODUCT_ID_TYPE_CODE always have to be used in combination.
<SalesPriceList> <TypeCode> 7PL0 </TypeCode> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID>CND_BUYER_ID </PriceSpecificationElementPropertyID> <PriceSpecificationElementPropertyValue> <ID> C123 </ID> </PriceSpecificationElementPropertyValue> </PriceSpecificationElementPropertyReference> </PropertyValuationPriceSpecificationElementPropertyValuation1> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRODUCT_TYPE_CODE </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <CODE> 1 </CODE> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation2> <PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRODUCT_ID_TYPE_CODE </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <CODE> 1 </CODE> </PriceSpecificationElementPropertyValue> </PriceSpecificationPropertyValuationPriceSpecificationElementPropertyValuation3> </SalesPriceList>
This sample XML will return all the customer group specific prices for a particular Sales Organization and distributon channel.
All customer group specific prices are returned because CDA_CUST_GROUP is not assigned any value.
You can see that the code value is empty.
<PriceSpecificationElementPropertyValue> <Code/> </PriceSpecificationElementPropertyValue>
If you want price lists for a particular customer group then you would have to assign a value to it.
<SalesPriceList> <TypeCode> 7PL0 </TypeCode> <--Base Price List, Distribution Chain Price List, Customer Specific Price List:--> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CDA_CUST_GROUP </PriceSpecificationElementPropertyID> <!--Customer Group: --> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <Code /> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_SALES_ORG_ID </PriceSpecificationElementPropertyID> <!--Sales Organization --> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> MC42100 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation2> <PropertyValuationPriceSpecificationElementPropertyValuation3> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> DISTR_CHANNEL </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <Code> 02 </Code> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation3> </SalesPriceList>
This will return customer specific discount product category (type code = 7PL4) for customer MC9785. In this example CND_BUYER_ID = MC9785. If you assigned no value to CND_BUYER_ID then customer specific discount product category would be returned for all customers.
<SalesPriceList> <TypeCode> 7PL4 </TypeCode> <!--Customer Specific Discount Products: --> <ValidityPeriod> <IntervalBoundaryTypeCode> 1 </IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 2001–01–01 </Date> </StartTimePoint> <EndTimePoint> <!--Date: --> <TypeCode> 1 </TypeCode> <Date> 9999–12–31 </Date> </EndTimePoint> <Duration /> </ValidityPeriod> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_BUYER_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> MC9785 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> </SalesPriceList>
This will return customer specific discount products (type code = 7PL2) for customer MC9785. In this example CND_BUYER_ID = MC9785. If you assigned no value to CND_BUYER_ID then customer specific discount producst would be returned for all customers.
<SalesPriceList> <TypeCode> 7PL2 </TypeCode> <!--Customer Specific Discount Products: --> <ValidityPeriod> <IntervalBoundaryTypeCode> 1</IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode>1</TypeCode> <!--Date: --> <Date> 2001–01–01 </Date> </StartTimePoint> <EndTimePoint> <Typecode>1</TypeCode> <!--Date: --> <Date> 9999–12–31 </Date> </EndTimePoint> <Duration /> <ValidityPeriod> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_BUYER_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> MC9785 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> </SalesPriceList>
This will return all released, approved and consistent customer specific price lists (type code = 7PL0). In this example CND_BUYER_ID is not assigned any value. If you assigned a value to CND_BUYER_ID then customer specific price lists would be returned for only that customer.
<SalesPrioceList> <ReleaseStatusCode> 3 </ReleaseStatusCode> <!--Released: --> <ApprovalStatusCode> 4 </ApprovalStatusCode> <!--Approved: --> <ConsistencyStatusCode> 3 </ConsistencyStatusCode> <!--Consistent: --> <Typecode> 7PL0 </TypeCode> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_BUYER_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID /> <!-- since element is empty all customer specific price lists are returned: --> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> </SalesPriceList>
This will return all price and discount lists that are released, approved, consistent, lie within a particular validity period, were created in a particular period and were changed within a particular period.
Since type code is not specified price lists and discount lists of all types will be returned provided they fulfil the other selection criteria.
<SalesPriceList> <ReleaseStatusCode> 3 </ReleaseStatusCode> <!--Released: --> <ApprovalStatusCode> 4 </ApprovalStatusCode> <!--Approved: --> <ConsistencyStatusCode> 3 </ConsistencyStatusCode> <!--Consistent: --> <ValidityPeriod> <IntervalBoundaryTypeCode> 1</IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 2001–01–01 </Date> </StartTimePoint> <EndTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 9999–12–31 </Date> </EndTimePoint> <Duration /> </ValidityPeriod> <CreationDateTimeInterval> <LowerBoundaryDateTime> 2001-01-01T00:00:00Z </LowerBoundaryDateTime> <UpperBoundaryDateTime> 2011-07-31T23:59:59Z </UpperBoundaryDateTime> </CreationDateTimeInterval> <LastChangedDatetimeInterval> <LowerBoundaryDateTime> 2001-01-01T00:00:00Z </LowerBoundaryDateTime> <UpperBoundaryDateTime> 2011-07-31T23:59:59Z </UpperBoundaryDateTime> </LastChangedDatetimeInterval> </SalesPriceList>
This will return distribution chain price lists (type code = 7PL0) for sales organization S100 and distribution channel 01 that have been changed within a particular time frame.
<SalesPriceList> <TypeCode> 7PL0 </TypeCode> <LastChangedDatetimeInterval> <LowerBoundaryDateTime> 2005-12-31T00:00:00.0000Z </LowerBoundaryDateTime> <UpperBoundaryDateTime> 9999-12-31T23:59:59.0000Z </UpperBoundaryDateTime> </LastChangedDatetimeInterval> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_SALES_ORG_ID </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> S100 </ID> <!-- search for a particular Sales Org: --> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> DISTR_CHANNEL </PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <Code> 01 </Code> <!-- search for a particular Distribution Channel: --> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation2> </SalesPriceList>
This will return distribution chain price lists (type code = 7PL0) for sales organization S100, distribution channel 01 and product category 40.
This means:
CND_SALES_ORG_ID = S100
CND_SALES_ORG_ID = 01
CND_PRD_CAT_ID = 40
Note that whenever CND_PRD_CAT_ID is used you have to also include CND_PRD_CAT_HIER_ID (product category hierarchy id) although you do not need to assign any value to it.
<SalesPriceList> <TypeCode> 7PL0 </TypeCode> <PropertyValuationPriceSpecificationElementPropertyValuation1> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_SALES_ORG_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> S100 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation1> <PropertyValuationPriceSpecificationElementPropertyValuation2> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> DISTR_CHANNEL</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <Code> 01 </Code> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation2> <PropertyValuationPriceSpecificationElementPropertyValuation3> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRD_CAT_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID> 40 </ID> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation3> <PropertyValuationPriceSpecificationElementPropertyValuation4> <IdentifyingIndicator> true </IdentifyingIndicator> <PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyID> CND_PRD_CAT_HIER_ID</PriceSpecificationElementPropertyID> </PriceSpecificationElementPropertyReference> <PriceSpecificationElementPropertyValue> <ID /> <!-- although empty this element needs to be there: --> </PriceSpecificationElementPropertyValue> </PropertyValuationPriceSpecificationElementPropertyValuation4> </SalesPriceList>
This will return the overall customer discount (type code = 7PL1) within a given validity period.
<SalesPriceList> <TypeCode> 7PL1 </TypeCode> <!-- Overall Customer Discount: --> <ValidityPeriod> <IntervalBoundaryTypeCode> 1 </IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 2001–01–01 </Date> </StartTimePoint> <EndTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 9999–12–31 </Date> </EndTimePoint> <Duration /> </ValidityPeriod> </SalesPriceList>
This will return the overall customer group discount (type code = 7PL3) within a given validity period.
<SalesPriceList> <TypeCode> 7PL3 </TypeCode> <!-- Overall Customer Group Discount: --> <ValidityPeriod> <IntervalBoundaryTypeCode> 1 </IntervalBoundaryTypeCode> <StartTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 2001–01–01 </Date> </StartTimePoint> <EndTimePoint> <TypeCode> 1 </TypeCode> <!--Date: --> <Date> 9999–12–31 </Date> </EndTimePoint> <Duration /> </ValidityPeriod> </SalesPriceList>
This operation is very similar to the Sales Price List Root Query By Type Code And Property ID And Property Value.