Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

calling script from ABAP Program

Former Member
0 Likes
685

Hi all,

We have this program which downloads some data to a .DAT file in the C:/temp of the local PC and then calls a VB script using the function 'GUI_EXEC'. The VB script is also located in the C:/temp directory of the local PC. The VB script opens a Word template which uses Mail Merge to retrieve data from the .DAT file and create some labels. The Word template is located in the C:/temp as well.

Now we're not so happy with this solution and we would like to keep the VB script and the Word templates in a location on the SAP server where the user cannot accidentally modify or delete them. But how to tun the script in that case on the local PC and pass the templates to MS Word on the local PC?

Thanks in advance,

Ioana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
548

Hello,

Two possibilities come into my mind:

1) Put the Templtes in a well-known position on the server and download them to c:\temp every time they're needed. Delete them when you're finished.

2) Using OLE automation start MS Word on the client and load the templates directly from Word - maybe a network share or something like that.

Hope that helps (please reward me if it does ,

Joerg

3 REPLIES 3
Read only

Former Member
0 Likes
549

Hello,

Two possibilities come into my mind:

1) Put the Templtes in a well-known position on the server and download them to c:\temp every time they're needed. Delete them when you're finished.

2) Using OLE automation start MS Word on the client and load the templates directly from Word - maybe a network share or something like that.

Hope that helps (please reward me if it does ,

Joerg

Read only

0 Likes
548

Hi Joerg,

I think this should work - I'll try to give you the reward points now, let me know if you don't get them.

Thanks,

Ioana

Read only

Former Member
0 Likes
548

Hi Ioana,

One option to try is using the SAP Web Repository (transaction SMW0). This lets you upload and download binary objects onto/from the SAP server. This includes word documents, jpeg pictures, pdf forms, etc. There is a function group SHTM which allows you to manipulate these objects programatically (upload/download/display/etc.).

So you should be able to upload the template and VB script once, and then download to the presentation server as required.

Hope that helps.

Brad