on 02-02-2012 2:48 PM
Hi,
I have a Webdynpro application and I need to call this application from a ABAP program, sending a value from this program.
How can I call a Webdynpro and how send a parameter?
Thanks,
Martina.
Edited by: Gerle Martina on Feb 2, 2012 3:48 PM
Hi harshith_reddy,
thanks for your quick answer. Your code was very helpful!
But I still have problems with the parameters.
You sent me this link:
http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoreadURLparametersinWebDynprofor+ABAP
I built a function that opens a webdynpro application. In this webdynpro application i want see a table with all data sets, for example with the number '123' from another table. This number is a input parameter from my function and i wrote the parameter in the url.
But where at my webdynpro application am i able to pick out this parameter?
And is the methode 'HANDLEDEFAULT' from the sap wiki a methode from an inbound plug?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For reading application parameters check this
http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoreadURLparametersinWebDynprofor+ABAP
Regards
Srinivas
Hi Gerle Martina,
Pass your url parameter with name str and In the window find the eventhandler HANDLEDEFAULT
and declare importing parameter with same name as 'STR type string' and implement following code.
methodHANDLEDEFAULT.
data : value type string.
CALL METHOD wdevent->get_string
EXPORTING
name = 'STR'
receiving
value = value.
ENDMETHOD.
you have different methods in the class cl_wd_custom_event. You can use them depending on data type.
My problem is solved.
Thanks to all of you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>
> I have a Webdynpro application and I need to call this application from a ABAP program, sending a value from this program.
>
> How can I call a Webdynpro and how send a parameter?
>
> Thanks,
> Martina.
>
> Edited by: Gerle Martina on Feb 2, 2012 3:48 PM
hi,
Create a t-code for your application in wda and then use
call transaction 'TRANSACTION '.
Hope it helps
Regards,
Sahai.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know upto calling a webdynpro application from abap.
But not sure how to send parameters to it, i will be watching this thread for answer as well.
Go to Transaction SE93 ,and create a new transaction,(Transaction With Parameters)
In Default value tab, Give Transaction as "WDYID", tick skip initial screen.
and in the table
Name of the screen Field Value
APLLICATION <your_wed_dynpro_application_name>
STARTMODE <its optional> (Give 'GUI')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerle,
This code opens a WD application from ABAP
DATA:gv_url_string TYPE string,
gv_url_c TYPE string.
* gv_url_c(250) TYPE c.
CONSTANTS:gc_login_auth TYPE string VALUE '?sap-system-login-basic_auth=X',
gc_client TYPE string VALUE '&sap-client=',
gc_lang TYPE string VALUE '&sap-language=',
g_browser type string value 'INTERNET EXPLORER'.
***Get the Url of Webdynpro Applicaion with HTTPS Protocol
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'ZWDA' "your component name
in_protocol = 'HTTPS'
IMPORTING
out_absolute_url = gv_url_string.
***If the server and port have not got added, try without HTTPS Protocol
IF gv_url_string CS '//:/'.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'ZWDA'
IMPORTING
out_absolute_url = gv_url_string.
***If server and port have still not got added
IF gv_url_string CS '//:/'.
**Raise a Error Message
ENDIF.
ENDIF.
***Build the URL
CONCATENATE gv_url_string
gc_login_auth
gc_client sy-mandt
gc_lang sy-langu
INTO gv_url_c.
****Call the Browser
*CALL FUNCTION 'CALL_BROWSER'
* EXPORTING
* url = gv_url_c
* EXCEPTIONS
* frontend_not_supported = 1
* frontend_error = 2
* prog_not_found = 3
* no_batch = 4
* unspecified_error = 5
* OTHERS = 6.
To pass parameter to WDA add the parameter to the url and follow the link to retrieve it in Webdynpro application
link : http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoreadURLparametersinWebDynprofor+ABAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.