cancel
Showing results for 
Search instead for 
Did you mean: 

The Gateway does not take care of long text from backend

srigovind
Associate
Associate
0 Kudos

Hello,

A long text maintained in the message of the message class (Backend) is not transferred to the UI layer from odata. I had to manually add the long text in Odata layer to error detail component of the container. Am i missing something to automatically get the long text along with the main message in the UI layer? Or is it that Odata framework does not take care of the same? If so, why is it?

Thanks and Best Regards,

Govind

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

Showing your code, on how did you raise exception would help.

srigovind
Associate
Associate
0 Kudos

Hi Krishna Kishore,

Following is the code.

catch cx_error into lx_error.

     ls_msg = lx_error->get_message( ).

     lo_msg_container = me->ar_context->get_message_container( ).

     lo_msg_container->add_message(

          iv_msg_type      = ls_msg-msgty

          iv_msg_id          = ls_msg-msgid

          iv_msg_number = ls_msg-msgno

          iv_msg_v1         = ls_msg-msgv1

          iv_msg_v2         = ls_msg-msgv2

          iv_msg_v3         = ls_msg-msgv3

          iv_msg_v4         = ls_msg-msgv4

          iv_error_category = /iwbep/if_message_container=>gcs_error_category

          iv_entity_type    = iv_entity_set_name ).

     raise exception type /iwbep/cx_mgw_busi_exception

          exporting

               message_container = lo_msg_container.

Thanks and Best Regards,

Govind

kammaje_cis
Active Contributor
0 Kudos

Yeah, long message would not come. Only the leading message would appear.

Quoting from SAP Help

The message text of the OData error response is the exception text in case of direct usage or the leading message of the message container in case of message container usage.

/IWBEP/CX_MGW_BUSI_EXCEPTION - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

Answers (0)