cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding Some Items in Price List

0 Kudos

Hi all,

I am trying to figure out a way to apply a rounding method to some items (but not all) in the same price list. I want some to have decimals and others to be integers, all within the same list. Is this possible?

Thanks!

former_member763929
Participant
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with Community Q&A , as the overview provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your Profile you encourage readers to respond.

Accepted Solutions (0)

Answers (1)

Answers (1)

LoHa
Active Contributor
0 Kudos

Hi Aaron,

if you have any rule for it, you can use CASE/WHEN

e.g.

SELECT 
TOP 100
[ItemCode]
,[Price]
,CASE WHEN LEFT([ItemCode],1) = '2' THEN CAST([Price] as int)
ELSE [Price] END AS [Rounding]
FROM [ITM1]
WHERE 
[PriceList] = 10

It means if the first charakter is a 2 then it will be cast as int

regards

Lothar