Skip to Content
0
Sep 13, 2016 at 02:36 PM

SAP Gateway Exception

52 Views

Hi everybody.

I'm starting with sap gateway and i'd like to custom my error response when i'm calling the exception.

It would be possible? For example:

The original response:

{

"error": {

"code": "SY/530",

"message": {

"lang": "pt",

"value": "MESSAGE I"

},

"innererror": {

"application": {

"component_id": "BC",

"service_namespace": "/SAP/",

"service_id": "ZGW_PLANNING_PRODUCTION_SRV_01",

"service_version": "0001"

},

"transactionid": "57CE749CDC2E533AE1000000AC0C0CD0",

"timestamp": "",

"Error_Resolution": {

"SAP_Transaction": "",

"SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"

},

"errordetails": [

{

"code": "",

"message": "MESSAGE I.",

"propertyref": "",

"severity": "error",

"target": ""

},

{

"code": "",

"message": "MESSAGE II.",

"propertyref": "",

"severity": "error",

"target": ""

},

{

"code": "/IWBEP/CX_MGW_BUSI_EXCEPTION",

"message": "",

"propertyref": "",

"severity": "error",

"target": ""

}

]

}

}

}

I'd like to receive the following structure:


{

"errordetails": [

{

"code": "",

"message": "MESSAGE I",

"propertyref": "",

"severity": "error",

"target": ""

},

{

"code": "XX",

"message": "MESSAGE II",

"propertyref": "",

"severity": "error",

"target": ""

}

]

}