Today I am going to find out answer of a question on SUP commit data to SAP via RFC. Where input and output parameters are i_p1, i_p2 and o_code, o_text, and RFC is a procedure for update. In this, to update SAP database, you need to call an operation in MBO. Define an “other” operation in one MBO and make RFC as data source for this. By setting up i_p1, i_p2 in native application, you can successfully update SAP data.
However, data update is successful, but you would not get output parameters o_code, o_text. Thus client user does not know whether procedure success or fails.
So, how to fetch operation result?
- Create a new MBO and use RFC as the definition/load operation/read for that MBO. RFC’s output will be mapped to the attributes of MBO. Invoke an object query on the MBO when you want to invoke the RFC.
- Setting up input parameters value depends on invoking procedure, via a native or a workflow app. Generally, you can do it using online cache and having parameters of object query fall into MBO definition/load/read. Another way to supply the input parameters is personalizing keys, typically transient, for the MBO definition/load/read.
- To get RFC output using MBO in a native iOS app, you need to use RFC as definition of MBO. Typically, you would have a SELECT statement much like with a MBO database, as the definition of MBO. Now you need to create an MBO with your RFC as its definition.
- After creating an MBO with input parameters mapping RFC input and output parameters mapping RFC outputs. Set MBO cache group’s cache policy as on demand. For native apps set MBO attributes, values and call synchronize method.
- Now you need to map output to new MBO, it will synchronize in CDB with your expected output then to requestor device. In few situations, online request would be the best solution in native app to use a ODATA service via NW gateway and build mixed model based on few MBO and direct SUP proxied calls to NWGW. A plug-in would permit to user a ODATA NWGW service as a source for MBO in future releases. It will also permit develop to design global model with online and caches/sync calls.
Hope, now you can get results after call RFC.