on 05-04-2011 9:14 PM
Hi everyone,
what's the difference between invoking a Service Call or Call Function directly from within a WebDynpro ABAP component to execute a BAPI/Function module?
Thank you.
No difference. The service call is just a wizard. It generates the CALL FUNCTION coding and has the added benefit that it can also generate a matching context node structure. However absolutely everything the service call wizard does can also be done manually without it. It is just a time saver/shortcut.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much to everyone, I've given points to all of you.
However I think that invoking a function through "CALL FUNCTION" is much much faster than through the Wizard. In fact, the wizard generates (depending on the options chosen) nodes in the context that have to be populated (the syntax to use is awkward especially to those having a Java background) before executing the function/bapi whereas invoking a call function requires just a few lines of coding.
So I'll stick to "CALL FUNCTION" next time.
Thans!
Hi
Both works same, creating and using service call is easy, just create and call execute method of component controller from view. your FM will works.
Using call function you have to write some coding, check example..
You can use FM in WD and loops as well. Check below example code, it is working fine.
DATA : HUKEY TYPE BAPIHUKEY-HU_EXID,
wa_hukey TYPE BAPIHUKEY-HU_EXID.
loop at lt_pack_mat into ls_pack_mat.
wa_hukey = ls_pack_mat-HANDLING_UNIT.
MOVE wa_hukey TO hukey.
endloop.
CALL FUNCTION 'BAPI_HU_DELETE_FROM_DEL'
EXPORTING
DELIVERY = del
HUKEY = HUKEY
TABLES
RETURN = Return1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Basically no much difference. Both perform a similar task in terms of execution. However, service call is a time saver compared to Call function as in Call function, I have to everything manually from node to code.
Any further notes from people appreciated.
Cheers,
Santosh Verma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.