Skip to Content
avatar image
Former Member

Old Value After Edit

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 26, 2008 at 04:55 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Nov 26, 2008 at 07:48 AM

    Hi,

    clear all the internal tables and variables.

    and try invalidate( ).

    hope above information will be helpfull for u.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 27, 2008 at 09:44 AM

    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

    Add comment
    10|10000 characters needed characters exceeded