How to print hundreds of hard-copy print forms
I’ve been watching this all my career in SAP. Every customer wants custom docs to be printed with logos, fonts, alignments, custom content. Every single customer wants it fast and right away and they all wonder why it’s that expensive to develop just one print form. They don’t understand why to write business requirement specifications, do testing, why to approve consultant’s functional specification when it’s written in weird SAP language.
I’ve good news for you. There is an old, very old technology that 90% of consultants don’t know today. It’s free, it doesn’t require any ABAP, any coding, any preliminary paperwork to make it happen. Just start using it.
One of my customers asked me how to print 500+ Agreements in a day. Normally I’d reply with a custom ABAP report, PDF template and all that project paperwork and approval workflow. But, suddenly I’ve noticed my old, very old note about merging. And here how it works.
First of all, we need to create MS Word template with a real data. Highlight fields you want to extract from SAP. These fields would be our variables we’ll fill out from SAP per every object, a person we want to print on a hard-copy paper. In my case we need HCM data, so I’ll highlight First name, Last name. As these agreements are the same for everyone, just names are different, I don’t need anything else.
Then we need to extract data from SAP. We can use any standard report we have in the system, or we can develop own Ad-Hoc report in PQAH transaction. Again, I promised you there is no ABAP or coding would be needed, so make sure you are familiar with ad-hoc queries as there is no coding at all! Here is my very simple ad-hoc report which I created in 10 seconds.
Main idea and the requirement for this tool is to have one row per one hard-copy document you want to print. When you run this or any other report with ALV output like on a picture above, there is a button (see red arrow). Click it and you’ll see another window.
I assume we’ve already created that template we want to fill with 500+ records from the system. I’ll show you how to place variables within the text in a moment. If you’re doing this for the first time it’s a good idea to start with a ‘new Word document’ to place variables across the text. There are special buttons to do that like ‘Insert Merge Field’ which would show you your SAP query column names, like variables, which you can place wherever you want.
Once you’re done with templating (pay attention how these variables look like in a doc. When you click on the variable it’s highlighted in grey) you can print the document. Or email.
Edit Recipient List – allows you to select rows from SAP you want to use in this template. So you can be selective with data you want to print. By default, it uses all the data from the report which comes from SAP.
Finish & Merge – finish and generate final documents. You can save them in MS Word, print or email – whatever you want. Here what I’ve got.
Initially, this technology was intended to use for mass mail printing or envelop labeling, but SAP has added some value to use SAP data to merge into MS Word templates. This makes very convenient way to print any data from SAP as you can use your own templates, you need to developers. If you’re large and want a unified way to print data – store these templates on a shared network folder, make a group of SAP Queries with some coding (like ZZ_FORM01 and ZZ_FORM01.DOC template) and you’re good to go with this solution.
It’s simple, reliable, works with any MS Word version and any SAP version. Just start using it. Have questions or want other tips and tricks – feel free to ask me here or in private message.
Nice to have options for custom forms .. 🙂