Skip to Content
Former Member
Aug 22, 2011 at 08:11 AM

Extrach BDoc messages from SMW01


Hi All,

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.

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.

This is how to use it:

1. Download the Excel file:

2. If you have a security warning, enable the marcos in the Excel document

3. 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.

4. Put the System name and client number - no spaces - into the A8 field.

5. 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.

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.