MS World Mail merge

How to use MS World Mail merge in SAP

The below procedure explain the methods, In Sap many cases this can potentially save couple of days. Conceptually it is very simple. Many IT professionals know how to use mail merge. For an SAP consultant, BDC is not a news. This will explain the steps to create a BDC session using recording and mail merge.

MS World Mail merge

1. Prepare the data First step is to prepare your data. It is easy to explain using an example. We will use IMG configuration for MRP Controller. We will use Name and telephone field of the MRP controller. The data to be created will be created as an excel sheet. Let us save this file as

mrpc.xls

Next step is to create the recording. Before proceeding, decide your naming conventions. This will help you in troubleshooting and analysis. We will be creating 3 files, The basic recording as a text file The mail merge document as a word document Finally the merged bdc session as a text file. I use r_xxxx .txt (xxxx tcode or some other meaningful name) for basic recording, mm_xxxx.doc for the mail merge document and bdc_xxxx.txt for the merged session.


To create the recording, you need to know the tcode. Most of the consultants are used to navigating using menu. Some experienced consultants know the tcodes by heart. It is easy to find the tcode. In the IMG screen>Additional Information>Additional Information>Display Key>IMG Activity. This will display the tcode of the specific IMG activity.

Another point before actually proceeding to create the recording, it is better to create one MRP controller normally to create the transport request. If the transport request is already created or if you can create the transport request manually then this is not required. Create the recording using the tcode SHDB. IN SHDB>New Recording, enter recording name and the tcode OMD0. Click Start Recording. You will get the actual MRP Controller maintenance screen. Create a new MRP Controller.

When the transaction is completed, you will see the recording in the SHDB screen. Export the transaction to the desktop as a text file r_OMD0.txt. Next step is to prepare the mail merger document. Open r_omd0.txt in ms word. You will see the text wrapped in 2 lines looking clumsy. 

Not to worry. Select File>page Setup. Choose paper size A3, orientation landscape and all margins as 2.5cm. EDIT>Select all and change font size to 6. If the display is very small, change zoom setting to 150%. 

2. Mail Merge With the file in the MS Word, select menu option tools>mail merge. Click on create and select form letters. Select active window to use the current document. The Get data button will become active now. Click get data>open data source and select your excel file you created in step 1 (mrpc.xls). A window will appear with the button . Click on this button will take you to the main document. In this step you have to link the excel sheet fields to the place in document, so when the mail merge is executed, the main document contents are repeated for each record in the excel sheet replacing the linked field with values from excel sheet. The mailmerge tool bar should appear. If not select view>toolbars>mail merge.

All the fields that needs to be linked will be in the right hand side end in the recording. Highlight the plant number, click on from the tool bar and select plant. The plant number will be replaced with <>, indicating that it is a merge field. Like this insert the merge fields where ever required. Sometimes the same fields might appear in multiple lines. The merge field needs to inserted in all the lines. Now click on button, enter the parameters in the window and click in the window. A new document window will open and create the merged document. Save this file as text document. You can use md_omd0.txt as the naming convention.

3. Run the Update Login to configuration client and run tcode SHDB>new recording. Enter a name in recording field and leave the transaction code field blank and click on green tick. Click on icon to import the recording. In the file open dialog select the text file created in step 2 (md_omd0.txt). Click to run the bdc session.

Also See: Processing the Batch Input Session (SM35)

Online Training Tutorials

  • what is sapTo Start Career in SAP? – How to Get SAP JobCareer in SAP is dream for everyone and It’s likely that you have not heard of SAP or considered a career in it unless you have been working in IT or have a penchant for IT software. For […]
  • SAP ConsultantHow to be SAP Consultant?Everyone have question, How to be a SAP Consultant? As we all know the SAP career is the hot cake in the market all over the world. Whenever you're impudent and identical advantageously […]
  • SAP ConsultantHow to become a SAP Consultant?From time to time I get emails along the following lines ... “please advise on how do I become a SAP consultant?” Obviously there is no one answer and everyone enters the market slightly […]
  • sap r3 certificationSAP R/3 Certification ProgramFew credentials in the business world carry the value of SAP R/3 certification. Those who hold it have honed their skills through rigorous study or direct experience. They have […]
  • SAP solutions EbooksSAP Solutions Ebooks DownloadsFollowing are the links to read reviews about SAP solutions Ebooks and providing its free ebooks download links if it is available in web. You can buy those SAP books from amazon. SAP […]
  • SAP BW Interview QuestionsSAP BW/BI (Business Warehousing) Interview Questions and AnswersSAP BW Business Warehousing is an end-to-end data warehousing solution that uses pre-existing SAP technologies. We have listed of SAP BW Interview Questions and Answers that have been […]
  • Make Faster Business Decisions With SAP HANAMake Faster Business Decisions With SAP HANAAnyone familiar with SAP’s solutions for the Intelligence Enterprise understands that intelligent enterprises effectively use their data assets to achieve their desired outcomes faster and […]
  • Maintain Versions in SAPHow to Maintain Versions in sap?To enter any transaction data in sap - CO, we need to maintain versions. Version stores your data into what type of data we entering whether Planned Or Actual. The most suitable version […]