Restrict values for F4 on field in Selection-screen

Hi,
For f4 on particular field I am getting list of values. These values are fixed in Value Range of DOMAIN of that field. There are 26  values fixed for that DOMAIN. Now what I need is I need to restrict 26th value from displaying on F4 for that field in selection screen.
I tried doing it in AT SELECTION SCREEN OUTPUT event  using F4_ON_VALUE REQUEST  FM, fetching data and deleting 26th entry , but before i delete it, It shows all values in selection-screen.
Please any one guide me.
  Thanks,
Vanitha P

You have to use AT SELECTION-SCREEN ON VALUE-REQUEST event.
Tables:mara.
TYPES :BEGIN OF gty_mtart,
       mtart TYPE mara-mtart,
       END OF gty_mtart.
DATA: gt_mtart  TYPE STANDARD TABLE OF gty_mtart,
      gtt_mtart TYPE gty_mtart.
DATA: gt_return_tab  TYPE TABLE OF ddshretval,
      gwa_return_tab TYPE ddshretval.
SELECT-OPTIONS:so_mtart FOR mara-mtart.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_mtart-low.
  REFRESH gt_mtart.
  gtt_mtart-mtart = 'Z01'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z02'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z03'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z04'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z05'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z06'.
  APPEND gtt_mtart TO gt_mtart.
  gtt_mtart-mtart = 'Z90'.
  APPEND gtt_mtart TO gt_mtart.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = ' '
          retfield               = 'SO_MTART-LOW'
*   PVALKEY                = ' '
*   DYNPPROG               = ' '
*   DYNPNR                 = ' '
*   DYNPROFIELD            = ' '
       value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
* IMPORTING
*   USER_RESET             =
        TABLES
          value_tab              = gt_mtart
*   FIELD_TAB              =
       return_tab             = gt_return_tab
*   DYNPFLD_MAPPING        =
     EXCEPTIONS
       parameter_error        = 1
       no_values_found        = 2
       OTHERS                 = 3
  IF sy-subrc = 0 AND gt_return_tab IS NOT INITIAL.
    CLEAR gwa_return_tab.
    READ TABLE gt_return_tab INTO gwa_return_tab INDEX 1.
    IF sy-subrc = 0 AND gwa_return_tab-fieldval IS NOT INITIAL.
      so_mtart-low = gwa_return_tab-fieldval.
    ENDIF.
  ELSEIF sy-subrc <> 0.
    REFRESH gt_return_tab.  CLEAR: gwa_return_tab.
  ENDIF.

Similar Messages

  • Field Validation for Authorization Object field on selection screen

    Hi Experts,
    We have included a new field u2018Authorization Objectu2019 in the selection screen which should be reflected in the field Authorization Object of the spool property. Please let us know how we can provide F4 help for this field and also validate it in the code.
    The data element "RSPOAUTH" is used for the field on selection screen parameter. However, as there is no value table attached to the domain, we are unable to provide any F4 help and hence cannot validate the field in the code.
    Looking forward for your valuable reply.
    Thanks in advance.
    --Warm Regards,
      Prajakta Kanitkar.

    Hi Prajakta,
       You can refer the following code for getting F4 help.
    TYPES: BEGIN OF stru_btc,
             zesgbtc TYPE zhr_del_btc,
           END OF stru_btc.
    DATA: it_btc TYPE STANDARD TABLE OF stru_btc
    SELECT-OPTIONS: s_zzbtc FOR pa0001-zzbtc NO INTERVALS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zzbtc-low.
      SELECT * FROM zbtc INTO CORRESPONDING FIELDS OF TABLE it_btc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BTC'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_ZZBTC'
          value_org       = 'S'
        TABLES
          value_tab       = it_btc
        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.
    Hope this will help you.
    Thanks & Regards.
    Aniruddha

  • Providing F4 help for the same field on selection screen

    Hello Experts,
    My requirement is :
    There are 2 radio buttons and a parameter "p_file" on my selection scree.
    1. rb_appl
    2. rb_pres
    If the radio button rb_appl = 'X', I need to place the logic of F4 help of application server for the field p_file. Else if the rb_pres = 'X', then I need to place the logic of F4 help of presentation server for the same field p_file.
    I have written the code in the below manner
    PARAMETERS: rb_appl RADIOBUTTON GROUP rad DEFAULT 'X',
                             rb_pres RADIOBUTTON GROUP rad ,
                             p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
          PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    But I am getting the F4 help for only the radio button for which i have placed the default value in the parameters.
    So please let me know how to define the F4 help for the same field based on the radio buttons.

    Hi,
    You can acheive the same by the addition of [USER-COMMAND fcode].
    RADIOBUTTON GROUP group [USER-COMMAND fcode] - The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    So you code should be altered as
    PARAMETERS: rb_appl  RADIOBUTTON GROUP rad
                         USER-COMMAND radclick    "Addition which you have to make.
                         DEFAULT 'X',
                rb_pres  RADIOBUTTON GROUP rad ,
                p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
        PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    Thanks & Regards,
    Harish

  • Default multiple values for formula variable on variable selection screen

    Hi All,
    Suppose 'A' is formula variable with customer exit as processing type then i want four default values for this variable eg: 3, 6,9, and 12 as selection options, when we will execute query user can able to pick any one of the default value.
    is it possible in BEx for formula variables?
    I also tried with ABAP code in 'cmod' t-code, but it is not working properly for 4 default values....but for single default value, code is working fine.
    I am using following code ::
    When 'ZCSIMCTB'. // variable name
    IF i_step = '1'.
    CLEAR : l_s_range.
    l_s_range-low = 3.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 6.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 9.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 12.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    Thanks in advance

    Hi Sankar,
    Thanks for reply...
    With single quotes also its not working.......
    Also as I am using Formula Variable so by default "Single Value" is coming on Variable Details....
    Regards,
    NIlesh

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • Restrict filter values that are shown in the selection screen

    Hi Experts
    1) Is it possible to restrict the filter values that are shown in the selection screen in BEx web? When a user are asked to enter a material number and uses the selection button in BEx web, he should only see material numbers for one specific plant. How is this done? 
    2) Is it possible to remove the selection button for å characteristic filter in the selection screen in BEx web? The selection button I am talking about is the button to the right of where you enter the filter value (two white papers on top of each other). If there is no solution for question 1 we have to go for question 2 solution.
    We are using BI 04s, SP 09.
    Kind regards
    Erik

    Hi Erik,
    It seems that you would like the user to see value for 1 single plant. If the Plant Value is fixed then you can use this value in the Query and hardcode it.> in the query go to the Plant Chrac and keep a constant value of the Plant.
    How ever if you need this value to be dynamic then use a variable for customer exit and populate this value using ABAP.
    Regards,
    Jasprit

  • How to get the value for the LIT_Withheld field in the city tax form?

    I am trying to get the value for the LIT_Withheld field on the city tax form , PAYUSEET.. This is not a database column but is generated based on some conditions.. Appreciate the help. Thanks, Suguna

    Hi Abhmanyu,
    Thanks for your response.
    Search Help Name : ZZ_MG_MARITAL_VH
    Selection Method  : T502T
    Search help parameters are SPRSL, FAMST, FTEXT,
    Can u provide me a sample code to fetch the value of corresponding text.
    Thanks,
    Hari

  • Validate a field on selection screen based on value entered on anothr field

    HI,
    There is a program with some fields in selection screen in EWM. The first field is Warehouse. I need to add another field 'Entity to Dispose' in such that what ever value I enter in Warehouse field, its corresponding values should only be displayed as F4 help for 'Entity to Dispose' field.
    For eg: If I select the warehouse as 0799(lets say), then the F4 help for Entity to Dispose field should display only the values which are related to warehouse 0799 (and any other values pertaining to other warehouse should not appear).
    Could anyone suggest, how this can be achieved?
    Thanks in advance.
    Regards,
    Pavan

    Hi,
    You can use FM
    DYNP_VALUES_READ
    DYNP_VALUES_UPDATE
    to read the another field value and Using that field build your internal table for f4 values.
    and use FM F4IF_INT_TABLE_VALUE_REQUEST for F4 values..
    do this on AT SELECTION-SCREEN ON VALUE REQUEST FOR <YOUR_F4_FIELDNAME>.

  • F4 help for PO number field with SELECT OPTIONS

    Hi all,
    I have a field (PO no) using SELECT OPTIONS on my selection screen.I need F4 help for this field.How shud i declare it?
    I have declared it as follows:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    select-options sel_po for ZPO_LOI-zobject_id obligatory .
    SELECTION-SCREEN END OF BLOCK b1.
    ZPO_LOI is a table view with a z data element ZOBJECT_ID to which i have attached a search help which displays the required values for the PO field in the selection screen.But now the problem is i cant see the F4 icon for the field on the sel screen.
    Please help.

    Hi I have a sapmle code for this.
    *&                AT SELECTION SCREEN ON VALUE REQUEST
    *-- F4 help for IDOC numbers
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-low.
      PERFORM value_request_status USING 'S_DOCNUM-LOW'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-high.
      PERFORM value_request_status USING 'S_DOCNUM-HIGH'.
    *&      Form  value_request_status
          text
         -->fp_field  dynpro field that gets the return value
    FORM value_request_status  USING fp_field TYPE dynfnam.
      STATICS tl_values TYPE STANDARD TABLE OF tp_value.
      IF tl_values IS INITIAL.
         SELECT docnum FROM edidc UP TO 500 ROWS INTO TABLE tl_values
              WHERE credat   IN  s_credat
              AND   cretim   IN  s_cretim.
         IF sy-subrc eq 0.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
              retfield        = 'DOCNUM'
              dynpprog        = syst-repid
              dynpnr          = syst-dynnr
              dynprofield     = fp_field
              value_org       = 'S'
             TABLES
              value_tab       = tl_values
             EXCEPTIONS
              parameter_error = 1
              no_values_found = 2
             OTHERS          = 3.
             IF sy-subrc IS NOT INITIAL.
               MESSAGE i999(zz) WITH 'No values found'(004).
             ENDIF.
          ENDIF.
        ENDIF.
    ENDFORM.                    " value_request_status
    Regards,
    Amit.

  • F4 for field at selection screen

    Hi all.
    I have a field at selection screen without any standard F4 on it.
    SELECT-OPTIONS: S_EXCMSG FOR  T458A-AUSKT.        "Exception message
    How can I implement F4 for this field?
    Thanks,
    Rebeka

    Hi,
    Try using the FM " F4IF_INT_TABLE_VALUE_REQUEST "
    A Sample Examle:
    REPORT  Z_TEST_F4_HELP.
    TABLES: ZEMPLOYEE,MARA.
    DATA: BEGIN OF ITAB OCCURS 0,
           ENO LIKE ZEMPLOYEE-ENO,
           ENAME LIKE ZEMPLOYEE-ENAME,
           EAGE LIKE ZEMPLOYEE-EAGE,
           SALARY LIKE ZEMPLOYEE-SALARY,
           END OF ITAB.
    PARAMETERS: P_ENO LIKE ZEMPLOYEE-ENO,
                P_MATNR LIKE MARA-MATNR.
    TYPES: BEGIN OF ts_mara,
    matnr TYPE matnr,
    ersda TYPE ersda,
    ernam TYPE ernam,
    END OF ts_mara.
    DATA : lt_mara TYPE TABLE OF ts_mara.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE LT_MARA UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'P_MATNR '
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      TABLES
        VALUE_TAB              = LT_MARA
      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.
    Regards,
    Ruthra

  • What is the initial value for a numeric field ??

    Can someone tell me what the INITIAL VALUE FOR A NUMERIC FIELD is ?? Thank you
    Rod.

    Using the following...
       class MyClass
         int myvar1;  // Default initial value
         int myvar2 = 3;  // Default initial value and default value
         MyOtherClass myclass1; // Default initial value
         void doit()
           int mylocal1;  // No value
           MyOtherClass myclass2; // No value
    All number member variables, like myvar1 start off with andefault initial value which is zero. For booleans this is false. Object reference variables, like myclass1, have a null value.
    All local numeric variables are considered undefined. So mylocal1 and myclass2 are undefined. Before you can use them you must explicitly provide a value.
    Finally note that myvar2 will have two values during class instantiation. Initially it will have a value of zero. Sometime later it will have the value of 3. (When that happens is very definitely outside the scope of what this forum covers. If you want to know then ask in the advanced forum.)

  • Passing multiple values for a single field in URL to call sap Transaction

    Hi All,
    I need to pass multiple values for a single field to SAP transaction .
    means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
    Let me know pls.
    Regards,
    Sirisha.R.S.

    Hi Satyajit,
    I need to call a transaction with multiple values which gives me the report based on those values.
    So I need to pass multiple values for a single parameter.
    I hope u got it.
    Regards,
    Sirisha.R.S.

  • "You must specify a value for this required field" in SharePoint list

    HI All,
    I have a couple of taxonomy fields in my content type. When I try to add a new item with my content type and save, I'm getting an error message "You must specify a value for this required field" against each taxonomy field. I'm not sure what am
    I missing. I deleted the content type and added that again to my list but still no luck. Can someone please help me out? Thanks.
    Regards,
    SC Vinod

    hi
    it depends how you updated existing field. We faced with the problem that update of taxonomy site column was not propagated to the lists. In Sharepoint when content type is bound to the list, new hidden content type is created for that list - you may check
    it if will enumerate
    SPList.ContentTypes property. And when you try to update site column changes may not be propagated to these list content types. In order to update it you need to get reference on a field from list content type and update if explicitly.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

Maybe you are looking for

  • BAPI_SALESORDER_CHANGE

    Hi All, I have a requirement to change the reasons for rejection for selective items in the sales order. but when i use BAPI_SALESORDER_CHANGE. i get the error: Field ABGRU cannot be changed VBAPKOM 0003000ready for input. Sales document not changed.

  • Setting bind variables for VO in JUnit test case

    Hi, I am using Jdeveloper 11.1.2.2 I have a problem while writing the test case for VO in JUnit. For the Remove method in the Test case , I have passed variables into the VO by using a setWhereClause() . Like this :         view.setWhereClause(null);

  • ABAP Advance document

    Hi All, Do you have any documents about ABAP Advance, pls share link to download or send to me: [email protected] Thanks!

  • How to search for BAPI or FM for some requirement

    Hi, I have one requirement for a standard transaction. i want to search for a BAPI or FM.

  • Using external keyboard w 10 key buttons

    I've got an A1048 keyboard connected to my MacBook Pro (it's got all my Final Cut Pro stickers on it) and the 10 key pad doesn't work. It seems like it's acting as a function key or something. When I start typing on it (out of habit), I can't enter t