cancel
Showing results for 
Search instead for 
Did you mean: 

MDM API: catches sy-subrc = 3 which is EX_KERNEL_ERROR

Former Member
0 Kudos

experts,

My MDM API code looks as below; but it catches sy-subrc = 3 which is EX_KERNEL_ERROR.. and Message of the error says: NiRaw2ConnectError: Connection refused..

What are the steps to debug this issue? thanks!



REPORT  ZPKB_MDMAPI1.

DATA lv_log_object_name TYPE mdm_log_object_name.
DATA ls_config_info     TYPE mdm_config_information.

DATA ls_dbms_info       TYPE mdm_dbms_info.
DATA ls_dbms_auth_inf   TYPE mdm_dbms_auth_info.
DATA lt_repositories    TYPE mdm_repository_info_table.
DATA ls_repository      TYPE mdm_repository_info.
DATA lv_errstr          TYPE string.

DATA LV_LOG_OBJECT_TYPE_CODE TYPE  MDM_TABLE_CODE.
DATA LV_CDT_LANGUAGE_CODE TYPE MDM_CDT_LANGUAGE_CODE.

*Logical connection name for all operations (maintained in customizing)

lv_log_object_name = 'CUSTOMER'.
LV_LOG_OBJECT_TYPE_CODE = 'CUSTOMER'.
LV_CDT_LANGUAGE_CODE = 'ENG'.


CALL FUNCTION 'MDM_ACCESSOR_CONNECT'
  EXPORTING
    IV_LOG_OBJECT_NAME           = lv_log_object_name
    IS_REPOSITORY_LANGUAGE       = LV_CDT_LANGUAGE_CODE
 EXCEPTIONS
   EX_API_USAGE_ERROR           = 1
   EX_PROVIDER_ERROR            = 2
   EX_KERNEL_ERROR              = 3
   EX_SERVER_RC_CODE            = 4
   EX_NOT_SUPPORTED             = 5
   OTHERS                       = 6
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


CALL FUNCTION 'MDM_API_QUERY'
  EXPORTING
    IV_OBJECT_NAME                 = lv_log_object_name
    IV_OBJECT_TYPE_CODE            = LV_LOG_OBJECT_TYPE_CODE
*   IT_QUERY                       =
*   IV_HITS_MAX                    =
*   IS_SORT_INFORMATION            =
*   IS_RESULT_SET_DEFINITION       =
*   IV_START_WITH                  =
* IMPORTING
*   ET_RESULT_SET                  =
*   ET_HIER_STRUCTURE              =
 EXCEPTIONS
   EX_API_USAGE_ERROR             = 1
   EX_PROVIDER_ERROR              = 2
   EX_KERNEL_ERROR                = 3
   EX_SERVER_RC_CODE              = 4
   EX_NOT_SUPPORTED               = 5
   OTHERS                         = 6
          .
IF SY-SUBRC <> 0.
  write:/ sy-subrc.

  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.


CALL FUNCTION 'MDM_ACCESSOR_DISCONNECT'
  EXPORTING
    IV_LOG_OBJECT_NAME       = lv_log_object_name
 EXCEPTIONS
   EX_API_USAGE_ERROR       = 1
   EX_PROVIDER_ERROR        = 2
   EX_KERNEL_ERROR          = 3
   EX_SERVER_RC_CODE        = 4
   EX_NOT_SUPPORTED         = 5
   OTHERS                   = 6
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

closing the thread.. this error was due to ; Server Down.. Thanks!

Former Member
0 Kudos

Hi Prema Boodi,

I am facing the same issue now.

Can you please let me know little more about this issue. Which Server are you talking about? What did you do to get the server up and running? If you are talking about the MDM Server, then in my case that is mounted and the repository is loaded also. Still I am getting this error.

Any help/info is highly appreciated.

Thanks & Regards,

Kalyan