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

regarding issue

selection-screen begin of block b1.

PARAMETERS: r1 RADIOBUTTON GROUP rg1,

r2 RADIOBUTTON GROUP rg1,

r3 RADIOBUTTON GROUP rg1.

selection-screen end of block b1.

data: x type c.

case x.

when r1.

write:/ 'r1'.

when r2.

write:/ 'r2'.

when r3.

write:/ 'r3'.

endcase.

in this i press radiobutton1 i am not gettting to print r1 like wise ,iam not getting when i press r2 i did not get able print r2 ..

pls help this

Thanks

rams

Add comment
10|10000 characters needed characters exceeded

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:03 AM

    Use the modified cod below:

    PARAMETERS: r1 RADIOBUTTON GROUP rg1,

    r2 RADIOBUTTON GROUP rg1,

    r3 RADIOBUTTON GROUP rg1.

    DATA: x TYPE c.

    x = 'X'.

    CASE x.

    WHEN r1.

    WRITE:/ 'R1', 5 r1.

    WHEN r2.

    WRITE:/ 'R2', 5 r2.

    WHEN r3.

    WRITE:/ 'R3', 5 r3.

    ENDCASE.

    -Kiran

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:04 AM

    use START-OF-SELECTION after end of block b1.

    selection-screen begin of block b1.

    PARAMETERS: r1 RADIOBUTTON GROUP rg1,

    r2 RADIOBUTTON GROUP rg1,

    r3 RADIOBUTTON GROUP rg1.

    selection-screen end of block b1.

    <b>START-OF-SELECTION</b>

    data: X type c.

    X = 'X'.

    case X.

    when r1.

    write:/ 'r1'.

    when r2.

    write:/ 'r2'.

    when r3.

    write:/ 'r3'.

    endcase.

    OR USE IF condition

    IF R1 = 'X'.

    write:/ 'r1'.

    ELSEIF R2 = 'X'.

    write:/ 'r2'.

    ELSEIF R3 = 'X'.

    write:/ 'r3'.

    ENDIF.

    Message was edited by: Srikanth Kidambi

    Message was edited by: Srikanth Kidambi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:05 AM

    Hi,

    Use,

    if r1 eq 'X'.
    
    write: / 'r1'.
    
    endif.

    <b>and same for r2 and r3.</b>

    Regards,

    AS

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:06 AM

    Hi Ram,

    Execute with the following code.

    REPORT zes_sample.

    SELECTION-SCREEN BEGIN OF BLOCK b1.

    PARAMETERS: r1 RADIOBUTTON GROUP rg1,

    r2 RADIOBUTTON GROUP rg1,

    r3 RADIOBUTTON GROUP rg1.

    SELECTION-SCREEN END OF BLOCK b1.

    CASE 'X'.

    WHEN r1.

    WRITE:/ 'r1'.

    WHEN r2.

    WRITE:/ 'r2'.

    WHEN r3.

    WRITE:/ 'r3'.

    ENDCASE.

    Reward the points.

    Thanks

    Eswar

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:07 AM

    Hi Ramesh,

    Any specific reasons for using variable x, u can always use the following code.

    IF R1 = 'X'.
    WRITE:/ R1.
    ELSEIF R2 = 'X'.
    WRITE:/ R2.
    ELSE.
    WRITE:/ R3.
    ENDIF.

    Note: always use X in Upper case only.

    Regards:-

    Santosh.

    P.S. Mark usefull answers

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 11:07 AM

    Hi

    U wont get the required output if u write case x. use if statment.Do

    If r1 = 'x'. and so on for f2 and r3.

    or else assign x = 'x'. and then give the case statements.

    Message was edited by: Ganesh Sundarakrishnan

    Add comment
    10|10000 characters needed characters exceeded