Skip to Content
author's profile photo Former Member
Former Member

Round function in OIBT table

Hi, I want to create a query in SAP, but my problem is that I can't round fields as for ex: Quantity. The query always shows the register with 3 decimals and 6 if it's a summatory. The table is OIBT, but it happens on more.

This is my query:

SELECT T0.WhsCode , T0.ItemCode , T1.ItemName , sum(t0.quantity) as Quantity, sum(Round(t0.quantity*t0.U_OPN_PRE,2)) as Valor FROM OIBT T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode GROUP BY T0.WhsCode, T0.ItemCode, T1.ItemName ORDER BY T0.WhsCode, T0.ItemCode,T1.ItemName

Please help me out, thanks for all.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 10, 2007 at 01:04 PM

    Hi Pablo!

    Such behavior is the consequence of general settings of the SBO company.

    Decimal places can be found in Administration -> System Init -> General Settings form.

    Another option for you is to cast the columns you need using CAST(sum(Round(t0.quantity*t0.U_OPN_PRE,2)) as nvarchar)


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.