Question

I want to create a new document in SAP. Additional I have some files which belongs to this document, these files I want to upload to the SAP knwolegde base.

I'm using BAPI_DOCUMENT_CREATE2 to create or BAPI_DOCUMENT_CHECKIN2 to add files to a document info data. Every thing works fine, except file upload or checkin.

I'm using the DOCUMENTFILES table. I add a row for each file, currently I set only three fields:

  row["STORAGECATEGORY"] = "DMS_C1_ST";
  row["DOCFILE"] = "c:\temp\bom.pdf";
  row["WASAPPLICATION"] = "PDF";

BAPI erro message: "Error while checking in and storing c:/temp/bom.pdf"

I set the parameter

  PF_FTP_DEST = "SAPFTPA";
  PF_HTTP_DEST = "SAPHTTPA";

I have looked in the log data (slg1). I found following entry:

  ERRMSG: Error in opening file "..." for reading (No such file or directrory)
  V1:     SCMS_DOC_CREATE_FILES
  V2:     13

It would be nice if anybody has an idea and could bring some light in this issue. Thanks in advance Thomas

No correct solution

OTHER TIPS

Remember that BAPIS run inside the application server and are not allowed to make any assumptions about the client side. This also means that they can't call back to the SAP GUI and upload a file from there. C:\temp\bom.pdf has to be a file on the application server, not your local machine!

Have you considered using

row["DOCFILE"] = "bom.pdf";
row["DOCPATH"] = "c:\temp\";

Let me know how it goes, or if you have already done with it then please paste your solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top