Skip to Content
author's profile photo
Former Member

Doubt in selection screen

hai friends,

i have doubt in selection screen when validation check in another screen.

this is my scenario.

SELECTION-SCREEN: BEGIN OF BLOCK box1,

PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT 'X',

r2 RADIOBUTTON GROUP rad1,

r3 RADIOBUTTON GROUP rad1.

BEGIN OF BLOCK box1.

*****************

SELECTION-SCREEN: BEGIN OF SCREEN 1200,

BEGIN OF BLOCK blk2,

PARAMETERS : p_ccode TYPE bkpf-bukrs, p_fyear TYPE bkpf-gjahr DEFAULT '',

p_pperd TYPE bkpf-monat DEFAULT ''.

SELECTION-SCREEN: END OF BLOCK blk2,

END OF SCREEN 1200.

****************

like 1200 screen i have 5 screens number as 1300,1400,1500..

*****************

start-of-selection.

if r1 = 'x'.

call selection-screen 1200.

elseif r2 = 'x'.

call selection-screen 1300.

***like that i am calling all screens.

endif.

now my problem is how to validate the parameters p_ccode,p_fyear,p_pperd .

please work on with this example after that tell me the correct one, if that one will ok means i assure, you get full points. ok,

best of luck in advance.

by maran.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • author's profile photo
    Former Member
    Oct 03, 2005 at 12:54 PM

    Hi

    You can use the event AT SELECTION-SCREEN, but before checking parameters you should check the number of screen is running:

    AT SELECTION-SCREEN.

    CASE SY-DYNNR.

    WHEN '1000'.

    WHEN '1200'.

    IF P_CCODE = .....

    MESSAGE....

    ENDIF.

    IF p_fyear = ....

    ENDIF.

    IF p_pperd = ....

    ENDIF.

    WHEN '1300'.

    .........

    ENDCASE.

    Max

    Message was edited by: max bianchi

    Message was edited by: max bianchi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 03, 2005 at 12:59 PM

    hai,

    pls try it in this way iam pasting my code which is working fine

    SELECTION-SCREEN: BEGIN OF BLOCK box1.

    PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT 'X',

    r2 RADIOBUTTON GROUP rad1,

    r3 RADIOBUTTON GROUP rad1.

    SELECTION-SCREEN:end of BLOCK box1.

    SELECTION-SCREEN: BEGIN OF SCREEN 1200,

    BEGIN OF BLOCK blk2.

    PARAMETERS : p_ccode TYPE bkpf-bukrs,

    p_fyear TYPE bkpf-gjahr DEFAULT '',

    p_pperd TYPE bkpf-monat DEFAULT ''.

    SELECTION-SCREEN: END OF BLOCK blk2,

    END OF SCREEN 1200.

    at SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.

    if r1 = 'X'.

    call selection-screen 1200.

    elseif r2 = 'x'.

    call selection-screen 1300.

    ***like that i am calling all screens.

    endif.

    start-of-selection.

    at selection-screen .

    if sy-dynnr = '1200'.

    if p_ccode is initial or p_fyear is initial or p_pperd is initial .

    message e000(ez).

    endif.

    endif.

    pls come back if any doubts.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HAI KUMAR,

      i want to give the message as <b>system message</b> and also after the message the action should be STOP will be raised.

      at the time the control directly go to start-of selection and point to call selection-screen statement again after that system raise abort message and terminate the program. i hope you will get the actual problem.

      thank you for the reply and i hope you will return soon with another idea.

      by from Maran

  • author's profile photo
    Former Member
    Oct 03, 2005 at 01:01 PM

    Hi Elam,

    Dont use start of selection -

    Instead try this -

    SELECTION-SCREEN: BEGIN OF BLOCK box1 .

    PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT 'X' user-command MOD ,

    r2 RADIOBUTTON GROUP rad1,

    r3 RADIOBUTTON GROUP rad1.

    selection-screen end OF BLOCK box1.

    *****************

    SELECTION-SCREEN BEGIN OF SCREEN 1200.

    selection-screen BEGIN OF BLOCK blk2.

    PARAMETERS : p_ccode TYPE bkpf-bukrs, p_fyear TYPE bkpf-gjahr DEFAULT '',

    p_pperd TYPE bkpf-monat DEFAULT ''.

    SELECTION-SCREEN END OF BLOCK blk2.

    selection-screen END OF SCREEN 1200.

    ****************

    *like 1200 screen i have 5 screens number as 1300,1400,1500..

    *****************

    at selection-screen .

    if r1 = 'X'.

    call selection-screen 1200.

    elseif r2 = 'X'.

    call selection-screen 1300.

    ***like that i am calling all screens.

    Now you can valid screen elemnts of 1200, 1300 as normal.

    Anothe alternative would be Tabbed Blocks on selection screen. See F1 help on selection screen.

    Cheers

    Cheers.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 03, 2005 at 01:03 PM

    hi,

    try with this

    p_ccode,p_fyear,p_pperd

    at selection-screen on P_ccode

    if p_ccode <> xxxx

    error message

    endif.

    at selection-screen on p_fyear

    if p_fyear <> xxxx

    error message

    endif.

    at selection-screen on p_pperd

    if p_pperd <> xxxx

    error message

    endif.

    cheers,

    sasi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 03, 2005 at 01:08 PM

    This looks like working somehow.

    SELECTION-SCREEN: BEGIN OF BLOCK box1.

    PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT 'X',

    r2 RADIOBUTTON GROUP rad1,

    r3 RADIOBUTTON GROUP rad1.

    SELECTION-SCREEN END OF BLOCK box1.

    SELECTION-SCREEN: BEGIN OF SCREEN 1200,

    BEGIN OF BLOCK blk2.

    PARAMETERS : p_ccode TYPE bkpf-bukrs,

    p_fyear TYPE bkpf-gjahr DEFAULT '',

    p_pperd TYPE bkpf-monat DEFAULT ''.

    SELECTION-SCREEN: END OF BLOCK blk2,

    END OF SCREEN 1200.

    at selection-screen on radiobutton group rad1.

    if r1 eq 'X'.

    call selection-screen 1200.

    endif.

    at selection-screen on p_fyear.

    if p_fyear ne '2005'.

    message 'Enter only 2005' type 'E'.

    endif.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 03, 2005 at 01:25 PM

    SELECTION-SCREEN: BEGIN OF BLOCK box1.

    PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT 'X',

    r2 RADIOBUTTON GROUP rad1,

    r3 RADIOBUTTON GROUP rad1.

    SELECTION-SCREEN:end of BLOCK box1.

    SELECTION-SCREEN: BEGIN OF SCREEN 1200,

    BEGIN OF BLOCK blk2.

    PARAMETERS : p_ccode TYPE bkpf-bukrs,

    p_fyear TYPE bkpf-gjahr DEFAULT '',

    p_pperd TYPE bkpf-monat DEFAULT ''.

    SELECTION-SCREEN: END OF BLOCK blk2,

    END OF SCREEN 1200.

    at SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.

    if r1 = 'X'.

    call selection-screen 1200.

    elseif r2 = 'x'.

    call selection-screen 1300.

    ***like that i am calling all screens.

    endif.

    at selection-screen .

    if sy-dynnr = '1200'.

    if p_ccode is initial or p_fyear is initial or p_pperd is initial .

    message e000(ez).

    endif.

    endif.

    start-of-selection.

    write: / 'test'.

    try this if this is not what you were looking for pls give the eaxt requirement

    cheers

    Add comment
    10|10000 characters needed characters exceeded