Question:
Hi,
The customer wants to load their contracts in word as it is easier for them to manage and make changes. Each contracts can be hundreds of pages long. There is a small section in this .doc file that needs to copy to the header text in the sales order for printing on the Invoice. I would like to be able to extract this section (which will always be in the same place) with a ABAP program and save it in a .txt file with a specific naming convention. Then in one of the sales order user-exits, retrieve and copy the contents of the .txt file into the sales order header.
The problem is that our programmer says that he cannot read a .doc file. Does anyone have some ideas of how I can go about solving this issue?
Thanks
Kansa
Answer:
If your programmer has some knowledge about VBA (Visual Basic for Applications), he could manage to make a program to extract these part of your files...
In my opinion, it will be fast if he does using an external way than SAP (maybe a program with Visual Basic) to extract these information from your files and saving automatically in a certain place with a certain name.
After that, change an user-exit to read this will be an easy thing.
_________________
Brief History of the Tuly Idiots
Bad advices, wrong answers, bigotism
sapfans GD
Ad by Viiiiiic
Answer:
Vic's right.
A .doc document contains far more than just words!
However, your programmer could have a look at OLE2 and take some examples from the program SAPRDEMOOFFICEINTEGRATION.
Whilst this might not be the fastest method, it keeps all the processing inside SAP.
_________________
Regards
R
Abap KC
SFMDR
Answer:
And in case if the programmer doesn't want to have a look at OLE2, this can be done externally in Java. There are libraries available for that task.
_________________
ilya
More input data: http://abaplog.wordpress.com
Sapfans ABAP FAQ: /forums/viewtopic.php?t=94198
R's ABAP Knowledge Corner: http://www.Rard-harper.net/kb/kb.html
Function modules documentation: http://www.se37.com