Selection-screen code error

hi all,
     i am trying to code selection screen. where in when i click on 1 pushbutton one field should be active and the other one should be invisible.
the code is syntactically correct but when i execute it . it is not working properly .
i am unable to find the error .
so can any one plz take some time and solve it. and plzzz let me know where i was wrong.
this is the code
parameters: mat1 type mara-matnr,
            lif1 type lfa1-lifnr.
selection-screen begin of line.
selection-screen pushbutton: (5)   lif user-command abc,
                             10(5) mat user-command dec.
selection-screen end of line.
data: f_1 type i value 1,
      s_1 type i.
at selection-screen output.
  loop at screen.
    case screen-name.
      when 'mat1'.
        screen-active = f_1.
      when 'lif1'.
        screen-active = s_1.
    endcase.
    modify screen.
  endloop.
at selection-screen.
  if sy-ucomm = 'abc'.
    f_1 = 1.
    s_1 = 0.
  elseif sy-ucomm = 'dec'.
    f_1 = 0.
    s_1 = 1.
  endif.

Hi Amar,
You can try the following codes:
PARAMETERS: mat1 TYPE mara-matnr,
lif1 TYPE lfa1-lifnr.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON: (5) lif USER-COMMAND abc,
                           10(5) mat USER-COMMAND dec.
SELECTION-SCREEN END OF LINE.
DATA: f_1 TYPE i VALUE 1,
s_1 TYPE i.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name CS 'MAT1'.
      screen-input = f_1.
    ELSEIF screen-name CS  'LIF1'.
      screen-input = s_1.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
AT SELECTION-SCREEN.
  IF sy-ucomm = 'ABC'.
    f_1 = 1.
    s_1 = 0.
  ELSEIF sy-ucomm = 'DEC'.
    f_1 = 0.
    s_1 = 1.
  ENDIF.
Regards,
Hendy

Similar Messages

  • Selection-screen code

    please help me in designing the selection-screen code for the following:
    1st field(PR Item release status):
    eban-frgkz (range of values) and default to '2' and 'Y'-PR autorized
    2nd field(PR Item Del. Indicator):
    eban-loekz (Range of values) and (default to not deleted)
    3rd field(PR TYPE):
    EBAN-BSART (Range of values)

    Hi,
    Check this code ..
    TABLES : eban.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
    SELECT-OPTIONS:
           s_frgkz  for eban-frgkz,
           s_loekz  for eban-loekz,
           s_bsart  FOR EBAN-BSART.  
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    s_frgkz-sign = 'I'.
    s_frgkz-option = 'EQ'.
    s_frgkz-low = 'Z'.
    Append s_frgkz. Clear s_frgkz.
    s_frgkz-sign = 'I'.
    s_frgkz-option = 'EQ'.
    s_frgkz-low = 'Y'.
    Append s_frgkz. Clear s_frgkz.

  • Back to selection screen after error

    Hello ABAPers,
    I have a executable program (REPORT) to do some processing (e.g. read a standard table with the parameters and select-options and save the data in a Z table).
    When occurs an error (e.g. when sy-subrc <> 0 after select) and a message of type E is showed, the program show the message in a "clean" screen with title SAP. Then, after ENTER or ESC, it leaves to initial screen of SAP (SAP Easy Access).
    The message of type E is triggered from a routine (FORM) called from START-OF-SELECTION event. And the program don´t write nothing in list (only return a status message if everithing is ok).
    How can I force the program to back to selection screen after some error?
    Thanks in advance.
    Best regards,
    Charles Oliveira

    hi,
    Do the following for your requirement.
    in the message give the following
    start-of-selection.
    Perform <routine>.
    Form <routine>.
    if <condition>.
      message 'xxxx' type 'S' display like 'E'.
      exit.
    endif.
    endform.
    This way the control returns to selection screen even after the message is triggered.
    Thanks
    Sharath

  • Finding selection screen code in xmb_support_restart

    Hi experts,
    There is a standard program called zsxmb_support_restart which i copied and made zsxmb_support_restart, which has got  a selection screen,where i can put the message id.
    But i need to pass this MID through  a function module, so that the message id is taken as input into the z program dynamically, when i call the function module. 
    I am not being able to find the position of selection screen in the z program (zsxmb_support_restart) code, which i need to comment out, so as to pass the value from the FM input parameter .
    Please suggest.
    Thanks,
    shreya

    Maybe, in property tab of report, it's linked to a logical DB, with selection-screen parameters.

  • Error during creation of push button on selection screen

    Hi,
    I wanted to create push buttons on selection screen,
    Code:
    DATA DB1 TYPE VBAP-WERKS.
    DATA DB2 TYPE MARA-MATNR.
    SELECT-OPTIONS : SPLANT FOR DB1,
                                    SCLASS FOR DB2.
    SELECTION-SCREEN:  FUNCTION KEY 1,
                                        FUNCTION KEY 2,
                                        FUNCTION KEY 3.
    INITIALIZATION.
    DATA FUNCTXT TYPE SMP_DYNTXT.
    CLEAR FUNCTXT.
    DATA: FUNCTXT_01 TYPE SSCRFIELDS-FUNCTXT_01.
    FUNCTXT-TEXT = 'DEL'.
    SSCRFIELDS-FUNCTXT_01 = FUNCTXT.
    CLEAR FUNCTXT.
    FUNCTXT-TEXT = 'EDIT'.
    SSCRFIELDS-FUNCTXT_02 = FUNCTXT.
    CLEAR FUNCTXT.
    FUNCTXT-TEXT = 'CRE'.
    SSCRFIELDS-FUNCTXT_03 = FUNCTXT.
    But during activating, I'm getting the error as : Field "SSCRFIELDS-FUNCTXT_01" is unknown. It is neither in one of the specified tables nor defined by "DATA" statement.
    Please suggest solutions to overcome this error.
    Regards
    Darshan MS

    Hi,
    trans. for examples of selection screen : BIBS
    regards
    Fred

  • Parameters in a selection-screen output

    Hi Guys,
    I have this situation.
    Parameters: street(20) type c,
                       code(10) type c,
                        number(6) type c.
    If street is not initial.
      if code is initial and number is initial.
         "I have to put information into code or into number.
    endif.
    endif.
    I could do.
    AT SELECTION-SCREEN OUTPUT.
    IF P_STREET IS NOT INITIAL. "Si está lleno es obligatorio llenar Población o Código Postal
       IF P_CITY1 IS INITIAL AND P_CODE1 IS INITIAL.
          MESSAGE 'write information into Code or into Numberl' type 'E'.
       ENDIF.
    ENDIF.
    START-OF-SELECTION.
    It doesn't work very well any idea,please?
    Thanks a lot

    Basically AT SELECTION-SCREEN OUTPUT is part of the PBO of the selection-screen dynpro, error messages must be issued in the PAI of a dynpro ([else|http://help.sap.com/saphelp_nw70/helpdata/en/e5/e719bab1d711d295bf0000e8353423/frameset.htm]),  look at [online help|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaabc35c111d1829f0000e829fbfe/frameset.htm] of the MESSAGE statement, so move your check in a AT SELECTION-SCREEN. or better put the 3 fields in a [block|http://help.sap.com/erp2005_ehp_04/helpdata/EN/79/34a23ad9b511d1950e0000e8353423/frameset.htm] (SELECTION-SCREEN BEGIN OF BLOCK/PARAMETERS/END OF BLOCK) and check the data in a AT SELECTION-SCREEN ON BLOCK, so the three fields will be available for input if an error message is issued.
    Regards

  • Common SELECTION-SCREEN in reports for reuse

    Dear ABAPERS,
    I have a number of ABAP reports with similar but complicated customized selection screen (i.e. implemented using SELECTION-SCREEN statement). I would like to "package" the codes for SELECTION-SCREEN in a common routine in an include program, so that all my reports can just use it (instead of all reports duplicating the same selection screen codes). Any changes to the selection screen can be made through the single source.
    However, an error :
    Within FORM routines and function modules, the SELECTION-SCREEN statement is not allowed.
    Is there any other way to accomplish this goal ? Thank you.
    Regards
    KC

    Hello Kir,
    The only way to be able to re-use a screen, selection-screen or otherwise, is when the screen is a subscreen.
    Have one report program where you have got the selection screen defined as follows -
    report  ztest.
    selection-screen begin of screen 1010 as subscreen.
      parameters : test like t001-mandt.
    selection-screen end of screen 1010.
    Have a second program with normal screen, which has a subscreen area.
    report ztest1.
    data : repid type syrepid,
           dynnr type sydynnr.
    repid = 'ZTEST'.
    dynnr = '1010'.
    call screen 100.
    Screen 100 has a subscreen area and its flow logic will be something like this -
    PROCESS BEFORE OUTPUT.
      call subscreen subscreen_area_name including repid
                                                   dynnr.
    PROCESS AFTER INPUT.
      call subscreen sub1.
    Now, each time you make a change to the selection-screen's definition in program ZTEST, the change will always be reflected in all the other programs which are using it as their subscreen.
    Regards,
    Anand Mandalika.

  • 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.

  • 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

  • Selection screen dynamic enable and disable

    HI all,
    I have one requirement like
    on selection of redio button my selection screen hould be enable and disable
    Like if i select rediobutton  tfile then my selection screen block B2 should enable and Block B3 hould be disable
    If redio button selscr is selected then my block B3 should be enable and Block B2 should disable
    my selection screen code is below
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-005.
    PARAMETERS: tfile  RADIOBUTTON GROUP g1 DEFAULT 'X'.
    PARAMETERS: selscr RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR marc-matnr,
                                 s_fkdat FOR vbrk-fkdat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
    PARAMETERS : filename TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b3.
    How to do that.
    Help me here its urgent tnx in advance.

    Hi Lalit,
    Check the below code.
    TABLES: marc, vbrk.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-005.
    PARAMETERS: tfile RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND rusr.
    PARAMETERS: selscr RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR marc-matnr  MODIF ID abc,
                     s_fkdat FOR vbrk-fkdat  MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
    PARAMETERS : filename TYPE rlgrap-filename MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN OUTPUT.
    *Note: To disable the fields use the below one.
      LOOP AT SCREEN.
        IF screen-group1 = 'DEF'. "Name field
          IF selscr = 'X'.
            screen-input = 1.
          ELSE.
            screen-input = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
         IF screen-group1 = 'ABC'. "Name field
          IF selscr = 'X'.
            screen-input = 0.
          ELSE.
            screen-input = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    *Note: To hide the screen use the below one.
    LOOP AT SCREEN.
       IF screen-group1 = 'DEF'. "Name field
         IF selscr = 'X'.
           screen-active = 1.
         ELSE.
          screen-active = 0.
         ENDIF.
         MODIFY SCREEN.
      ENDIF.
       IF screen-group1 = 'ABC'. "Name field
         IF  tfile = 'X'.
           screen-active = 1.
         ELSE.
          screen-active = 0.
        ENDIF.
         MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  • Hiding a block in selection screen

    Hi everybody,
             My requirement is to hide the entire block of a particular selection screen, find the below selection screen code.  with my piece of code,iindividual fields are getting hidden, please let me know how to hide the entire block.
              If I select rb_det then the block b2 should hide.
    Selection screen :
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
    PARAMETER: rb_sum RADIOBUTTON GROUP rtyp DEFAULT 'X' USER-COMMAND DISP,
    rb_det RADIOBUTTON GROUP rtyp.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t04.
    PARAMETER: cb_asco AS CHECKBOX DEFAULT 'X' modif id SEL,
    cb_divi AS CHECKBOX modif id SEL,
    cb_buen AS CHECKBOX modif id SEL,
    cb_prod AS CHECKBOX modif id SEL,
    cb_bupa AS CHECKBOX modif id SEL,
    cb_inob AS CHECKBOX modif id SEL.
    SELECTION-SCREEN END OF BLOCK b2.
    Existing code :
    A T S E L E C T I O N - S C R E E N *
    at selection-screen output.
    loop at screen.
    if screen-group1 = 'SEL'.
    if rb_det = 'X'.
    if screen-name = 'CB_ASCO' or
    screen-name = 'CB_DIVI' or
    screen-name = 'CB_BUEN' or
    screen-name = 'CB_PROD' or
    screen-name = 'CB_BUPA' or
    screen-name = 'CB_INOB' .
    screen-active = 0.
    modify screen.
    endif.
    endif.
    endif.
    endloop.
    Thanks in advance...
    Regards,
    Ravi

    Hi,
    A block will be made invisible if everything inside it is inactive. If you give all of them a MODIF ID, too, the block will disappear.
    SELECTION-SCREEN BEGIN OF BLOCK processing WITH FRAME TITLE text-030.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS pa_xmanu LIKE rm08mrbr-manu DEFAULT 'X'
      RADIOBUTTON GROUP val MODIF ID id1.
      SELECTION-SCREEN COMMENT 3(30) text-040 FOR FIELD pa_xmanu MODIF ID
    id1.
      SELECTION-SCREEN POSITION 40.
      PARAMETERS pa_xauto LIKE rm08mrbr-auto
      RADIOBUTTON GROUP val MODIF ID id1.
      SELECTION-SCREEN COMMENT 43(30) text-050 FOR FIELD pa_xauto MODIF ID
    id1.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: pa_xskto LIKE rm08mrbr-skto AS CHECKBOX MODIF ID id1.
      SELECTION-SCREEN COMMENT 3(30) text-055
      FOR FIELD pa_xskto MODIF ID id1.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK processing.
      AT SELECTION-SCREEN OUTPUT.
        LOOP AT SCREEN.
          IF screen-group1 = 'ID1'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
    Regards,
    Priyanka.

  • At-selection-screen modification

    Hi Experts,
    I am doing the selection screen modification. The selection screen is designed such as i have two radio buttons 1. header & 2. Item anb beside header radio button i have field sales document number and beside item radio button sales item number field.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) text-005.
    SELECTION-SCREEN: position 32.
    parameter:p_sh type c radiobutton group rg.                "Sales header
    selection-screen: comment 35(15) for field p_sh.
    selection-screen: comment 60(20) for field p_vbeln.
    parameter:p_vbeln like vbak-vbeln MODIF ID gp5.            "Sales Document
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN: position 32.
    parameter:p_si type c radiobutton group rg.                "Sales Item
    selection-screen: comment 35(15) for field p_si.
    selection-screen: comment 60(20) for field p_posnr.
    parameter:p_posnr like vbap-posnr MODIF ID gp6.            "Sales Document Item
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: skip.
    This is the selection screen  code where for sales document i have assiged Modif id GP5 for Item Modif id GP6.  so when i check radio button p_sh ( header ) then sales document ( p_vbeln) shoudl be active for input .
    if i check p_si (item) then both saleds document (p_vbeln) and p_posnr both have different group names i.e GP5 & GP6 should be active. i.e screen-inpu = 1.
    I have written the following code for header but for item i am unable to make screen-input = 1 for two different groups. how to do that?
    LOOP AT SCREEN.
        IF ( P_SH NE 'X' AND SCREEN-GROUP1 EQ 'GP5' ) OR
           ( P_SI NE 'X' AND SCREEN-GROUP1 EQ 'GP6' ).
          screen-input = 0.
          MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    This code is working when i click header radio button but for when i click item radio button (p_si) only item field is active i am unable to make sales docuemnt active at same time. please help me in this regard.
    Regards,
    sunil kairam.

    Hi,
    Check this piece of code changed a bit.
    PARAMETERS : p_ct  RADIOBUTTON GROUP grp .
    SELECT-OPTIONS : s_kunnr FOR kna1-kunnr,
    PARAMETERS : p_sh RADIOBUTTON GROUP grp.
    SELECT-OPTIONS : s_vbeln  FOR vbak-vbeln,                
    PARAMETERS : p_si  RADIOBUTTON GROUP grp.
    SELECT-OPTIONS : s_vbeln1  FOR vbak-vbeln,
                                   s_posnr   for vbak-posnr.
    IF p_ct  IS NOT INITIAL .
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'S_KUNNR-LOW'.
              screen-input = 1.
              MODIFY SCREEN.
             WHEN 'S_KUNNR-HIGH'.
              screen-input = 1.
              MODIFY SCREEN.
               WHEN 'S_VBELN-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_VBELN-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_VBELN1-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_VBELN1-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_POSNR-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_POSNR-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
          ENDCASE.
        ENDLOOP.
      ELSEIF p_sh IS NOT INITIAL.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'S_KUNNR-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
             WHEN 'S_KUNNR-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
               WHEN 'S_VBELN-LOW'.
              screen-input = 1.
              MODIFY SCREEN.
            WHEN 'S_VBELN-HIGH'.
              screen-input = 1.
              MODIFY SCREEN.
            WHEN 'S_VBELN1-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_VBELN1-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_POSNR-LOW'.
              screen-input = 0.
              MODIFY SCREEN.
            WHEN 'S_POSNR-HIGH'.
              screen-input = 0.
              MODIFY SCREEN.
          ENDCASE.
        ENDLOOP.
    now one more  ELSEIF p_si  IS NOT INITIAL
    now make s_vbeln1 and s_posnr as input 1 and rest others as input 0.
    endif.
    Regards,
    Nagaraj

  • At selection-screen on field

    friends can u tell me the difference between atselection-screen and at selection-screen on field?

    First of all the actual order of events
    INITIALIZATION
         AT SELECTION-SCREEN OUTPUT
         AT SELECTION-SCREEN ON <field>
         AT SELECTION-SCREEN     
    START-OF-SELECTION
    INITIALIZATION
    This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen or you can assign your own default values.
    REPORT EVENT_DEMO.
    PARAMETERS DATUM TYPE SY-DATUM DEFAULT SY-DATUM.
    NODES SPFLI.
    INITIALIZATION.
      CITY_FR = 'NEW YORK'.
      CITY_TO = 'FRANKFURT'.
      CARRID-SIGN   = 'I'.
      CARRID-OPTION = 'EQ'.
      CARRID-LOW    = 'AA'.
      APPEND CARRID.
      DATUM+6(2) = '01'.
    In the PBO of the selection screen, the
    AT SELECTION-SCREEN OUTPUT
    event is triggered. This event block allows you to modify the selection screen directly before it is displayed.
    PARAMETERS: TEST1(10) MODIF ID SC1,
                TEST2(10) MODIF ID SC2,
                TEST3(10) MODIF ID SC1,
                TEST4(10) MODIF ID SC2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'SC1'.
        SCREEN-INTENSIFIED = '1'.
        MODIFY SCREEN.
        CONTINUE.
      ENDIF.
      IF SCREEN-GROUP1 = 'SC2'.
        SCREEN-INTENSIFIED = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    The parameters TEST1 and TEST3 are assigned to the modification group SC1, while TEST2 and TEST4 are assigned to group SC2. During the AT SELECTION-SCREEN OUTPUT event, the INTENSIFIED field of internal table SCREEN is set to 1 or 0, depending on the contents of the GROUP1 field. On the selection screen, the lines for TEST1 and TEST3 are highlighted while those for TEST2 and TEST4 are not.
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON <field>
    is triggered when the contents of each individual input field are passed from the selection screen to the ABAP program. The input field <field> can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
    The program below is connected to the logical database F1S:
    REPORT EVENT_DEMO.
    NODES SPFLI.
    AT SELECTION-SCREEN ON CITY_FR.
      IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'.
        MESSAGE E010(HB).
      ENDIF.
    If the user enters "AA" in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.
    The AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program. If an error message occurs in this processing block, the selection screen is redisplayed with all of its fields ready for input. This allows you to check input values for consistency.
    The program below is connected to the logical database F1S:
    REPORT EVENT_DEMO.
    NODES SPFLI.
    AT SELECTION-SCREEN.
      IF CARRID-LOW IS INITIAL
        OR CITY_FR IS INITIAL
        OR CITY_TO IS INITIAL.
        MESSAGE E000(HB).
      ENDIF.
    If the user does not enter values in all of the fields on the selection screen, an error message appears in the status line. This makes all of the input fields mandatory, even though they are not defined as such in the logical database.
    Reward points, if the issue is resolved.
    Regards,
    Raman
    Message was edited by:
            Raman Vinocha

  • How to skip required check on mandatory field of selection screen

    Hi expert,
    In my report, I define two rodiobutton to show block1 or block2, but every time I click each radiobutton, the message "Fill in all required entry" shown, so my question is how can I skip required check when click radiabutton?
    Some of my selection-screen code is :
    PARAMETER: P_block1  RADIOBUTTON GROUP GRP1 DEFAULT 'X'  USER-COMMAND UC1.
    PARAMETER: P_block2  RADIOBUTTON GROUP GRP1.
    SELECT-OPTIONS S_ERDAT FOR  VBRK-ERDAT OBLIGATORY.

    Hi,
    If you dont want PAI to be triggered when you select the radio button, then you can remove the USER-COMMAND while declaring parameter.
    If User Command is necessary, use following code
    PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
    PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
    SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT .
    AT SELECTION-SCREEN.
    CHECK SY-UCOMM NE 'UC1'.
    IF S_ERDAT IS INITIAL.
    MESSAGE E038(001) WITH 'ERDAT IS MANDATORY'.
    ENDIF.
    Please Reward points.

  • CALLING SELECTION SCREEN.

    Hi All,
    My requirement is whenever i am clicking check box on selection screen one window selection screen shu apper where i will enter some data.After pushing execute button it should go to standard selection screen.
    code i hav wirtten as...
    Program *********************************************
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
    PARAMETERS: pa_ls1 AS CHECKBOX,
                            pa_ls2 AS CHECKBOX USER-COMMAND flag.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
    SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF SCREEN 2000.
    at selection-screen.
    IF pa_ls2 = 'X'.
    do.
        CALL SELECTION-SCREEN '2000'
        STARTING AT 10 10.
        exit.
    enddo.
      ENDIF.
    with this code i am able to call the screen but cant go back to standard screen.

    HI RUSHIKESH,
    MODIFICATION HAS BEEN MADE INTO YOUR CODE.SEE THE BOLD PART.
    REPORT  ZCLICK.
    tables : vbak.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
    PARAMETERS: pa_ls1 AS CHECKBOX,
    pa_ls2 AS CHECKBOX USER-COMMAND CLICK.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
    SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF SCREEN 2000.
    at selection-screen.
    IF pa_ls2 = 'X'.
    <b>PA_LS2 = ''.</b>
    CALL SELECTION-SCREEN '2000'
    STARTING AT 10 10.
    ENDIF.

Maybe you are looking for

  • Key figure, number of decimal places are not showing in report output

    Dear experts, At cube level PO qty value is getting 0.010 where as in bex report output of PO qty showing as 0. I have chosen decimal places as 0.000 in key figure additional properties tab. In query designer also I have chosen no of decimal places a

  • XSLT transformation in XML to ABAP: special characters issue

    Hi, I am parsing well-formed XML file that has the following data (: <projects><project><name>Wallis & Futuna</name></project></projects> I use XSLT transformation: <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www

  • Can't open .mov files in quicktime anymore

    I can't think of any system changes that I've made recently but a few days ago I was able to open .mov files with quicktime and now I can't. I get the following error when I try to open one. Error -1856: an unknown error occurred (filename.mov) I've

  • Email -almost no 'real estate' on screen

    new screen HORRIBLE.. Please give me back the top half of the screen.  It's all wasted.  PLEASE tell me how to spread the list of emails to the top of the screen.  You don't need half the screen to say We're Verizon.  I'm already a customer..  Just p

  • Auto_ID_Integration_Scenario

    Hi, <b>Outbound Delivery Execution        1.      Send outbound delivery creation information The supplier’s ERP system sends the IDoc DELINF.DELVRY03 or DELINF.DELVRY05 to the XI system which dispatches the information to SAP AII.</b> The above give