cancel
Showing results for 
Search instead for 
Did you mean: 

bapi_document_create2

Former Member
0 Kudos

Hi all

I am trying to upload documents to our SAP DMS from Mii using bapi_document_create2. I can create a document header record if i dont put anything in the transaction about the file i am wanting to upload. If i put a file type, path and name in the transaction does nothing. No useful error messages come from the transaction. I can get the bapi to upload files from SE37 so have all correct settings. Any suggestions?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

Yes the path is entered as
server\folder\

Have made some progress since posting question.

I added the server name into DOCUMENTFILES/item/SOURCEDATACARRIER and now get a error message, although didnt need this when running FM from SE37.

[INFO ]: FMM - Error while checking in and storing: guide.pdf

So I think I am nearly there.

Former Member
0 Kudos

Are you also using the '
server\folder' path in se37? If so this could be a permission error. The service user running MII might not have network access or it might not have read access to that share. Se37 will use your windows credentials to access the share.

Jasper

Former Member
0 Kudos

Hi Les,

Did you figure this out? I am facing the same issue. It works fine from SE37, but not from MII. I too suspect the data carrier and/or file reference and have tried many combinations. Any advice is appreciated.

Thanks in advance.

Former Member
0 Kudos

My guess would be to make sure the path you are putting into the BAPI is relative to where you are running it from.

If you put 'c:\file1.doc' as the path it will work in se37 because your computer is running the BAPI but when you put it in the context of MII it will pull it from the MII server not your desktop.

You may have to create a page that uploads the file to a temp directory on the server before you run the BAPI.

Jasper