cancel
Showing results for 
Search instead for 
Did you mean: 

"BAPI_DOCUMENT_CHECKOUTVIEW2" -not fetching the original to local path ..

Former Member
0 Kudos

Hi,

When i use the function module "BAPI_DOCUMENT_CHECKOUTVIEW2" it is working fine. But i call in my webdynpro application , it is not placing the original to the given path . Plz give me the Solution

Regards,

Rani.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That BAPI uses a SAPGUI connection to the client side to write the data into the local path of the client machine. Of course from Web Dynpro ABAP, you have no connection to the SAPGUI nor would you have access to write directly to the local filesystem of the client machine because of the sandbox nature of web browsers. Many of the BAPI_DOCUMENT_* function modules are structured this way, making them practically unusable from Web Dynpro or ther web environments.

There is a way to make them work "dark" (without SAPGUI) and therefore from Web Dynpro. You have to supply a value for the PF_HTTP_DEST or PF_FTP_DEST. These need to be remote locations that are running the SAPHTTP or SAPFTP applications and the SAP Gateway. Generally these might be the application server of the ABAP system itself. You FTP the files to the application server and write them into a filesystem that is a public share that can be accessed by the client desktop.

Former Member
0 Kudos

Hi Thomas,

I given the parameter "PF_HTTP_DEST " . but still i am able to get the original in my loacl pc. Give me some solutuion

Regards,

Rani.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What did you supply in PF_HTTP_DEST? Is this a server running the SAP Gateway and the SAPHTTP EXE as I described? If so did it write correctly into this destination? Is this destination a public file share? Were exactly did the process break? How were you expecting it to get from the HTTP Server to your local file system of the client machine? You are going to have to supply more details on your setup and what the problem is before I can help you. Just saying "it isn't working, give me a solution" doesn't help anyone.

Former Member
0 Kudos

Hai Thomas,

CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'

EXPORTING

documenttype = 'TOS'

documentnumber = 'G2020029-0050'"DOC_NUM

documentpart = '000'

documentversion = '00'

documentfile = wa_document

originalpath = 'C:/RANI/2.TIF'

pf_http_dest = 'SAPHTTP'

IMPORTING

return = wa_return

TABLES

documentfiles = tl_files.

This r the value passed in the function module.

The image is not palced in the Local folder 'C:/RANI/' .

What may be the problem.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can't use SAPHTTP or SAPFTP. Look at the configuration on these destinations. They point to the client via SAPGUI - and are exactly what I said wouldn't work.

When using Web Dynpro, you need to understand that you are running in a browser and what that means. You have no connection to the SAPGUI. The browser is also security sandboxed. This means no direct access to the filesystem. This is not just a Web Dynpro limitation, but a basic security feature of the browser.

You would have to use SAPHTTPA or SAPFTPA or setup a custom RFC Destintation - but basically something that would call Server to Server. You can't establish an RFC call to the client machine unless each client machine would be running an SAP Gateway process and be registered with the server (neither likely nor recommended).