09-29-2006 9:55 AM
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
09-29-2006 10:09 AM
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.
09-29-2006 10:01 AM
Hi,
in PBO you can set default value
PBO
screen-field1 = 'TEST'.
Regards
amole
09-29-2006 10:03 AM
In the PBO have a flag called F_INITIAL.
IF F_INITIAL IS INITIAL.
Populate the default values.
F_INITIAL = 'X'.
ENDIF.
Regards,
Ravi
09-29-2006 10:09 AM
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.
09-29-2006 10:35 AM
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