2007 Jun 05 11:04 AM
hello ,
I want to open a word document that is placed on the application server.
the function module 'ws_execute' works fine for displaying documents placed on ur local file system. But if i want to open from application server, what needs to b done?
i m referring to the following demo program 'SAPRDEMOOFFICEINTEGRATION'
is this the correct reference or there is some other way to do the same?
kindly help.
Regards,
Roshani
hello ,
I want to open a word document that is placed on the application server.
the function module 'ws_execute' works fine for displaying documents placed on ur local file system. But if i want to open from application server, what needs to b done?
i m referring to the following demo program 'SAPRDEMOOFFICEINTEGRATION'
is this the correct reference or there is some other way to do the same?
kindly help.
Regards,
Roshani
2007 Jun 05 11:15 AM
Hi Roshani jain,
The trasaction to see the files on application server is AL11. You can go to this trasaction and see the file's if you have created any. This is mainly used to trasport the data to other systems. The data you may see here may look truncated beyond a particular point on account of the width.
Do not worry about that as it would not be truncated but would not be available to view in this trasaction.
The function module to be used to get the data on to the presetation server is "GUI_DOWNLOAD" as ws_download is outdated or considered obselete.
Hope your query is answered.
Reward points if useful.
Thanks,
Tej...
2007 Jun 05 11:25 AM
hi ,
i dont want to download the document.
i have a word document on application server.
all i need is to open this word document and not download it on my pc.
2007 Jun 05 11:31 AM
Hi,
Use Tcode CG3y to copy file from application to presentation server.
2007 Jun 05 11:23 AM
Hi,
To open a file in the appl server :
OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT
To read the data from that opend file is
DO.
READ DATASET dsn INTO line.
IF sy-subrc <> 0.
EXIT.
ENDIF.
WRITE: / line. --> ur logic
ENDDO.
Revert back if any issues,
Reward with poinst if helpful.
Regards,
Naveen
Message was edited by:
Naveen Deva
2007 Jun 05 11:32 AM
Hi Again Roshani,
So you mean to say that the file is already created in the application server. Alright then, you need to know where in trasaction AL11 is your file created. So you need to go to that directory and search for the file that you have created or want to see. The files present in the application server are not in order and thus needs to be searched as per the name specified in the program or selection-screen.
Reward Points if useful.
Thanks,
Tej..
2007 Jun 05 12:29 PM
hello every1,
probably i was not clear for the first time.
let me explain the scenario again.
i have a start page where in i hav provided 2 buttons
1) execute
2) display user manual.
now when i click execute the program executes and provides the intended result.
on click of 'display user manual' i want to open the user manual which is a word document.
this document is present on the application server. I jus want to open it and not save or download it.
so how do i proceed?
2007 Jun 05 12:35 PM
Hi Roshani,
The solution is like this.
1> Execute - this is the solution to your program. The file is generated and put in the Application Server for the data to be sent by some means to the intended Place.
2> To Display/View - This is for the person (who runs the program) to view if the output generated is correct or not.
So to accomplish this use the same internal table for both Open Dataset and Gui download.
Open dataset puts data onto the Application server and Gui_download puts the data onto the Desktop or Presentation server for the user to see the data thats fetched.
So use them as directed to achieve the desired output.
Reward Points.
Thanks,
Tej..
2007 Jun 05 12:41 PM
my program and user manual(word document) are not related at all..
i place this word document by myself on application server.
this document basically is just a guide which has instructions that needs to be followed while executing the program.
i m developing this program for a user who wil execute it using the word document that i wil place on application server.
i.e. when he clicks on the display button he should be able to view the document.
2007 Jun 05 12:44 PM
Hello Roshani,
Upon clicking the Button let it go to a piece of code (Form and Perform technique) which contains GUI_DOWNLOAD function module so that he gets to view the document and the data.
Reward Points.
Thanks,
Tej..
2007 Jun 05 12:37 PM
the program you mentioned "SAPRDEMOOFFICEINTEGRATION'" is using SAP business document service. classes and methods to manipulate data in SAP business document service (BDS). For example check the documentation for class CL_BDS_DOCUMENT_SET.
However if you find it complex or if the requirement is simple, you can alway store your word document in a cluster table like INDX. The trick is to read the document in in internal table in binary mode. than use 'Export to database' statement to store it. Later on as per requirement use statement 'Import from database' to retreive it in an internal table, save it in form of a file etc. (just an idea. I personally find BDS a bit more complex however it depends on the requirements)