Monday, September 18, 2017

Communication failure while loading data to Open Hub

I came across a following error while using Open Hub functionality in SAP BW. An DTP that is used to load data from BW InfoProvider to the Open Hub it-self was failed and showing following errors:


Error: COMMUNICATION_FAILURE with function RSB_API_OHS_3RDPARTY_NOTIFY and target system . Message No. RSBO523

Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT', communication rc: CM_ALLOCATE_FAILURE_RETRY (cmRc=2)). Message No. RSBO899

Error while updating to target (type Open Hub Destination) Message No. RSBK241

Operation could not be carried out for Message No. RS_EXCEPTION120
Exception CX_RS_FAILED logged Message No. RSBK228

There wasn’t any ABAP dump generated in BW system so it was obvious (also as per errors) that issue is in target external system that is picking up the data from Open Hub. I had a look into the FM mentioned in the error – RSB_API_OHS_3RDPARTY_NOTIFY as well. The source code of the FM looked strange to me.

FUNCTION rsb_api_ohs_3rdparty_notify.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(OHDEST) TYPE  RSOHDEST OPTIONAL
*"     VALUE(REQUESTID) TYPE  RSBREQUIDOUT OPTIONAL
*"     VALUE(NUMB_OF_PACKETS) TYPE  I OPTIONAL
*"     VALUE(DBTABNAME) TYPE  RSBTABNAME OPTIONAL
*"     VALUE(DBRECORDS) TYPE  SYTABIX OPTIONAL
*"     VALUE(TIMESTAMP) TYPE  RSBTIMESTAMP OPTIONAL
*"     VALUE(REQUEST_GUID) TYPE  RSREQUID OPTIONAL
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRET2
*"  TABLES
*"      PARAMETERS STRUCTURE  BAPI6107PA OPTIONAL
*"  EXCEPTIONS
*"      COMMUNICATION_FAILURE
*"      SYSTEM_FAILURE
*"----------------------------------------------------------------------

* must be implemented in the 3rd party system

ENDFUNCTION.

What that “must be implemented in 3rd ..” means? After some more investigation it was clear. The FM is called by 3rd party system once extraction for the OH is done. The FM basically just sends back to called system information on how many data were extracted. All this is sent over in parameters of the FM – Req ID, no of records etc. To just transmit this basic info there is no need to put any additional code.

The FM is part of API available for connect a third-party tool to the BW. There are other API’s FM available too:
RSB_API_OHS_DEST_SETPARAMS
RSB_API_OHS_3RDPARTY_NOTIFY
RSB_API_OHS_REQUEST_SETSTATUS
RSB_API_OHS_DEST_GETLIST
RSB_API_OHS_DEST_GETDETAIL
RSB_API_OHS_DEST_READ_DATA

Now let’s came back to the error itself. This is basically connection error between the BW and target extremal system. Once connection between the two was re-established the load was successful.

More information:
1585460 - Error when running DTP to 3rd party Open Hub Destination

No comments: