cancel
Showing results for 
Search instead for 
Did you mean: 

max JCO connections

Former Member
0 Kudos

Hi

I have about 15-20 models in my project. is there a way to reduce the number of RFC calls in a web dynpro or an other way.

Regards

Sven

Accepted Solutions (1)

Accepted Solutions (1)

former_member189631
Active Contributor
0 Kudos

Hi Dresen,

Are you using BAPIs/RFC enabled FMs from the Same R/3?

if so U can use many Bapis/RFC enabled FM in a Single Model while creating the model itself.

Regards,

Ramganesan K.

Former Member
0 Kudos

please explain what you exactly mean?

Use indeed RFC bapi's

Answers (11)

Answers (11)

Sigiswald
Contributor
0 Kudos

Hi Sven,

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01ce8a">JCo Quick Summary</a> "The relationship between Web Dynpro model objects, JCo Connection Pools and ABAP sessions within an SAP system" is very interesting to better understand this topic.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1">How to Configure the JCo Destination Settings</a> is very interesting when it comes down to scaling.

In my opinion it's often a tradeoff between performance and maintainability. It really depends on your specific situation and application design. To be honest, I find this a rather complex subject too.

Kind regards,

Sigiswald

Former Member
0 Kudos

Dresen

do you know how this set connection provider works, or what I need to do for that to set it up?

can somebody else help me?

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Sven,

Let me map your question to a similar one. I assume, my answer is also applicable for your scenario:

<b>Question</b>

<i>Let's say I have an application for which I need to use 2 Adaptive RFC. What would be the better thing to do:

  • Import each RFC separately so that I have 2 models (one for each RFC) or

  • Import the 2 RFC at the same time. I would then have 1 model but with the ability in it to access the RFC that I need (when I do the Model Binding in the controller)

At first, I thought that the 2nd method would not be recommended because when I execute the model Object it would actually execute both RFC at the same. But after a test it doesn’t seem to do so.</i>

<b>Answer</b>

Best Practice is certainly to put as many RFCs in a single Adaptive RFC model as possible.

Reasons:

1) a model represents a namespace, therefore, any commonly used datatypes or structures can be shared only within a single model. The best example for this is the "Return" Structure of Bapis (Bapiret2). If you import 2 RFCs (Bapis) in different models, then you will receive two different classes representing Bapiret2. You can therefore no longer build any common functionality for parsing and interpreting the Return Value of multiple Bapis. You can not share references, which means you can not pass data by reference from one RFC to another. Instead, you would be forced to copy, e.g. via the WDCopyService.

2) a model represents a number of services, which are required at runtime. The most important one is the connection (JCO.Client). If you import 2 RFCs in 2 different models, then each model will re-quire a connection to be assigned at runtime. In most cases though, you want to share the connec-tion between multiple RFC calls, therefore it is wise to keep those RFCs in a single model. Remark: It is possible to share a connection between multiple models (see Method IWDDynamicRf-cModel.setConnectionProvider() ), but it is still easier if you are not forced to do this.

3) Reimport functionality exists, so you are able to update an existing model and add further RFCs as needed. In the past, this was often the reason for using multiple models. This problem no longer exists.

You may still wish to separate models, and there are use cases for this. Here are some situations in which you would do this:

1) You need to access different RFCs in different back-end systems, e.g. RFCA accesses SystemA and RFCB access SystemB. This requires uses different connections, therefore, you MUST use dif-ferent models.

2) The lifecycle of the RFCs is different. E.g. RFCA belongs to a different Business Package than RFCB. This could lead to updates in RFCA which would not affect RFCB. If this is known at devel-opment time, then it is wise, to also keep these RFCs independent of each other by importing them into different models. This is usually only the case in larger development projects involving many developers (such as XSS)

3) <i>Componentization</i>: If you make strong use of Web Dynpro components which are contained in dif-ferent DCs, then you may also want to split up RFC Models, to keep them from getting too big, and to avoid unnecessary dependencies. E.g. WD Component A (part of DCA) uses RFCA and WD Component B (part of DCB) uses RFC B. But the two components have nothing to do with each other. In this case, you have the option of either importing a single common model and placing it in a different DC (lets say DCX) to prevent DCA and DCB from getting dependent on each other. Al-ternatively, you can import two different models and place each model in the DC in which it is used: RFCA is imported into ModelA and placed in DCA.RFCB is imported into ModelB and placed in DCB.

Best regards, Bertram

Former Member
0 Kudos

Hi,

I think with in one Action you are going to call at least 3 to 4 RFC's.

that doesn't effect the Performance.

If you go for the more than 5 then only the problem will come.

But the it depends on your data coming from the back end.

thanks,

Lohi.

Former Member
0 Kudos

why schould I not use: setconnectionprovider? How does it work?

We are going to have more then 5 connections together, it's very big project.

former_member189631
Active Contributor
0 Kudos

Welcome Dresen.. :)..

Thankyou.

former_member189631
Active Contributor
0 Kudos

Dresen,

From My View,

We can use Connection provider when ur project using more than One R/3.

For ur project i suggest u to go through above steps.

Regards,

Ramganesan K.

former_member189631
Active Contributor
0 Kudos

Hi Dresen,

While creating the model, Please follow these steps:

1)In Ur Project Node Models --> Create Model

2)Choose <b>Import Adaptive RFC MOdel</b>-->Next

3)Give Model Name,Model Package,...etc details

4)Click Next

5)Select Single Server --> Give Ur R/3 system details Here.->next

6)After successfull login It will leeds to next screen.

7)here u can search for ur Bapi.and check it.

8)U can choose More Bapis Here.

9)Next

10)Finish

See the step 8.From this we can use Many bapis in a single model .

like wise Your can do iNstead of use one model for each bapi.

Regards,

Ramganesan K.

Former Member
0 Kudos

Ramganesan, thanks for your help. I already did this.

former_member189631
Active Contributor
0 Kudos

Hi Dresen,

I will Explain IN DETAIL..

former_member189631
Active Contributor
0 Kudos

Hi Dresen,

I think now your problem get solved.

Regards,

Ramganesan K.

Former Member
0 Kudos

Don't get what you mean? what should I do exactly. I am pretty new at this

I also read something about. setconnectionprovider how does this work?

Message was edited by:

S. Dresen

former_member189631
Active Contributor
0 Kudos

Hi,

By doing so it will reduce the RFC calls in ur Model. Because for each model

will communicate the R/3 each time.So u can use No of Bapis in a single model.

Regards,

Ramganesan K.

former_member189631
Active Contributor
0 Kudos

Dresen,

U can Use Number of BAPIs in SINGLE MODEL...

While creating the model itself the system will displays all available

BAPIs and RFC Fms . So here You can choose all Bapis which u want

to use in projects.Instead of using one model for each BAPI u can use no of Bapis in a single model Itself. In your case it will reduce the complexity.

Regards,

Ramganesan K.

former_member189631
Active Contributor
0 Kudos

Hi Dresen,

Are you Using the same R/3 System for all models to fetch the data ?

Regards,

Ramganesan K

Former Member
0 Kudos

yes same r3 system