Hi.
I've searched this forum for an answer to my query but cannot find any mention of the possibility.
What I want to do is take the line items and cost from the ITT1 table (BOM) and calculate the cost. What I require from SAP B1 is to provide a prompt so that I can manually enter a numeric variable so that if the BOM cost is $100 then what cost will the multiple of the numeric input value be.
The reason for doing it this way is that I am using the "Additional Quantity" to calculate the cost for machine setup as it will not be affected by the multiple as the machine is only setup once irrespective of the volume required so the economies if scale will dictate a reducing unit price per volume.
The query so far is below.
SAP B1 9.1 PL:10, SQL 2012.
Declare @amount as int
Set @amount = [%0]
Select t0.code [Parent Code], t1.code [Item Code],
case when t1.type = '4' then t2.itemname when t1.type = '290' then t3.Resname else '' end as "Description",
case when t1.type = '4' then CONCAT ('Based on Price List ' , t4.ListName) else 'Based on Standard Resource Costs' end as "Price List",
t1.Price [Unit Price], t1.quantity, t1.AddQuantit [Setup Time],
case when t1.AddQuantit > '0' then (t1.AddQuantit * t1.price) else ((t1.quantity * price) * [%0]) end as "Cost"
from oitt t0
left join itt1 t1 on t0.code = t1.Father
left join oitm t2 on t1.code = t2.itemcode
left join orsc t3 on t1.code = t3.VisResCode
left join opln t4 on t1.PriceList = t4.ListNum
Thanks in advance, Alan.