Skip to Content
avatar image
Former Member

Parameters Obligatory

Hi experts,

I have defined 3 parameters on my selection screen one of this one like checkbox

when populate this checkbox, trhe other 2 parameters must stop being obligatory someone can indicate me if it is possible to realize this?

regards.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • May 26, 2008 at 03:55 PM

    When you want to do so, make these fields not mandatory in the coding at first, so do NOT use

    parameters: p_one type c OBLIGATORY.

    At selection screen, event check if checkbox is initial or not. IF initial, create error message, saying that input fields should be filled first.

    If checkbox is not initial, don't raise error message.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 26, 2008 at 04:29 PM

    u can do this with..

    At selection screen output.

    If p_check = 'X'.

    "" here u validate the other parameters if are initial put a message error

    endif.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 26, 2008 at 04:55 PM

    hi check this but this is not the exact case but u can do like this...but i think u cannot do this with the obligatory statement ..

    parameters:p_c as checkbox,

    p_test1 type i,

    p_test2 type i.

    AT SELECTION-SCREEN OUTPUT .

    loop at screen.

    if p_c = 'X'.

    if screen-name = 'P_C'.

    if p_test1 = ' ' and p_test2 = ' ' .

    message E000 with 'the two parameters must be obligatory'.

    endif.

    endif.

    endif.

    endloop.

    regards,

    venkat

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 26, 2008 at 05:01 PM

    Hi Rodolfo,

    Create a logic that if the checkbox is ticked, then paramtext1 should not be initial and paramtext2 should not be initial.

    if checkbox is initial.

    if paramtext1 = space.

    message e001 'Parameter 1 in blank!'.

    exit.

    endif.

    if paramtext2 = space.

    message e002 'Parameter 2 in blank!'.

    exit.

    endif.

    endif.

    Hope this helps.

    Benedict

    Add comment
    10|10000 characters needed characters exceeded