cancel
Showing results for 
Search instead for 
Did you mean: 

How to share data between 2 different WDA application

Former Member
0 Kudos

Hi friends,

I have a requirment to share data between 2 different WDA application, let me explain you more...when user clicks on the button(Search)..I have to shoe the results in a separate WDA application(not a popup)..I did the same thing in WD JAVA using XML and JAVA Bean concept by sharing the data over the session object.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry friends,I haven't explained my requirement completely....and when the user selects a record from the search results of the External window that record should placed to the search input of the main WDA application.

Please share your thoughts to solve this.

Thanks in advance

Regards

Rajesh

former_member196213
Active Participant
0 Kudos

Hi,

     About a year back we a had quite similar situation after breaking our heads. We ended using export to memory id and then reading into other. In our case it was an R3 program sending data to WDA.

     If it comes to last choice, you can use export to memory id from the search result, and then import it into your. We have also placed a check for sy-uname so that not multiple people should dive into that memory at a time.

     Good Luck

     HAPPY ABAPing

Former Member
0 Kudos

1. Create a custom class (zcl_data_share) and in the attributes define a static attribute(ls_context_first_webdynpro) of type ref to IF_WD_CONTEXT_NODE.

2. In your  first WDA, assign your context that you want to share, to this attribute.

zcl_data_share=>ls_context_first_webdynpro  =  WD_CONTEXT .

3. Now, in your second WDA you can access the context of the first WDA using the standard get/set methods of the context interface on zcl_data_share=>ls_context_first_webdynpro.

This works fine, but I am not sure whether it is the best way to achieve this.

I have used the whole context, you can also share the data in internal table/ Variables.

Also, check the following blog on Singleton pattern http://scn.sap.com/community/web-dynpro-abap/floorplan-manager/blog/2010/08/23/abap-class-using-sing...

RicardoRomero_1
Active Contributor
0 Kudos

Hi Raj,

Why do you need two different browser windows?

If this is your scenario I dont know the solution, you can pass data to the second application with a parameter, or saving the data in a temporary dictionary table, but how to return the value to the first one? you need an event or something to react in the first application.

I think you can not pass the data to an external window from the first application using Export to memory, because is session-specific, instead using Abap Memory, you can use SAP Memory (GET/SET) wich works with different sessions. Both are user-specific, so you don't need to check the user. But have the same problem, how to return the data.

The solution of Upendra is good, is used a lot in FPM, but I don't know if it will work in your scenario, because each session has a diffente singleton instance... try and tell us...

What I would do if I were you is add the second component as used component in the first one and call to it as a popup. In this way you can use interface nodes and is easy to share data.

Regards,

Ricardo.

Former Member
0 Kudos

Hi Upendra,

Thanks for the suggestion, right now am working on some other priority work .i.e. generating hierarchy at design time and also runtime.

Kindly help me if you have any idea on that,i posted my issue in sdn.

your suggestion are most appriciatable.

Regards

Rajesh

Former Member
0 Kudos

Hi Upendra,

Sorry for the intteruption, i have a requirement I need your help ..

I have a XML file in my MIMES folder  , to this XML I need to pass data which get from FM...how I can access and how can I update the XML in MIMES.I posted in SDN no replies yet.

Thanks in advance

Regards

Rajesh

Answers (0)