on 09-29-2015 11:28 AM
Hi,
Request for help on ABAP WEBDYNPRO URL with Parameter values.
My requirement is:
An email would be sent to the recipients with an unique URL. This URL contains carries certain parameter values.
Clicking on this URL must open my webdynpro application. I need to read the parameter values from this URL and tweak my logic accordingly inside the code.
Could anybody please let me know, :
1. How to set up parameters in webdynpro applications to capture the parameters from the link. Say for example, the URL contains MATNR and MJAHR, in order to read these values, how should the set up be on the webdynpro application.
2. How to read these values and apply the logic in the method HANDLEDEFAULT.
3. Since the URL also has to be created how do i additionally add the parameter to the webdynpro application URL.
Thanks,
Deepak.
Hi Deepak,
Q :- How to set up parameters in webdynpro applications to capture the parameters from the link. Say for example, the URL contains MATNR and MJAHR, in order to read these values, how should the set up be on the webdynpro application.
Ans:- For this you have to define two importing parameter's in the handle default method of the calling window.
If you can define system automatic transfer the both element value in the importing parameter. But ensure that parameter defined in the URL must have same name.
2. How to read these values and apply the logic in the method HANDLEDEFAULT.
I think read logic i have already told you, create two attributes in the Component container and pass the importing value to the Global Container,
3. Since the URL also has to be created how do i additionally add the parameter to the webdynpro application URL.
You don't need to bother about the how URL is generated. When user click the LINK system automatic transfer the parameter to the handle default method.
Thanks
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepak,
You can add parameters to URL as follows :
* Get Web Dynpro Appplication URL
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = '<Your App name>' " Application Name
IMPORTING
out_absolute_url = lv_url.
* Append parameters and values to Web Dynpro Application URL
lv_value = ls_sflight-carrid. " Your Parameter
CALL METHOD cl_http_server=>append_field_url
EXPORTING
name = 'CARRID'
value = lv_value
CHANGING
url = lv_url.
Finally call WD app with parameters
* Call Web Dynpro Application with URL parameters
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = lv_url .
Hope this will help.
Thanks-
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to create the parameters for the HANDLEDEFAULT method or you could use get_data( ) method of wdevent to read all the url parameters.
And you can use method construct_wd_url of cl_wd_utilities to create Url and append parameters to the WDA application.
check the below document for reference which addresses all your queries:
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.