How to set selection screen

I have a question that ...
i have 2 options --
when select 1st option , show group1 screen
when select 2nd option, show group2 screen
like the follow ..which is pretty work!....but i have another question that how to set the screen field ..
my question is that if i select group1 screen...i want to set
if S1_EBELN = '' and S1_IHREZ = ''.
    message e398 with 'pls input one of these two options!'.
  elseif S1_EBELN ne '' and S1_IHREZ ne ''.
    message e398 with 'Only one of these two options input is allowed!'.
  endif.
i've tried to insert these statement within the LOOP...but not work ......
so can anyone know how to set?
PARAMETERS:
R1 RADIOBUTTON GROUP OPT1 USER-COMMAND R DEFAULT 'X'.
PARAMETERS:
R2 RADIOBUTTON GROUP OPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC. 
SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC . 
SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .  
SELECTION-SCREEN END OF BLOCK RPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS:  S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.   
SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .   
SELECTION-SCREEN END OF BLOCK RPT2.
IF R1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'DEF'.
        screen-input = '1'.
        SCREEN-required = '1'.
        SCREEN-INVISIBLE = '1'.
        screen-input = '0'.
        screen-output = '1'.
        screen-active = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
ELSEIF R2 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'ABC' .
        screen-active = '0'.
        screen-input = '0'.
        screen-output = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Modified ur code .
tables : ekko, mkpf.
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC.
SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC .
SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .
SELECTION-SCREEN END OF BLOCK RPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.
SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .
SELECTION-SCREEN END OF BLOCK RPT2.
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DEF' .
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
at selection-screen .
if r1 = 'X'.
if s1_ebeln[] is initial and s1_ihrez[] is initial..
message e001(zxx) with 'pls input one of these two options!'.
endif.
if NOT s1_ebeln[] IS initial.
IF NOT s1_ihrez[] IS INITIAL.
message e001(zxx) with 'only one entry in Ebeln or Ihrez is
allowed'.
ENDIF.
ENDIF.
endif.
START-OF-SELECTION.
WRITE:/ 'hi'.
***add on
split the text into two texts .
<b>if NOT s1_ebeln[] IS initial.
IF NOT s1_ihrez[] IS INITIAL.
message e001(zxx) with text-001 text-002.
*'only one entry in Ebeln   = text-001
or Ihrez is allowed'.       = text-002.</b> 
regards,
vijay

Similar Messages

  • How to set selection screen field obligatory dymically

    hi expert,
    i have to make selection screen field obligatory while selecting a check box,i am using the following code can any one help me regards, thanks in advance.....
    PARAMETER:p_user TYPE adr6-smtp_addr ,
              p_check AS CHECKBOX user-command ucomm.
    at SELECTION-SCREEN.
    case sy-ucomm.
    when 'UCOMM'.
      PERFORM set_obligatory.
    ENDCASE.
    FORM set_obligatory .
      LOOP AT SCREEN.
      IF SCREEN-name = 'P_USER'.
      SCREEN-REQUIRED = 1.
       MODIFY SCREEN.
      ENDIF.
      ENDLOOP.
    ENDFORM.                    " set_obligatory

    Hi,
       The following is the sample code.
    PARAMETERS : p_barea TYPE ps0171-barea DEFAULT 'Z1' MODIF ID pb,
                                                " Benefit Area
                 p_imfil TYPE rlgrap-filename,  " Import file name
                 p_lock  TYPE ztx_int-int_name
                   DEFAULT 'ZHBNT06A_METLIFE_INBOUND' MODIF ID pb, " Lock
                p_test  TYPE c AS CHECKBOX,    " Test run
                 p_update type c as checkbox. " default 'X'
    SELECTION-SCREEN END OF BLOCK selb01.
                          AT SELECTION-SCREEN OUTPUT                     *
    AT SELECTION-SCREEN OUTPUT.
    Benefit Area field made display only field
      LOOP AT SCREEN.
        IF screen-group1 EQ 'PB'.
          CLEAR screen-input.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Regards
    Vick

  • How to avoid selection-screen?

    Hi,
    i have this short report:
    TABLES: MARA.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    AT SELECTION-SCREEN.
      IF SY-BATCH = 'X'.
    * how to avoid selection screen
      ENDIF.
    START-OF-SELECTION.
      SELECT * FROM MARA WHERE MATNR IN S_MATNR.
        WRITE: / MARA-MATNR.
      ENDSELECT.
    END-OF-SELECTION.
    in batch i don't want the selection-screen. Is it possible? How can i do this?
    Thanks.
    regards, Dieter

    Dieter Gröhn wrote:
    > Hi,
    >
    > i have this short report:
    >
    >
    > TABLES: MARA.
    > SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    > *
    > AT SELECTION-SCREEN.
    >   IF SY-BATCH = 'X'.
    > * how to avoid selection screen
    >   ENDIF.
    > *
    > ************************************************************************
    > START-OF-SELECTION.
    > *
    >   SELECT * FROM MARA WHERE MATNR IN S_MATNR.
    >     WRITE: / MARA-MATNR.
    >   ENDSELECT.
    > *
    > END-OF-SELECTION.
    >
    >
    > in batch i don't want the selection-screen. Is it possible? How can i do this?
    >
    > Thanks.
    >
    > regards, Dieter
    Please check the value of the variable sy-binpt, I believe the value of the variable sy-binpt will be set to 'X'  if the program is called from a bath input, hope this helps.

  • How to set the screen size with nested Iview screen

    Can someone show me how to set the screen size with nested IView  screen.
    at the moment i only try it with trial and error untill it looks somewhat close. Is there a property in VC to set the size for Height and width.
    The same question is for the form. the form elements inside the form is easy but the actual form is still a challenge.

    Hi,
    Yes you are correct ,Still the Form and iview are not able to change thier Layout Structure using a Propery.
    it is available with VC7.1
    Govindu

  • How to set full screen camera on ios 8 on iphone5s

    How to set full screen camera on iphone 5s having an ios8

    HI,
    Give the width in % instead of mentioning in pixels.
    ie. for full width, give 100%.
    Make sure the layout is GridLayout.
    Regards
    Fahad Hamsa

  • HOW TO USE SELECTION SCREEN

    HOW TO USE SELECTION SCREEN
    I WANT TO INSERT PURCHASE DOCUMENT NUMBER
    AND WANT TO SEE ALL INFORMATION FOR THAT PURCHASE DOCUMNET NUMBER.
    THANKS IN ADVANCED.

    The main use of the selection-screen is to select screen in the back ground
    ex :    
    TABNAME
    IN THE ABOVE FIGURE  TABNAME IS THE FIELD AND THE BACK END IS   CREATED SCREEN IN THE BACK END
    THIS SCREEN CREATION WE CAN USED THE SCREEN SELECTION

  • How to pass selection screen parameters in text elements?

    how to pass selection screen parameters in text elements?

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

  • WAD template with BSP Application - how to read selection screen values

    Hello,
    I've created Web template with Web Application Designer (WAD).
    I would like to extend  that page with BSP Application...
    Purpuse of this application is to read some information from tables
    on BW transaction server and display them within Web page.
    Question: How to read selection screen values from a Web template ?
    Thanks for any help,
    Pawel Borowiec

    Hi,
    The selection screen parameters will be on an inputField, so try and get the is of the inputfield generated by doing View source...
    And once you get the inputfield Id, you can read the value in the InputField(InF) by
    using the following code...!
    data : if_value type ref to cl_htmlb_inputfield.
    data : variable type string.
    if_value ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'inputField'
                                                id      = 'InF_ID_here'
           if if_value->value is not initial.
             variable  = if_value->value.
           endif.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • How to cal selection screen in module pool

    Hi abapers,
    I have to use selection screen in module pool programme..How to call selection screen in module pool.
    Regards,
    ramya

    YOU HAVE TO DEFINE YOUR SELECTION SCREEN LIKE THIS
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-SUBRC.
        PARAMETERS     PAR1 LIKE SPFLI-CARRID.
        SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
      SELECTION-SCREEN END OF BLOCK BL1.
    SELECTION-SCREEN END OF SCREEN 123.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF SCREEN 99.
      SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
                       USER-COMMAND US01.
      SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.
      PARAMETERS     PAR2 TYPE I.
    SELECTION-SCREEN END OF SCREEN 99.
    THEN YOU HAVE TO CALL THAT
    CALL SELECTION-SCREEN scr.
    AFTER THAT YOU CAN CALL THE ANOTHER SCREEN..
    CALL SCREEN..
    REGARDS
    SHIBA DUTTA

  • How to capture selection-screen values

    Hi,
      How to capture selection-screen values when user pressing F3 or Back button after the display of report.
    Regards,
    Bujji.

    Hi Bujji,
    select-option are actually ranges or more general internal tables with the structure:
    SIGN:    'I'nclusive or 'E'xclusive
    OPTION:  'EQ', 'BT', 'NE', 'GE', 'CP', ....
    LOW:     low value of type of the curresponding "FOR table-field"
    HIGH:     high value of type of the curresponding "FOR table-field"
    You may just code:
    TABLES: mara.
    SELECT-OPTIONS s_matnr FOR mara-matnr.
    LOOP AT s_matnr.
      WRITE: / s_matnr-sign,
               s_matnr-option,
               s_matnr-low,
               s_matnr-high.
    ENDLOOP.
    If you find my answer useful, please don't forget the reward.
    Regards,
    Juergen

  • How to set selected radioButton

    Hi,
    There are tons of examples on the websites to show you how to detect selected radioButton or click event. But It is not easy to find aone example to show you how to set selected radioButton.
    Here is my code, but not working, Is it not well handle on it for Flex?
    [Bindable]       
    private var selectedRadioButton:RadioButton;
    private function initSelect(): void {
            selectedRadioButton = rb1;
    <mx:RadioButtonGroup id="rbg" selection="{selectedRadioButton}"
                       change="rbg_change(event);" />
                    <mx:HBox>
                  <mx:RadioButton id="rb1"
                          label="Active" group="{rbg}" />
                  <mx:RadioButton id="rb2"
                          label="Lock" group="{rbg}" />
    </mx:HBox>
    Thanks

    it's simple set its selected property true. For instance
    myRadioButtonSelectedOnStart.selected="true"
    Sincerely,
    Michael
    El 14/05/2009, a las 10:32, "master.card" <[email protected]> escribió:
    >
    Hi,
    >
    There are tons of examples on the websites to show you how to detect 
    selected radioButton or click event. But It is not easy to find aone 
    example to show you how to set selected radioButton.
    >
    Here is my code, but not working, Is it not well handle on it for 
    Flex?
    >
    private var selectedRadioButton:RadioButton;
    private function initSelect(): void {
            selectedRadioButton = rb1;
    <mx:RadioButtonGroup id="rbg" selection=""
                       change="rbg_change(event);" />
                    <mx:HBox>
                  <mx:RadioButton id="rb1"
                          label="Active" group="" />
    >               <mx:RadioButton id="rb2"
    >                       label="Lock" group="" />
    </mx:HBox>
    >
    >
    >
    Thanks
    >

  • I want to be able to monitor my teen daughter's computer from home using screen sharing.  Anyone know how to set up screen sharing when my daughter's school has her computer set up for Apple Remote Desktop?

    I want to be able to monitor my teen daughter's computer from home using screen sharing.  Anyone know how to set up screen sharing when my daughter's school has her computer set up for Apple Remote Desktop? 

    ARD won't be as smooth as you think  over the Internet and be a security risk for your daughter.
    Your best bet would be to install nannyware, then when she's asleep you can review the logs.
    This is the best and Mac friendly
    http://www.internetsafety.com/

  • How to skip selection screen? Please help!

    Hi Experts,
           I have a report program that has a default selection screen (1000) and ALV output. First selection screen is displayed and on execution ALV is shown.
    My requirement is, if the user is not authorized to run this report then selection screen should be skipped and instead display a error page. This error page is nothing but some write statements in ABAP displaying error icon and error info.
    Currently I have written the authorization check in the INITIALIZATION event. Here I am setting a flag if the user is not authorized followed by "write" statements showing error info.
    But when I run the report, error info is not displayed and instead selection screen loads even though the user is not authorized. I have written the selection screen code in the TOP include.
    So what shall I do? How to skip the selection screen?
    Are there any other better ways to handle my case?
    Thanks
    Gopal

    Got it.
    CODE:
    REPORT  zzsorttry                               .
    SELECTION-SCREEN BEGIN OF SCREEN 1001.
    PARAMETERS : p_vbeln TYPE vbak-vbeln.
    SELECTION-SCREEN END OF SCREEN 1001.
    DATA : flag.
    INITIALIZATION.
    *C-- Put your authorization check here.
      IF 1 = 1.
        flag = 1.
        LEAVE TO LIST-PROCESSING .
      ELSE.
        CALL selection-screen 1001.
      ENDIF.
    START-OF-SELECTION.
      IF flag IS NOT INITIAL.
        CLEAR flag.
        WRITE: 'User', sy-uname , 'not authorized to use this report'.
      ENDIF.

  • How to pass selection screen value to LDB dynamic field.

    Hello everybody,
    In my program, I am using standard LDB(PSJ) for getting data. And there is a requirement that I have to display some dynamic fields on my selection screen like plant , person responsible ( which are mandatory also ) etc. and inside the program I have to fill those dynamic fields for which the user has entered the value in selection screen.
    Could you please tell me how to pass some of selection screen values to ldb dynamic fields before GET statement.
    Thanks !!!
    Regards,
    Mitra

    >
    Pavan Bhamidipati wrote:
    > Hi,
    >
    >
    I have to fill those dynamic fields for which the user has entered the value in selection screen.
    >
    >
    > This means that the user is going to enter the values in the selection screen for the dynamic field values so
    >
    > SET PARAMETERID 'XYZ' FIELD p_field.
    >
    > where p_field is a parameter on the selection screen
    >
    > Regards
    > Pavan
    You can capture the values selected through the dynamic selections using some of the functions modules below, just search the forum for the below FM's, perhaps you can find some sample code
    FREE_SELECTIONS_EX_2_RANGE
    FREE_SELECTIONS_EX_2_WHERE
    FREE_SELECTIONS_RANGE_2_EX
    FREE_SELECTIONS_RANGE_2_WHERE
    FREE_SELECTIONS_WHERE_2_EX
    FREE_SELECTIONS_WHERE_2_RANGE

  • Set selection screen defalut variant

    I was developed one program, when ever i execute the program, the selection screen with default variant, how i can set the default variant to selection-screen.
    Please suggest me.

    hi,
    Use FM RS_SUPPORT_SELECTIONS
    Here is a sample code
      CALL FUNCTION 'RS_VARIANT_EXISTS'
        EXPORTING
          REPORT  = 'ZPP65'
          VARIANT = 'STANDARD'
        IMPORTING
          R_C     = RC.
      IF RC = 0.
        CALL FUNCTION 'RS_SUPPORT_SELECTIONS'
          EXPORTING
            REPORT  = 'ZPP65'
            VARIANT = 'STANDARD'.
    ENDIF.
    Regards,
    Santosh

Maybe you are looking for

  • Cairo-compmgr preferences wont appear

    I am running xfce4 with openbox as my WM and cairo-compmgr for compositing. To enable cairo-compmgr i have it in my ~/.config/openbox/autostart file as cairo-compmgr & Compositing does work, but there is no icon in the xfce4 panel's system tray. The

  • XML diff - ignoring order

    I'm working a project which basically involves producing a diff of 2 XML files. I recently discovered XDK and though that this would be the best way to do this. However, after I implemented the XDK solution, I found that it makes a distinction betwee

  • HELP - BB Curve 9320 Contact List Problem

    hi , please help me resolve this.. previously my Curve 9320 was crash after update Whatsapp app..after restart, got error '102' - RESET..then after the problem resolved ( flash again using Desktop Software ) and i restore contact list from backup fil

  • I am trying to download a quicktime movie.  A pop up tells me that I don't have the format to support it.  What do I do?

    I am trying to download a quicktime movie.  A pop up tells me that I don't have the format to support it.  What do I do?

  • Recovery Disk Outdated

    I've updated my Late 09 iMac to 10.10 recently and noticed that the Recovery Disk (Partition) on my computer is still 10.9. It seems it failed to update with the rest of the system. How do I go about updating the Recovery Disk? Thanks