2008 Jul 23 11:55 AM
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
2008 Jul 23 12:06 PM
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.
2008 Jul 23 12:06 PM
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.
2008 Jul 23 12:28 PM
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
2008 Jul 23 12:36 PM
OK that works so far.
Thank you.
You both got points... hope this is ok
2008 Jul 23 12:44 PM
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?
2008 Jul 23 12:58 PM
Hi,
Check which field you are clearing,
Is it the screen fields or the work area in your programs
reagards
prasanth
2008 Jul 23 1:17 PM
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
2008 Jul 23 1: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