Finding bom component item stufe = 1 without subitems
Hi friends,
We have developed a bom explosion report,
Here we got the output as folows.
level component number component desc uom
materials A is have the following sfg.
1 stufe = 1
..2
1
..2
...3
here we are getting the subitem levels correctly.
1.
but at the last level if the sub item is not present, it is not fetching the stufe = 1 without subitems.
1.
1.
please suggest us with sutiable solution to get the last Sutfe without sub items.
Below we have pasted the Code used to retreviev the data for reference.
TABLES : MAST.
DATA: BEGIN OF ISTPO OCCURS 1000.
INCLUDE STRUCTURE STPOX.
DATA: END OF ISTPO.
DATA: W_TOPMAT LIKE CSTMAT.
SELECT-OPTIONS : P_MATNR FOR MAST-MATNR.
PARAMETERS : P_WERKS TYPE MAST-WERKS.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MAST-MATNR,
WERKS LIKE MAST-WERKS,
END OF ITAB.
DATA: IT_STB LIKE ISTPO OCCURS 0 WITH HEADER LINE.
data : istpofinal like istpo occurs 0 with header line.
data : istpotemp like istpo occurs 0 with header line.
START-OF-SELECTION.
CLEAR ISTPO. REFRESH ISTPO.
SELECT MATNR WERKS FROM MAST INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE MATNR IN
P_MATNR AND WERKS = P_WERKS.
LOOP AT ITAB.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
MEHRS = '1'
MMAPS = 'X'
MDMPS = '1'
BREMS = 'X'
DATUV = SY-DATUM
MTNRV = ITAB-MATNR
WERKS = P_WERKS
EMENG = '1'
STKKZ = ' '
FBSTP = ' '
FTREL = ' '
IMPORTING
TOPMAT = W_TOPMAT
TABLES
STB = ISTPO
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
OTHERS = 8.
IF SY-SUBRC = 0.
WRITE:/ 'MaterialNumber' ,21 'Description'.
SKIP 1.
WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
data : ttabix like sy-tabix,
tstufe like stpox-stufe.
data : len type i.
istpotemp[] = istpo[].
LOOP AT ISTPO .
ttabix = sy-tabix - 1.
if tstufe ge istpo-stufe.
read table istpotemp index ttabix.
move-corresponding istpotemp to istpofinal.
append istpofinal.
endif.
tstufe = istpo-stufe.
WRITE :/ ISTPO-STPOZ,
ISTPO-STLKN,
ISTPO-POSNR,
ISTPO-IDNRK,
ISTPO-OJTXP,
ISTPO-MENGE,
ISTPO-MEINS.
ENDLOOP.
ENDIF.
SKIP 5.
ENDLOOP.
skip 3.
loop at istpofinal.
WRITE :/ ISTPOFINAL-STPOZ,
ISTPOFINAL-STLKN,
ISTPOFINAL-POSNR,
ISTPOFINAL-IDNRK,
ISTPOFINAL-OJTXP,
ISTPOFINAL-MENGE,
ISTPOFINAL-MEINS.
endloop.
Suggestions and Help will be appreciated very much.
Regards.
DS.
Dear Shiba,
In the<b> ISTPO</b> we are getting all the values like
1
...2
.....3
1
....2
1
<b>1</b>
But in the <b>ISTPOFINAL</b> we are getting only
1
.....3-------want this -
we got
1
....2-----want this--
we got
1.-------want this -
upto this. we got
we are not getting the last Level 1 wihich has no subitems in it, which is mentiond below in this example. like if the level has one or more level 1 without subitems we are not getting the values in it.
<b>1........if this level is present without subitem we need to get this also</b>
we have attached the sample code below for ur refernce.
data : ttabix like sy-tabix,
tstufe like stpox-stufe.
data : len type i.
istpotemp[] = istpo[].
describe table istpotemp lines len.
LOOP AT ISTPO .
if sy-tabix = len.
read table istpotemp index sy-tabix.
move-corresponding istpotemp to istpofinal.
append istpofinal.
endif.
ttabix = sy-tabix - 1 .
if tstufe ge istpo-stufe.
read table istpotemp index ttabix.
move-corresponding istpotemp to istpofinal.
append istpofinal.
endif.
tstufe = istpo-stufe.
WRITE :/ ISTPO-STPOZ,
ISTPO-STLKN,
ISTPO-POSNR,
ISTPO-IDNRK,
ISTPO-OJTXP,
ISTPO-MENGE,
ISTPO-MEINS.
ENDLOOP.
ENDIF.
SKIP 5.
skip 3.
loop at istpofinal.
WRITE :/ ISTPOFINAL-STPOZ,
ISTPOFINAL-STLKN,
ISTPOFINAL-POSNR,
ISTPOFINAL-IDNRK,
ISTPOFINAL-OJTXP,
ISTPOFINAL-MENGE,
ISTPOFINAL-MEINS.
endloop.
ENDLOOP.
Similar Messages
-
Component item duplicated in Posting Purchase Order (BOM Template) from XML
Hi,
I have a SDK program that posts draft document using XML. I have a problem in posting a Purchase Order using a bom template from XML, it duplicates the component items of the document. Here is an example of the transaction.
Draft Document to be posted----
Card Code - PM0013
Status - Draft
ItemCode | Quantity | UOM | Warehouse | Profit Center | Price
PMBX13 1 set DHO KAP
PMBX13-B 1 piece DHO KAP USD 0.8000
PMBX13-C 1 piece DHO KAP
PMBX13-P 1 piece DHO KAP
Draft Document to be posted----
Posted Document----
Card Code - PM0013
Status - Open
ItemCode | Quantity | UOM | Warehouse | Profit Center | Price
PMBX13 1 set DHO KAP
PMBX13-B 1 DHO KAP
PMBX13-C 1 DHO KAP
PMBX13-P 1 DHO KAP
PMBX13-B 1 piece DHO KAP USD 0.8000
PMBX13-C 1 piece DHO KAP
PMBX13-P 1 piece DHO KAP
Posted Document----
Thanks!Hi Cecille,
When adding template BOMs to a marketing document via the DI API, you only need to add the BOM header item and not the components. When the DI API adds the document it will copy the components from the BOM definition. This is why your components are doubling up. If you want to be able to edit the components then you'll need to add the PO using the DI API (with just the BOM header in your XML) and then reload it in to a PO object. You'll then be able to loop through the component lines and edit quantities etc.
Kind Regards,
Owen -
Change item category of BOM component
Hi,
Our user wanted to change the item category for BOM components through transaction IB12 using LSMW.Wanted to confirm whether it is possible to change item categoryof BOM component from "N" to "L" through LSMW.What exactly will be effected because of this change?And the steps to change the item category from "N" to "L" for the list of BOM component using LSMW.
Request your valuable thoughts.
Thank you in advance,
Regards,
Rubina RahmanHi Rubina,
N is non stock item
L is stock item
You have to make sure why the business warants to chnage the item category.
To answer the question:
It is possible to chnage the item category from "N" to "L" through LSMW (Provided depends on the number of components used in a BOM. If the number of items exceeds to multiple screen, then you have to think of developing BDC)
The effect will be: with item category "N" if the material is used in the order, based on the configuration the system shall automatically trigger the purchase requisition. With item category "L" it is assumed as stock is available and taken care by MRP program.
Suppose if it is material BOM:
A. Use T.code: CS02 in LSMW recording
B. Provide information like Material number, Plant, BOM usage
C. In the item level change the item category from N to L
D. Save the recording
E. I hope you know the remaining LSMW process steps
Cheers,
Raj -
FM For Finding if Material BOM exits for BOM component.
Hi,
Is there any FM or BAPI to find out if there is any material BOM exists for the BOM component.
How is Indicator assembly get assighned..?
Any inputs would be appreciated.
Thanks,
MarkSample program.
report zrich_0001 .
* Internal Tables
data: i_stpov like stpov occurs 0 with header line.
parameters: p_matnr type marc-matnr,
p_werks type marc-werks.
start-of-selection.
perform where_used tables i_stpov
using p_matnr
p_werks.
loop at i_stpov.
write:/ i_stpov-matnr, i_stpov-werks.
endloop.
* FORM WHERE_USED.
form where_used tables itab
using matnr
werks.
data: selpool like mc29s.
data: eqpcat like cscequi occurs 0.
data: kndcat like cscknd occurs 0.
data: matcat like cscmat occurs 0.
data: prjcat like cscprj occurs 0.
data: stdcat like cscstd occurs 0.
data: tplcat like csctpl occurs 0.
clear itab. refresh itab.
call function 'CS_WHERE_USED_MAT'
exporting
datub = sy-datum
datuv = sy-datum
matnr = matnr
postp = ' '
stlan = ' '
werks = werks
stltp = ' '
importing
topmat = selpool "Not Currently Used
tables
wultb = itab
equicat = eqpcat "Not Currently Used
kndcat = kndcat "Not Currently Used
matcat = matcat "Not Currently Used
stdcat = stdcat "Not Currently Used
tplcat = tplcat "Not Currently Used
prjcat = prjcat "Not Currently Used
exceptions
material_not_found = 02
no_where_used_rec_found = 03
no_where_used_rec_selected = 04
no_where_used_rec_valid = 05.
endform.
Regards,
Rich Heilman -
How to make Buyer and Planner fields in Master Items Form Required without
How to make Buyer and Planner fields in Master Items Form Required without using personalization?
1) Steps to Reproduce
Under Application Developer Common Modules responsibility,
1) Query Region MTL_SYSTEM_ITEMS
2) Click on Region Items
3) Add Buyer Id and Planner Code attributes with Required checkbox checked.
4) Bounce iAS server and JVM and clear java cache
5) Changes not taking effect
Current Application Release: 11.5.10.2 (3460000)
Current INV Rollup: INV.J RUP22 (9878808)
Current WMS Rollup: WMS RUP19 (9951502)
Product Installation List :
Product Installation: 11i.BOM.J: Installed
Product Installation: 11i.EGO.E: Installed
Product Installation: 11i.ENG.I: Installed
Product Installation: 11i.INV.J: Installed
Product Installation: 11i.PO.I: Installed
Product Installation: 11i.WMS.G: Installed
client needs to make the Buyer and Planner fields under Inventory->master Items form to be required.
He tried using the Application Developer Common Modules responsibility, to find the Master Items Region and added the Buyer Id and Planner Code attributes with the Required check-box set to Yes. He bounced the iAS server and cleared java cache, but the changes do not take effect.
client does not want to use form personalization.
Can you please provide more assistance for using Application Developer Common Modules responsibility?
Edited by: jemar98 on Aug 9, 2011 1:44 PMA forms developer could make those fields required with a CUSTOM.pll extension if you didn't want to use forms personalization. Both are considered customizations to standard functionality and may or may not require rework after patching or upgrades.
-
In sales order does not not show sales bom component
hi to all,
it is possible if i create one sales order and i connect one sales bom to order and do not display component of sales bom in sales order so pls tell me procedure.pls tell me how to set print layout of sales order without sales bom component
Regards
vishalHi,
To do not show the component items in Sales Order, you should use Assembly type of BoM.
Here I copied the differences between them which is from Online Help.
The sales bill of materials and the assembly bill of materials represent a finished product which is assembled at the sales stage.
The difference between the assembly bill of materials and the sales bill of materials is as follows:
· Assembly bill of materials; the finished product appears in the sales order document.
· Sales bill of materials; both the finished product and the components appear as separate items in the sales order document.
Hope this helps you.
regards,
maggie an -
How to identify parent item & child (component) item??
Hi
Plz let me know how we can identify parent item & component item in the same bom?? I am checking it in table STPO but not able to identify.
Thnx
NeelHi,
I hope there is no such indicator to differeciate parent material and child material in same BOM.
i will explain one simple way to find out.
Suppose you are having three Material Number ex P1,C1,C2 .
Suppose ur having three Material Number ex P1,C1,C2 .
1.Use table MAST and give the Material List - It will give Parent Material list only(P1)
2.Give the BOM Number to table STPO - It will give child material list of Parent Material BOM(C1,C2) with repect to BOM
3. Use report CS15 to find out that Parent Material (P1 Material from MAST) material is being used as component in Some other BOM.
regards
pradeep -
BOM component should not appear in order confirmation
Hi
In a scenario, I want one of the BOM component should not appear in process order confirmation.
I have not assigned this component to any phase and in material master MRP2 view the backflush tick is not activated.
Still the component is appearing during order confirmation.
Can anyone help in this matter?
Thanks
Pradipta SahooYou need to check only at two places to find out the reason
1. In production order (CO02/CO03) in components overview see if backflush indicator is checked.
if it is check you need to look for where it is coming from
a) Material master <<< you already checked
b) Work Center <<< you might have checked this also
c) Components allocation of BOM items to routing operations
2. In OPK4 make sure "All components" is unchecked.
You may have to also note that the production order was created before the backflushing was removed from the above settings. -
BOM: Component Substitution
Hi All,
How to set up in the system for auto substitute BOM component when the main component not available. I have tried the alternative item where the substitute item also maintained as BOM item and assigned alternative group as 1, priority 2, strategy 2, usage probability 100% as well. When I perform MD02, the result it seems not correct because system create PR for the main component even though the stock is zero. My requirement system auto switch to alternative item due to the substitute component still plenty enough stock. Your advice is appreciated.
Best regards,
MahnansaDear Mahnansa,
Plz find Mr. Mangalraj inputs on Altenative items in BOM
Eg:
If there's a material Alt2 which can be used instead of a material called Alt1,now we will first form an Alternative item group using this 2 material.It can be more than 2 materials also.
Now in our case after u enter Alt1 as the line item for a HALB or FERT,select that entire row and click on Item details or Press F7.In Item data screen,in the bottom under general data u can find the field for Alternative item group.
Click that and enter the values as follows
A-Alt Item Group
2- Priority
2- Strategy
70% - Usage probability ,now come back.
Now enter Alt2 as the line item and after that as i said select that row & press F7.
Click on Alt.Item group button and enter the values.
A,
1,
2,
30%.Now save.
Now let's assume this BOM is used for a HALB.Let's assume 10 quantity is mentioned in the BOM for each of this line item.
Now if there's PIR for say 100 quantity
After running MRP for the HALB the requirements will be seen as Alt1 700 required & Alt2 300 required.
Here for the planning Only Usage Probability comes into picture.
When you are doing the production booking for making 100 quantities,the system shows 1000 quantity of Alt1 and no Alt2 will be seen in good's movement's screen.
Now the priority comes into picture,as we have given priority as 1 to Alt1 the systems proposes 1000 quantity of Alt1.
So while planning Only usage probability is considered and requirements fallas as per that.
While doing Production booking priority comes into picture.
So Here as we have maintained priority 1 and strategy as 2 for Alt1,the systems proposes 1000 quantity of Alt1.
If your strategy is then the planning & production will be as per the usage probability.
Second case:
If for Alt1 A & for Alt2- A
2 1
2 1
70% 30%
Planning will be 700 & 300 of Alt1 & Alt2.
But for production booking 1000 & 300 of Alt1 , Alt2 will be proposed by the system.Because For Alt1 though the priority is 2,but its strategy is 2.
For Alt2 priority1 but strategy is 1(Manual maintenance).
also Plz check the below links
[Alternative item in BOM;
[Alternative BOM;
[http://help.sap.com/saphelp_erp2005vp/helpdata/en/f4/7d3f9344af11d182b40000e829fbfe/frameset.htm]
Regards
kumar -
Bom Component qty & WIP Quantity differ at Trget cost calculation
Dear gurus,
i am facing the problem with WIP at target cost calculation in REM.
My issue is
BOM Component qantity is 9.524 TO and price is 2000 then total cost is 9.521*2000=19048.
but in WIP Report kkas in WIP explation it takes input qty 9.52 T0 and price 2000 then total price is 19040.
Difference is 19048 - 19040 =8
and also when i am issuing actual qty i.e 9.524 in BOM then my price is 19048.00 ant at time of variance calculaton then quantaty variance as 9.52.0-9.524.0=-0.04 then 0.004*2000 =-8
Please suggest solution for this.
Any OSSS NOTE Required
any Quires please revert back
REGARDS
Avinash.pegarlawarHi
Rounding differences between target and actual values and quantities are not unlikely to occur and cannot always be avoided but can be minimized.
Small prices and price unit of 1 are likely to cause more of these rounding differences..
The actual credit is simply calculated as price * quantity. The target credit however is calculated during the variance calculation
and based on the sum of all items in the itemization/cost components of the cost estimate and therefore more accurate.
To avoid this I suggest to store the material price with a larger price unit, i.e. 1000
Std cost release stores price upto 2 decimals and target cost calculation goes upto 3 decimals...
Please check also the note 1265918 for more information to this topic.
Regards
Ajay M -
Unable to display the Kit Items and component Items in XML Publisher
we have created an Order with Kit Items,when we Pick Release the Order it is not printing Kit Items as it is Oracle standard functionality. We customized the Pick Slip RDF to display Kit Items.
when we run the XML Publisher version of Pick Slip report, it is displaying component Items on one page and Kit Items on another page without header information.
How can we display Kit Items and Component Items on single page instead of 2 pages?
Please give us suggestions to implement this in XML Publisher.
Thanks&Regards,
Suresh.Suresh
I dont know anything about the Pick Slip template so am unable to help without more information.
If there are enough kit items to fill more than one page then w/o reducing the font size you'll have to put up with the items spilling to a second page
Tim -
How to load long text in BOM line item
Hello Experts
How do i load Long text in BOM Line item using LSMW
Thanks
S
Edited by: Alvaro Tejada Galindo on Jan 31, 2008 5:11 PMUse Read_text function module.
you need to pass
ID
LANGUAGE
NAME
OBJECT to the function moduel
To find the Text id name language and object these are the following steps. Example: FB02
1. goto FB02, Enter Document number
2. from menuselect Goto>Header-->header Text..... New window will be displayed
3. select the Header Text. here you can see all the text.
4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper.
5. in the Next window you will find Text Name. Text ID, Language. etc...
Regards,
Lalit Mohan Gupta. -
Problem in determing the Component Item Category in Work Order
HI ALL,
When I enter the Component and quantity required for Work/Maintenance Order Operation and press ENTER button, its taking the item category as Non-Stock (N) item. When I checked in SPRO (PM > Maintenance and Service Orders > General data > Define default values for Component Item Categories) for Plant and Material Type combination the Item Category is mentioned as Stock (L) item.
Could you please let me know is there is any other setting from which it is taking the item category as Non-stock item instead of Stock item?
Note:
- For this Material No BOM maintained / exist?
- Operations are entered manually not take from TASK LIST.
- Material type of material is HIBE : Operating Supplies
Regards
RamuDear,
Its not ur fault during configuration. i think in material master operating supplies under which ur material is mainted is assigned as Non stock item plz check the material master .
hope u will get ur ans
reward with point
Regards,
Rakesh -
Automatic PR for non-stock BOM component for Subcontract PO
Dear Guru,
Can you any master please advice me on below question?
We have a subcontract PO with the BOM component of non-stock, can i know if there is possible for those non-stock BOM component to generate a Purchase Requisition automatically, any existing configuration that we can do?
Thank you very much,
Regards
Chee WeeHi,
You can use Material Type "NLAG" for Non-stock materials.
Non stock materials cannot be stored, right, hence the name non-stock.
Non-stock material includes materials that are not managed on an inventory basis (for example, small parts such as nails) though physically in stock.
You can create a BOM which contains an NLAG item or directly use in Production order also.
item Category "N" So system will create the purchase requisition when there is requirement.
We receive the non stock material using movement type 101. upon receiving the material will be consumed.
Please refer link below for better understanding.
BOM explosion in MRP for non-stock material
What is use of Item Category N(non-stock item) in BOM creation
Believe this could help your queries. TQ
rgds,
nanthakumar -
BOM component Qty is getting rounded to next value in Process Order and BOM
We are in ECC 6.0, and maintaining BOM where Item quantities are decimal places e.g 0.3lb with respect to Hader qty. Now when we are craeting process order or exploding in CS11, we are seein that item quantities are getting rounded to next full integer e.g 1, 2 or 3.
What could be the reason for this behaviour.In standard "lb' doesn't have decimal point
If you want decimal point
go to CUNI
select the mass
you can find the lb
maintain the decimal point as 3, & decimal point rounding as as 3, system will show 3 decimal point in process order and in CS11
Maybe you are looking for
-
Hooking up my iphone to a new computer for the first time....
My computer broke and isn't worth fixing so I can't access it again. My mom just bought her a new laptop so I just inherited the one she had been using (actually ended up working out great for me cause it's only a year old and nicer than mine that br
-
NLS_LANG value that suits Forms 10G and Database 11G wanted !
I can't believe how bad is to install Oracle Database and Oracle Forms on the same Windows Vista machine! I had a problem in Oracle Forms 10g that prevents many items in the Form Builder menu from appearing in English Language and also prevents anyth
-
I have an iPhone 5s, runs on straight talk. Has been working fine for a few months now and I had it on iOS 7.1 until this morning when every IMessage I sent got stuck at "sending..." I updated to iOS 8.1 and it fixed the problem, and now it's happeni
-
I am using Lightrrom 4 and have just started seeing this error message with previously cataloged images and on new catalog imports. I can open the same images from the CF card in Bridge with no problem. How can I remedy this new problem?
-
Upgrade path from CC&B 1.5.x to 2.4
Hi, Has anyone done an upgrade from CC&B 1.5.15 to 2.3.1 or 2.4? The release notes in 2.4 say that the one-step upgrade is only available from 2.1 and above, so I would like to understand what steps are necessary for upgrading 1.5.15. Should I even a