I'm having trouble trying to explain my necessity, so I'll describe the scenario.
Scenario:
- Product A has a maximum production of 125KG at a time.
- The operator received a production order of 1027,5KG of product A.
- The operator have to calculate how many rounds he'll have to manufacture and adjust the components quantity for each round.
We want to create a report where this calculations are already done and what we believe would be the first step, based on the values of this scenario, is to return something like this:
ROUND QUANTITY(KG)
1 125
2 125
3 125
4 125
5 125
6 125
7 125
8 125
9 27,5
After that, the recalculation of the components could be done with simple operations.
The problem is that we couldn't think of a way to get the desired return and we also couldn't think of a different way of achieving the said report.
All we could do is get the integer part of the division
SELECT FLOOR(1027.5/125) AS "TEST" FROM DUMMY
and the remainder
SELECT MOD(1027.5,125) AS "TEST" FROM DUMMY
We are using:
- SAP HANA SQL
- Crystal Reports
- SAP B1
Any help would be appreciated
Thanks in advance!