The SCN wiki will not be available for new content submission starting September 11th 6PM CET until September 14th 6PM CET. Please plan your SCN wiki tasks accordingly.
Why I used this?
I have built a small SAP GUI script in Microsoft Excel which extracts all the BDoc message from SMW01. I have a lof of BDoc failures and it was painful to see the errors one-by-one. There could be a more elegant way to extract this information, but I built this script anyway. The reason I choose to work with a script because I can run it in any environment without makeing any change to the system. All I need the scripting to be enabled on the server.
If you are not familiar with SAP GUI Scripting, this is a scripting tool which runs on the SAP GUI and simulates the button clicks, selections, etc. that happens in the GUI which can be recorded and played back. My script is running from MS Excel, and it dumps the information into the same Excel file which can be filtered and manipulated later on. If you have not used scripting before, scroll down for a quick GUI Scripting Guide for Dummies at the end of this document. If you are interested in the details, look towards the end of this document.
This is how to use it
- Download the Excel file: Excel document on Google Docs
- If you have a security warning, enable the marcos in the Excel document
- Log into your target system, start SMW01 and execute a query so the screen shows the Bdocs for which you want to extract the messages.
- Put the System name and client number - no spaces - into the A8 field.
- Click Start Dump.
Depending on the number of Bdocs or the number of messages this can take some time. You will see in the GUI screen what the script is actually doing. It loops through the Bdocs in the SMW01 view and simulate the pressing of "Show Bdoc Msg Error/Receviers" button and dumps everything on pop-up screen.
What is SAP GUI Scripting?
SAP GUI Scripting can be used to record your action in a Visual Basic macro, than use that macro to execute the same process over and over again. This is pretty much like using LSMW and screen recording to process repeated action. For many of the CRM transactions I found LSMW unusable, it is just not able to record all the changes made on the screen. SAP GUI Scripting can cope with these issues. With the SAPGUI, the feature for Script Recording and Playback using GUI automation should also be installed (unless you installed SAPGUI with reduced features). If scripting is enabled, most transactions can be "scripted" to take data from an Excel spreadsheet and enter the data in the SAPGui at a high rate of speed.
SAP GUI scripting should be enabled in your SAP system indicated by a small ikon on your GUI toolbar on the lower right corner. If it is not turned on, change the "sapgui/user_scripting" parameter in RZ11. Also you need a SAP GUI with scripting support installed. If you see "Script Recording and Playback" under "Customize Local Layout" button than you have it.