Show TOC

Map Message Container to Message Protocol FormatLocate this document in the navigation structure

Use

If a request is successful, warnings and success messages can be returned to the consumer in the new HTTP header SAP-Message. The format of the messages can be either set by the URL option format=json or in case of a modifying request with an empty response by using the request header Accept: application/json.

Example: http://<server>:<port>/sap/opu/odata/IWBEP/TEA_TEST_APPLICATION/Teams('TEAM_03')?$format=json

<notification xmlns:sap="http://www.sap.com/Protocols/SAPData">
                <code>/IWBEP/CM_TEA/004</code>
                <message>Team ID 'XXX_I' is not in the defined range.Team ID 'XXX_I' is not in the defined range.</message>
                <severity>info</severity>
                <target></target>
                <details>
                               <detail>
                                              <code>/IWBEP/CM_TEA/004</code>
                                              <message>Team ID 'XXX_E' is not in the defined range.</message>
                                              <target>Team_Itentifier</target>
                                              <severity>error</severity>
                               </detail>
                               <detail>

                                              <code></code>
                                              <message>Message text directly set as warning.</message>
                                              <target>Name</target>
                                              <severity>warning</severity>
                             </detail>
                </details>
</notification>

 Response in http-header sap-message JSON:
 {
                "code":"/IWBEP/CM_TEA/004",
                "message":"Team ID 'XXX_I' is not in the defined range.",
                "severity":"info",
                "target":"",
                "details": [
                                 {
                               "code":"",
                               "message":"Message text directly set as warning.",
                               "target":"Name",
                               "severity":"warning"
                               }
                ]
}
 
More Information