Regarding Parameter statement in selection screen

Hi All,
Pls provide me the logic for the below requirement.
The requirement is that in the selection screen if i give the input as 6months in paramenter option field,the employee data for the last six months sud be fetched in the report.And if i give 2 months ..the last 2months employee data sud be fetched by the report.
Pls help me how to proceed further.
Thanks,
Chakradhar.

Use logic like this..
data:
  begin of t_pernr occurs 0,
    pernr type pa0001-pernr,
  end of t_pernr.
parameters:
  p_period type i.
data:
  w_date type pa0001-begda,
  w_temp type i.
start-of-selection.
  if p_period lt 1
  or p_period gt 12.
    message 'Period must be between 1 and 12' type 'I'.
    exit.
  endif.
  w_date = sy-datum.
  w_date+6(2) = '01'.
  if w_date+4(2) gt p_period.
    w_date4(2) = w_date4(2) - p_period.
  else.
    w_temp = w_date+4(2) - p_period.
    w_temp = 12 + w_temp.
    w_date0(4) = w_date0(4) - 1.
    w_date+4(2) = w_temp.
  endif.
  select pernr
    from pa0001
    into table t_pernr
   where begda ge w_date.
   if sy-subrc eq 0.
   endif.

Similar Messages

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • Parameter on the selection screen

    Hi All,
    I have a check box and a parameter on the selection screen. If the checkbox is initial, the paramter shouldn't be editable but if the checkbox is ticked, the parameter should be made mandatory to be enetered with value. How can this be done ?
    Thanks in advance.

    Hi,
    Refer to the following code.In this change radiobuttons with the checkbox.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    parameters: p_erdat like zirpactivity-erdat modif id SC1 ,
                r1 radiobutton group RAD1 user-command ABC default 'X',
                r2 radiobutton group RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN.
      check sy-ucomm = 'ABC'.
      check sy-ucomm = 'F8'.
    AT SELECTION-SCREEN OUTPUT.
      loop at screen.
        if  r1 = 'X' and screen-group1 = 'SC1' .
          screen-input = 0.
        ENDIF.
        IF r2 = 'X'.
               screen-group1 = 'SC1'  .
          screen-input = 1.
        endif.
        modify screen.
      endloop.
    Hope this helps.
    Reward if helpful.'
    Regards,
    Sipra

  • Report - parameter name in selection screen

    Hi,
    I am working with a report and in that I am using a parameter for my selection screen.
    Parameter : lifnr like lfa1-lifnr.
    My question is: when i execute the program i see in the selection sreen 'Lifnr'. How to get a text say 'Vendor no.' instead of LIFNR in selection screen.
    Thanks

    Hi,
    Go to the TEXT ELEMENTS of the program from the SE38 screen. Click on the SELECTION TEXTS tab, and you can give whatever desription you want for the selection screens here.
    If you want the description from the data dictionary just check the check box on the right hand side.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • How to maximise the length of the Parameter text on Selection screen

    Hello,
    I am putting the text in the selection screen for a Parameter.
    Its text is long and it is not letting me to put the whole text in Text Symbol.
    In the report
    When I click on GOto--> Text Elements --> Selection Texts  
    I am sure there is a way we can maximise this...
    ANy suggestions will be apprecaiated.
    Regards,
    Kittu

    Hello,
    Thank you for all your response!
    Here is my code :
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS : BOTH  RADIOBUTTON GROUP RG1,
                 EXICLASS RADIOBUTTON GROUP RG1.
    SELECTION-SCREEN END OF BLOCK B2.
    Here for Both, I need to add the selction text as  'BOTH Existing and Non-existing Classifications'
    This is a parameter, can any body explain me how to do it with the Parameters.
    Any suggestions will be appreciated.......
    Regards,
    Kittu

  • Adding new parameter in ME28 selection screen

    Hi All,
    Did anyone know how to add in a new parameter(select-options) in ME28 selection screen?
    I'm only able found one enhancement for this requirement.
    In program
    i create a new implementation for ENHANCEMENT-POINT RM06EF00_02 and write the
    For eg:
    PARAMETERS:     p_matnr LIKE mara-matnr.
    The new parameter displayed in ME28.
    Anyhow, i'm not able to change the selection text from p_matnr to "Material Number" as there is no enhancement in INITIALIZATION for me to set the text dynamically. (i'm not able to change the text element via goto->text elements->selection texts as its standard sap).
    Can someone please share if you've done this enhancement before?
    Really appreciate your input and advise.
    Thanks.
    Regards,
    Sham.

    Hi Sham,
    I copy standard program of me28(RM06EF00) and implement the code.
    Regards,
    Quddus.

  • Ho to disabled the parameter on the selection screen

    Hi all,
    I have a parameter (p_matnr)  and two radiobutton b1 and b2 on the selection screen. Now what the requirement is if user selects radio button b2, the parameter should get disabled. I know it can be done by <b>loop at screen</b> and then modifying the screen but in this case start-of-seection is to be called. In my case as the user selects the radio button b2 the parameter should be appear disabled. the code which is given below will work in that case where user selects the b2 and then press F8. Bu i don't want the user to pres F8. He will only select the b2 and will find the parameter (p_matnr) disabled.
    Please suggest something.
    AT SELECTION-SCREEN outpu.
    IF b2 = 'X'.
    LOOP AT SCREEN.
    IF screen-name cs 'p1' .
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    Thanks,
    Annup.

    Hi,
    Try this i have used this in my code
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    PARAMETERS:      rb_img    RADIOBUTTON GROUP rad1 user-command rad.
    PARAMETERS:      rb_invo   RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_img    RADIOBUTTON GROUP rad1.
    PARAMETERS:      p_from    like bkpf-bldat modif id gr2,
                     p_to      like bkpf-bldat modif id gr2.
    SELECT-OPTIONS:  s_arobj  FOR   toa01-ar_object modif id gr2.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_invo   RADIOBUTTON GROUP rad1.
    SELECT-OPTIONS:  s_bukrs   FOR bkpf-bukrs modif id gr1,
                     s_belnr   FOR bkpf-belnr modif id gr1,
                     s_gjahr   FOR bkpf-gjahr modif id gr1,
    SELECTION-SCREEN END OF BLOCK b_3.
    SELECTION-SCREEN END OF BLOCK b_0.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'GR1'.   "Name field
          IF rb_invo  = space.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ELSEIF screen-group1 = 'GR2'.
          IF rb_invo  = c_x.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
    Thanks & Regards,
    Judith.

  • How to fill another parameter automatically on selection screen?

    Hello Friends,
    I have two parameters on selection screen.
    Date
    ID
    When I do F4 for Date parameter, By calling following function it gives me date and ID value
      CALL FUNCTION 'F4_ZAHLLAUF'
       EXPORTING
         F1TYP               = 'D'
         F1NME               = ' '
         F2NME               = 'F110V-LAUFI'
         DISPLAY_LAUFK       = 'X'
         EXPLAIN_LAUFK       = ' '
       IMPORTING
         LAUFD               = v_laufd
         LAUFI               = v_laufi.
    All I need is when I do F4, It should automatic fill the ID parameter.
    Note : Date parameter filled automatically by doing F4.
    Please give me an example.
    Regards,
    RH

    interesting... if I try than it works
    can you copy the code here?
    Again, again, again: the importing parameters (f1nme and f2nme) of the FM has to get the names of the two selection screen fields for the payment run and date, the DYNP_VALUE_UPDATE FM will be called inside the F4_ZAHLLAUF FM in this case
    modified source code of Max:
    PARAMETERS: V_LAUFD TYPE F110V-LAUFD,
                V_LAUFI TYPE F110V-LAUFI.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_LAUFD.
    *  DATA: DYNAME     LIKE  D020S-PROG,
    *        DYNUMB     LIKE  D020S-DNUM,
    *        DYNPFIELDS TYPE  TABLE OF DYNPREAD WITH HEADER LINE.
      CALL FUNCTION 'F4_ZAHLLAUF'
           EXPORTING
                F1TYP         = 'D'
                F1NME         = 'V_LAUFD'
                F2NME         = 'V_LAUFI'
                DISPLAY_LAUFK = 'X'
                EXPLAIN_LAUFK = ' '
           IMPORTING
                LAUFD         = V_LAUFD
                LAUFI         = V_LAUFI.
    *  DYNAME = SY-REPID.
    *  DYNUMB = SY-DYNNR.
    *  DYNPFIELDS-FIELDNAME  = 'V_LAUFI'.
    *  DYNPFIELDS-FIELDVALUE = V_LAUFI.
    *  APPEND DYNPFIELDS.
    *  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    *       EXPORTING
    *            DYNAME     = DYNAME
    *            DYNUMB     = DYNUMB
    *       TABLES
    *            DYNPFIELDS = DYNPFIELDS.

  • Set the parameter in the selection screen of a program from another program

    Hi ALL,
    I need to call the program RHALESMD from another program and the program RHALESMD takes from date as one of the input parameter.how do i set the from date from the calling program and call RHALESMD
    Thanks
    Bala Duvvuri

    i got the answer
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Thanks
    Bala Duvvuri

  • Input help required for parameter on the selection screen

    hi all,
    i have created two parameters on the selection screen.
    1. deptno
    2.empname
    so my requirement is if i input any deptno then i should get all
    the empname corresponding to that deptno in the parameter empname
    ie for deptno 10 there should be f4 help for empname.
    here i am pasting my code plz check where i am doing wrong--
    *& Report  ZTEST10
    *& Developer
    *& Date:   &DATE
    REPORT  ZTEST10.
    tables: zemployee1.
    parameters: p_deptno like zemployee1-deptno,
                p_empnam like zemployee1-empname.
    Data: begin of itab occurs 0,
           deptno like zemployee1-deptno,
           empname like zemployee1-empname,
           empno like zemployee1-empno,
           end of itab.
    At selection-screen on value-request for p_empnam.
    select empname
            from zemployee1
            into corresponding fields of table itab
            where deptno = p_deptno.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
          DDIC_STRUCTURE         = ' '
            retfield               = 'empname'
          PVALKEY                = ' '
           DYNPPROG               = sy-repid
           DYNPNR                 = sy-dynnr
          DYNPROFIELD            = 'p_empnam'
          STEPL                  = 0
          WINDOW_TITLE           =
          VALUE                  = ' '
          VALUE_ORG              = 'C'
          MULTIPLE_CHOICE        = ' '
          DISPLAY                = ' '
          CALLBACK_PROGRAM       = ' '
          CALLBACK_FORM          = ' '
          MARK_TAB               =
        IMPORTING
          USER_RESET             =
          tables
            value_tab              = itab
          FIELD_TAB              =
          RETURN_TAB             =
          DYNPFLD_MAPPING        =
        EXCEPTIONS
          PARAMETER_ERROR        = 1
          NO_VALUES_FOUND        = 2
          OTHERS                 = 3
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    I will award ur efforts.
    Thanks
    sanjeev

    Hi Sanjeev,
    If you input any deptno and you should get all the empname corresponding then first you need to use CALL FUNCTION 'DYNP_VALUES_READ'.
    EXPORTING
        DYNAME                         = sy-repid
        DYNUMB                         = sy-dynnr
      TRANSLATE_TO_UPPER             = ' '
       REQUEST                        = 'A'
      PERFORM_CONVERSION_EXITS       = ' '
      PERFORM_INPUT_CONVERSION       = ' '
      DETERMINE_LOOP_INDEX           = ' '
      TABLES
        DYNPFIELDS                     = gt_dynp
    declare: DATA : gt_dynp LIKE dynpread OCCURS 0.
    loop at gt_dynp into wt_dynp where fieldname = 'P_SUPRID-LOW'.
      lv_low = wt_dynp-fieldvalue.
      endloop.
    Then while selecting use this p_superid-low instead of p_deptno.
    Then :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    After this funtion module:
    write:
      IF sy-subrc = 0.
        READ TABLE itab
    INDEX 1.
        'p_empnam' = return_tab-fieldval.
    Declare return_tab as:
        DATA: return_tab   LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    Thanks,
    Shweta
      ENDIF.

  • Hide a parameter in a select-screen

    hi
    I have this selection screen
    SELECTION-SCREEN BEGIN OF BLOCK tipo WITH FRAME.
    PARAMETERS: p_resumo RADIOBUTTON GROUP tipo,
    p_farm   RADIOBUTTON GROUP tipo.
    *RP(20.02.2009)-Reestruturação do módulo
    SELECT-OPTIONS: s_kunnr FOR qmel-kunum.
    PARAMETERS: p_sform  LIKE tnapr-sform OBLIGATORY
    DEFAULT 'ZLYSD_RESUMO_RECLAMACOES'.
    SELECTION-SCREEN: END OF BLOCK tipo,
    END OF BLOCK inicial.
    and i need
    if p_resumo is not initial, the select option s_kunnr doesn'appear or isn't a input field.
    How can i do this ?
    Thanks

    Hi,
    SELECTION-SCREEN BEGIN OF BLOCK tipo WITH FRAME.
    PARAMETERS: p_resumo RADIOBUTTON GROUP tipo,
    p_farm RADIOBUTTON GROUP tipo.
    *RP(20.02.2009)-Reestruturação do módulo
    SELECT-OPTIONS: s_kunnr FOR qmel-kunum.
    PARAMETERS: p_sform LIKE tnapr-sform OBLIGATORY
    DEFAULT 'ZLYSD_RESUMO_RECLAMACOES'.
    SELECTION-SCREEN: END OF BLOCK tipo,
    END OF BLOCK inicial.
    and i need
    if p_resumo is not initial, the select option s_kunnr doesn'appear or isn't a input field.
    You have to write the following code in AT SELECTION-SCREEN OUTPUT event.
    LOOP AT SCREEN.
        IF NOT p_resumo IS INITIAL.
           IF ( SCREEN-NAME EQ 'S_KUNNR-LOW' or SCREEN-NAME EQ 'S_KUNNR-HIGH' ).
              SCREEN-ACTIVE    = '0'             ---Field will be disabaled...
              SCREEN-INVISIBLE = '1'             ---Field will be invisible...
           ENDIF.
           MODIFY screen  .
      ENDIF.
    ENDLOOP.
    Regards,
    Anil Salekar

  • Odd behaviour with parameter id on selection screen

    Try this code
    PARAMETERS: p_fpath1 TYPE string LOWER CASE MEMORY ID rofile,
                p_fpath2 TYPE string LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath1.
      PERFORM get_filepath CHANGING p_fpath1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath2.
      PERFORM get_filepath CHANGING p_fpath2.
    *---------Forms
    FORM get_filepath CHANGING x_filepath TYPE string.
      DATA: l_filepath TYPE string.
      cl_gui_frontend_services=>directory_browse( CHANGING selected_folder = l_filepath ).
    * If no filepath selected, leave the filepath unchanged
      IF l_filepath IS NOT INITIAL.
        x_filepath = l_filepath.
      ENDIF.
    ENDFORM.
    Run the program, and use F4 to choose a file path for p_fpath1 and another for p_fpath2.
    Hit execute
    Leave the program.
    Run the program again.
    Use F4 to choose the filepaths for the two parameters.
    For me, it's fine for p_fpath2, but for p_fpath1, I get no directory selector.  In fact, to get it working again, I have to log off and log back on.
    I'd like to know if anyone else gets the same problem, and also if anyone knows how to fix it!
    thanks
    matt

    The issue was with the STRING VARIABLE in parameters decelaration.I just changed it to RLGRAP-FILENAME it worked.
    Try these codes.
    PARAMETERS: p_fpath1 TYPE rlgrap-filename LOWER CASE MEMORY ID rofile,
                p_fpath2 TYPE rlgrap-filename LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath1.
      PERFORM get_filepath CHANGING p_fpath1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath2.
      PERFORM get_filepath CHANGING p_fpath2.
    START-OF-SELECTION.
      WRITE : p_fpath1,p_fpath2.
    *---------Forms
    FORM get_filepath CHANGING x_filepath TYPE rlgrap-filename.
    *CALL METHOD cl_gui_cfw=>flush.
      DATA: l_filepath TYPE string.
      CLEAR :l_filepath,x_filepath.
      cl_gui_frontend_services=>directory_browse( CHANGING selected_folder = l_filepath ).
    * If no filepath selected, leave the filepath unchanged
      IF l_filepath IS NOT INITIAL.
        x_filepath = l_filepath.
      ENDIF.
    ENDFORM.                    "get_filepath
    LAST ENTERED VALUE WILL ALSO DISPLAY
    These codes work.
    Regards,
    Gurpreet

  • Adding selection parameter in VF04 selection screen

    Hi Gurus...
    I need to add a selection parameter on selection screen of VF04 transaction.
    Is it possible to do so?
    If yes, please tell me how.
    Thanks.

    HI Jagdish
    You can go in for Source Code Enhancements. (wont require the access key in this case)
    Note - Available SAP ERP 6.0 onwards
    1) Just click on the spiral (ENHANCE) button
    2) Right click on the suitable enhancement point / Enhancement Section
    3) Go to Enhancement Implementation -> Create
    4) Add your code in the enhancement implementation and activate
    You will need to add your code at multiple place (Obviously !!); just use the same implementation for all the Point / Sections you use in the program.
    Refer Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework for more.
    Hope it helps. Please revert in case of specific issues.
    Neeraj

  • Regarding the event AT SELECTION-SCREEN ON FIELD ..

    Hi experts,
    Can u plz tell the real advantage of the event AT SELECTION-SCREEN ON FIELD than
    AT SELECTION-SCREEN ..
    in which type of situations  AT SELECTION-SCREEN ON FIELD is needed??
    Thanks & Regards,
    sathish.

    Hi,
    when we are going to do two are more field validations at a time
    we can use AT SELECTION-SCREEN ON <fieldname>.
    if it is there single field we can use AT SELECTION-SCREEN.
    have a look.
    select-options: s_vbeln like vbak-vbeln,
                          s_vkorg like vbak-vkorg,
                          s_vtweg like vbak-vtweg,
                          s_matnr like vbap-matnr.
    AT SELECTION-SCREEN ON s_vbeln.
    select----
    if sy-subrc <> 0.
    error message.
    endif.
    AT SELECTION-SCREEN ON s_vkorg.
    select----
    if sy-subrc <> 0.
    error message.
    endif.
    AT SELECTION-SCREEN ON s_vtweg.
    select----
    if sy-subrc <> 0.
    error message.
    endif.
    AT SELECTION-SCREEN ON s_matnr.
    select----
    if sy-subrc <> 0.
    error message.
    endif.
    Regards.
    sriram.

Maybe you are looking for