Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ModulePool Initialization

Former Member
0 Likes
2,492

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.

4 REPLIES 4
Read only

Former Member
0 Likes
1,123

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@

Read only

Former Member
0 Likes
1,123

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.

Read only

Former Member
1,123

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

Read only

Former Member
1,123

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