SAP Adapter and reload package

Good morning everybody.
I’m having a problem with the SAP Adapter, and I don’t know what’s causing it. This is the scenario: the MES vendor loads data into border tables on which a flow I created remains polling, the flow analyzes the data, sends it to SAP via a BAPI call and performs other operations on the border table.
Sometimes, it seems random, the flow processes the data and executes the BAPI call and subsequent operations on the border table, but the data is not sent to SAP. In these situations, to send the data to SAP I have to manually reload the package from the Integration Server.

Can someone help me?

I have seen that there is a package in the Designer to reload the package, but what happens if it is running? Do I check if the package is running before reloading it?

Thank you,
Diego

Hi Diego,

to which package are you referring?
WmSAP or your custom package?

WmSAP cannnot be reloaded due to the nature of the JCo API which has a native library part.

To avoid problems with the usage of the WmSAP adapter all custom packages which are using WmSAP based connectivity should declare a dependency to WmSAP in their package properties settings.

Is there any info in either server or error log when the BAPI call fails?
Additionally check with your SAP system administrator if they can see any thing in the sap server logs.

Regards,
Holger

Hi Hoger,

I’m referring to a custom package, that receive data from DB polling, and then makes a BAPI call. The problem is that the BAPI call doesn’t seem to fail, and I don’t see ESB-side and SAP-side errors. In fact, the processing after the BAPI call is done. The only thing I have to do is reload the package from the Integration Server.
I created the BAPI call as an Adapter Service, do I have to declare the dependency to WmSAP anyway?

Thank you

Hi Diego,

yes, this is advisable to make sure that the SAP Connection has started before the BAPI call tries to use it.

You might want to check the SAP Adapter Users Guide for further informations.

Additionally it might be helpful to set a dependency to WmJDBCAdapter as well to inform the polling notification to wait for the JDBC Adapter runtime.

When not setting dependencies packages might be loaded out of order causing them to try to access objects which are not yet loaded.

Please check that you have set MinPoolSize for your SAP Connection to 0 to avoid stale connections in the pool.
Hitting a stale connection may cause the BAPI to fail without notice if you do not handle it in a TRY-CATCH scenario.
Reloading the packages restarts the connection pool providing fresh connections for the BAPI call.

Regards,
Holger

Thank you Holger.

I added the package dependencies to WmSAP and WmJDBCAdapter and changed the MinPoolSize to 0.

Hi Holger,

I checked the system a little while ago, and found again other records that weren’t processed even though I had included dependencies in the packages.

Hi Diego,

sounds really weird.

In this case I would suggest to modify the connections to “Log Throughput Data” for further investigation.

Additionally you might want to check the JCo Trace files for any messages.

Regards,
Holger

Hi Holger, where could i modify the connections to “Log Throughput Data”?

Thank you,
Diego

Hi Diego,

logi into tou your IS Admin UI via browser, go to the left navigation bar and select "Adapters → SAP").

Under Connections disable the connection, edit it and select the "Log Throughput Data" CheckBox.
After saving re-enable the connection.

Same can be done for SAP Listeners.
Remember to keep the SAP Connection enabled when editing the Listener otherwise it will loose its Repository Location information when you have multiple connections configured as it will be reverted to the first enabled connection.

Regards,
Holger

Hi Diego,

You might want to take note that the more details logging you’ve enabled in your environment, it will definitely impact the overall performance of your environment. So if this is your PRD instance, it’s probably good idea to just enable the logging level you need to troubleshoot your issue and for a short duration of time and not leaving it enabled over a long duration of time.

The detail the log is, the more storage it will require and it might deplete your storage fast if you’ve not disabled it after finish collecting required info.