cancel
Showing results for 
Search instead for 
Did you mean: 

Pass back Assistance class object from Webdynpro to SAPGUI

Former Member
0 Kudos

Hi All.

I am showing my webdynpro application in SAPGUI.

Now after user presses on a button in the webdynpro, the control passes back to SAPGUI. I am able to pass back parameters in NAme and VALUE.

But I need to pass back the assistance class object back .

It is passed in the structure WDR_NAME_VALUE. In this there is a field OBJECT. I am passing the assistance class object to it.

I debugged and found that the object is passed correctly, however when the control reaches the SAPGUI, the object is initial.

Is it because the object is destroyed as soon as the Webdynpro application passes back control to SAPGUI?

Alternatively, I want to pass back some tables stored in this object. Again, I only have Name and value which are of type string.

I guess I could use DREF which is of type DATA. But I have never done it before.

How could I assign my table to this DREF so that it is available in the other application even if the object is destroyed?

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aishi Sharma,

web dynpro and SAPGUI run in different sessions, objects cannot be passed.

Workarounds /hacks would be:

- usage of Shared objects

- serialize and r/w database

Kind regards,

Silke

Former Member
0 Kudos

Well, thanks Silke.

So can you give me an example of how to pass it via Shared objects? Have never done it before.

Former Member
0 Kudos

Hello Aishi!

Shared objects may not be a very good approach to such a thing as your application server maybe different at a later stage.

The best would be to pass the keys and resconstruct the object at the SAPGUI session.

Regards,

Neha

Former Member
0 Kudos

Thanks Neha. But how to get the keys for the Assistance class? It is created automatically at the start of the application?

Former Member
0 Kudos

Hi Neha. I am still stuck at this problem. How can we reconstuct the Assistance class in the SAPGUI Session?

Former Member
0 Kudos

Ohh...Hmm!!

You can try shared objects if you are absolutely sure if you are going to be in the same Application Server.

Or else, the only way is to store the data in some otehr format while sending requests to server.

It is quite subjective.

Regards,

Neha

Former Member
0 Kudos

Well, thanks again Neha.

But I just figured that the assistance class cannot be shared in buffer. The shared memory flag cannot be set for this class as the framework for shared objects requires that the super class should also have that enabled and it's not done.

I saw that in the parameters table (WDR_NAME_VALUE), there is a column for passing object as well.

However when I pass it from the Webdynpro and when the control comes back to GUI, this object becomes blank, don't know why..

Thanks in adv.

Answers (0)