cancel
Showing results for 
Search instead for 
Did you mean: 

I::001 Win32 error 2 while using document bapi methods

Former Member
0 Kudos

Dear colleagues,

I'm using SAP .NET Connector for integration between .NET application and SAP System.

When I try to work with standard document bapi methods like BAPI_DOCUMENT_CREATE (with defined filepath for a document in file table parameter), BAPI_DOCUMENT_CHECKIN or BAPI_DOCUMENT_CHECKOUTVIEW, I get an error in out RETURN parameter - "I::001 Win32 error 2: The system cannot find the file spe".

When file path is not defined in BAPI_DOCUMENT_CREATE everything works OK and information about the document successfully appears in SAP system.

When I test BAPI_DOCUMENT_CREATE or BAPI_DOCUMENT_CHECKOUTVIEW in SAP GUI with same parameters, RETURN parameter shows no errors.

Does anybody know what can be a reason of this problem? Please, help if you know how to solve this issue.

If this forum is not a right place for such question. please tell me, where I can get any information about this issue.

Best regards,

Andrey Kim

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey Kim,

I've been trying doing the same from Java connector and have been facing similar issues.

Two options:

- you can either get the file in return of the module fonction call (binary) - this implies you write a new Bapi that will return the file in binary

- or only get the reference to the file (ftp or http link). In this case prefer the HTTP link, it should be working

What options are you on?

Hope this helps

Yann

Former Member
0 Kudos

Hello, Yann ) Of course, I can find another way, but for a few reasons I need to use these standard bapi methods for checkin and checkout documents. I want to investigate, what am I doing wrong here)

I've found the reason of this stupid error - I just didn't know SAPHTTP.exe and SAPFTP.exe files should be copied to system32 or application's bin folder. After doing that this error disappeared.

But then I've got another error, which was exactly described in https://service.sap.com/sap/support/notes/885058

I receive an error message from SAP when I'm trying to call bapi_document_checkin or bapi_document_checkoutview methods.

I've copied last versions of librfc32.dll, librfc32u.dll and ICU libraries to my windows\system32 folder and to my application's bin folder also, but I still receive the same error message

I didn't work with SAP before, so that is my first experience. Can anybody help or explain, what exactly should I do with RFC and ICU libraries to avoid this error?

Is it necessary that rfc libs' versions on my client machine were the same as rfc lib's on the machine with SAP system?

I'll be grateful for any assistance in this question.