Skip to Content
0

OData Service Using BOR RFC

May 31, 2017 at 09:14 PM

148

avatar image

Hi Experts,

I was looking into the possibility of using RFC / BOR for creating Entities in Odata service as well as using map to data source functionality however i am facing issues passing tables as input to RFC.

I am using BAPI_MATERIAL_SAVDATA for entity creation and mapping.

I came across very useful blogs but the blogs provide example using simple entities without navigation.

http://scn.sap.com/community/developer-center/netweaver-gateway/blog/2013/12/22/steps-in-creating-gateway-service-with-all-the-crud-operations

http://scn.sap.com/community/developer-center/netweaver-gateway/blog/2013/12/22/detailed-step-by-step-process-for-creating-gateway-service-with-all-the-crud-operations-and-testing-them-in-service-explorer-part2

I have few questions:

While creating entities using RFC BAPI_MATERIAL_SAVEDATA we selected all the structures as well as tables, as a result of which a singe complex entity (Material_Details) was created which was a combination of all structures. Also different entities were created for each tables. Below is the screenshot of same:

Entity Material_Details is the entity having all structure fields of BAPI (import structures).

For all Table parametes of BAPI separate entites have been created.

Now when i do map to data source in Service Implementation for Material_Details i can only map the fields of this entity. If i want to also map the fields in other entities so that we can pass table parameters to BAPI in single call how can we achieve that ?

Here during mapping is there a way we can map fields of other entities linked through navigation ?

Or if we map the fields in create method for each entity separately then during material create how can send data and pass all tables and structures in RFC call at one go, at the call of create_entity set method of main entity.

~Tanmay

mm1.jpg (113.8 kB)
mm5.jpg (914.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Syam Babu Jun 01, 2017 at 01:50 PM
0

Hi Tanmay,

For the above requirement does not suite the BOR/RFC Mapping with multiple entities for create_entity method.

Solution : You have to go with code-based implementation and redefine the Create_deep_entity method in data provider class and implement the method with your RFC/BAPI ex: BAPI_MATERIAL_SAVEDATA

Please refer the below link for your requirment.

Step by Step development for CREATE_DEEP_ENTITY operation

Thanks,

Syam

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

Hi Syam,

Thanks for the reply. We are using the Deep Entity Method. We wanted to check if there is a way to achieve it though mapping. Did a lot of research and found that it would not suffice the requirement. Thanks for your inputs.

~Tanmay

0