Query on BOM
BOM Query
Dear expert kindly help on following BOM example.
BOM Name Chain Sling
Component
Chain qty 1 mtr
Item A 2 No
Item B 2 No
Item C 4 No
Item D 1 No
this become FG Chain sling 1 mtr
Now if I want to make chain sling of 2 mtr and 9 mtr and 18 mtr and so on..... without changing any component and qty except length ( qty ) of component Chain changes.
example
BOM Name Chain Sling
Component
Chain qty 9 mtr
Item A 2 No
Item B 2 No
Item C 4 No
Item D 1 No
this become FG Chain sling 9 mtr and so on...
what would be your advice
can I use only one BOM for this ?
Example
BOM Name XYZ
Item A 1 mtr
B 5
C 4
D 5
Item A 1 mtr only item A changes to 2 or 3 or 4 mtr ( qty)................. ALL OTHER Component REMAIN SAME
B 5
C 4
D 5
what is the esiest way to make such BOM
Similar Messages
-
Query for BOM Allocations to Master Routes
I just acquired Query Building permissions and the involved transactions in SAP-PP. I have access to the sandbox (QAS) to build them before they go into production. I have a good technical background but never built a query in SAP. I should be able to catch on fairly quick.
**I would like to create a query that reports which material numbers have BOM components that are/aren't allocated. Is this possible where do I start?
**Are there any threads in this forum that show good query information in regards to production versions, master routes, BOMs, etc. that someone can point me to?Hi Lucas,
Sorry for the late reply. I was travelling yesterday. Was able to create your query in quickviewer.
Table I used for Joining are as follows:
Mast: Material to BOM Link
STPO: BOM Item
PLMZ: Allocation of BOM to operation
PLPO: Task List - operation/activity
Join Condition:
MAST-STLNR to STPO-SLNR
STPO-STLTY to PLMZ-STLTY
STPO-STLNR to PLMZ-STLNR
STPO-STLKN to PLMZ-ZUONR
PLMZ-PLNTY to PLPO-PLNTY
PLMZ-PLNNR to PLPO-PLNNR
Selection Screen:
Material Number: MAST-MATNR
Plant: MAST-WERKS
List Fields:
Material Number: MAST-MATNR
Plant: MAST-WERKS
BOM Item Number: STPO-POSNR
BOM Component: STPO-IDNRK
Component Quantity: STPO-MENGE
Component Unit: STPO-MEINS
Operation Assignment: PLPO-VORNR
I guess this will help you in getting your query set. In case you need to change the field you can do as per your requirement. As told earlier once you are ok with Quickviewer you can convert it to SAP Query from SQ01 transaction.
Hope this helps you out.
Best regards,
Kiran -
Hello All,
I need to know how are the values for component materials which are entered through transaction ME39 captured and also how are they linked with the purchasing document?
I am writing a report for downloading the PO data in which i need to capture also the component items for the PO items(i.e child items).But when the BOM for that material is missing.when i check in transaction CS13,it says that the BOM for material does not exist.Also in transaction CS03,the message i get is "Logical system not defined".Maybe the BOM has got deleted or something like that,but i just need to know while entering the component materials manually,the values get stored in which tables and how is the linking to the purchasing document?
Thanks & Regards,
Deepti.Try this query:
SELECT T1.[Father], T1.[Code], T1.[Quantity]
FROM [dbo].[ITT1] T1
WHERE T1.[Code] =[%0] -
Hi All,
I need a query which displays for an spicific BOM child item
all its parent items in the hierarchical structure
For example: the Table ITT1 consists of following rows
child_item parent_item
I1 P1
I1 P2
P1 P3
P2 P4
I1 P5
the query I need should display
child_item parent_item1 parent_item2
I1 P1 P3
I1 P2 P4
I1 P5Hi All,
thank you for the quick answers, but I have already found the solution, how to display for an spisific item all it's parent items in all assembly levels.
It can be done with recursive function calls:
CREATE FUNCTION dbo.GetParentItems(@ChildItem nvarchar(20))
RETURNS @retParentItems TABLE(ChildItem nvarchar(20), ParentItem nvarchar(20))
AS
BEGIN
DECLARE @Item nvarchar(20), @ParentItem nvarchar(20)
DECLARE RetrieveParentItems CURSOR STATIC LOCAL FOR
SELECT Code, Father FROM ITT1 WHERE Code=@ChildItem
OPEN RetrieveParentItems
FETCH NEXT FROM RetrieveParentItems
INTO @Item, @ParentItem
WHILE (@@FETCH_STATUS = 0)
BEGIN
INSERT INTO @retParentItems
SELECT * FROM dbo.GetParentItems(@ParentItem)
INSERT INTO @retParentItems
VALUES(@Item,@ParentItem)
-- set @Level = @Level + 1
FETCH NEXT FROM RetrieveParentItems
INTO @Item, @ParentItem
END
CLOSE RetrieveParentItems
DEALLOCATE RetrieveParentItems
RETURN
END
GO -
Dear Friends,
This following query,if I will attach it at PO in Item Code with formatted search , I get result as BOM child items as per project code, here project code is similar to item code.
But my limitation is that my item code is more than 8 character ,under accounting TAB BP project ,project I can define it up to 8 character only.
My requirement is that if I will put project name (which is 30 characteristic) as like as item code , shall I get child item list.
If yes , suggest necessary changes in above query.
Query :
WITH RECUR ( CODE) AS
SELECT ITT1.CODE FROM ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father WHERE ITT1.Father=$[$157.1.1]
UNION ALL
SELECT ITT1.CODE
FROM ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father
INNER JOIN RECUR ON RECUR.CODE =ITT1.Father
SELECT CODE FROM RECUR inner join OITM on OITM.ItemCode=RECUR.CODE --and OITM.PlaningSys='M' and OITM.PrcrmntMtd='B'
Thanxs & regards
Mahesh.Dear Mahesh,
I am not sure about your aim.
You would like to put a formatted search in the project code field of the sales order in order to get the children of the itemcode of that line in the document. The child codes will become the name of the project.
Your issue is the following:
As the project code field in the sales order (field called: rdr1, project) is long 8 characters only and the sum of the children codes will be too long for this field.
Am I correct?
If I am not correct, can you please tell me step by step what you are trying to do?
Thank you.
Marcella Rivi
SAP Business One Forums Team -
Hi Experts,
I need a report in which i hit BOM Code and it returns BOM + Child Item Inventory Status.
i.e.
BOM Code = ABC
Child Code = A, B, C
When I select ABC in selection criteria then I can able to see BOM Code(ABC) + Child codes(A, B, C) inventory status.
Any help will be appreciated.
Regards,
RaviHi Ravi,
try this:
Declare @Item As Nvarchar(20)
Set @Item = (Select MAX(Code) from OITT I0 Where I0.Code = '[%0]')
Select
T1.Father as [Parent Code],
(Select MAX(ItemName) from OITM Where ItemCode=T1.Father ) [Parent Name],
T1.Code Child,
(Select MAX(ItemName) from OITM Where ItemCode=T1.Code ) [Child Name],
(Select Sum(onHand) from OITM Where ItemCode=T1.Code) [OnHand Qty]
from ITT1 T1, OITT T0
Where
T0.Code = T1.Father and
T0.Code=@Item For Browse
Thanks,
Neetu -
Hi Experts,
We want to make a Query of BOM explosion, suppose we require 100 Nos X, 200 Nos Y, 200 Nos Z, where X,Y,Z are my FG Material. We want to put all the three FG in one go, and the child components required quantity get populated. Which Tables we have to use and in what order. Kindly suggest. Or any other method.
Full Points for helping answers.
GRHi,
You can use the Function Module: CS_BOM_EXPLOSION for BOM Explosion.
It is better to use this FM in SAP query than SQVI.
Take the help of your ABAPer.
Regards,
Siva -
Unused BOM components not getting filtered
I have written a Query for BOM, which is having ECM active. Earlier there were 14 components.
3 components have been removed. But If I execute my Query--it is getting all the 14 components
instead of 11.
In CS03--If I execute,
with both Valid from and Valid to date as today--Defaulted--Then 11 components are displayed.-OK
If I keep Valid from Only--Then 11 are displayed.--Ok
If I remove both Valid from and Valid to date--Then 14 are displayed.-Ok
If I keep valid to date --Then it is displaying all the 14 components.
That means Valid from is acting a s filter.
If I use the same Valid from--(Tried all the Valid From fields in STPO) in my Query--It is not taking.
The strange thing this, If we give that Particular date (On which the component is changed)--Then it is
taking and showing the output in the query.
The thing I need here is --The same functionality (Filtering criteria) has to be put into my Query.
P.S: Even Standard reports like CS11/CS12/CS13 are not filtering, in the way--CS02/CS03 are doing.
Any suggestions would be highly appreciable. Thanks in advance.
Wherever we see in the standard reports--The Valid to is coming from structures.Hello,
You can try with CS11/CS12 where select Change No. and valid from date.
If you change a Material BOM with a change number then a new entry is created in the database (tables STPO, STAS).
Best Regards,
R.Brahmankar -
I need a Query for BOM items to get, Inventory item Category, Inventory Item type and approved supplier, if any, for each item in BOM. for this I wrote a query, but i am getting Duplicate item.
when I join MTL_SYSTEM_ITEMS_B, MTL_ITEM_CATEGORIES and MTL_CATEGORIES_B i am getting duplicate items.
any body can help to eliminate duplicate.
This is my query:
SELECT MC.SEGMENT1 MODEL
,MC.SEGMENT3 ITEM_GROUP
,MC.SEGMENT4 ITEM_TYPE
,BCB.OPERATION_SEQ_NUM OPERATION_NUM
,MSI.SEGMENT1 PART_NUMBER
,MSI.DESCRIPTION PART_NAME
,MSI.INVENTORY_ITEM_ID
,msi.organization_id
FROM BOM_BILL_OF_MATERIALS BBM
,bom_components_b bcb
,MTL_SYSTEM_ITEMS_B MSI
,MTL_ITEM_CATEGORIES MIC
,MTL_CATEGORIES_B MC
WHERE BBM.BILL_SEQUENCE_ID = BCB.BILL_SEQUENCE_ID
AND BCB.COMPONENT_ITEM_ID = MSI.INVENTORY_ITEM_ID
AND BBM.ORGANIZATION_ID = MSI.ORGANIZATION_ID
AND MSI.ORGANIZATION_ID = MIC.ORGANIZATION_ID
AND MSI.INVENTORY_ITEM_ID = MIC.INVENTORY_ITEM_ID
AND MIC.CATEGORY_ID = MC.CATEGORY_ID;
Thanks in advance.
Regards
RaviOps! you post in wrong forum. post at {forum:id=75}. Remember before posting there close this thread marking as answered.
Hamid -
BOM Report with Alternative Items
Hello Experts,
I am trying to write a query of BOM Report with the first Alternative Item (from OALI)
Your help please..
Thank You
MeitalmoThen what is this report using for? Check this to start:
SELECT T0.Father, CASE WHEN T1.OrigItem IS NULL THEN T0.Code ELSE T1.AltItem END as 'Item No.', Case WHEN T1.OrigItem IS NULL THEN T2.ItemName ELSE T3.ItemName END 'Item Description'
FROM dbo.ITT1 T0
LEFT JOIN dbo.OALI T1 ON T1.OrigItem = T0.Code
LEFT JOIN dbo.OITM T2 ON T2.ItemCode = T0.Code
LEFT JOIN dbo.OITM T3 ON T3.ItemCode = T1.AltItem
WHERE T0.Father = '[%0\]' -
Fromatted Search on BOM to calculate Price and UDF
Hi All,
I'm trying to do a formatted search query on BOM line level. I'm using a UDF field (numeric19,6) and the unit price field. I get the individual amounts fine but I need to divide the two with each other. My syntax of query is:
DECLARE @A NUMERIC (16,2)
DECLARE @B NUMERIC (16,2)
SET @A=$[$3.4.0]
SET @B=$[ITT1.U_SG_BOM]
SELECT @A / @B
I have used both $[$3.U_SG_BOM.0] and the one used above.
Can someone please advise as to how I would be able to correct my query.
Regards,
Louchange
DECLARE @A NUMERIC (16,2)
DECLARE @B NUMERIC (16,2)
SET @A=$[$3.4.0]
SET @B=$[ITT1.U_SG_BOM]
SELECT @A / @B
to
DECLARE @A NUMERIC (16,2)
DECLARE @B NUMERIC (16,2)
SET @A=$[$3.4.NUMBER]
SET @B=$[ITT1.U_SG_BOM.NUMBER]
SELECT @A / @B
Regards,
David -
Whats the Difference Between BOM and Components??
Hi all,
I tried to create a SubContracting PO,i found BOM and Components in Item <b>Tab</b>
but if i click components and BOM same data details exists,then whats the difference between component and BOM??
and also Pls give me method of Creating PO with BOM
Thanks a lot in advanceDear Veeranna Chavadi,
This is some infirmation about BOM in PO subcontract
1) The purchasing department processing time defined for the plant
2) The planned delivery time from the material master record or purchasing info record
3) The delivery date
4) The goods receipt processing time from the material master record
For Ex:
Processing time Planned del. GR processing
Purchasing time time
Release PO Delivery Date
date date date required
Date required: 10.09.2007
GR processing time: 2 days (working days)
Planned delivery time: 10 days (calendar days)
Purchasing dept processing time: 2 days (working days)
Requirement date less GR processing time, planned delivery time, and purchasing department processing time.
Hope you understand, this is as per the SAP help.
what happen to u r query, if BOM is exploding please close this thread as answered
Hope this helps you
Prem. -
Dear Gurus,
i am having one strange requirement from client.They want to process in mass.i have given only one example.the same they want for all materials in the plant.
FG consists of two BOMs.Bom1 consists of X(FG 1nos)-Y(SFG 1nos)-Z(ROH 100kg).Bom2 consists of X(FG 1nos)-Y(SFG 1nos)-Z(ROH 10kg).I want to run MRP twice.In First time MRP system should consider BOM1 and Purchase Requistions for Z with quantity of 100kg should generate.System should not generate planned order for X and Y.in second time MRP run,system should consider BOM2 and system should generate planned order for X and Y.System should not generate Purchase requistion for z 10 kg.This is the requirement. How to map this scenario?
Please through some light to map this scenario
GunaHi Guna ,
You have twice posted the same thread . Please check my reply and let me know whether it was useful .
Check this link :
Re: Typical query-MRP-BOM selection
Neal -
Which table does CS80 use?
Hi all,
A report that I'm writing which involves material documents generated after REM backflush (transaction MFBF) requires me to get the component quantity (field MENGE) of a particular BOM from table STPO.
But I was told to check for any changes to the BOM just in case that material document was made before a change was made to the BOM.
In transaction CS80, we can see the changes. The thing I would like to know is which table (if any) that stores these data? Can anyone give me any ideas if I can query the BOM number and the date of the material document so that I can get the BOM data for that particular period?
I'm kinda new with abap, so any help I can get is greatly appreciated.
Thanks!Hi,
Refer the table RC29N.
Hope this helps u.
Thanks. -
Problem with ora:addChildNode()
Hi,
in wsdl file i have such a xml element defined
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://ntu.ac.uk/bpel/travelagency/"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="intArray">
<complexType>
<sequence>
<element name="ind" type="int" maxOccurs="unbounded" />
</sequence>
</complexType>
</element>
</schema>
</types>
when i try to add a new element to intArray i get fault message that there is an error in xpath query while executing ora:addChildNode(bpws:getVariableData('sortedIndexes','/tns:intArray'), bpws:getVariableData('no-of-results'))
Here are fragments of my bpel file
<variable name="no-of-results" type="xsd:int"/>
<variable element="tns:intArray" name="sortedIndexes"/>
<copy>
<from expression="ora:addChildNode(bpws:getVariableData('sortedIndexes','/tns:intArray'), bpws:getVariableData('no-of-results'))"></from>
<to variable="sortedIndexes" query="/tns:intArray"/>
</copy>
where tns is "http://ntu.ac.uk/bpel/travelagency/"
Why ora:addChildNode() is not able to add new element to array of integers? Mayby I use it in wrong way? Do you have any suggestions?Hi Jedrzej,
Please don't use the addChildNode() function, this function is going to deprecated, instead use the new bpel extension insert/append (bpelx:append):
Syntax:
<bpel:assign>
<bpelx:append>
<bpelx:from ... />
<bpelx:to ... />
</bpelx:append>
</bpel:assign>
The from-spec within <append> yields a single node or a node list. (Please note: the from-spec of <bpel:copy> still MUST yield ONLY one node.) The node list will be appended as child nodes to the target node specified by to-spec. If the from-spec yields zero node, "bpel:selectionFailure" fault will be generated.
The to-spec MUST yield one single L-Value element node. Otherwise, "bpel:selectionFailure" fault will be generated. The to-spec cannot refer to a partnerLink.
See: http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Node.html#appendChild(org.w3c.dom.Node)
Example: (XSD details at end of the document)
Consolidating multiple bills of material into one single bill of material by appending multiple "b:part" for one BOM to "b:parts" the consolidated BOM.
<bpel:assign>
<bpelx:append>
<from variable="billOfMaterialVar"
query="/b:bom/b:parts/b:part" />
<to variable="consolidatedBillOfMaterialVar"
query="/b:bom/b:parts" />
</bpelx:append>
</bpel:assign>
2. Insert
2.1 insertBefore
Syntax:
<bpel:assign>
<bpelx:insertBefore>
<bpelx:from ... />
<bpelx:to ... />
</bpelx:insertBefore>
</bpel:assign>
The restriction and semantics of from-spec under insertBefore is similar to those in the case of <bpelx:append>.
The to-spec under <insertBefore> MUST points to one or more single L-Value nodes. If more than one nodes are returned, the first node will be used as the reference node. The reference node MUST be an element node. The parent of the reference node MUST be an element node also. Otherwise, "bpel:selectionFailure" fault will be generated. The to-spec cannot refer to a partnerLink.
The node list generated by the from-spec will be inserted before the reference node.
See:
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Node.html#insertBefore(org.w3c.dom.Node,%20org.w3c.dom.Node)
Example: (XSD details at end of the document)
Say before the execution of <insertBefore>, the value of "addrVar" is:
<a:usAddress>
<a:state>CA</a:state>
<a:zipcode>94065</a:zipcode>
</a:usAddress>
After the execution of the following:
<bpel:assign>
<bpelx:insertBefore>
<from>
<a:city>Redwood Shore></a:city>
</from>
<to "addrVar" query="/a:usAddress/a:state" />
</bpelx:insertBefore>
</bpel:assign>
The value of "addrVar" becomes:
<a:usAddress>
<a:city>Redwood Shore</a:city>
<a:state>CA</a:state>
<a:zipcode>94065</a:zipcode>
</a:usAddress>
2.2 insertAfter
Syntax:
<bpel:assign>
<bpelx:insertAfter>
<bpelx:from ... />
<bpelx:to ... />
</bpelx:insertAfter>
</bpel:assign>
<insertAfter> is very similar to <insertBefore>. Except:
If more than one L-Value nodes are returned by the to-spec, the last node will be used as the reference node.
Instead of inserting nodes "before" the reference node, the source nodes will be inserted after the "reference" node.
This operation can also be considered a macro of conditional-switch + (append or insertBefore).
Example: (XSD details at end of the document)
Say before the execution of <insertAfter>, the value of "addrVar" is:
<a:usAddress>
<a:addressLine>500 Oracle Parkway</a:addressLine>
<a:state>CA</a:state>
<a:zipcode>94065</a:zipcode>
</a:usAddress>
After the execution of the following:
<bpel:assign>
<bpelx:insertAfter>
<from>
<a:addressLine>Mailstop 1op6</a:addressLine>
</from>
<to "addrVar" query="/a:usAddress/a:addressLine[1]" />
</bpelx:insertAfter>
</bpel:assign>
The value of "addrVar" becomes:
<a:usAddress>
<a:addressLine>500 Oracle Parkway</a:addressLine>
<a:addressLine>Mailstop 1op6</a:addressLine>
<a:state>CA</a:state>
<a:zipcode>94065</a:zipcode>
</a:usAddress>
Maybe you are looking for
-
HI, I need your help. How can I delete all data, when I do not have the special security code, which I didn´t remember ? I also think, that I never create this code before. But I cannot put my settings back.
-
HT5219 Do I have Thunderbolt On my Mac? Does it work?
I'm trying to install a WD MyBook Thunderbolt 4T to my Mac Snow Leopard OS X 10.6.8. It will be used to store photos. I am unable to get the WD MyBook to show in my Finder. How can I confirm that I have Thunderbolt firmware and that it works prope
-
How the find the name of each div element for Android firefox
Hi guys, I have been trying to customize the ui of my Android firefox. I think the first step is to find the name of each element so that I can add my own css via stylish. For example, I wanna move the tab count beside the address bar to the right bo
-
How do I keep from my 20th Century Masters: The Millennium Collection from going into the same folder with the other artists? Does anyone know? I have about 3 of 4 different artist of The Millennium Collection but since the album title is *20th Centu
-
Hello, Can we make with lenovo iomega IX4-300D diiferent partition ? i explain what i want, for example: disk 1 and 2 -> a raid 1 partition disk 3 and 4 -> a jbod partition detected as 2 differents drives on the network. Thanks. Christophe Solved! Go