‎2008 Nov 04 10:31 AM
Hello Folks,
I have a requirement where i need to initialize the modulepool screen for first time and those values in the text field can be changed later.
‎2008 Nov 04 10:33 AM
Hi,
In PBO initialize the values.
Suppose.
Zdate-DATE = Sy-datum.
So when you trigger the module pool program automatically the date will be initialized in the I/O field of date.
Cheers!!
VEnk@
‎2008 Nov 04 10:36 AM
Declare a variable in the TOP INCLUDE
DATA w_init TYPE c value 'X'.
In the PBO
IF w_init EQ 'X'.
**Initialize
CLEAR w_init.
ENDIF.
‎2008 Nov 04 10:38 AM
Hi,
You'll have to code the initial values in the PBO section of the module pool program. Double click on the module <name> Output, which would take you to the editor and in between the module ... endmodule statement initialize the screen fields with the appropriate values., such as txtname = '<value>'.
Now when you run your program the screen field input box) will contain the <value> intialized and can be changed at runtime.
Thanks,
Sachin Dargan
‎2008 Nov 04 10:44 AM
Hi Nishant,
As far as I understand you need to initialize the fields only once i.e. when the program in started ...... right????.
And I also assume that the fields on the screen are pointing to the program fields.
For this you need to write your code in 'LOAD-OF-PROGRAM' event.
Define this event in the TOP INCLUDE of the program or the main program.
This event is trigerred only once when your program is loaded for execution.
I hope this helps.
Regards,
Prakash Pandey