cancel
Showing results for 
Search instead for 
Did you mean: 

reg : passing values b/w 2 wd applications

Former Member
0 Kudos

Hi,

Can you please help me at this point.

I have 2 WD applications.

WD1u2014displays header data details in a table.

WD2u2014displays item data details in a table.

When I test WD1 u2026header data is being displayed . when I select one record and click a button (get item data) u2026the WD2 should be displayed

In a separate browser ..with the item details for the selected header data.

My question is : how to pass selected values from one Web dynpro app to another WD app ????

Plz note that both the WD App have to be executed in a new browser .

regards

Arjun

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Arjun,

I had created my application so that up on lead selection in the 1st application the corresponding SFLIGHT details would get passed to the 2nd WDA and it would display the relevant details from SBOOK. I created an action for the lead selection & within this method am appending the CARRID, CONNID & FLDATE values to the 2nd applications URL.

CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = 'Z187442_MAIN1_SUBCOMPONEN'
    IMPORTING
      out_absolute_url = lv_url.

  concatenate lv_url '?' 'CARRID=' wa_data-carrid '&'
                         'CONNID=' wa_data-connid '&'
                         'FLDATE=' wa_data-fldate into lv_url.

So now when you call the 2nd application even the required parameters would have been passed on to it.

Now within the 2nd application you would have to receive these passed parameters and code your SELECT so that it would fetch the desired data and bind it to your context node.

1) Go to the inbound plug (which should be DEFAULT generally unless you have renamed it) & double click on it

2) Within the event handler method HANDLEDEFAULT put the desired coding like shown below

METHOD handledefault .
  DATA: lr_node TYPE REF TO if_wd_context_node,
        lt_data TYPE ig_componentcontroller=>elements_sbook.

  select * from sbook into corresponding fields of table lt_data
          where carrid = carrid and connid = connid and fldate = fldate.

  lr_node = wd_context->get_child_node( name = 'SBOOK' ).
  lr_node->bind_table( new_items = lt_data ).
ENDMETHOD.

I have tried it out this way and its working fine. But yes you would be able to see the values being passed in the URLu2026

Regards,

Uday

Former Member
0 Kudos

hi,

solved problem..thx

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Arjun,

You want to call another application from one application and also you have to pass values am i right?

Then use exit plug of first application and add parameters to that plug and then call this plug in the ONAction of view of First application.To receive these parameters in the second application use start up plug of window with same parameter names.

Check the below wiki.

https://wiki.sdn.sap.com/wiki/x/ZgArAg

pranav_nagpal2
Contributor
0 Kudos

Hi Arjun,

>

> I have 2 WD applications.

You have two different WebDynpro components?? If yes i think you can use concept of faceless component here.

regards

Pranav

Former Member
0 Kudos

Hi,

Pls Go thur this [Tutorial|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f]

Regards,

Padmam.