Skip to Content
0

Calling a RFC Function Module in SAPUI5

Sep 05, 2017 at 01:21 PM

276

avatar image
Former Member

Hello everyone,

i am developing a SAPUI5 App that should call the RFC Function Module "BAPI_ACC_ACTIVITY_ALLOC_POST" but i dont know how to implement that rfc call.

By searching i find different solutions for this topic but im not sure which is the right in my case.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jun Wu Sep 05, 2017 at 04:08 PM
0

google sap gateway function import

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Jun,

thanks for your reply!

For my understanding an function import is used if you want to perform an action that cannot be done through the CRUDQ operations. Plus you have to define a return typ (none/complex/entity) but what if i just want to call a bapi which returns a boolean?

My guess is to call the bapi via soap from sapui5 but i dont know if this is best practice.

0
Joseph BERTHE Sep 07, 2017 at 11:05 AM
0

Hello,

You have to create an OData service in your Fonrt end Server. This OData should be mapped to your RFC Function module. After having this Service, you can then call it with ODataModel object from UI5 library.

1. Create Odata from BAPI :

https://blogs.sap.com/2017/04/14/step-by-step-creation-of-purchase-order-using-bapi-in-odata-service/

2. Consume OData from UI5 :

https://blogs.sap.com/2017/03/13/how-to-consume-an-odata-service-with-openui5-sapui5/

Regards

Share
10 |10000 characters needed characters left characters exceeded