on 01-20-2014 9:36 AM
Hallo,
is there any method or FM to get the URL of a WD Application only from WD Component Aplication or WD Component Configuration?
Thank you all
Hi,
Use cl_wd_utilities=>construct_wd_url method and pass the WD component name which returns the WDA Application URL.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
i know this methode, but i dont have an Application name, i have only Application configuration,
i have create 2 application/Component configuration for 2 Standart WDA applications,
and now i want generate thise 2 appl configuration with my own configuration, i need a methode that gives the URL only from Application configuration and not application name.
i can give more explanation if needed
regars
Aga
Hi,
Try this code:
DATA : lr_api TYPE REF TO if_wd_component,
lr_app TYPE REF TO if_wd_application,
lr_app_info TYPE REF TO if_wd_rr_application,
lv_app_name TYPE string,
lv_url TYPE string.
lr_api = wd_comp_controller->wd_get_api( ).
CALL METHOD lr_api->get_application
RECEIVING
result = lr_app.
CALL METHOD lr_app->get_application_info
RECEIVING
result = lr_app_info.
CALL METHOD lr_app_info->get_name
RECEIVING
result = lv_app_name.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = lv_app_name
in_protocol = 'HTTPS'
IMPORTING
out_absolute_url = lv_url.
Hope this helps u,
Regards,
Kiran
Hi Agadir,
Parameters names can be passed based on our requirement. We can simply check that by creating an Application Configuration for the component and look out the URL which browser displays. Based on URL we can proceed to pass the Parameters to the Construct_wd_url method. I have given the code based on the url provided by the system and you can also check that.
Hope this could help you.
Regards,
Ravikiran.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Agadir,
You can follow the code suggested by Ravi Kiran K but you need to some corrections as below
data : lt_parameters type TIHTTPNVP,
ls_parametes like LINE OF lt_parameters,
lv_url type string.
clear ls_parameters.
clear lt_parameters.
ls_parametes-name = 'WDCONFIGURATIONID'.
ls_parametes-value = 'Zconfig_id'. " pass your configuration id here
APPEND ls_parametes to lt_parameters.
cl_wd_utilities=>construct_wd_url(
EXPORTING
application_name = 'ZWDA_TEST' " Pass your application name
in_parameters = lt_parameters
out_absolute_url = lv_url
).
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Agadir,
Check out this code.
data : lt_parameters type TIHTTPNVP,
ls_parametes like LINE OF lt_parameters,
lv_url type string.
ls_parametes-name = 'configure_component'.
* ls_parametes-value = 'EN'.
APPEND ls_parametes to lt_parameters.
ls_parametes-name = 'COMP_NAME'.
ls_parametes-value = 'MYTEST'.
APPEND ls_parametes to lt_parameters.
ls_parametes-name = 'CONFIG_ID'.
ls_parametes-value = 'zApp_id'.
APPEND ls_parametes to lt_parameters.
ls_parametes-name = 'CONFIG_TYPE'.
ls_parametes-value = '00'.
APPEND ls_parametes to lt_parameters.
cl_wd_utilities=>construct_wd_url(
EXPORTING
application_name = 'Test'
* in_host =
* in_port =
* in_protocol =
in_parameters = lt_parameters
* in_client =
* in_forward_accessibility_flag =
* namespace = 'sap'
* in_server =
IMPORTING
* out_host =
* out_port =
* out_protocol =
* out_local_url =
out_absolute_url = lv_url
).
WRITE lv_url.
output :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AGADHIR,
you can use this method.....
cl_wd_utilities=>construct_wd_url(
EXPORTING
application_name = ""WD APPLICATION NAME
* in_parameters =
IMPORTING
out_absolute_url = LV_URL ''''GET URL
).
regards
happy chourasia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Happy,
i know this methode, but i dont have an Application name, i have only Application configuration,
i have create 2 application/Component configuration for 2 Standart WDA applications,
and now i want generate thise 2 appl configuration with my own configuration, i need a methode that gives the URL only from Application configuration and not application name.
i can give more explanation if needed
regars
Aga
hi Aga,
I dont know any other method but you can pass application name and application configuration id in
this method only,bcoz url 'll always be same and the application config. id is appended by this method..
you dont need to write append statement...
CL_WD_UTILITIES=>CONSTRUCT_WD_URL( EXPORTING
APPLICATION_NAME = APPL_NAME
IN_PARAMETERS = T_PARAMETERS
iMPORTING
OUT_ABSOLUTE_URL = ABS_URL ).
Hope,this 'll help u ....
regards
happy chourasia
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.