cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_Document_Create2 fails in background, using PI

sarath1988
Explorer
0 Kudos

Hi experts,

We have a problem triggering BAPI in the background.

Our scenario is like this:     We have ECC(on UNIX) running on 172.16.10.51 and FTP(on WINDOWS) on 172.16.10.50.  Files are placed on FTP Server and the BAPI is triggered through PI.  Our intention is to make the BAPI_Document_Create2 pick the file from the FTP Server and create the DIR and check-in the document. 

The FTP server is on the same network as that of ECC.    

While we execute the BAPI in foreground passing the filepath as
172.16.10.50\sap\Archive, it is successfully creating the DIR and checking in the document.     However, when the same BAPI is triggered through PI in background, it throws an Error -- "Error while trying to checkin the document
172.16.10.50\sap\Archive\abc.pdf".     

While running in the background,  we are using SAPFTPA and SAPHTTPA as the destinations.

Request your suggestions / inputs at the earliest.

Regards,

Sriram

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

I recommend not using a BAPI from PI in back ground. Use the corresponding IDoc for this purpose.

This would enhance monitor and error handling features.

gagandeep_batra
Active Contributor
0 Kudos

can u test bapi in background using varient?

sarath1988
Explorer
0 Kudos

BAPI is creating the document, in background, if am placing the file on application server and triggering it through PI.

sarath1988
Explorer
0 Kudos

Problem solved. Instead of trying to pick the file from 10.50, we now post the file onto 10.51(ECC) and now the BAPI is able to pick it from back ground.

Thanks.