Code for i_step = 2 in user exit ZXRSRU01 for selection screen validation

Hello Experts,
I have BI report, in which on selection screen I have 4 formula variable.
I want to check, what number user has entered in these variables and summation of these fields should not be getter than 100 or less than 100. It should be 100 only. If that summation is not 100 then, I have to display message and again go back to selection screen so that user will make the correction.
I came to know that for this I have to write a code in user exit ZXRSRU01, when  i_step = 2. I have written the code but it's not working. I have declare one more variable which is not ready for input and which I am checking in the code.
Can anyone help me out in this regards.
Thanks
Chetan

Hi
Have you gone through the proper steps for creating and activating the enhancement?
You can find more detailed documentation in the[ SAP Help|http://help.sap.com/saphelp_nw70/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm].
Regards

Similar Messages

  • Code for selection screen,  urgent

    Hi Everyone,
      I need code for selection screen.
      I have four radio buttons, p1, p2,p3,p4(assume)
    If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
    Regards,
    Nagaraju

    Hi,
    REPORT ZTEST222 .
    PARAMETERS : p_add  RADIOBUTTON GROUP radi
                             USER-COMMAND radio MODIF ID MOD,
      p_disp RADIOBUTTON GROUP radi DEFAULT 'X'  MODIF ID pod,
      p_chng RADIOBUTTON GROUP radi MODIF ID rad,
      p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
    SELECT-OPTIONS : s_idn    FOR  vendor   MODIF ID mod,
                                   s_pcode  FOR ws_c_pcode MODIF ID pod.
    PARAMETERS:  p_plant    LIKE  zaw_pol_plan-plant   MODIF ID rad,
                 p_zzvend   LIKE  zaw_pol_plan-zzvendor   MODIF ID cod.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_add EQ 'X'.
          IF screen-group1 EQ 'MOD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_disp EQ 'X'.
          IF screen-group1 EQ 'POD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_chng EQ 'X'.
          IF screen-group1 EQ 'RAD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_er_log EQ 'X'.
          IF screen-group1 EQ 'COD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    Pls. reward if useful
        ENDLOOP.
    Pls. reward if useful

  • Creating Transaction code for selection screen of one ztable

    Hi ,
        i have one Ztable in order see the data in it , he wants one new transaction . by executing tht transaction he wants to view the data inside the table.
    i have created one transaction code by taking the transaction type as report transaction and program name i gave the selection screen program of tht table.
    when i executed tht t code  selection screen of table contents should come and on executing it i have to get  data.
    but im not getting data on executing tht selection screen .
    why? for this scenario which tcode type i have to select.

    Hi Pavan,
    Check this,
    Step 1
    Create parameter transaction (i.e. via SE93)
    Select the fourth options
    Step 2
    Enter transaction details. Within the Proposed values section there are a number of value which
    can be setup, simply use drop down menu to view the list. The 2 values assigned in the following
    example are as follows:
                   VIEWNAME:        Set table name to maintained
                   UPDATE:               Open table for update
    Mohinder

  • Code for selection screen

    hi all,
    in selectin screen i have to populate two fields VIQMEL-KDAUF(sales order) & VIQMEL-QMNUM( shop visit notification),
    here i have to give any of the inputs.like, if i give the SALES ORDER  as input, SVN should be retrived& if SVN is given as input SO should be retrived.
    depending on the given input the second input also should be retrived and passed to others as input.
    can any one send me the code for this..i need it immediately.

    Hi,
    Tables: viqmel.
    Data: begin of it_itab occurs 0,
               ls_qmnum like viqmel-qmnum,
               ls_kdauf like viqmel-kdauf,
            end of it_itab.
    select-options: s_qmnum for viqmel-qmnum,
                           s_kdauf for viqmel-kdauf.
    select QMNUM KDAUF
               from VIQMEL
               into table it_itab
               where qmnum in s_qmnum
               OR kdauf in s_kdauf.
    loop at itab.
    write: /it_itab-ls_kdauf,  it_itab-ls_qmnum.
    endloop.
    Reward pts if helpfull

  • Examples of code ritten in includes in user exits

    Can anyone send some examples on code written in includes of user exits.
                                       Thanks in advance

                   U S E R   E X I T   F O R   P A 0 0 0 8               *
    IF innnn-infty = '0008' AND
    ( ipsyst-ioper = 'INS' OR
       ipsyst-ioper = 'COP' ).
                 G L O B A L   D E C L A R A T I O N S                   *
      DATA:
          g_lga         TYPE lgart,      " Wagetype
          g_count(2)    TYPE n,
          g_cnt_blank(2) TYPE n,          " Record position for hrly WT
          g_cnt_hrly(2) TYPE n,          " Record position for hrly WT
          g_cnt_inc(2)  TYPE n,          " Record position for inc WT
          g_cnt_lng(2)  TYPE n,          " Record position for lng WT
          g_cnt_ret(2)  TYPE n,          " Record position for ret WT
          g_wtype(11)   TYPE c,          " Wage type
          g_wrate(11)   TYPE c,          " Wage rate
          g_ht510_rate  TYPE betrg,      " Default rate for WT0011 from T510
          g_maxrate_inc TYPE betrg,      " Maximum Incumbency Rate
          g_maxrate_lng TYPE betrg,      " Maximum Longevity Rate
          g_maxrate_ret TYPE betrg.      " Maximum Retention Rate
                      D A T A   D E C L A R A T I O N                    *
      DATA:
          it_9006       TYPE TABLE OF pa9006,
          st_9006       TYPE pa9006,
          i0008         TYPE p0008,
          st_grdcode    TYPE zthhr_grdcode.
                      F I E L D    S Y M B O L S                         *
      FIELD-SYMBOLS: <fs_wtype> TYPE ANY, " Used for Wage Type
                     <fs_wrate> TYPE ANY. " Used for Amount
                      C O N S T A N T S                                  *
      CONSTANTS:
        c_molga_10   type molga value '10',    " Country grp for US
        c_hlgar_0011 TYPE lgart VALUE '0011',  " Hourly Wage Type
        c_ilgar_0012 TYPE lgart VALUE '0012',  " Incumbent Wage Type
        c_llgar_0147 TYPE lgart VALUE '0147',  " Longevity Wage Type
        c_rlgar_01e0 TYPE lgart VALUE '01E0',  " Retention Wage Type
        c_subty_inc  TYPE subty VALUE '1',     " Subtype for Incumbency
        c_subty_lng  TYPE subty VALUE '4',     " Subtype for Longevity
        c_subty_ret  TYPE subty VALUE '5'.     " Subtype for Retention
                      P R O C E S S I N G                                *
    Typecast PRELP to PNNNN structure
      CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
        EXPORTING
          prelp = innnn
        IMPORTING
          pnnnn = i0008.
    Refresh & Clear Process variables.
      CLEAR:  g_lga, g_count, g_cnt_blank, g_cnt_hrly, g_cnt_inc,
              g_cnt_lng, g_cnt_ret, g_wtype, g_wrate, g_maxrate_inc,
              g_maxrate_lng, g_maxrate_ret.
    Populate all unexpired & applicable records of IT9006 of subtype:
    Incumbency, Longevity and Retention
      REFRESH: it_9006.
      SELECT * FROM pa9006 INTO TABLE it_9006
              WHERE pernr EQ i0008-pernr
                AND begda LE i0008-begda
                AND endda GE i0008-begda
                AND ( subty EQ c_subty_inc
                OR    subty EQ c_subty_lng
                OR    subty EQ c_subty_ret )
                AND zapplflg EQ 'X'.
    Sort IT9006 Table descending based on Amount
      SORT it_9006 BY zwage zaddamt DESCENDING.
    Check for validity of Pay Scale Group & Level
      SELECT * FROM zthhr_grdcode UP TO 1 ROWS
                      INTO st_grdcode
                     WHERE trfgr = i0008-trfgr
                       AND trfst = i0008-trfst.
      ENDSELECT.
      IF sy-subrc EQ 0.
      If valid, read the Maximum Incumbency Rate
        READ TABLE it_9006 INTO st_9006
                           WITH KEY zwage = c_ilgar_0012
                                    zgrdcode = st_grdcode-grdcode
                           TRANSPORTING zaddamt.
        IF sy-subrc EQ 0.
          g_maxrate_inc = st_9006-zaddamt.
        ENDIF.
      ENDIF.
    Get Max Longevity rate
      READ TABLE it_9006 INTO st_9006 WITH KEY zwage = c_llgar_0147
                         TRANSPORTING zaddamt. " to g_maxrate_inc.
      IF sy-subrc EQ 0.
        g_maxrate_lng = st_9006-zaddamt.
      ENDIF.
    Get Max Retention rate
      READ TABLE it_9006 INTO st_9006 WITH KEY zwage = c_rlgar_01e0
                         TRANSPORTING zaddamt. " to g_maxrate_inc.
      IF sy-subrc EQ 0.
        g_maxrate_ret = st_9006-zaddamt.
      ENDIF.
      CLEAR : g_count, g_cnt_blank, g_cnt_hrly, g_cnt_inc,
              g_cnt_lng, g_cnt_ret.
    Check Infotype 0008 Wagetype entries
      DO 40 TIMES
          VARYING g_lga FROM i0008-lga01 NEXT i0008-lga02.
        g_count = g_count + 1.
        IF NOT g_lga IS INITIAL.      " Fill max no of field filled
          g_cnt_blank = g_count.
        ENDIF.
        IF g_lga = c_hlgar_0011.      " Get Rec Pos for Hrly WT
          g_cnt_hrly = g_count.
        ELSEIF g_lga = c_ilgar_0012.  " Get Rec Pos for Inc WT
          g_cnt_inc = g_count.
        ELSEIF g_lga = c_llgar_0147.  " Get Rec Pos for Lng WT
          g_cnt_lng = g_count.
        ELSEIF g_lga = c_rlgar_01e0.  " Get Rec Pos for Ret WT
          g_cnt_ret = g_count.
        ENDIF.
      ENDDO.
      g_cnt_blank = g_cnt_blank + 1.  " Next Avl. Pos for WT entry
    Incumbency Processing
    0011 and 0012 both not found
      IF g_cnt_hrly = 0 AND  g_cnt_inc = 0.
    Do Nothing
    0011 Not found but 0012 found
      ELSEIF g_cnt_hrly = 0 AND  g_cnt_inc > 0.
        CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
        CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
        ASSIGN (g_wtype) TO <fs_wtype>.
        ASSIGN (g_wrate) TO <fs_wrate>.
        IF g_maxrate_inc <> 0.
          <fs_wtype> = c_ilgar_0012.
          <fs_wrate> = g_maxrate_inc.
        ELSE.
        If WT0012 has expired in IT9006, revert to WT0011 with
          default rate from T510
          <fs_wtype> = c_hlgar_0011.
          SELECT betrg FROM t510 UP TO 1 ROWS
                       INTO g_ht510_rate
                      WHERE molga = c_molga_10
                        AND trfar = i0008-trfar
                        AND trfgb = i0008-trfgb
                        AND trfgr = i0008-trfgr
                        AND trfst = i0008-trfst
                        AND lgart = c_hlgar_0011
                        AND begda LE i0008-begda
                        AND endda GE i0008-endda.
          ENDSELECT.
          IF sy-subrc = 0.
            <fs_wrate> = g_ht510_rate.
          ENDIF.
        ENDIF.
    0011 found but 0012 Not found
      ELSEIF g_cnt_hrly > 0 AND  g_cnt_inc = 0.
        IF g_maxrate_inc <> 0.
        Update 9006 amount if greater. And Replace 0011 with 0012
          CONCATENATE 'I0008-LGA' g_cnt_hrly INTO g_wtype.
          CONCATENATE 'I0008-BET' g_cnt_hrly INTO g_wrate.
          ASSIGN (g_wtype) TO <fs_wtype>.
          ASSIGN (g_wrate) TO <fs_wrate>.
          IF <fs_wrate> < g_maxrate_inc.
            <fs_wtype> = c_ilgar_0012.
            <fs_wrate> = g_maxrate_inc.
          ELSE.
          Do Nothing
          ENDIF.
        ELSE.
        Do Nothing
        ENDIF.
    0011 and 0012 both found
      ELSEIF g_cnt_hrly > 0 AND  g_cnt_inc > 0.
      Rate in IT9006 exists.
        IF g_maxrate_inc <> 0.
        Remove existing 0011
          CONCATENATE 'I0008-LGA' g_cnt_hrly INTO g_wtype.
          CONCATENATE 'I0008-BET' g_cnt_hrly INTO g_wrate.
          ASSIGN (g_wtype) TO <fs_wtype>.
          ASSIGN (g_wrate) TO <fs_wrate>.
        If hourly rate < Max Inc Rate, Clear Hrly WT & update WT0012
          IF <fs_wrate> LT g_maxrate_inc.
            CLEAR : <fs_wtype>, <fs_wrate>.
          Update existing 0012 with new amount
            CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
            CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
            ASSIGN (g_wtype) TO <fs_wtype>.
            ASSIGN (g_wrate) TO <fs_wrate>.
            <fs_wtype> = c_ilgar_0012.
            <fs_wrate> = g_maxrate_inc.
        If hourly rate > Max Inc Rate, clear WT0012
          ELSE.
            CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
            CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
            ASSIGN (g_wtype) TO <fs_wtype>.
            ASSIGN (g_wrate) TO <fs_wrate>.
            CLEAR : <fs_wtype>, <fs_wrate>.
          ENDIF.
      Rate in IT9006 do not exists.
        ELSE.
        Let 0011 be there but remove 0012.
          CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
          CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
          ASSIGN (g_wtype) TO <fs_wtype>.
          ASSIGN (g_wrate) TO <fs_wrate>.
          CLEAR : <fs_wtype>, <fs_wrate>.
        ENDIF.
      ENDIF.
    Longevity Processing
    Wage type 0147 already exists
      IF g_cnt_lng > 0.
        CONCATENATE 'I0008-LGA' g_cnt_lng INTO g_wtype.
        CONCATENATE 'I0008-BET' g_cnt_lng INTO g_wrate.
        ASSIGN (g_wtype) TO <fs_wtype>.
        ASSIGN (g_wrate) TO <fs_wrate>.
      IT9006 contains the rate.
        IF g_maxrate_lng > 0.
        Update the existing amount
          <fs_wtype> = c_llgar_0147.
          <fs_wrate> = g_maxrate_lng.
        ELSE.
        Remove Wage Type 0147
          CLEAR <fs_wtype>.
          CLEAR <fs_wrate>.
        ENDIF.
    Currently no 0147 exists
      ELSE.
      IT9006 contains the rate.
        IF g_maxrate_lng > 0.
        Add 0147 with amount
          CONCATENATE 'I0008-LGA' g_cnt_blank INTO g_wtype.
          CONCATENATE 'I0008-BET' g_cnt_blank INTO g_wrate.
          ASSIGN (g_wtype) TO <fs_wtype>.
          ASSIGN (g_wrate) TO <fs_wrate>.
          <fs_wtype> = c_llgar_0147.
          <fs_wrate> = g_maxrate_lng.
          g_cnt_blank = g_cnt_blank + 1.
      IT9006 does not contain the rate.
        ELSE.
        Do Nothing
        ENDIF.
      ENDIF.
    Retention Processing
    Wage type 01E0 already exists
      IF g_cnt_ret > 0.
        CONCATENATE 'I0008-LGA' g_cnt_ret INTO g_wtype.
        CONCATENATE 'I0008-BET' g_cnt_ret INTO g_wrate.
        ASSIGN (g_wtype) TO <fs_wtype>.
        ASSIGN (g_wrate) TO <fs_wrate>.
      IT9006 contains the rate.
        IF g_maxrate_ret > 0.
        Update the existing amount
          <fs_wtype> = c_rlgar_01e0.
          <fs_wrate> = g_maxrate_ret.
        ELSE.
        Remove Wage Type 01E0
          CLEAR <fs_wtype>.
          CLEAR <fs_wrate>.
        ENDIF.
    Currently no 01E0 exists
      ELSE.
      IT9006 contains the rate.
        IF g_maxrate_ret > 0.
        Add 01E0 with amount
          CONCATENATE 'I0008-LGA' g_cnt_blank INTO g_wtype.
          CONCATENATE 'I0008-BET' g_cnt_blank INTO g_wrate.
          ASSIGN (g_wtype) TO <fs_wtype>.
          ASSIGN (g_wrate) TO <fs_wrate>.
          <fs_wtype> = c_rlgar_01e0.
          <fs_wrate> = g_maxrate_ret.
          g_cnt_blank = g_cnt_blank + 1.
      IT9006 does not contain the rate.
        ELSE.
        Do Nothing
        ENDIF.
      ENDIF.
    Typecast the PNNNN to PRELP structure
      CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
        EXPORTING
          pnnnn = i0008
        IMPORTING
          prelp = innnn.
    Show Data Again Switch to display the field values again
      show_data_again = 'X'.
    ENDIF.

  • How to write HTML code in Web Template for selection screen

    Hello All,
    Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
    I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
    if so, how.
    My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen.  I was thinking of putting this text using HTML code in the selection screen.
    Regards,
    Nagendra.

    Hi Erick,
    No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
    Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
    Regards,
    Nagendra.

  • Need code for this Small validation on when-validate-item

    Hi All,
    I have a text item(date datatype) in forms 4.5 I need to do a small validation want to write on when-validate-item. When I enter a date in that text item (Ex 10-JUN-2005) it has to check
    1) It Cannot be "blank"
    2) It cannot be "Not older than today"
    can you please put me code for this small validation. I am new to Forms.
    Thanks in Advance,
    Reddy

    I always put code in the when-validate-RECORD trigger to ensure fields are entered, rather than setting the property. That way, the user can enter other fields within the record, and then gets a message that the field is required only when leaving the record.
    ...of course, if the date item is the only field in the block, then the when-validate triggers will not run unless the user at least types a space in the date. In that case, you need to check in the key-commit trigger.

  • Need code for this checkbox validation

    There are 3 checkboxes on my form cb1,cb2,cb3.I need the code for the below validations..
    if I check the checkbox cb1 then cb2,cb3 should be disabled(grayed, should not allow to
    check). when i unchecked cb1 all 3 boxes should be enabled and then if i check cb2
    then cb1,cb3 should be disabled.
    At any point of time only one checkbox should be checked and
    remaining 2 will be disabled/grayed.
    hope its clear.
    thanks in advance
    Devender

    Hello,
    You can enable/disable your check box items with the:
    Set_Item_Property( 'item_name', ENABLED, PROPERTY_TRUE | PROPERTY_FALSE ) Built-in.
    If Checkbox_Checked( 'chk1' ) Then
       Set_Item_Property( 'chk2', ENABLED, PROPERTY_FALSE ) ;
       Set_Item_Property( 'chk3', ENABLED, PROPERTY_FALSE ) ;
    End if ;
    ...Francois

  • I have set up as security password-code for home screen.  So when I turn it on, I forgotten the correct code and I'm locked out for 60 minutes ;(  How do I retrieve or reset so I can use phone

    I have set up as security password-code for home screen.  So when I turn it on, I forgotten the correct code and I'm locked out for 60 minutes ;(  How do I retrieve or reset so I can use phone again. Please help!

    You need to connect to iTunes and restore the iPhone to remove the passcode...then from a recent backup restore the content.

  • Global Variable for selection screen variable

    Hi All,
    We need to create a report where calendar day has to be included in the selection screen.Later after executing the report we should be able to retrieve the selection screen input for calendar day and modify it and use the modified one for other calculations.Can somebody help me out in finding the global variable in the variable exit where we find all the inputs for selection screen variables....
    Regards,
    Shravani

    shravani,
    I_vnam will store the varaible names...if you have varaible in the query...
    please use this code for ur help...
    DATA: ww_der_date LIKE sy-datum,
            wzdate LIKE sy-datum,
            wzact_gi_dte TYPE /bi0/oiact_gi_dte.
      wzact_gi_dte = sy-datum.
      IF i_step = 2.
        READ TABLE i_t_var_range INTO wa_i_t_var_range WITH KEY vnam =
        'ZNODAYS'.
        ww_der_date = sy-datum - wa_i_t_var_range-low.
            CLEAR wa_i_t_var_range.
        IF i_vnam = 'ZVAGIDCUSTEXIT'.
          CLEAR l_s_range.
          l_s_range-low    =  ww_der_date .
          l_s_range-high   =  wzact_gi_dte.
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'BT'.
          APPEND l_s_range TO e_t_range.
          CLEAR l_s_range.
        ENDIF.
      ENDIF.
    in this case user will enter no.of days in ZNODAYS and that being is used in calculation and used in the next varaible....

  • Dinamic variant for selection screen

    Hi,
    I got a requirement where i need  a Dynamic variant for selection screen .There is a date field in the selection screen i want to create  a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
    Regards,
    Ravi

    Hi,
    Using Customer Exit code you can give it.
    Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    WHEN 'ZV_DAT'.
        IF i_step = 1 .
          CLEAR l_s_range.
          l_s_range-low = sy-datum.
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    Thanks
    Reddy

  • Using NAST info for selection screen design

    Hi
    I am doing customization for RFQ printing ( TCODE ME9A)
    I want to know can I get the same selection screen as of ME9A using NAST info for my z driver program.
    Which function module can be used?
    Kindly provide sample code
    Regards
    Harshada

    Hi Piyush,
    Add the below code in your program.
    *Note: you have to take two parameters for files.
    If you select check box then p_pc parameter is visible.
    if you dont select check box then p_app parameter is visible.
    PARAMETERS: p_chk1 AS CHECKBOX USER-COMMAND rusr.
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS: p_pc  LIKE rlgrap-filename MODIF ID abc.
    PARAMETERS: p_app LIKE rlgrap-filename MODIF ID def.
    SELECTION-SCREEN: END OF BLOCK blk1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          CLEAR: p_pc, p_app.
          IF p_chk1 = 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
        IF screen-group1 = 'DEF'.
          CLEAR: p_pc, p_app.
          IF p_chk1 <> 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_app.
      PERFORM get_fname_app.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pc.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_pc.
    *&      Form  get_fname_app
          text
    FORM get_fname_app.
      DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
      search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
      file_path LIKE dxfields-longpath.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          i_location_flag = 'A'
          i_server        = ' '
          i_path          = search_dir
          filemask        = c_fnh_mask
          fileoperation   = 'R'
        IMPORTING
          o_path          = file_path
        EXCEPTIONS
          rfc_error       = 1
          OTHERS          = 2.
      IF sy-subrc EQ 0.
        p_app = file_path.
      ENDIF.
    ENDFORM.                    "get_fname_app

  • Transaction Variant for Selection Screen

    Hi, experts!
    A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
    Any hints are more than welcome!
    Regards,
    Thomas

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Change default value (200) of Max No of Hits for selection screen in WAD

    How do i change the default value of Maximum Number of Hits from 200 to 1000 for selection screen's find box in Web Application Designer .
    Thanks in Advance
    Points will be surely Rewarded

    Dear Hammad,
    Please refer to the wiki created by me,
    http://wiki.sdn.sap.com/wiki/display/BI/Information+on+the+user+setting+for+the+selector+dialog
    Regards,
    Arvind

  • How to set default variant for selection screen

    Hi,
    I want to make one variant as default for selection screen for one user.
    For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
    I am not seeing any way to do this. please help me..
    Thanks
    Srini

    Hi,
    If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
    This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
    Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
    This will solve your problem and you can make n number of variants and assign it to different users.
    Regards,
    Arpit

Maybe you are looking for