Skip to Content
author's profile photo
Former Member

hi

hi can any one tell how can i make parameters mandatory or upon clicking a radio button i have to get value in the parameter field on the selection screen.

thnks

Vaasu.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 08:10 AM

    Hi Vaasu

    for mandatory:

    parameter: p_werks LIKE t001w-werks OBLIGATORY.

    at selection-screen.

    if r1 = 'x'.

    p_werks = '000000001'.

    endif.

    reward points to all helpful answers

    kiran.M

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi, i have 3 blocks in a selection screen the question wat i raised is related to one particular block in that case how we can change the screen.

      thnks

      Vaasu.

  • Posted on Aug 22, 2007 at 08:16 AM

    Instead you can do it this way.

    <b>Check the sample code now</b>

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
    PARAMETERS : p_r1 RADIOBUTTON GROUP r1 DEFAULT 'X' USER-COMMAND r1.
    PARAMETERS : p_r2 RADIOBUTTON GROUP r1.
    PARAMETERS : p_r3 RADIOBUTTON GROUP r1.
    PARAMETERS : a(10) TYPE c.
    PARAMETERS : b(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
        IF p_r3 = 'X'.
          IF screen-name = 'A' OR
             screen-name = 'B'.
            screen-required  = 1.
            a = 'Gopi'.
            b = 'Narendra'.
            MODIFY SCREEN.
          ENDIF.
        ELSE.
          IF screen-name = 'A' OR
             screen-name = 'B'.
            screen-required  = 0.
            CLEAR: a,b.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Regards

    Gopi

    Message was edited by:

    Gopi Narendra

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 11:21 AM

    Hi Vasu,

    Please go through this , I am sure u will get usefull information.

    Parameters

    Parameters helps one to do dynamic selection

    Parameters can accommodate only one value for one cycle of execution of the program

    Syntax

    Defining parameters as a data type

    Parameters p_id(30) type c.

    Defining parameters like a table field.

    Parameter p_id like <table name>-<field name>.

    Parameters can be Checkboxes as well as Radiobuttons.

    Parameters p_id as checkbox.

    Parameters p_id1 radiobutton group <group name>.

    Parameters p_id2 radiobutton group <group name>.

    Parameters can be listbox.

    Parameter p_id like <table name>-<field name> as listbox.

    <b>Select-Option</b>

    A Select-Option is used to input a range of values or a set of values to a program

    Syntax

    Defining Select-Option like a field of a table.

    Select-Options s_vbeln for vbak-vbeln.

    A select-option can be made to look like a parameter. Following is the syntax

    select-options s_vbeln for vbak-vbeln no intervals no-extension

    Note that in the above case only a single value can be entered in the select-option.

    One might want to make it necessary to input some values for the execution of the program. In such a case the following addition is used

    Obligatory

    e.g Parameters p_id like vbak-vbeln obligatory

    Select-options s_vbeln for vbak-vbeln obligatory

    You can specify a default value to both a Parameter and a Select-Option with the following addition

    Default <value>

    E.g. Parameters : p_date TYPE sy-datum DEFAULT sy-datum. Select-options s_date for sy-datum default sy-datum.

    You can hide a parameter , select-option with NO-DISPLAY addition

    E.g. PARAMETERS d TYPE spfli-carrid no-display.

    Select-options s_vbeln for vbak-vbeln no-display .

    Add comment
    10|10000 characters needed characters exceeded