cancel
Showing results for 
Search instead for 
Did you mean: 

Send data from Abap to Webdynpro

Former Member
0 Kudos

Hello,

I want to do a simple exercise. I created a Webdynpro with one view. In the component controller I have one node with one attribute, a material( type Matnr ). I set it to be Read only.

I have also an Abap program where i select a material.

I want to send the material to the webdynpro so when i test the webdynpro, the material will appear in the view. How do i bind the material from the Abap program to the webdynpro?

Thank you very much,

Efren

Accepted Solutions (0)

Answers (1)

Answers (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Efren,

There are two ways to do that:

one way is to use SAP shared memory, go through below blog:

http://wiki.sdn.sap.com/wiki/display/WDABAP/SharedObjects-PassvaluefromABAPscreentoWD+application

and another method is to use WD ABAP application parameter, Just declare a parameter of type MATNR in WD ABAP application parameter tab. In the application URL you would be able to see that parameter, while calling that WD ABAP application just fill the value against that parameter in the URL.

Hope it will help.

Regards,

Vaibhav

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Be careful with the shared memory approach. From my comment in the linked wiki entry:

This approach is actually not that reliable. In post production servers you have more than one application server. When the WDA application opens, due to load balancing there is no guarantee that the user session for the WDA application will be on the same application server as the originating SAPGUI screen (or whatever your original process was).

Share memory objects exist in the global memory of the application server. They do not cross application servers. Unless you use some RFC based tricks to propigate your shared memory objects across all application servers, you will likely find that this approach fails some times in production systems with multiple application servers.

I would instead suggest passing small amounts of information via URL parameters. For larger amounts or data types that can't easily be converted to strings, you should consider writting the data into the database temporarily (perhaps as a server cookie). This is the only way to ensure persistence in a multiple application server environment.

Former Member
0 Kudos

I do not want to fill manually the value. I read about the SAP shared memory. I will try it out.

I found a solution. I fill a dictionary table when i run the Abap program with the material data and i read the table in the web dynpro. What do you think?

gill367
Active Contributor
0 Kudos

I do not want to fill manually the value. I read about the SAP shared memory. I will try it out.

>

> I found a solution. I fill a dictionary table when i run the Abap program with the material data and i read the table in the web dynpro. What do you think?

That is fine Efren,

fill the table in the abap program and read the value in the web dynpro.

or you can use the URL parameter thing and read the parameter in the handledefault method of the WD window.

thanks

sarbjeet singh