on 05-21-2015 5:27 AM
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
Showing your code, on how did you raise exception would help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.