Selection Screen Depeon Upon Radio Button

How to display Selection Screen depend upon the Radiobutton Flag.
SELECTION-SCREEN BEGIN OF BLOCK OPTION WITH FRAME TITLE TEXT-T01.
PARAMETERS: <b>CUSTOMER</b> LIKE KNA1-LOEVM DEFAULT 'X'
                                 RADIOBUTTON GROUP HIT.
PARAMETERS: <b>VENDOR</b>   LIKE LFA1-LOEVM  RADIOBUTTON GROUP HIT.
SELECTION-SCREEN END OF BLOCK OPTION.
SELECTION-SCREEN SKIP 0.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-T02 .
PARAMETERS    : P_BUKRS TYPE T001-BUKRS DEFAULT 'EIS' OBLIGATORY.
                                      "Company Code
SELECT-OPTIONS:
                S_LAND1 FOR T005-LAND1 DEFAULT 'IT' OBLIGATORY,
                                      "Country
                S_SPMON FOR S031-SPMON,         "Period
          <b>      S_KUNNR FOR KNA1-KUNNR,         "Customer
                S_LIFNR FOR LFA1-LIFNR,         "Vendor</b>                S_STCEG FOR KNA1-STCEG,         "VAT Registration Number
                S_STCD1 FOR KNA1-STCD1,                     "TAX Code1
                S_STCD2 FOR KNA1-STCD2.                     "TAX Code2
SELECTION-SCREEN END OF BLOCK 1.
I want to diaplay <b>S_KUNNR</b> or <b>S_LIFNR</b> depend upon Radiobutton Flag.
Could any body help me.
Thanx in Advance.<b></b><b></b>

You can try this.
report zrich_0001.
tables: t005, s031, kna1, lfa1.
selection-screen begin of block option with frame title text-t01.
parameters: customer like kna1-loevm default 'X'
                 radiobutton group hit  user-command chk.   "<- ADD THIS
parameters: vendor like lfa1-loevm radiobutton group hit.
selection-screen end of block option.
selection-screen skip 0.
selection-screen begin of block 1 with frame title text-t02 .
parameters : p_bukrs type t001-bukrs default 'EIS' obligatory.
* "Company Code
select-options:
s_land1 for t005-land1 default 'IT' obligatory,
* "Country
s_spmon for s031-spmon,
s_kunnr for kna1-kunnr modif id kun, "<- ADD THIS
s_lifnr for lfa1-lifnr modif id lif, "<- ADD THIS
s_stcd1 for kna1-stcd1,                                     "TAX Code1
s_stcd2 for kna1-stcd2.                                     "TAX Code2
selection-screen end of block 1.
*  ADD ALL THIS
at selection-screen output.
  loop at screen.
    if customer = 'X'
        and screen-group1 = 'LIF'.
      screen-active = '0'.
      modify screen.
    endif.
    if vendor = 'X'
        and screen-group1 = 'KUN'.
      screen-active = '0'.
      modify screen.
    endif.
  endloop.
REgards,
Rich Heilman

Similar Messages

  • Creation of selection screen with 2 radio button groups

    Hi All,
    I have following selecton screen to be created:
    1. Radio Button for File
       A. Radio Button for PC File
           - Parameter for PC File Input
       B. Radio Button for UNIX File
           - Parameter for Unix File Input
    2. Radio Button for Material
        - Material Select-Option
    As per above Either of Radio Buttons 1/2 File/Material will be selected.
    If 1(File) Selected Radio Button for PC File/Unix File will be selected, No other radio buttons will be active.
    If 2(Material) Selected Material Select-option input will be given, No other radio buttons will be active.
    How can we write the selection screen code for above design.
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    go through the following example-----
    **************************************INTERNAL TABLE DECLERATION**************************************
    DATA: BEGIN OF ITAB2 OCCURS 0,
             VALUE(250) TYPE C,
             END   OF ITAB2.
    **************************************DATA DECLERATION************************************************
    DATA: PATH LIKE DYNPREAD-FIELDNAME.
    DATA : P TYPE STRING,
           D TYPE STRING.
    DATA : V_DATASET    LIKE FILENAMECI-FILEEXTERN.
    **************************************SELECTION SCREEN***********************************************
    PARAMETERS: V_PATH TYPE RLGRAP-FILENAME DEFAULT 'C:\Documents and Settings\vchaturvedi\Desktop\vijay.txt'.
    PARAMETERS: D_PATH TYPE RLGRAP-FILENAME.
    SKIP 5.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: PC_ONE    RADIOBUTTON GROUP RAD1 DEFAULT 'X',
                PC_OTHER    RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_PATH.
    HELP FOR SEARCHING FILES PATH************************************************
      IF PC_ONE = 'X'.
        CALL FUNCTION 'F4_FILENAME'
         EXPORTING
      PROGRAM_NAME        =  'Z8VIJAY_SHADOWER_COVERSIONDATA'
      DYNPRO_NUMBER       = SYST-DYNNR
           FIELD_NAME          = PATH
         IMPORTING
           FILE_NAME           = V_PATH.
    *******CONVERT IN TO STRING************
        P = V_PATH.
      ENDIF.
    **************************************SELECTION SCREEN VALIDATION***********************************
    AT SELECTION-SCREEN.
      IF V_PATH = ''.
        MESSAGE E014.                    "FILE PATH NOT FOUND!!!!!!!
      ENDIF.
      IF D_PATH = ''.
        MESSAGE E016.                "TARGET FILE NOT FOUND!!!!!!!
      ENDIF.
    *******************FOR DOWNLOAD**********
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR D_PATH.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
      PROGRAM_NAME        = 'Z8VIJAY_SHADOWER_COVERSIONDATA'
      DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME           = PATH
       IMPORTING
         FILE_NAME           = D_PATH.
    ***************CONVERT INTO STRING***********
      D = D_PATH.
    *******************************************MAIN LOGIC************************************************
    START-OF-SELECTION.
      IF P = ''.
        P = 'C:\Documents and Settings\vchaturvedi\Desktop\vijay.txt'.
      ENDIF.
    ******************UPLOAD DATA FROM OTHERS TO INTERNAL TABLE****************
      CALL FUNCTION 'GUI_UPLOAD'
              EXPORTING
                FILENAME                      = P
             FILETYPE                      = 'ASC'
             HAS_FIELD_SEPARATOR           = ' '
             HEADER_LENGTH                 = 0
             READ_BY_LINE                  = 'X'
             DAT_MODE                      = ' '
             CODEPAGE                      = ' '
             IGNORE_CERR                   = ABAP_TRUE
             REPLACEMENT                   = '#'
             CHECK_BOM                     = ' '
           IMPORTING
             FILELENGTH                    =
             HEADER                        =
              TABLES
                DATA_TAB                      = ITAB2
             EXCEPTIONS
               FILE_OPEN_ERROR               = 1
               FILE_READ_ERROR               = 2
               NO_BATCH                      = 3
               GUI_REFUSE_FILETRANSFER       = 4
               INVALID_TYPE                  = 5
               NO_AUTHORITY                  = 6
               UNKNOWN_ERROR                 = 7
               BAD_DATA_FORMAT               = 8
               HEADER_NOT_ALLOWED            = 9
               SEPARATOR_NOT_ALLOWED         = 10
               HEADER_TOO_LONG               = 11
               UNKNOWN_DP_ERROR              = 12
               ACCESS_DENIED                 = 13
               DP_OUT_OF_MEMORY              = 14
               DISK_FULL                     = 15
               DP_TIMEOUT                    = 16
               OTHERS                        = 17
          IF sy-subrc = 1.
           MESSAGE E014.                    "FILE PATH NOT FOUND!!!!!!!
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    ******************************DOWNLOAD DATA FROM INTERNAL TABLE TO OTHERS******************************
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                    =
          FILENAME                        = D
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
        TABLES
          DATA_TAB                        = ITAB2
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF PC_OTHER = 'X'.
    ****************************8FOR ONE SERVER TO ANOTHER************************************************
      OPEN DATASET V_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF SY-SUBRC = 0.
          DO.
            READ DATASET V_DATASET INTO ITAB2.
            IF SY-SUBRC <> 0.
              EXIT.
            ENDIF.
            APPEND ITAB2.
          ENDDO.
        ENDIF.
      ENDIF.
    *********************************PRINTING DATA *********************************************************
      LOOP AT ITAB2.
        WRITE :/5 ITAB2-VALUE.
      ENDLOOP.
    ****do reward if usefull
    Regards,
    vijay

  • At-selection screen output and radio button together

    Hi all,
    I want to make  a screen with radio buttons and a drop down menu on selection screen as soon as I check any button and click on Open from drop down menu the output should come according to the button cheked but the problem is that desired output is not coming.
    Please see if something could be done.
    Thanks,
    Shweta

    Hi,
    Here is the code see y it didnt responds,
    I made ZMENU2 in SE41 with Menu bar as OPEN , also activated buttons BACK and EXIT.
    tables : sscrfields.
    CONSTANTS : buttonselected TYPE c LENGTH 1 VALUE 'X'.
    DATA: ok_code LIKE sy-ucomm.
    SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN ULINE /1(60).
    PARAMETERS: first RADIOBUTTON GROUP rad DEFAULT 'X',
    second RADIOBUTTON GROUP rad,
    third RADIOBUTTON GROUP rad,
    fourth RADIOBUTTON GROUP rad,
    fifth RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK frame1.
    AT SELECTION-SCREEN OUTPUT.
      SET PF-STATUS 'ZMENU2'.
      If first = buttonselected and ok_code = 'OPEN'..
             WRITE 'You selected first button'.
        ELSEIF second = buttonselected and ok_code = 'OPEN'..
            WRITE 'You selected second button'.
        ELSEIF third = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected third button'.
        ELSEIF fourth = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected fourth button'.
        ELSEIF fifth = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected fifth button'.
        ELSEIF ok_code ='BACK'.
           LEAVE PROGRAM.
        ELSEIF ok_code ='EXIT'.
          LEAVE PROGRAM.
      ENDIF.

  • Mandatory fields in the Selection screen if a Radio button in on

    Hi all,
      In my selection screen I have got 2 radio buttons and few select-options and parameters.
    I need to make (date) one select-option as mandatory when the second radio button is checked.
    can you please help me to make this.
    Please send me code if possible.
    Regards,
    Shalem

    Hi
    It's Simple.
    AT SELECTION-SCREEN OUTPUT.
    IF RADIO2 = 'X'.
        IF S_DATE IS INITIAL.
            error message.
        ENDIF.
    ENDIF.
    The above code behave same as the MANDATORY option.
    Regards
    Surya.

  • Hiding selection screen fields upon clicking a button

    Hi .
    I have a requirement like we need to hide and bring back the selection screen fields upon clicking a button( Expand and collapse in the same button) .
    in ABAP Query,we can maintain this,  for the variant we created.
    We need this functionality on the selection-screen presently.
    How to achieve this in the selection -screen?
    Valuale pointers are desparately needful.
    Regards,
    SSR.

    Hi,
    SELECTION SECREEN (P_) Parameter
    (S_) Select Options
    SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001,
    BEGIN OF LINE,
    COMMENT (26) C1 MODIF ID XYZ.
    SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID XYZ NO-EXTENSION .
    SELECTION-SCREEN : END OF LINE,
    BEGIN OF LINE,
    COMMENT (26) C2 MODIF ID XYZ.
    SELECT-OPTIONS : S_MATKL FOR MARA-MATKL MODIF ID XYZ NO-EXTENSION .
    SELECTION-SCREEN : END OF LINE.
    PARAMETERS : R_MATNR RADIOBUTTON GROUP RAD1 DEFAULT 'X'
    MODIF ID ABC USER-COMMAND MAT,
    R_MATKL RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK blk1.
    INITIALIZATION.
    C1 = 'Product Code'.
    c2 = 'Product Group'.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-NAME0(7) = 'S_MATNR' OR SCREEN-NAME0(7) = 'S_MATKL'.
    SCREEN-INPUT = '0'.
    SCREEN-INVISIBLE = '1'.
    ENDIF.
    CASE SCREEN-NAME+0(7).
    WHEN 'S_MATNR'.
    IF R_MATNR = 'X'.
    SCREEN-INPUT = '1'.
    SCREEN-INVISIBLE = '0'.
    ENDIF.
    WHEN 'S_MATKL'.
    IF R_MATKL = 'X'..
    SCREEN-INPUT = '1'.
    SCREEN-INVISIBLE = '0'.
    ENDIF.
    ENDCASE.
    IF R_MATNR = 'X'.
    IF SCREEN-NAME = 'C1'.
    C1 = 'Product code'.
    C2 = SPACE.
    ENDIF.
    ENDIF.
    IF R_MATKL = 'X'.
    IF SCREEN-NAME = 'C2'.
    C2 = 'Product Group'.
    C1 = SPACE.
    ENDIF.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    Hope it helps.
    best regards,
    Nagaraj Kalbavi

  • Calling selection screen depends on radio buttion selection

    I need to call two selection screens (not radio buttons selection screens) depends on radio buttion selection
    Eg :
       R1-radio button
      R2- radio button
    if we select R1- we should get selection screen to enter input values like parameters, select options
       PARAMETERS:     p_abc TYPE    MARA-matnr OBLIGATORY
      SELECT-OPTIONS: s_mno  FOR   MARC- chngr OBLIGATORY.
      PARAMETERS:     p_xyz TYPE     MARA - amktxOBLIGATORY.  (just example)
    If we select R2, we should get selection screen to enter input values like parameters, select options
    PARAMETERS:         p_abcd TYPE    KNA1-matnr OBLIGATORY
      SELECT-OPTIONS:  s_mnop  FOR   VBAK- chngr OBLIGATORY.
      PARAMETERS:        p_xyza TYPE     VBAP - amktxOBLIGATORY  (just example)
    if we select 1 , other should be hide
    Madhu

    Hi,
    this is an example:
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETER R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND SET1.
    PARAMETER R2 RADIOBUTTON GROUP G1 .
    SELECTION-SCREEN BEGIN OF BLOCK B21 WITH FRAME TITLE TEXT-004.
    PARAMETER: P1 LIKE IBIPPARMS-PATH MODIF ID FPA.
    SELECTION-SCREEN END OF BLOCK B21.
    SELECTION-SCREEN BEGIN OF BLOCK B22 WITH FRAME TITLE TEXT-004.
    PARAMETER: P2 LIKE IBIPPARMS-PATH MODIF ID FPB.
    SELECTION-SCREEN END OF BLOCK B22.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: P_CHECK.
    AT SELECTION-SCREEN OUTPUT.
      IF P_CHECK <> 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA' OR
             SCREEN-GROUP1 = 'FPB'.
            SCREEN-INPUT = '0'.
            SCREEN-INVISIBLE = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        P_CHECK = 'X'.
      ENDIF.
      IF R1 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Angelo.

  • To run a report in background in selection screen using a new button

    hi friends iam new member to this site
    nice to meet u all
    i want to run a report in background using the selection screen of the same report and i want to keep a button in application tool bar.
    after enter the values in the selection screen by clicking that button it should move to the screen which we get generally by menu option
    program-->execute in background
    and by entering the output device and start condition it should be scheduled in the background.
    with job_open,job_submit and job_close we need variants.
    for this i tried through bp_jobvariant_schedule and
    bp_jobvariant_overview but with this we can run with variants only
    but the user wants to enter the values in selection screen and need a button to run background
    ok friends i think u understood me
    please inform soon ok bye have a nice time

    Hi Jagadish
       There are two ways for you to handle the situation.
    1. Train the users to enter the values in selection screen and manually go for backgroung scheduling.
    2. Use At user command and within that basing on the option selection selected, use FM:JOB_OPEN with sy-repid get the job number, submit the program with the values on the selection screen and lastly executing FM: JOB_CLOSE with the job number from JOB_OPEN and SY-REPID.
    Note that you have to set 'X' for export parameter something like startimmed while calling FM: JOB_CLOSE for immediate execution. Am not on SAP to give you the exact parameter.
      Hope the above info helps you.
    Kind Regards
    Eswar

  • Sub screen: Handling the Radio button selection?

    Hi,
    Scenario:
    I have a Main screen and a sub screen. From the main screen I am calling the sub screen. On the Sub screen, I have 2 radio button. On the selection of the Radio buttons, I am activating/deactivating few of the screen elements on the sub screen.
    I have grouped the radio button and also tried assigning Function code to it, but in vain..:(
    Issue
    I am not able to handle the event triggered by the selection of the radio buttons?
    Kindly suggest.
    Regards
    s@k

    Hi,
    Are you still have any Issue, Let us know
    In the Main Screen Element List there is a field OK_CODE pass an entry into it
    in the TOP Include
    DATA : OK_CODE type SY-UCOMM. " This captures the OK_CODE from the Screen.
    Since SUb Screen cant have their Own OK_CODE this can be handled in the Main Screen only
    Try in PAI of Sub Screen using OK_CODE if it is not working then Implement the same in PAI of Main Screen
    The system will generate UCOMM for Radio Button since they are in One Group only. Each Radio button cannt have a separate UCOMM assigned. In Screen Painter (if It is Module Pool) assign a FCode for the Radio Button.
    Even if try changing the FCODe Value they still will have the New Changed Value but cannot be changed.
    This automatically triggers PAI . only way to capture it is check
    case ok_code. " Optionally you can omit this
    when  ok_code = 'RAD'.  " This is common for all the Radio BUttons but cant be different
    if r1 = 'X'.
    elseif r2 'X' " Etc.
    endif.
    endcase.
    Ram
    Edited by: Ramchander Krishnamraju on Feb 26, 2010 10:37 AM

  • Display Hide screen elements on radio button select

    Hi all,
    We have requirement to display some elements if radio button 1 is selected and display others elements if radio button 2 is selected .
    All elements should display/hide on radio button click not on any other button .
    <REMOVED BY MODERATOR>
    Regards,
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:34 PM

    Hi,
    Refer the code below:
    *Radiobuttons for selecting single material or range of BOM components
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
    *Radiobutton for selecting material
    PARAMETERS:rb_mat RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1.
    *Radiobutton for selecting BOM components
    PARAMETERS:rb_comp RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    *Enter BOM header and details
    SELECTION-SCREEN BEGIN OF BLOCK sub1 WITH FRAME TITLE text-002.
    PARAMETERS:p_matnr TYPE mara-matnr MODIF ID id1.                 "Material Number
    PARAMETERS:p_werks TYPE marc-werks MODIF ID id1.                 "Plant
    PARAMETERS:p_stlan TYPE mast-stlan MODIF ID id1.                 "BOM usage
    PARAMETERS:p_stlal TYPE mast-stlal MODIF ID id1.                 "Alternative BOM
    PARAMETERS:p_capid TYPE rc29l-capid MODIF ID id1.                "BOM Application
    SELECTION-SCREEN END OF BLOCK sub1.
    *Enter BOM components
    SELECTION-SCREEN BEGIN OF BLOCK sub2 WITH FRAME TITLE text-003.
    SELECT-OPTIONS:s_matnr FOR marc-matnr MODIF ID id2.              "Material Number(BOM component)
    SELECTION-SCREEN END OF BLOCK sub2.
    *Enter document details
    SELECTION-SCREEN BEGIN OF BLOCK sub3 WITH FRAME TITLE text-004.
    *Document number
    PARAMETERS:p_doknr TYPE draw-doknr.
    *Document Type
    PARAMETERS:p_dokar TYPE draw-dokar.
    *Document Part
    PARAMETERS:p_doktl TYPE draw-doktl DEFAULT '000'.
    *Document Version
    PARAMETERS:p_dokvr TYPE draw-dokvr DEFAULT '00'.
    SELECTION-SCREEN END OF BLOCK sub3.
    *Display screen based on selection of radio button
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF rb_mat = 'X'.
          IF screen-group1 = 'ID2'.
            screen-active = 0.
          ENDIF.
        ELSEIF rb_comp = 'X'.
          IF screen-group1 = 'ID1'.
            screen-active = 0.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.

  • ALV report to display data based upon radio button.

    i am new to abap, I have a requirement its like there are three radio buttons , r1 r2 r3  If i click r1 datas of r1 should display
    if i click r2 datas of r1 and r2 should display if i click r3 datas of r1 r2 and r3 should display , its ALV report. Please give me solution.

    Hi
    You can use by having the radio buttons in the same group. For ex i'm stating if want to have r radio buttons for change, display and create and you select it with a push button you can code it as ..
    //////SAMPLE CODE
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: SRCE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: VARIN RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: ATTR RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-006.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: DOCU RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-007.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: TXELE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-008.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(15)  TEXT-009 USER-COMMAND DISPL.
    SELECTION-SCREEN PUSHBUTTON 18(15) TEXT-010 USER-COMMAND CHNGE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK1.
    *PARAMETERS : XXX LIKE T100A-ARBGB MATCHCODE OBJECT YCL_T100A.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'CREAT'.
      MESSAGE I000(YCL_MC01) WITH 'Create'. // or insert your alv code here
    WHEN 'DISPL'.
      MESSAGE I000(YCL_MC01) WITH 'Display'. // or insert your alv code here
    WHEN 'CHNGE'.
      MESSAGE I000(YCL_MC01) WITH 'Change'. // or insert your alv code here
    ENDCASE.
    //////SAMPLE CODE
    In same you can code it.
    Hope this is useful to you.
    Regards
    Vinodh

  • What is the diffrence  between "Key to Select" and "Selected Key" while creating Radio  Buttons?

    While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
    Thanks,
    Vimal

    Hi Vimal,
    Please find my explanation as below
    Key to Select: This is the unique key for each radio button to identify which one is selected
    Selected Key: This holds the "KEY" of selected radio button
    Example:
       Let us say we have 2 radio buttons : Male & Female
         Create a context attribute SELECTED_KEY of type STRING.
         Create an action ON_SELECT for radio button select event
         Now,
         the properties for "MALE" radio button as below
              KEY_TO_SELECT = 'M'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
         The properties for 'Female" radio button as below
              KEY_TO_SELECT = 'F'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
    If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
    check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
    So, the context attribute 'SELECTED_KEY'  gets filled with the key of selected radio button
    Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
    Regards,
    Rama

  • How to disable a lead selected item in a radio button group ?

    Hi,
    I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both.  So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
    Please help.
    Thanks
    Praveen

    Try setting the radio button value of the lead selected button to abap_false/space.

  • I want to execute selection screen by pressing enter button

    Hi,
    I have a requirement like after giveing values in selection screen I want to execute it by pressing enter button not by pressing execute button.
    Please give some sample code if u have any solution.
    Thanks & Regards
    Venkatrami Reddy B

    Hi,
    You can achive this.
    You just need to do all your coding under even AT SELECTION-SCREEN OUTPUT.
    But you have to put a check also say counter.
    Define a variable of type integer and then put the check on the mail block of code (whole program eccept selection screen) as mentioned below.
    IF lv_count > 1.
    program lines..
    ENDIF.
    lv_count = lv_count + 1.
    Regards,
    Raj Gupta

  • Screen changes using Radio-button

    Hi All
    There are 3 blocks on Sel-screen.
    Before that I want 1 more screen which has 3 RB's & depanding on RB's these blocks will be displayed.
    I have to display all 3blocks depanding on RB but some fields are diff in diff blocks.
    Any sample code for that?
    Regards.

    hI
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-015.
      Selection-screen Begin of line.
      PARAMETERS: P_DSPF Radiobutton Group R1 USER-COMMAND Action.
      selection-screen comment 4(15) text-013 for field P_dspf .
      PARAMETERS: P_Edspf Radiobutton Group R1 .
      selection-screen comment 24(15) text-014 for field P_EDSPF .
      PARAMETERS: T_Run Radiobutton Group R1  .
      selection-screen comment 41(25) text-012 for field T_run .
      SELECTION-screen end of line.
      SELECTION-SCREEN END OF BLOCK B3 .
    *Block to select the file for display or extracted
      SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
      selection-screen Begin of line.
      PARAMETER: Master TYPE C  Radiobutton Group ABC .
      "user-commamd filetype.
      selection-screen comment 4(15) text-002 for field master .
      PARAMETER: Newhire TYPE C  Radiobutton Group ABC.
      selection-screen comment 24(12) text-003 for field Newhire .
      PARAMETER: Term TYPE C  Radiobutton Group ABC.
      selection-screen comment 43(15) text-007 for field Term .
      PARAMETER: Rehire TYPE C  Radiobutton Group ABC.
      selection-screen comment 66(15) text-004 for field Rehire .
      selection-screen end of line.
    AT SELECTION -SCREEN OUTPUT .
    PERFORM MODIFY_SCREEN .
    PLEASE FIND THE FORM  BELOW FOR MODIFY_SCREEN.
    FORM MODIFY_SCREEN .
      Loop at Screen .
        IF T_run = ' ' and Screen-NAME = 'P_PATH' .
          SCREEN-input = 0 .
          Modify Screen .
        ENDIF.
        if screen-name  = 'PNPTIMR1'
         or screen-name = 'PNPTIMR2'
         or screen-name = 'PNPTIMR3'
         or screen-name = 'PNPTIMR4'
         or screen-name = 'PNPTIMR5'.
          screen-active = 0.
          modify screen.
        endif.
      ENDLOOP.
    ENDFORM.

  • Radio button field issue in the selection screen

    Hi Folks,
    I am using an LDB(Logical Data Base) of 'PNP' in my custom report and the LDB has a selection screen with different parameters .
    My concern is, the selection screen has 6 Radio buttons from which if I select one from the first 5 Radio buttons the Dates highlighted should clear off, and when I click on Radio Button 'Other Period' the dates should display as shown .
    Note: I am using the ECC 4.6C
    Please suggest any solution to achieve this functionality .
    Thanks,
    Sujay.V

    Hi,
    Consider your radio buttons looks like below:
    PARAMETERS: RADIO1 RADIOBUTTON GROUP R1 MODIF ID RA1, "Today
                               RADIO2 RADIOBUTTON GROUP R1 MODIF ID RA2, "Current Month
                               RADIO3 RADIOBUTTON GROUP R1 MODIF ID RA3, "Current Year
                               RADIO4 RADIOBUTTON GROUP R1 MODIF ID RA4, " Up to today
                               RADIO5 RADIOBUTTON GROUP R1 MODIF ID RA5, "From today
                               RADIO6 RADIOBUTTON GROUP R1 MODIF ID RA6. "Other period
    AT SELECTION-SCREEN.
    IF RADIO1 EQ 'X' OR RADIO2 EQ 'X' OR RADIO3 EQ 'X'
        OR RADIO4 EQ 'X' OR RADIO5 EQ 'X'.
         CLEAR: "Add your date variables here
    ELSEIF RADIO6 EQ 'X'
         ADD Logic for your date variable here
    ENDIF.
    Hope this will help you .
    regards,
    Rajesh Sadula.

Maybe you are looking for

  • Can i replace the screen on a nano 6th

    My nano got wet. it works but has no screen display. How hard is it to replace the screen

  • Classification view

    For Material which i receive from customer i have activated Batch management. I want to give Batch number Externally whenever i receive the material. to identify which material is supplied from which customer. While creating the master data do i have

  • Setup ITouch/ITunes for two PCs - one for home one for travel

    We bought a new itouch for my mom this xmas. I am in charge of setting this up (yikes, the pressure). I want her to have access/main set up on her PC (Windows XP) for daily use, but when they travel, they bring another laptop (Windows XP) that she wi

  • Require Password for Printing to Networked Printer?

    Hi All, I have a HP Color LaserJet 3600n on my network of 4 Airport Extreme Gigabit Routers. It is both connected by USB to the router AND CAT6 Ethernet to the router for a direct network connection. I have 5 computers on the network and i would like

  • Finger print reader probook win 8.1

    i cant find the fingerprint option after i've installed the driver sp66915