cancel
Showing results for 
Search instead for 
Did you mean: 

Create document in Background with BAPI_DOCUMENT_CREATE2

0 Kudos

Hi,

how can i create a document with the BAPI_DOCUMENT_CREATE2 in background (not in dialog)?

I want to upload the original from my front-end (Path: C:\test.pdf).

If i use the paramter "pf_http_dest = SAPHTTP", it didn't work.

I don't want to upload the file from the applicationserver (not SAPHTTPA).

I am thankful for any solution?

Thanks in advance.

Sebastian

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The issue is your file handling. How do you see your background program getting access to a random C:\ drive on a computer somewhere?

Upload is done via SAPHTTP, either running in the context of your user on your machine or on the application server via the SAP user. The first gives access to all your drives, whereas the second gives access to the application server.

Espen

0 Kudos

Hello Espen,

your first answer is also my opinion... but, what i have to do?

I give the hostname and the SAPHTTP to the BAPI.

Thanks

Sebastian

Former Member
0 Kudos

The straight answer is that it doesn't work.


The only workaround I've used befor is having a shared network folder that both your user and the user running the SAP dialog service have access to. This does work, but you could argue it is a little messy.

That windows user is probably named SAPservice<SID> on the OS level (or equivalent for Linux).

Windows Operating System User Settings in an SAP System - SAP NetWeaver Security Guide - SAP Library

Share a folder and grant both acess. Afterwards you can run the bapi with the network path.

espen

0 Kudos

Hi Espen,

network-path should work? Hmmm.. i mean i've checked this befor....

This means i have to create a network folder and give access... is it not enough to give "everyone" access to the folder (for testing)?

I try and leave a message .

Sebastian

Former Member
0 Kudos

Read access for everyone will work for testing. You might have challenges with regards to firewalls and ports between your SAP system and file share, but that is doable.


If your SAP system and your user are in different domains you might also have some trust issues, but usually the SAP domain is trusted by the other one, but not the other way around.

espen

0 Kudos

Espen,

when i pass the network-path to the BAPI (docfile = '\\LP-213\test\test.pdf') than the SAP-UNIX server can't reach the UNC-path, or i'm wrong?!

Thanx

Seb.

Former Member
0 Kudos

I'm a little on thin ice, but think you need to run the path like this '/lp-213/test/test.pdf'

See wikipedia:

Path (computing) - Wikipedia, the free encyclopedia

espen