on 06-17-2009 2:56 PM
Hi ,
I am trying to pass a parameter 'PERNR' to another Webdynpro Application .
Application1 : Has a table list of 'PERNR' and user selects one of the 'PERNR' and hits a 'GO' button which opens up a new browser 'APPLICATION2' which has the same list of 'PERNR' ( Table ) which should be highlited as the 'PERNR' of App1.
Code in Application 1 :
*Get the relevant values from the table .
call method lo_element->get_attribute
EXPORTING
NAME = 'PERNR'
IMPORTING
VALUE = LV_CHECK
DATA : W_FORM_ACTIONS TYPE STRING.
SELECT SINGLE APPLICATION FROM Z_ACTIONS
INTO W_FORM_ACTIONS
WHERE NOTESEQ = LT_VALUE.
IF SY-SUBRC EQ 0.
CALL METHOD CL_WD_UTILITIES=>CONSTRUCT_WD_URL
EXPORTING
APPLICATION_NAME = W_FORM_ACTIONS
IMPORTING
OUT_ABSOLUTE_URL = STR.
concatenate STR '?' 'PERNR=' LV_CHECK into STR.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window1 = l_cmp_api->get_window_manager( ).
result = l_window1->create_external_window(
url = str ).
result->open( ).
ENDIF.
In the URL am passing the 'PERNR' , but not able to capture in Application2 . Any suggestions or sample code would be helpfull.
thanks,
kumar
issue closed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the target applicaiton, yuo need to use the WIndow handler (HNALDEDEFALUT) where you can declare the PERNR as Impoting.
Now, in that window defalut handle method
pass this pernr to globale variable.
wd_comp_controller->gv_pernr = pernr.
in the source application -
lv_url TYPE string. "URL that you get by passing the applicaiton2 name.
CONCATENATE lv_url '?' 'PERNR=' lv_check '&'
INTO lv_url.
"You might be missing the Ampersand .
Also check wether when you run the applicaiton, that that pernr value is there in URL or not.
Check out this-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/exampleforpassingvaluesfromoneApplicationtoanotherApplicationinWebDynproABAP.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you have 2windos in the second application, then based on the requirement create two applications by for 2 windows. In the 1st application, use the application name that you wnat to have the PERNR value.
You can create 2 applications for two windows by giving the WINDOW name and the DEFAULT plug.
This is where it is going wrong.
while creating the application1, give the window name1 and default plug like wise create for 2nd one also.
Now pass the relevant application name for creating URL in source and handel parameters for this application.
Regards,
Lekha.
User | Count |
---|---|
85 | |
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.