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

parameters

How can I assign a default value to a parameter dynamically? like every time i run my program it should generate a default value into that.

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 Jan 29, 2008 at 02:51 AM

    Try using INITIALIZATION or AT SELECTION-SCREEN OUTPUT Events.

    Check below example for some understanding:

    parameters: p_chb as checkbox user-command chb,
                p_text type char15.
    
    at selection-screen output.
       perform get_text.
    
    *&---------------------------------------------------------------------*
    *&      Form  GET_TEXT
    *&---------------------------------------------------------------------*
    form GET_TEXT .
    
      if p_chb is initial.
         p_text = 'NOT CHECKED'.
      else.
         p_text = 'CHECKED'.
      endif.
    
    endform.                    " GET_TEXT
    

    Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 03:23 AM

    Hi,

    u can use initialization event like below.

    parameters : p_date type dats.

    initialization.

    move sy-datum to p_date.

    whenever the rpt is run...........system date becomes default value of p_date.

    Cheers,

    Will.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 03:25 AM

    Hi ,

    Use the initialization event for it .

    In that event get the value of the parameter and then assign the value to it.

    Regards

    Arun

    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.