cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro application parameters

Former Member
0 Kudos

Hi,

How can i access my webdynpro application parameters inside my view / in WDDOINIT method.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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,

  • par_matnr is the application parameter ( which should also be declared in the HANDLEDEFAULT method of the window as importing parameter )
  • g_matnr is a Component Controller attribute
wd_comp_controller->g_matnr = par_matnr. Regards, Radhika

Former Member
0 Kudos

Hi,

Thanks for your reply. But how can i pass value to this Application parameter from UWL.

Former Member
0 Kudos

Hi Radhika,

Thanks a lot for posting this information, it helped me a lot.

Regards,

Eric

kmoore007
Active Contributor
0 Kudos

Radhika,

Most helpful! Thanks!

kmoore007
Active Contributor
0 Kudos

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

alespad
Contributor
0 Kudos

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 ).

Answers (0)