Skip to Content
author's profile photo Former Member
Former Member

How to refresh (initialize) a Dynpro

Hello experts,

i´am very new in developing SAP Dynpros, before i develeoped BSP, WebDynpro.

But now i have to develope a "normal" SAP application.

I´ve a Dynpro 0100 with 4 fields on it. These 4 fields have their types from dictinonary because of the automatic search help. My problem is: If i leave the window by an exit (leave programm) and jump in the application again, the values in the fields are still there. How can i refresh the values?

Thank you

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 11:06 AM

    Hi,

    Write the code in the PBO to Clear the screenname-fields.

    Sample code:

    MODULE pbo100_status OUTPUT.

    • When transaction is refreshed set the default values

    loop at screen.

    if screen-name = 'FIELD1'.

    IF myscreen-field1 IS NOT INITIAL.

    CLEAR myscreen-field1.

    ENDIF.

    ENDIF.

    endloop.

    regards,

    rama.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 11:44 AM

    I am sorry i was too fast.

    I clear the window by exiting and on loading.

    In debugger the value is empty after clearing both times.

    In PBO the value of the field is emtpy the whole time i call the application (F5 steps), but when the screen appears the ole value is in the field. How can that be?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hey,

      Just check ifyou are clearing the same fields as that are there on the screen if yes then check if you have written any select query or if you are populating those fields again some where later, to solve your problem it would be best for you to write the clear statement in the last PBO module just before the screen is called.

      Hope this helps,

      Regards,

      RK

  • Posted on Jul 23, 2008 at 11:28 AM

    Hi,

    You can do in two ways.

    In the PBO of the screen

    you can clear all the fields using CLEAR statemmnt

    ( OR )

    In the PAI of the screen

    Under case sy-ucomm

    when 'BACK'.

    clear all the fields

    leave program.

    endcase.

    regards

    prasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 12:06 PM

    Read following blogs you will get clear idea about flow of program

    /people/horst.keller/blog/2004/10/27/abap-geek-4-150-the-mystery-of-submit-unveiled

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.