cancel
Showing results for 
Search instead for 
Did you mean: 

Can i restore user entered inputs data on MAIN/home screen, when clicks GO_BACK button?

former_member202077
Participant
0 Kudos

Hello

In my_wda i have 2 views, MAIN and OUTPUT, user enters the inputs on the MAIN / home and expects the results on OUTPUT view, well.

I placed a button on OUTPUT view as GO_BACK_TO_MAIN to navigate back to home screen, but bcz of some reason i am not achieving this navigation by inbound/outbound plugs, the moment user clicks the GO_BACK_TO_MAIN button am just re-launching the my_wda by using the EXIT plug with a URL parameter, working fine.

But, in this case, obviously (bcz we are relaunching the my_wda) the user enetered inputs are wiping pff on  MAIN / home screen, pls. let me know how can retain / restore the user inputs on home screen? do we have any standard SAP's class / function / settings?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

One more addition with suggestion given by ..

You can keep your data at assistant class also.. using wd_assist you can access that data easily..

Hope we are able to help you...

BR

Chans..

former_member184578
Active Contributor
0 Kudos

Hi,

We cannot achieve this using assistance class! As OP is relaunching the application hence the wd_assist will get re-initialized and the data will not be persistent!

Regards,

Kiran

former_member202077
Participant
0 Kudos

Thank you all.

Sharing memory( which is not that perfect in case of multiple users/sessions)

Yes, i saw your article and Thomas Jung remarks.

Hence, can i use below, is it safe / guaranteed?

EXPORT zz_my_itab TO DATABASE indx(st) 'MY_HOME_INPUTS_DATA'?

former_member184578
Active Contributor
0 Kudos

Hi,

The only problem with shared memory is, in case of multi user, let say you(User A) have entered data and read it from shared memory during reload, in the mean time some other user(User B) launches the fresh application for the first time, since you are reading the data initially and if data exists you are setting back to context, the other user's(User B) application will also be filled with the existing data which is not expected as he would like to see an empty view!

This same case is with Export to DB index ( for multi user case!) and data is guaranteed since it is semi-persistent (at DB level).

Hope you understood. And in case of multiple application servers due to load balancing the shared memory is not advisable to use.  The above mentioned multi user scenario is very rare case as you will be deleting data from shared memory after use, it will be fine if you are not worried about multi user case!

If not, you can go for creating temporary DB with user name as one more field( user specific) and read the data for particular user and delete is after use.

Regards,

Kiran

former_member202077
Participant
0 Kudos

Thank you, yes, its multiple user app, hence i will go with passing via URL (not "storing in a Z table" approach, at this moment)

Answers (2)

Answers (2)

former_member184578
Active Contributor
0 Kudos

Hi,

May I know why din't you use plugs to simply navigate back.

And you can achieve this using,

1. Sharing memory( which is not that perfect in case of multiple users/sessions). In onActionResult method read the context data and store in Shared memory. Then in WDDOINT method read the data from shared memory and set back to context. You can check my article for reference of Shared Objects here: http://scn.sap.com/docs/DOC-27396

2.  Create a temporary DB table and in onActionResult read the data from context and store in temporary DB for each user and in WDDOINT method check whether any data exists and load it back to the View. Don't forget to delete the data after use!

Hope this helps u.,

Regards,

Kiran

GirieshM
Active Contributor
0 Kudos

Hi,

My understanding in such a way that when the user fills the main view and navigates to the Output view they can see the output which entered in the main screen. You also have an "Back to main" button, in which the user clicks it has to move to the Main menu with the options entered. If it is the case then, You have to write the code in the Event Handler  "HANDLETO_BACK_TO_MAIN" to read the values of the context.

With Regards,

Giriesh M

former_member202077
Participant
0 Kudos

Thank you, your suggestion will not work in my case, bcz, i assigned a action, say its 'RE_LAUNCH_WDA_ON_CLICKING_OF_GO_BACK' button, and in this OnAction method am just relaunching my_wda, hence its a brand new session technically (but for user, its same session impression), i didn't achieved the navigation via inbound / outbound plugs concept

Than you