10-21-04 07:46 AM
Hi everyone,
Using the BizTalk Adapter for SAP V 2.0, we are accessing the SAP System
from within an orchestration. Our requirements are to call multiple BAPIs in
sequence:
BAPI_EMPLOYEET_ENQUEUE - Lock the Employee Record
BAPI_PTMGRATTABS_MNGCREATION - Create a Booking record on that employee
BAPI_EMPLOYEET_DEQUEUE - Unlock the Employee Record
The problem is that the SAP Adapter seems to loose the context when
accessing the SAP System. The BAPI_PTMGRATTABS_MNGCREATION calls returns an
error indicating that the employee has not been locked yet; however we have
confirmed that the ENQUEUE call gets executed correctly.
We assume this to be a problem of the connection to SAP getting closed after
every interaction. Our first approach was to use the SAPSend.ConnectionType
Property and set it to reuse the connection according to the documentation
of the SAP Adapter. However, this fails with the message "object reference
not set to an instance of an object" when the second BAPI gets invoked; it
seems the adapter does not associate the connection correctly.
So, the questions are:
1. How can we ensure that the connection retains between multiple BAPI
calls?
2. Do we have to explicitly call BAPI_TRANSACTION_COMMIT or is this done
implicitly?
Thanks!
Sincerely
Joerg Fischer
[ Post a follow-up to this message ]
|