Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CONVERSION REQUIRED..HELP SOON..URGENT

Former Member
0 Likes
944

HELLO. I AM NEW TO SAP.

parameters: date like sy-datum,

division (1) type c.

parameters: r1 radiobutton group rad1,

r2 radiobutton group rad2.

CHANGE THIS TO ABAP.

if r1 ne space.

division = invisible.

elseif r2 ne space.

divisio = visible.

endif.

VITTHAL

HELLO. I AM NEW TO SAP.

parameters: date like sy-datum,

division (1) type c.

parameters: r1 radiobutton group rad1,

r2 radiobutton group rad2.

CHANGE THIS TO ABAP.

if r1 ne space.

division = invisible.

elseif r2 ne space.

divisio = visible.

endif.

VITTHAL

7 REPLIES 7
Read only

Former Member
0 Likes
920

Hi Vitthal,

Try this:

parameters: date like sy-datum,

division(1) type c.

parameters: r1 radiobutton group rad1 default 'X',

r2 radiobutton group rad1.

at selection-screen output.

loop at screen.

if r1 ne space.

if screen-name = 'DIVISION'.

screen-invisible = 1.

screen-active = 0.

modify screen.

endif.

elseif r2 ne space.

if screen-name = 'DIVISION'.

screen-invisible = 0.

modify screen.

endif.

endif.

Regards,

Ravi

Read only

Former Member
0 Likes
920

Hi Vitthal

I am not getting what exactly you are trying to do

do you want when the user choose r1 ..parameter division get invisible and when user choose r2 parameter division get visible??

If so the code will be like this

parameters: date like sy-datum,

division(1) type c.

parameters: r1 radiobutton group rad1 default 'X',

r2 radiobutton group rad1.

at selection-screen output.

loop at screen.

if r1 = 'X'.

if screen-name = 'DIVISION'.

screen-active = 0.

modify screen.

endif.

elseif r2 = 'X'.

if screen-name = 'DIVISION'.

screen-active = 1.

modify screen.

endif.

endif.

endloop.

Thanks

Read only

Former Member
0 Likes
920

Vitthal,

Welcome to SDN Forums.

division (1) type c modif id 'MOD1'.

AT SELECTION-SCREEN.

If r1 ne SPACE.

LOOP AT SCREEN.

IF screen-group1 = 'MOD1'.

screen-invisible = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

else.

LOOP AT SCREEN.

IF screen-group1 = 'MOD1'.

screen-invisible = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
920

Hey ,

I see the same problem in the forum before too.

Here is the solution to it.

Try something like this in the event AT SELECTION-SCREEN or AT SELECTION-SCREEN

OUTPUT (whichever makes sense for what you are doing...)

LOOP AT SCREEN.

If screen-name = division.

if r1 ne space.

screen-invisible = 1.

elseif r2 ne space.

screen-invisible = 0.

endif.

modify screen.

endif.

ENDLOOP.

You may also try adding a statement for screen-input and/or screen output

instead. That way they are still visible, but you can't change them.

Good luck!

Suruchi

Read only

0 Likes
920

Hi

Try this easy code:

PARAMETERS: DATE LIKE SY-DATUM,

DIVISION(1) TYPE C MODIF ID AAA.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X' USER-COMMAND RAD,

R2 RADIOBUTTON GROUP RAD1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'AAA'.

IF R1 = 'X'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Max

Read only

Former Member
0 Likes
920

Hi Vitthal,

You mentioned your radio buttons groups as differently.

If you want to group them, you just mention the group name as the same.


Parameters: r1 radiobutton group g1 default 'X' user-command ucomm,
            r2 radiobutton group g1.

Parameters: Division type c modif id abc.


at selection-screen output.

  if r1 = 'X'.
    loop at screen.
      check screen-group1 = 'ABC'.
      screen-active = 0.
      modify screen.
    endloop.
  endif.

Please do not forget to reward points if my post is helpful to you.

Thanks,

Ramya

Read only

Former Member
0 Likes
920

Hi Vitthal,

Just check this code.

parameters: date like sy-datum,

division(1) type c.

parameters: r1 radiobutton group rad1,

r2 radiobutton group rad1.

at selection-screen output.

if r1 ne space.

loop at SCREEN.

if screen-name = 'DIVISION'.

screen-ACTIVE = 0.

modify screen.

endif.

endloop.

elseif r2 ne space.

loop at screen.

if screen-name = 'DIVISION'.

screen-ACTIVE = 1.

modify screen.

endif.

ENDLOOP.

endif.

This will work..

Regards,

SP.