cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT: Merge SAP data into a word document

Former Member
0 Kudos

Dear Experts,

I am trying to design a printing solution, where there would be around 100 letter formats.

If I store a word document (which is a letter format) in a restricted folder in a file server, can I call this document using an ABAP program, and embed/merge some data from the SAP system into predefined place holders in the word document?

If yes, how can we do it?

PLease help me. All helpful replies will be assigned points.

Regards,

Prince

Accepted Solutions (1)

Accepted Solutions (1)

valter_oliveira
Active Contributor
0 Kudos

Hello.

You can create Smartforms almost directly from Word with the new editor. You can create the windows that are needed and then you can use COPY->PASTE to copy data to smartform in a faster way. To upload directly as you need (from a directory) i'm not seing a way.

Now, to create output in word ... It's possible to create smartform output and then create PDF documents with it ... and after that you can convert PDF to word (in Windows, not SAP) with known software.

Hope this could help you in any way.

Best regards.

Valter Oliveira.

Edited by: Valter Oliveira on May 30, 2008 2:47 PM

Former Member
0 Kudos

Hi Valter,

Your answer was useful and I have assigned points.

However, by using smart forms, are you saying that we will have to create 100 smart forms for 100 letters? Is there a better approach?

Can we retrieve word documents (which would be letter templates) from a network folder, and put the SAP data into required places? This way, we can save time developing forms. Please let me know what you thinks of this approach. And what would be the best possible way to do it.

Regards,

Prince

Edited by: Prince Joseph on May 30, 2008 6:10 PM

valter_oliveira
Active Contributor
0 Kudos

Hello.

That depends. For example, if the letters have same structure, and some variables are different (for example, all letters have same text, but different address), you can create a file with 100 lines, with the data to each letter, and only create 1 smartform. Then create a program that uploads the file, and call the smarform 100 times.

The next step, convert to word, can be achieved as I said. In print program of that smarform, you can automatically create a PDF with the output spool (calling standard report RSTXPDFT4).

Regards.

Valter Oliveira.

Edited by: Valter Oliveira on May 30, 2008 5:15 PM

Answers (0)