cancel
Showing results for 
Search instead for 
Did you mean: 

BOM template qty in PO

RYOJII
Explorer
0 Kudos
450

When the quantity of the parent item is changed, I would like to change the quantity of the component items accordingly. I have created a query to see if I can do it in FMS but it doesn't work. Please let me know if there is a good solution.

SELECT $[$38.11.NUMBER] * X.[ParentQTY] FROM( SELECT $[$38.11.NUMBER] * T0.[Qauntity] AS "ParentQTY" , T0.[Code] , T0.[TreeType] FROM OITT T0 WHERE T0.[TreeType] = 'T' AND $[$38.1.0] = T0.[Code] ) X INNER JOIN ITT1 T1 ON T1.[Father] = X.[Code] WHERE $[$38.1.0] = T1.[Code]

SAP Business One 

Accepted Solutions (1)

Accepted Solutions (1)

RYOJII
Explorer
0 Kudos

Solved

1. Create a UDF in document header. 

2. Set FMS in quantity in detail tab 

3. Enter parent item qty in the UDF

Query for FMS

SELECT
CASE WHEN T1.[Code] IS NULL THEN $[OPOR.U_ParentQty]
ELSE T1.[Quantity]*$[OPOR.U_ParentQty] END

FROM OITM T0
LEFT JOIN ITT1 T1 ON T0.[ItemCode] = T1.[Code]
WHERE $[$38.1.0] = T0.[ItemCode]

Hope it will help someone faced same issue~

Answers (0)