Crea un proxy de cliente remoto

El código de una clase de excepción debería verse así:

CLASS zcx_travels_cons_xxx DEFINITION
  PUBLIC
  INHERITING FROM cx_rap_query_provider
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.

    METHODS constructor
      IMPORTING
        !textid   LIKE if_t100_message=>t100key OPTIONAL
        !previous LIKE previous OPTIONAL .

        constants:
          begin of destination_provider_fail,
            msgid type symsgid value 'ZCM_TRAVELS_XXX',
            msgno type symsgno value '001',
            attr1 type scx_attrname value 'attr1',
            attr2 type scx_attrname value 'attr2',
            attr3 type scx_attrname value 'attr3',
            attr4 type scx_attrname value 'attr4',
          end of destination_provider_fail,

        begin of http_client_fail,
            msgid type symsgid value '/DMO/CM_SERVICE_003',
            msgno type symsgno value '002',
            attr1 type scx_attrname value 'attr1',
            attr2 type scx_attrname value 'attr2',
            attr3 type scx_attrname value 'attr3',
            attr4 type scx_attrname value 'attr4',
        end of http_client_fail,

        begin of client_proxy_fail,
          msgid type symsgid value '/DMO/CM_SERVICE_003',
          msgno type symsgno value '003',
          attr1 type scx_attrname value 'attr1',
          attr2 type scx_attrname value 'attr2',
          attr3 type scx_attrname value 'attr3',
          attr4 type scx_attrname value 'attr4',
        end of client_proxy_fail,

        begin of remote_access_fail,
          msgid type symsgid value '/DMO/CM_SERVICE_003',
          msgno type symsgno value '004',
          attr1 type scx_attrname value 'attr1',
          attr2 type scx_attrname value 'attr2',
          attr3 type scx_attrname value 'attr3',
          attr4 type scx_attrname value 'attr4',
        end of remote_access_fail,

        begin of gateway_fail,
          msgid type symsgid value '/DMO/CM_SERVICE_003',
          msgno type symsgno value '005',
          attr1 type scx_attrname value 'attr1',
          attr2 type scx_attrname value 'attr2',
          attr3 type scx_attrname value 'attr3',
          attr4 type scx_attrname value 'attr4',
        end of gateway_fail,

        begin of query_fail,
          msgid type symsgid value '/DMO/CM_SERVICE_003',
          msgno type symsgno value '006',
          attr1 type scx_attrname value 'attr1',
          attr2 type scx_attrname value 'attr2',
          attr3 type scx_attrname value 'attr3',
          attr4 type scx_attrname value 'attr4',
        end of query_fail

          .

  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.

CLASS zcx_travels_cons_xxx IMPLEMENTATION.
  METHOD constructor ##ADT_SUPPRESS_GENERATION.
    CALL METHOD super->constructor
      EXPORTING
        previous = previous.
    CLEAR me->textid.
    IF textid IS INITIAL.
      if_t100_message~t100key = if_t100_message=>default_textid.
    ELSE.
      if_t100_message~t100key = textid.
    ENDIF.
  ENDMETHOD.
ENDCLASS.

Hecho

Inicie sesión para responder la pregunta

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *