Prefill "Restrict value range" ?

Hello. My first posting, but after searching, I can't find any threads discussing this subject.
So:
My code is like this:
  select-options: %%hyperi for ska1-saknr,
                  %%saknr for ska1-saknr.
When the users press F4 on these fields, they get the same search-help. I want to prefill this search-help so that correct "sub-sheet" is selected, and values are correct.
Is this possible?
I've tried to use
  at selection-screen on value-request for %%hyperi-low
  and so on..
after filling an internal table, but the funcionality isn't good enough I feel.

Hi Helge,
It is not very clear whether you just want the user to get a different "tab" of the search help for each of these fields, or whether you (also) want to fill your own values into the search-help. I shall try to explain to you both these cases.
Case 1 : You just want to display a different tab for the user for each of these fields, when he presses F4.
The search help SAKO, which is being used in this case, has around 8 different tabs from which the user can select a value. This search-help is therefore called a "Collective search-help", becauses you are providing the suer with several ways of obtaining the input help through a single search-help.
Now, let us assume that you want the user to be able to select from "G/L account number in company code" for the first field. That is to say, when he presses F4 for the first field, he should be able to see only that tab of the actual search-help.
In your program, you will ahve to code something like this:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_HYPERI-LOW.
  call function 'F4IF_FIELD_VALUE_REQUEST'
    exporting
      tabname    = 'SKA1'
      fieldname  = 'SAKNR'
      SEARCHHELP = 'GL_ACCT_CA_NO' 
    tables
      return_tab = ITAB_RETVAL.
      IF ITAB_RETVAL[] IS NOT INITIAL.
        READ TABLE ITAB_RETVAL INDEX 1.
        S_HYPERI-LOW = ITAB-RETVAL-FIELDVAL.
      ENDIF.
Here ITAB_RETVAL is the return table which contains the entry the user has selected. It is of the type DDSHRETVAL.
2. If you want to use your own values in the F4 help of the user, it is generally recommended to use the search-help exit. However, you can always programmatically control that,too. The function Module F4IF_INT_TABLE_VALUE_REQUEST can be used for the same. Please go through the documentation for this Function Module - SAP has explained it better than I ever can :-).
In general, you should always try to search for the Function Modules beginning with F4IF* for any information on programming the input-help.
Hope this information has been useful.
Regards,
Anand Mandalika.
P.S: In case you did not get how I obtained the search-help GL_ACCT_CA_NO for use in the above example, just go to SE11, and display the search-help SAKO. you will find a tab called "Included search helps". Just dig a little deeper into it and at the end of it, you will understand how several elementary search-helps make up the different tabs of the collective search help.

Similar Messages

  • F4 help:Restrict Value Range

    Hello Experts,
    I want to a search help for one field such that when user click on F4 help , it will again pop- up with one  screen, in which I need to have 2- 4 fields to Restrict the values then user enter some values here then F4 help will appaer.
    Like in standard tables mseg-lifnr F4 help Restrict Value Range screen , but i require only one tab
    Plz suggest
    Aastha

    Hello,
    Use the following piece of code.
    Parameter : p_value type ......
      TYPES : BEGIN OF y_value,
                      value TYPE text6,
                     END OF y_value.
      DATA : t_value TYPE STANDARD TABLE OF y_value.
      DATA: t_return TYPE STANDARD TABLE OF ddshretval.
    Fill table t_value with the values which  u require in the F4 help.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield         = 't_value-value' 
          dynpprog     = sy-repid
          dynpnr         = sy-dynnr
          dynprofield   = 'p_email'     
    TABLES
          value_tab       = t_value
          return_tab      = i_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.

  • ECATT: Recording "Restrict Value Range" screen for CO58

    Hi,
    I need to provide PI Sheet # for CO58 (Process a material). Here, I search the PI Sheet # from Process Order # when I perform this manually. But, when recording this via TCD Mode or SAPGUI mode, I am not able to record the part where PI Sheet # is searched through the "Restrict Value Range" screen through Process Order #.
    How can I record this part?
    OR
    Is there any way to obtain PI Sheet number from PO # through some other transaction. I tried using CO60 but the values inside the table displayed there with PI Sheet # is also not getting recorded.
    Any help would be highly appreciated.
    Thanks,
    Punit Sethi.

    Hi,
    I need to provide PI Sheet # for CO58 (Process a material). Here, I search the PI Sheet # from Process Order # when I perform this manually. But, when recording this via TCD Mode or SAPGUI mode, I am not able to record the part where PI Sheet # is searched through the "Restrict Value Range" screen through Process Order #.
    How can I record this part?
    OR
    Is there any way to obtain PI Sheet number from PO # through some other transaction. I tried using CO60 but the values inside the table displayed there with PI Sheet # is also not getting recorded.
    Any help would be highly appreciated.
    Thanks,
    Punit Sethi.

  • Restrict Value Range

    Hi,
    is it possible to set the values of Restrictions (F4) programmatically. How?
    Thanks.
    /Elvez

    Hi Srinivas,
    I would like to default the selection screen to something, however, dynamically and not be setting the default value in the search help. Here is the what I would like to achieve:
    1) F4 help for an additional infotype field with competence category id.
    2) The F4 uses molga, begda, endda to select data.
    => Problem: How to transfer the selection parameters to F4 when they are not fields on the screen?
    /Elvez

  • Restrict Value Range - VA05n

    Dear Experts.
    In VA05n(List Of Sales Order) T-Code, when i do press F4 for Sold-To-Party field in that i do want to add customer group for selection.
    Regards
    Bhavesh Vegad

    Hi Bhavesh,
    It is quite simple,
    1. Create an Elementary Search Help in that include all the fields you want to have in your search.
    2. After doing this then Open  Collective Search help DEBI from there goto tab Included Search Helps
        goto in Change Mode and put a new entry there ( this is the append search help which is being created).
    3. Next double click on the newly appended search help here u will find 3 tabs:
           1. Attributes
           2. Defination - In this you enter the following  two rows
    Search help paramater            Data Element                                                Default Value
    KUNNR                                 KUNNR                         
    BUKRS                                 BUKRS                                                             BUK
    Tick both import and export parameters in here.
            3. Included Search Helps - In this include the Elementary Search help that you have created.
    In this Elementary Search help i Propose the following parameters:
    Search help paramater                                                               Data Element Default Value
    KUNNR      4     4                                           KUNNR                         
    VKORG     1     1                                           VKORG         VKO
    VTWEG     2     2                                           VTWEG         VTU
    SPART     3     3                                           SPART          SPA
    NAME1     5     5                                           NAME1_GP                         
    NAME2     6     6                                           NAME2_GP                         
    KVGR1     7     7                                           KVGR1                         
    KDGRP     8     8                                           KDGRP           VKD
    Also u need to you need to have a Help view created say ZKDGRP which is assigned in the Selection Method of the Elementary Search Help
    Dialog Type - "C"
    Hot Key       - "G"
    In the Help View join the two tables KNVV & KNA1 specifying the output fields in the View Fields Tab.
    Hope this helps you, for more help you can refer the following link,
    Link: [Search Help|http://help.sap.com/saphelp_wp/helpdata/en/1f/29ef5777df11d2959800a0c929b3c3/content.htm]
    Regards,
    Abhijit G. Borkar

  • Value range restrictions for Characterstics

    Hi all,
    I am not sure where should I post this message as it is related to characterstics in classification system and variant configuration, and I am aware that SD experts are the most knowledgable in those areas 
    My requirement is simple:
    I have a characterstic (CT04) where it has values maintained in the values tab. After some time, some of the values manitained need to be either hidden or locked, so my question is
    Is there such a way to do that? I have heard about (value range restrictions) functionality, but I really don't know how to use it or where to use it?
    I really appreciate any help.
    Regards,

    I appreciate if someone could share some experience.
    Regards,

  • Restrict Characteristic on value range in Query Designer

    Hi,
    In 3.5, it was possible to restrict a filter in the query designer on a value range, even if the start- and end values of that range did not exist in the master data.
    In 2004s, it is possible to restrict single value filters to a non-existing masterdata value. However, for value ranges, this does not seem to be the case. Do you know any workaround for this?
    Regards,
    Daniel

    of course, BI 7.0 support value range for restrict.Please kindly release more information about your case .
    Value Range
    • Instead of selecting single values you can quickly gather multiple characteristic values using this next option. This choice provides the following additional options:
    1. Between
    2. Greater than or equal to
    3. Less than or equal to
    4. Greater than
    5. Less than
    And you can reference following URL on this topic
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm
    Edited by: Brian on Oct 22, 2008 3:08 PM

  • Implementing routine in DTP to restrict value

    Hi ,
    I want to implement a routine in DTP to restrict value 'F' or 'f' which can appear anywhere in the number of a field.
    ex : "00000F389877" .
    As 'F' appears at the six position in the number, there can be a possibility of 'F'/'f' appearing at any position in the number.
    I went to the filter section of the DTP under extraction and tried to implement the logic but I need some help as to what exactly I should put there.
    I have included the table name as '/BIC/A....' and the high and low variables for the range .
    Any qucik help in this regard would be highly appreciated.
    Kindly also let me know if there is any alternate method to tackle this kind of problem.
    Regards,
    Amit

    Hello,
    Find below a sample code used in DTP filter to restrict date field:
    form compute_/BIC/ZDATE
      tables l_t_range structure rssdlrange
      changing p_subrc like sy-subrc.
          Insert source code to current selection field
    $$ begin of routine - insert your code only below this line        -
    data: l_idx like sy-tabix.
              read table l_t_range with key
                   fieldname = '/BIC/ZDATE'.
              l_idx = sy-tabix.
    data: g_date(6) type n.
    data: g_date1 type d.
    CALL FUNCTION 'ZMONTH_CALC'
    Exporting
         MONTHS = -17
         OLDDATE = sy-datum
    Importing
         NEWDATE = g_date1.
    g_date = g_date1+0(6).
    clear g_date1.
    concatenate g_date '01' into g_date1.
    l_t_range-iobjnm = 'ZDATE'.
    l_t_range-FIELDNAME = '/BIC/ZDATE'.
    l_t_range-sign = 'I'.
    L_T_RANGE-OPTION = 'GE'.
    l_t_range-LOW = g_date1.
              if l_idx <> 0.
                modify l_t_range index l_idx.
              else.
                append l_t_range.
              endif.
              p_subrc = 0.
    But i feel what you want to achieve will be much more easier to achieve in start routine of the transformation.
    Here you just need to loop at result package, check for the record with the number containing F/f and delete the record.
    REgds,
    Shashank
    Edited by: Shashank Dighe on Feb 27, 2008 10:22 AM

  • As Bex Query design why I canu2019t select from list in values range

    Hello experts,
         I want to pop input window when I use analyzer run bw report, I know to add filter through restrict, then I selected value ranges, it was appearing between input text, the button canu2019t let me input, I tried select from list, Bex Query design occured some errors, if click u2018exitu2019 will prompt unknown software exception(0xc00200001) then stop .
    the imange: [http://www.itpub.net/thread-1192217-1-1.html]
    How to input text or select list? Why My Bex query design canu2019t do select from list? 
    please let me know the soultions, thanks for you help in advance
    Regards,
    Steve

    first of all, thanks for your help.   if need to install batch, please let me know. many thanks .
    more infomation as belows:
    the windows prompt:
    Your application an unhandled exception occurs. If you click [continue], the application will ignore the error and try to continue. If you click the [end], it will immediately close the application.
    I clicked more detail button , displayed as belows:
    For more information call using Just-In-Time (JIT) debugging details
    Please refer to the end of this message (instead of this dialog box) information.
    Exception Text **************
    System.NullReferenceException: Object reference not set to be the implementation of individual objects
    in com.sap.bi.et.selector.BExSelectorDialog.SelUIDialog.HandleUnhandledException(Exception iException)
    in com.sap.bi.et.selector.BExSelectorDialog.SelUIDialog.OnGuiUnhandledException(Object iSender, ThreadExceptionEventArgs iEventArgs)
    in System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
    in System.Windows.Forms.Control.WndProcException(Exception e)
    in System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
    in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    in System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
    in System.Windows.Forms.Control.SetVisibleCore(Boolean value)
    in System.Windows.Forms.Form.SetVisibleCore(Boolean value)
    in System.Windows.Forms.Control.set_Visible(Boolean value)
    in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    in System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    in System.Windows.Forms.Form.ShowDialog()
    in com.sap.bi.et.selector.BExSelectorDialog.SelUIDialog.GetUserSelection()
    in com.sap.bi.et.selector.BExSelectorDialog.SelUIDialog.ShowSelector()
    in com.sap.bi.et.selector.BExSelectorDialog.SelUICtrlDDBox.InvokeSelector()
    in com.sap.bi.et.selector.BExSelectorDialog.SelUICtrlDDBox.OnInvokeSelector()
    in com.sap.bi.et.selector.BExSelectorDialog.SelUICtrlDDBox.picValueHelp_Click(Object sender, EventArgs e)
    in System.Windows.Forms.Control.OnClick(EventArgs e)
    in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    in System.Windows.Forms.Control.WndProc(Message& m)
    in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    inSystem.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

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

  • How to restrict field range in selection screen in adhoc report

    Hi Experts,
    I have created one adhoc report in which i have to restrict region values range when i searched for particular company code.is it possible to restrict in adhoc report.
    For example when i searched for particular company code US the values in region gets restricted automatically to US country itself.
    Thanks&Regards,
    narasimha.

    Hi,
    how to restrict  region list to particular company code in Adhoc report.Could you please explain it in brief .
    Regards,
    narasimha.

  • Can i create value range in domain

    can i create value range in domain

    Hi,
    Value range means we will give possible values at Domain level.
    We will have Value tabe also at Domail level.
    when we give possible values at Domain level it will restrict to those values to that particular field.
    Deepak.
    If this helps you reward with points.
    Message was edited by: KDeepak

  • Value range for domain

    Is it possible to enter value range more than 10 characters long ??

    HI Michal
    This seems to be a restriction as the DOMAIN for storing the value range is defined of length 10 Chars.
    Kind Regards
    Eswar

  • Value range for free characetstic

    Hi All,
    I need to restrict the free characterstics value range form 20...29 and 40...49 for document type charcaterstic in the work book i mean i need to exclude the 20..29 range and 40...49 range form the selections, but i couldn't see the 20 and 49 in the slections i can see only 21 to 29 i couldnt find 20.How to achieve this in the work book itself.
    Any help in this regards.
    will assign the points.
    thnaks
    sg

    Hi SG-
      Lets see if this helps. In the query definition, from the context menu of doc type, choose RESTRICT. In the small window that opened, click on the box at the bottom left that has an arrow pointing to the right. In the subwindow that opens, see if you have the checkbox for Only Values in Infoprovider selected (tick mark). If yes, uncheck it and see if you can find the value 20 now. Let me know if it worked.
      What KJ said is true. But since you said that your superior was able to do so for the same infoobject I am assuming that the values are being filtered from master data table already. One other place you can check is in the infocube. Go to RSA1, doubleclick on the infocube, go to EXTRAS -> Structure specific infoobject properties -> see what is the selected value under the column F4 query. If it says Only Values in Infoprovider, then change it to Values in Master data table and activate the cube.
    Assigning points is the way of saying thanks in SDN.
    Message was edited by:
            Sudheer B

  • Value Range for numeric field

    I'm fairly new to LiveCycle, I've used it to make forms for a bit, but am now hoping to make the forms much more advanced.  I'd like to know the best way to set a value range/parameter for a numeric field? I want the filler to be restricted to a range of $300 to $10,000 and if they try to enter below or above that value they would receive an error message.  I've looked at all the beginner material and am trying to get introduced to FormCalc and/or JavaScript but not fully comprehending the best/complete method (any guidance on where to start is also greatly appreciated).
    Thanks, Ed

    if (((300 < this.rawValue) && (this.rawValue < 10000)) || (this.rawValue == null)){
       true
    } else {
    this.rawValue = null;
    app.alert("Please enter a value between 300 and 10.000")
    I changed some things though... ^^
    If you want 300 / 10 000 to be true too then set <= instead of <.
    You can also change the app.alert message as you want.
    If you don't add the null in the beginning you might get an error message if it's on the validate event. If it's in the exit there shouldn't be a problem...
    Though this is just a little different from Paul's original solution.

Maybe you are looking for

  • Webservice to RFC Scenario - Through Java Mapping

    Hello All, In my integration scenario, I will receive a request from a webservice consumer. The webservice is my outbound interface. Now I have to write a Java Mapping for it because a similar interface (file to RFC) has been implemented using it and

  • How to call the javascript through Command prompt?

    I need to call the .js file through command prompt. And also through programming language like c++, java. Could you please advice me with samples.This is for "illustrator cs".

  • I cannot enter verification codes in safari anymore

    When I try to enter a verfication code then it is always rejected (see picutre). When I open Firefox it works without a problem. I rather want to keep using Safari :-) Thanks for the help!

  • LR5.7.1 does not recognize all files on SD or CF cards?

    I have been using LR 5.7.1 through creative cloud. Using LR since verison 1 ) Using a card reader to import, LR now does not recognize all of the files on either SD or CF cards. To get LR to see all of the files, I must close LR and sturn off comptue

  • Pie chart drill down problem

    Hi, We are facing an issue with the drill implementation in the Pie chart of the dashboard. Initially, the drill functionality worked fine but now, we observe that the drill happens ONLY on the edges of the pie chart Now this behaviour is observed wh