cancel
Showing results for 
Search instead for 
Did you mean: 

Old Value After Edit

Former Member
0 Kudos

Hi,

I have displayed a user data in the second view of a web dynpro application after selecting the user in the first view. I have editted the user's data with SU01.

After editting I have displayed the same user's data in the web dynpro. Unfortunately the old data is seen on the screen.

When I close the Explorer and reexecute the application the right data is seen.

I can't find out the problem.

thanks for your help!

- ferudun

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Ferudun,

I guess that you mean to say that you are modifying the users profile through your web dynpro screen & would like to see the latest updated values when you try to display the users data after editing. I guess that you still keep getting the same data because you are just re-displaying the data from your context node. Try doing it this way.

1) Create a supply function for your context node which you have used to bind to your display elements

2) Within this supply function populate the context node with information about the users profile

3) After you edit the users profile & reflect the changes on to the database. Call the INVALIDATE method of IF_WD_CONTEXT_NODE on this context node. This would result in the supply function getting executed and your context node will get refreshed with the latest set of values from the database. so you would end up with the latest data on your display.

Below is a bit more detailed explanation of how you can use the INVALIDATE method if you haven't done it before:

INVALIDATE is a method of IF_WD_CONTEXT_NODE. So you should first obtain a reference of the context node that you want to invalidate and then call this method using that reference. Suppose you have a node named SFLIGHT in your context node then you first get the reference of that node in to a reference variable like shown below.

data: lr_node type ref to if_wd_context_node.
 
lr_node = wd_context->get_child_node( name = 'SFLIGHT' ).

You then call the invalidate method using the above reference to invalidate the data present in the node SFLIGHT.

lr_node->invalidate( ).

Its pretty simple. I hope that you understood what I meant to explain.

Regards,

Uday

Former Member
0 Kudos

Hi,

let me explain hte case in detail:

WebDynpro SU01

1. Enter username in view_1

2. Display user in view_2, do no action

3. Back to selection screen

4. Edit the user data and save

5. Redisplay the same user's data

  • the fourth step is accomplished with standard SU01 tcode, outside the webdynpro application. the problem arise when the user's data is redisplayed in step 5. the changes made with SU01 do not reflect to the web dynpro application. if I accomplish the fourth step within the webdynpro application everything is OK.

uday_gubbala2
Active Contributor
0 Kudos

Hi Ferudun,

Just check if you can incorporate the earlier suggested supply function logic & call the INVALIDATE method in step 5 when you are trying to re-display the users profile. I understand what you had said about the users profile being updated through the dynpro screen but may be you could just always invalidate & re-fetch the latest copy of data from the database before re-displaying to the user.

Regards,

Uday

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

How do you read the data for the user? Which bapi/function?

You might have buffer problem. Try to use function ADDR_MEMORY_CLEAR.

Regards

Kameliya

Edited by: Kameliya Gicheva on Nov 27, 2008 2:26 PM

Former Member
0 Kudos

Hi,

clear all the internal tables and variables.

and try invalidate( ).

hope above information will be helpfull for u.