on 07-30-2009 10:21 AM
Hi,
How can i access my webdynpro application parameters inside my view / in WDDOINIT method.
Thanks
Hi,
Application parameters can be accessed directly only in the Window. To access application parameters in the WDDOINIT of the View carry out these steps:
1. In the HANDLEDEFAULT method of the window, create Importing parameters with same names as that of your application parameter.
2. Now create a attribute in the Component Controller( Component Controller->Attributes Tab; mark it as public )
3. Now in the HANDLEDEFAULT method of the window, assign your application parameter values to the component controller attributes directly as shown below,
wd_comp_controller->g_matnr = par_matnr.
Regards,
Radhika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Candy,
If you mean, how do you pass a parameter in the URL, then you have to create the parameter at the web dynpro application level. Just add the parameter you created on the Component attributes. Then in the URL, at the end of the URL, add your parameter and value like this: &my_param=12345
You can dinamically construct Url with parameters calling method CL_WD_UTILITIES=>CONSTRUCT_WD_URL
DATA: T_PARAMETERS TYPE TIHTTPNVP,
L_PARAMETERS TYPE IHTTPNVP,
APPL_NAME TYPE STRING,
ABS_URL TYPE STRING.
APPL_NAME = 'ZAPPL_NAME'.
L_PARAMETERS-NAME = 'PARAM_NAME1'.
L_PARAMETERS-VALUE = 'value1'.
APPEND L_PARAMETERS TO T_PARAMETERS.
L_PARAMETERS-NAME = 'PARAM_NAME2'.
L_PARAMETERS-VALUE = 'value2'.
APPEND L_PARAMETERS TO T_PARAMETERS.
CL_WD_UTILITIES=>CONSTRUCT_WD_URL( EXPORTING APPLICATION_NAME = APPL_NAME
IN_PARAMETERS = T_PARAMETERS
IMPORTING OUT_ABSOLUTE_URL = ABS_URL ).
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.