cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to read Offline Pricing in SAP C4C SDK

0 Kudos

Hi All,

I have a requirement in which I need to read offline pricing data that is available in Prices view of Product work center in C4C for a product and update that in a custom field in product master. I use Sales Price List to retrieve this data where I used two queries. The 1st is for initializing which is QueryByGroupCode and second is QueryByTypeCodeAndPropertyIDAndPropertyValue for fetch the price details.

Initial query is returning data correctly for offline pricing but second query is not producing any records from the prices. Any help with this is highly appreciated!!!

Thanks,

Rocky

.Below is code snippet :

//Initializationquerytodefine Workcenter subview,e.g. PriceList
var initQuery = SalesPriceList.QueryByGroupCode;
var initSelParams = initQuery.CreateSelectionParams();
initSelParams.Add(initQuery.GroupCode.content,"I", "EQ","COD_PRICES");
var initQueryResult = initQuery.Execute(initSelParams);//Querybase price list
var query= SalesPriceList.QueryByTypeCodeAndPropertyIDAndPropertyValue;
var selParams =query.CreateSelectionParams();
selParams.Add(query.TypeCode.content,"I", "EQ", "ZJPS");
selParams.Add(query.ReleaseStatusCode,"I", "EQ", "3" );

var queryResult =query.Execute(selParams);// Not returning any value

if(queryResult.Count()>0)

{
var  amo = queryResult.PriceSpecification.GetFirst().Amount;

}

Accepted Solutions (0)

Answers (0)