Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to POST confidential data in function import?

Hello,

my SAPUI5 application runs against SAP Gateway. I have written a function import CheckEmployee, originally with method GET, which has some confidential data as input.

An audit resulted in the requirement to not pass the confidential data as URL query parameters. I thought this would be easy by setting the method of the function import to POST. But then I found out that neither Gateway nor SAPUI5 support setting data as request body (payload) in case of a POST function import

SAPUI5 (currently v1.26)   ---   ODataModel-dbg.js:

In method callFunction:

if (sMethod === "GET") {

//            parameters are encoded in read function

    return that.read(sFunctionName, oContext, oUrlParams, true, fnSuccess, fnError);

} else {

    jQuery.each(oUrlParams, function (sParameterName, oParameterValue) {

        // addQuery also encodes the url

        sUrlURI.addQuery(sParameterName, oParameterValue);

    });

    oRequest = this._createRequest(sUrlURI.toString(), sMethod, bAsync);

SAP Gateway (part of NW7.4 SP9)   ---   /IWCOR/CL_DS_PROC_DISPATCHER

In method PROCESS_FUNCTION_IMPORT:

lo_provider =  lo_processor->execute(

io_function_import = io_uri->function_import

it_parameter_value = io_uri->function_import_parameter

iv_format          = lv_format ).

Questions:

  1. Do newer versions of UI5 and newer Gateway SPs support POSTing function imports with payload?
  2. If not, is it planned to be supported?
Tags:
Former Member
Former Member replied

Unfortunately in OData V2 function imports of type POST, payload is not supported.

In OData V4 I think it is allowed, but gateway does not support V4 yet.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question