Skip to Content
author's profile photo Former Member
Former Member

Dialog Programming

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 09: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 09:01 AM

    Hi,

    in PBO you can set default value

    PBO

    screen-field1 = 'TEST'.

    Regards

    amole

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.