Application Development 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: 

Dialog Programming

Former Member
0 Kudos

Hallo,

how can i initialize fields with default values?

The program is not a selection-screen. It is a dynpro.

The initialization should only work once (only at the beginning of the program).

If i have a selection-screen i would use "initialization".

regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Keep a flag to check whether it is beginning of hte program or not.

In PBO,

if v_flag = ' '.

v_field = 'Value'.

v_flag = 'X'.

endif.

Regards,

Sailaja.

4 REPLIES 4

Former Member
0 Kudos

Hi,

in PBO you can set default value

PBO

screen-field1 = 'TEST'.

Regards

amole

Former Member
0 Kudos

In the PBO have a flag called F_INITIAL.

IF F_INITIAL IS INITIAL.

Populate the default values.

F_INITIAL = 'X'.

ENDIF.

Regards,

Ravi

Former Member
0 Kudos

hi,

Keep a flag to check whether it is beginning of hte program or not.

In PBO,

if v_flag = ' '.

v_field = 'Value'.

v_flag = 'X'.

endif.

Regards,

Sailaja.

0 Kudos

Hi,

that's what many developers do: Set a flag in the PBO after initializing, initialize only if the flag is initial.

You can have the same without flag if you do it using the event LOAD-OF-PROGRAM. This works like initialization in programs with selection-screen but it can be used in function groups and module pools as well.

Regards,

Clemens