cancel
Showing results for 
Search instead for 
Did you mean: 

Model Re-design Suggestion

Former Member
0 Kudos

Hi Experts,

in one of our application - we are accessing around 10 BAPIs from one single backend. By mistake the developer has created 10 different models in the project each one connecting to one single BAPI. The BAPIs are huge (complex set of input output parameters)- and a huge amount of coind has also been done over that. As usual - each model has two JCo destinations associated with it - which means I have 20 JCo destinations now in the project where I could have only two if the design was proper.

Now my question is - are we now opening 20 connections per user due to this design fault in the runtime? If yes - thats a huge drawback of the application we developed. So we need to do something to have a single model out of all these 10 models - and that also without disturbing the model context bindings. We have over 300 fields in the whole application spread over different views - and deleting the existing models and recreating a new one will be a true nightmare. Is there any way by which I can merge all these models by keeping the contaxt mapping intact - and have only two JCo destinations for them?

Any help - any light would be highly appreciated.

Regards,

Shubhadip

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

Hi Shubhadip,

I feel sorry for you... No simple way at all to merge the connections of disparate models. If multiple components are using the same model, then possible to ensure that only one instance of it is created, but I don't think that is your problem.

Hopefully your design has clearly separated your model view and controller stages so that all models are bound to a central controller rather than directly to view controllers? If so, then remapping these central controllers will fix all your other mappings, if not - Ouch!

Good luck.

Chris

Former Member
0 Kudos

Chris: thanks for the suggestion. I really feel thats the only way to do it. Actually the application is huge - really huge - and though the model binding is done with component context only still its a lot of work to remapping everything. And I guess there is considerable chances of errors too.

Tell me one thing: as I am having 20 JCo destinations for the application where I could have only 2 - does it really open 20 physicall connection at runtime? Means I am trying to understand whether I am worried for really something? Or it takes the connections from a pool where we really dont need to worry? Please confirm me this..then if its really consuming that 10X number connections we have to take the harder way if nobody has any solution.

Regards,

Shubhadip

ChrisPaine
Active Contributor
0 Kudos

Hi Shubhadip,

Yes it really does take all those connections

however, you can do things to ensure that connections drop as soon as possible.

Also be aware that the metadata connection is made by the engine only when it needs to understand what the RFC looks like, so may not always be 2n connections where n is number of models.

Pran Bhas, an excellent chap working at SAP Australia has put together some <a href="/people/sap.user72/blog/2005/01/08/adaptive-rfc-models-in-web-dynprosome-pointers that address this whole issue. I'd suggest you have a look. Setting the scope of the connections to task only could very well work in your application and would very much reduce the number of connections open...

Cheers,

Chris

Former Member
0 Kudos

Chris,

thanks a lot. Though it doesnt solve my problem - you know why - still it cleared out a lot of cloud. Thanks again...

Regards,

Shubho

ChrisPaine
Active Contributor
0 Kudos

Hi Shubho,

not sure if you've already gone through the pain of changing all those models... but I have just found some very interesting code in the FPM...

look at the code in component com.sap.pcuigp.xssfpm.wd.BackendConnections - specifically the method connectModelInternal(model, rollAreaKey)

it seems to implement a way that can be used to merge multiple model connections into one - at runtime!

Sorry I didn't know about this before - as I think this is the solution to your issue...

Hope I haven't been too late to save you work,

Cheers,

Chris

Former Member
0 Kudos

Chris,

hmmmm - a bit late we have taken the pain already.

But still I would be very much interested in knowing it fully. Could you point me the exact location I need to look in? I am not sure what FPM is? Please help. I would definitely look into that.

Have a great time and thanks for remembering this post.

Regards,

Shubho

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ghosh,

My idea Create a new Model (Single Model)which contains your ten BAPIs is possible .

After that while doing mapping from your model to controller (CompCont) Make sure that BAPI Main Nodes and All Child nodes shoould be same names which you used in previous model.

This will reduce your rework of your coding.

While doing mapping from Model to CompCont you shuould be very careful giving names od nodes.

Rgds

SS