Application Development 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: 

any one help

Former Member
0 Kudos
108

requirement: two radio buttons a and b.

if we select radio button a i want two checkboxes on the same screen.

if we select radio button b i want parameter so that i has to ask the name.

answers can be appriciated by reward points.

with regards,

kps moorthy.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
83
Hi srinivas,

chk this

REPORT ZWOP_TEST1 .

PARAMETERS : P_RAD1 RADIOBUTTON GROUP RAD USER-COMMAND ABC DEFAULT 'X',
             P_RAD2 RADIOBUTTON GROUP RAD.

PARAMETERS : P_CH1 AS CHECKBOX MODIF ID DEF,
             P_CH2 AS CHECKBOX MODIF ID DEF.

PARAMETERS : P_FIELD(25) MODIF ID GHI.

AT SELECTION-SCREEN OUTPUT.

  IF P_RAD1 EQ 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'GHI'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ELSEIF P_RAD2 EQ 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'DEF'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ENDIF.
6 REPLIES 6

Former Member
0 Kudos
83

hi

copy pate the code. here is ur answer



TABLES: eban,
        SSCRFIELDS.

SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
          rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
           p_matnr TYPE eban-matnr MODIF ID g1,
           sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
           str_loc TYPE eban-lgort MODIF ID g4.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.


SELECTION-SCREEN END OF SCREEN 100.



name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.


TYPE-POOLS slis.

* declaration of internal tables and work areas to be used


DATA: BEGIN OF it_pr OCCURS 0,
      banfn TYPE eban-banfn,
      bnfpo TYPE eban-bnfpo,
      loekz TYPE eban-loekz,
      statu TYPE eban-statu,
      ekgrp TYPE eban-ekgrp,
      matnr TYPE eban-matnr,
      werks TYPE eban-werks,
      lgort TYPE eban-lgort,
      preis TYPE eban-preis,
      peinh TYPE eban-peinh,
      END OF it_pr.

DATA: BEGIN OF it_mat OCCURS 0,
      matnr TYPE eban-matnr,
      END OF it_mat.

*DATA:BEGIN OF ITAB1 OCCURS 0,

  DATA: l_answer.



DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF it_fieldcat,
      it_event TYPE slis_t_event,
      wa_event TYPE slis_alv_event.

* declaration of variables to be used

DATA: r_ucomm TYPE sy-ucomm,
      mat_no TYPE eban-matnr,
      len TYPE i VALUE 1,
      count TYPE i VALUE IS INITIAL,
      iflag TYPE i VALUE IS INITIAL,
      iflag1 TYPE i VALUE 0.


DATA :pr_id TYPE sy-repid,
rt_extab TYPE slis_t_extab.

 INITIALIZATION.

  pr_id = sy-repid.

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Former Member
0 Kudos
83

Hi Srinivasa,

First define all the CHECKBOXES and PARAMETERS that you need on the screen.

Now, In the AT SELECTION-SCREEN OUTPUT event,

IF RADIOBUTTON A eq X,

You can LOOP AT SCREEN, and make the PARAMETERS variable as INVISIBLE.

ELSE

You can LOOP AT SCREEN, and make the

CHECKBOXES as INVISIBLE

ENDIF.

Reward points if answer is useful.

Best Regards,

Ram.

Former Member
0 Kudos
84
Hi srinivas,

chk this

REPORT ZWOP_TEST1 .

PARAMETERS : P_RAD1 RADIOBUTTON GROUP RAD USER-COMMAND ABC DEFAULT 'X',
             P_RAD2 RADIOBUTTON GROUP RAD.

PARAMETERS : P_CH1 AS CHECKBOX MODIF ID DEF,
             P_CH2 AS CHECKBOX MODIF ID DEF.

PARAMETERS : P_FIELD(25) MODIF ID GHI.

AT SELECTION-SCREEN OUTPUT.

  IF P_RAD1 EQ 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'GHI'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ELSEIF P_RAD2 EQ 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'DEF'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ENDIF.

Former Member
0 Kudos
83

hi ram how we can make check box and name parameter as visible and invisible.

0 Kudos
83

Hi Srinivasa,

There are screen attributes like

INVISIBLE

ACTIVE

that needs to be set to X or Space accordingly by looping in to the screen.

Please go through the matrix given in the table below that would help you to modify the screen fields dynamically.

http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba70535c111d1829f0000e829fbfe/frameset.htm

Reward points for useful answers.

Best Regards,

Ram.

0 Kudos
83

Hi Srinivasa,

When you loop at screen,

Check

IF NAME of the SCREEN field EQ CHECKBOX (Name that you have given).

SCREEN-INVISIBLE = "X".

Modify SCREEN.

ENDIF.

Similar procedure for other screen fields.

Best Regards,

Ram.