on 03-08-2011 8:52 AM
Hi all, does anyone know how to call function 'RH_GET_DATE_DAYNAME' in WDDOINIT?
Regards,
YC
hi,
u can use the code wizard(control+F7) for the same,it is the same as you do in normal ABAP functions..
regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all, thanks for your advice and I'm a little bit confuse. So far I know there are three approach to call function in web dynpro. This first one is call using Pattern, second is Code Wizard, and the third one is using Service Call. But what is the differences between them? Thanks.
Regards,
Calvert
Hi YC,
see.. for example you have some FM or BAPI or Class method already there, now that you want to use in webdynpro,
so by using SERVICE CALL option you can use this.
Generally, WD is MVC pattern, so bussiness logic statements like SELECT, MODIFY, INSERT like commands directly
not use in webdynpro methods, for this we create any FM or Class method and use those FM in webdynpro using
SERVICE CALLS.
Check this example for your understand..
http://wiki.sdn.sap.com/wiki/display/WDABAP/WebdynproApplicationtocalltwoBAPIsfordisplayingtheFlightdetailsusingtab+strips
And read this..
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a189b0ee583b8be10000000a421937/frameset.htm
->using CALL FUNCTION you can call any FM in webdynpro abap.. same works with pattern too.
Cheers,
Kris.
Edited by: kissnas on Mar 9, 2011 7:00 AM
Hi
you can create a service call for the FM.
for this
right click on the web dynpro comp.
then choose create -> serivc call.
continue .
then choose existing controller and click continue.
select function module radio button and continue
give the FM name and continue
then make the import and export parameter either context or attirbute.
continue and finish .
then one method will be created with name execute_<FM name> in the comp controller.
also there will be correspongind context attribute created.
fill those attributes and call this method in the wddoinit.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi YC,
Just put curson in wddoint method click on pattern .. give FM name ..yo get FM
CALL FUNCTION 'RH_GET_DATE_DAYNAME'
EXPORTING
LANGU =
DATE =
CALID =
IMPORTING
DAYNR =
DAYTXT =
DAYFREE =
EXCEPTIONS
NO_LANGU = 1
NO_DATE = 2
NO_DAYTXT_FOR_LANGU = 3
INVALID_DATE = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.