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

Dialog Programming

Former Member
0 Likes
609

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
Read only

Former Member
0 Likes
571

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
Read only

Former Member
0 Likes
571

Hi,

in PBO you can set default value

PBO

screen-field1 = 'TEST'.

Regards

amole

Read only

Former Member
0 Likes
571

In the PBO have a flag called F_INITIAL.

IF F_INITIAL IS INITIAL.

Populate the default values.

F_INITIAL = 'X'.

ENDIF.

Regards,

Ravi

Read only

Former Member
0 Likes
572

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.

Read only

0 Likes
571

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