Add messages in Odata services

 *1. Instatiate the Message Container

    DATA: lo_message_container TYPE REF TO /iwbep/if_message_container.

    CALL METHOD me->/iwbep/if_mgw_conv_srv_runtime~get_message_container
      RECEIVING
        ro_message_container = lo_message_container.

    CALL METHOD lo_message_container->add_message
      EXPORTING
        iv_msg_type               = /iwbep/cl_cos_logger=>warning
        iv_msg_id                 = 'ZTEST'
        iv_msg_number             = '000'
        iv_add_to_response_header = abap_true. "add the message to the header
********************************ROHINI KUMAR*********************************
                               Please support my work : sap.rohini988@gmail.com
                               LinkedIn Link  : https://www.linkedin.com/in/rohini-kumar-14647a13a/
********************************************************************************

Comments

Popular posts from this blog

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool