on 01-27-2011 6:01 PM
Hi,
I have created a Webdynpro applications and the logic requires calling avrious Function modules.
Do I need to create Service Call for each Function module or call them directly.
It would be great if you can suggest me under what cases I need to opt for Service call
For example, if I use 'RP_CALC_DATE_IN_INTERVAL', do I need to use Service call or call function module directly.
Note: I have searched forums but could not get the correct answer which I want
Thanks!
The Service Call is really meant to be a wizard/time saver. It has the advantage that it can generate matching context nodes/attributes for the interface of the Function Module you are calling. However everything that the service call does can also be created by hand.
Personally I'm not a fan of what the service call wizard generates. Its good as a time saver or for beginners, but I find I prefer to touch up the code it generates anyway. I much prefer to create a nice reusable model class with its own unit test and then consume this model class (with the service call wizard) from WD. This model class might contain one or more function module calls depending upon what logic I need to access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply.
I just need 2 clarifications
-> Is ' Remote Enabled' functionality of Function module has something to do with Service call
i.e. like if Function module is onlt remote enabled go for Service call etc.
-> Will there be any difference in performance if we go for Service call instead of calling FM directly
Thanks
>like if Function module is onlt remote enabled go for Service call etc.
No. The opposite is true in fact. The Service Call Wizard doesn't support remote enabled function modules, only local ones.
> Will there be any difference in performance if we go for Service call instead of calling FM directly
No. As I said, you could write the same code yourself. If you really know what you are doing, you can probably write better code than what the wizard generates.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.