What is Bill of Material (BOM)?
Bill of Materials (BOM) means that the list items require to produce the semifinished product or Final Product and the list of material can be raw materials, purchase materials and transfer materials.
The Bill of material consists two part. One is Header item and another one is Sub items which have the consumable quantity and its unit of measurement.
How Bill of Material can be created?
The Bill of material can be created manually using the T codes called CS01 – BOM Creation, using the BAPI, ABAP upload program can be created for BOM upload.
LSMW can be used for BOM creation and another method is we can create SAP GUI Scripting through excel sheet that automated with in a single click.
What is SAP GUI Scripting?
SAP GUI Scripting is the method of creating, changing master data and transaction data in SAP
To use SAP GUI Scripting method, the recording needs to be done with single entry where these entries will be used in Script recording.
Here, to create Bill of material one header material and its subitems are used and same is recorded and downloaded as notepad file.
This recorded GUI scripting can be copied in to the excel source code view in the sheet. The macro setting needs to be enabled in excel sheet.
The excel field mapping is done and the looping method of programming used to create multiple headers with multiple subitems.
Following code is modified to get the automation for creating multiple Bill of Materials in the plant.
Public SapGuiAuto, WScript, msgcol
Public objGui As GuiApplication
Public objConn As GuiConnection
Public objSess As GuiSession
Public objSBar As GuiStatusbar
Public objSheet As Worksheet
Dim W_System
Function Attach_Session() As Boolean
Dim il, it
Dim W_conn, W_Sess
If W_System = “” Then
Attach_Session = False
Exit Function
End If
If Not objSess Is Nothing Then
If objSess.Info.SystemName & objSess.Info.Client = W_System Then
Attach_Session = True
Exit Function
End If
End If
If objGui Is Nothing Then
Set SapGuiAuto = GetObject(“SAPGUISERVER”)
Set objGui = SapGuiAuto.GetScriptingEngine
End If
For il = 0 To objGui.Children.Count – 1
Set W_conn = objGui.Children(il + 0)
For it = 0 To W_conn.Children.Count – 1
Set W_Sess = W_conn.Children(it + 0)
If W_Sess.Info.SystemName & W_Sess.Info.Client = W_System Then
Set objConn = objGui.Children(il + 0)
Set objSess = objConn.Children(it + 0)
Exit For
End If
Next
Next
If objSess Is Nothing Then
MsgBox “No active session to system ” + W_System + “, or scripting is not enabled.”, vbCritical + vbOKOnly
Attach_Session = False
Exit Function
End If
If IsObject(WScript) Then
WScript.ConnectObject objSess, “on”
WScript.ConnectObject objGui, “on”
End If
Set objSBar = objSess.FindById(“wnd[0]/sbar”)
objSess.FindById(“wnd[0]”).maximize
Attach_Session = True
End Function
Public Sub RunGUIScript()
Dim W_Ret As Boolean
Dim material, plant, bomusage, Date01 As String
Dim i As Integer
W_Ret = Attach_Session
If Not W_Ret Then
Exit Sub
End If
material = Cells(9, 2).Value
plant = Cells(9, 5).Value
bomusage = Cells(10, 2).Value
Date01 = Cells(10, 5).Value
i = 0
On Error GoTo myerr
objSess.FindById(“wnd[0]”).maximize
While Cells(12 + i, 1).Value <> “”
If Cells(12 + i, 1) <> Cells(11 + i, 1) Then
objSess.FindById(“wnd[0]/tbar[0]/btn[11]”).press
objSess.FindById(“wnd[0]/tbar[0]/okcd”).Text = “cs01”
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]/usr/ctxtRC29N-MATNR”).Text = Cells(12 + i, 1).Value
objSess.FindById(“wnd[0]/usr/ctxtRC29N-WERKS”).Text = Cells(12 + i, 2).Value
objSess.FindById(“wnd[0]/usr/ctxtRC29N-STLAN”).Text = Cells(12 + i, 3).Value
objSess.FindById(“wnd[0]/usr/ctxtRC29N-DATUV”).Text = Cells(12 + i, 4).Value
objSess.FindById(“wnd[0]/usr/ctxtRC29N-DATUV”).SetFocus
objSess.FindById(“wnd[0]/usr/ctxtRC29N-DATUV”).caretPosition = 10
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-POSNR[0,0]”).Text = Cells(12 + i, 5).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-POSTP[1,0]”).Text = Cells(12 + i, 6).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-IDNRK[2,0]”).Text = Cells(12 + i, 7).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).Text = Cells(12 + i, 8).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).SetFocus
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).caretPosition = 1
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT”).VerticalScrollbar.Position = i + 1
Else
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-POSNR[0,0]”).Text = Cells(12 + i, 5).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-POSTP[1,0]”).Text = Cells(12 + i, 6).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-IDNRK[2,0]”).Text = Cells(12 + i, 7).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).Text = Cells(12 + i, 8).Value
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).SetFocus
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]”).caretPosition = 1
objSess.FindById(“wnd[0]”).sendVKey 0
objSess.FindById(“wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT”).VerticalScrollbar.Position = i + 1
End If
i = i + 1
Wend
objSess.FindById(“wnd[0]/tbar[0]/btn[11]”).press
objSess.FindById(“wnd[1]/tbar[0]/btn[0]”).press
Exit Sub
myerr:
MsgBox “BOM creation Successful!!!”
End Sub
Sub StartExtract()
Dim currentline As Integer
‘ This is the system to connect to
W_System = “CEF340”
‘ Run the actual GUI script
RunGUIScript
objSess.EndTransaction
End Sub
Conclusion – The BOM can be created with the help of excel sheet and the provision is given by SAP as SAP GUI Scripting. Only thing is we need record with minimum data and while uploading we can upload huge data. This feature will create n number of BOM in front of our eyes. Thanks for reading or referring. Cheers!
Интересный пост
_________________
бесплатные прогнозы игр футбола
dvd 通販 新品 dvd 通販 安い dvd 通販サイト DVD買取 dvd 通販 激安 nhk dvd 購入 アニメ dvd 安く買う ドラマdvd 人気 dvd 海賊版
+ за пост
_________________
стратегия ставок на спорт взлет приносящая от 5000 рублей в день
Краснодарский инструментальный завод
Производство и продажа измерительного оборудования
Калибры конус морзе
Продажи с помощью Pinterest. Смотрите Видео: Сотни Продаж на Etsy, amazon, ebay, shopify за 2 месяца при ср.цене чека 300 usd https://youtu.be/GNOZtXGGM-I
2020 PC Install v4.16 Win serial key or numberBy admin 2020 PC Install v4.16 Win serial key or number 0 Comments2020 PC Install v4.16 Win serial key or number
2020 PC Install v4.16 Win serial key or number
Where can I find the Activation Key and File Installation Key (FIK) for my license?
IMPORTANT: If you are looking for the File Installation Key for the purposes of installing MATLAB on an offline machine, see “How can I install MATLAB or other MathWorks products on an offline machine?” for complete instructions. Entering a File Installation Key into a MATLAB installer downloaded directly from the MathWorks website will not enable you to install MATLAB on an offline machine.
Administrators
License administrators can obtain the Activation Key and File Installation Keys through through the “Advanced Options” button in the license center. To retrieve your Activation Key and File Installation Key, follow the steps below:
кубань фото города
САмое эффективное для продаж – Pinterest. Сотни Продаж на Etsy, amazon, ebay, shopify за 2 месяца при ср.цене чека 300 usd https://youtu.be/GNOZtXGGM-I
News, articles, secrets and more in Punjabi Latin … https://punjabims.blogspot.com/
Привет всем! Класный у вас сайт!
Что думаете по этим новостям?:
Asus готовит презентацию флагманской модели планшетного компьютера http://mybioplanet.ru/information-technology-it/19469-asus-gotovit-prezentaciyu-flagmanskoy-modeli-planshetnogo-kompyutera.html
http://mybioplanet.ru/news/33670-vo-lvove-pytalis-vzorvat-ofis-advokatov-obschestvennikov.html
Ещё много интересного нашел тут: новости возобновляемой энергетики в России http://mybioplanet.ru/
свежие новости политики мира http://mybioplanet.ru/politika/
Incredible update of captchas solving software “XRumer 19.0 + XEvil 5.0”:
Captchas recognition of Google (ReCaptcha-2 and ReCaptcha-3), Facebook, BitFinex, Microsoft, Mail.Ru, SolveMedia, Steam,
and more than 12000 another size-types of captchas,
with highest precision (80..100%) and highest speed (100 img per second).
You can use XEvil 5.0 with any most popular SEO/SMM software: iMacros, XRumer, SERP Parser, GSA SER, RankerX, ZennoPoster, Scrapebox, Senuke, FaucetCollector and more than 100 of other programms.
Interested? You can find a lot of impessive videos about XEvil in YouTube.
Free XEvil Demo available.
Good luck 😉
XEvil Net
Женские секреты
Vakha vakha dilacasapa khabaram. Dunia vica vaparana vali hairanijanaka hara cija bare khabaram ithe prakasata kitiam gaiam hana … http://bit.ly/3nHPdu3
секреты семейной жизни
зеркальный гипермаркет мидеон или зеркало в раме багете
https://bagemika.ru/catalog/product/zerkalo-v-rame-091.html
第一借錢網擁有全台最多的借錢資訊
https://168cash.com.tw/
Happy New Year! My best wishes for the new year! Well-being, prosperity and health!
Your Jessica and team from: http://lnk.do/kfPrfL
Hi, here on the forum guys advised a cool Dating site, be sure to register – you will not REGRET it https://bit.ly/37UalYz
Hey there, You have performed an incredible job. I will definitely digg it and in my opinion recommend to my friends. I am confident they will be benefited from this site.|
I like everything what is said and I support it a lot. I am glad to be here and to share my opinion.
This site I like too:
סרטי סקס לצפייה ישירה
I’d like to find out more? I’d love to find out more details.|
Hello, i believe that i noticed you visited my web site so i got here to go back the favor?.I’m attempting to to find things to enhance my site!I guess its adequate to make use of some of your ideas!!|
молитва от ссор и скандалов в семье
歐客佬精品咖啡
https://blog.oklaocoffee.tw/
Smart socket with Wi-Fi, 16 A, with power monitor … http://bit.ly/socketsmart
Hi there, yes this paragraph is truly fastidious and I have learned lot of things from it about blogging. thanks.|
you’re truly a good webmaster. The web site loading pace is incredible. It seems that you are doing any distinctive trick. Furthermore, The contents are masterpiece. you have done a magnificent job in this subject!|
Awesome! Its truly awesome paragraph, I have got much clear idea about from this piece of writing.|
Hello, every time i used to check weblog posts here in the early hours in the break of day, since i like to learn more and more.|
Hi, just came across your post, really appreciate your works!
Would like to share some useful free website, hope you like it.
https://fabpdf.com/
https://myconverters.com
https://topten.review/
https://vidusoft.com
https://vanceai.com/image-enhancer/
https://keepvid.ch/en6/
hi!,I really like your writing so so much! proportion we communicate more approximately your post on AOL? I require a specialist in this area to resolve my problem. Maybe that’s you! Taking a look forward to look you. |
Descubrio el consolador de la suegra… – Suegras marusia-club.ru.
Hi there friends, pleasant post and nice arguments commented at this place, I am truly enjoying by these.|