Maximum no.of Hits

Hi,
I have one parameter on my report as 'Maximum no.of Hits'.Can anyone help me to how to code for this logic.
Thanks in advance,
Sheetal

Hi Sheetal,
Please find the code for the same:
Say after filling an internal table it_sales , say the max. no of hits enter by user is in pr_max.
Sort Internal Table
  SORT it_sales.
  Restricting Values as per the Maximum Hits of Selection Screen.
  IF pr_max IS INITIAL .
    LOOP AT it_sales INTO wa_sales.
      APPEND wa_sales TO it_detail.
    ENDLOOP.
  ELSE.
    LOOP AT it_sales INTO wa_sales FROM 1 TO pr_max.
      APPEND wa_sales TO it_detail.
    ENDLOOP.
  ENDIF.
and then dispay that internal table into the report.
Let me know if u still have any problem in putting this logic.
Cheers
Sunny
Rewrd points, if found helpful
Message was edited by: Sunny

Similar Messages

  • F4IF_INT_TABLE_VALUE_REQUEST with Maximum Number of Hits.

    Hi, all,
    Currently i'm doing a customized F4 help for a selection-option filed on a report by using the function module 'F4IF_INT_TABLE_VALUE_REQUEST'. When i execute my report and go to the selection-option filed just now i created and press F4, i can see a list of data in my search help. However when i go to the tab 'Restrictions', i can't see the 'Maximum No. of Hits' option.
    So anyone have any idea about this? or how to make the 'Maximum No. of Hits' box come out in my F4 help?
    Thanks in advance.

    My full code :-
    TABLES : BSIK , DDSHF4CTRL .
    DATA: BEGIN OF T_ZUONR OCCURS 0,
           ZUONR TYPE BSIK-ZUONR,
          END OF T_ZUONR.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME  TITLE TEXT-001.
    SELECT-OPTIONS   : ASGN_CK FOR BSIK-ZUONR.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ASGN_CK-LOW.
      SELECT ZUONR FROM BSIK INTO TABLE T_ZUONR.
      SORT T_ZUONR BY ZUONR.
      DELETE ADJACENT DUPLICATES FROM T_ZUONR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD         = 'DYNR'
          DYNPPROG         = SY-REPID
          DYNPNR           = SY-DYNNR
          VALUE_ORG        = 'S'
          CALLBACK_PROGRAM = SY-REPID
          CALLBACK_FORM    = 'F4CALLBACK'
        TABLES
          VALUE_TAB        = T_ZUONR.
         RETURN_TAB       = T_ZUONR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ASGN_CK-HIGH.
      SELECT ZUONR FROM BSIK INTO TABLE T_ZUONR.
      SORT T_ZUONR BY ZUONR.
      DELETE ADJACENT DUPLICATES FROM T_ZUONR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD         = 'DYNR'
          DYNPPROG         = SY-REPID
          DYNPNR           = SY-DYNNR
          VALUE_ORG        = 'S'
          CALLBACK_PROGRAM = SY-REPID
          CALLBACK_FORM    = 'F4CALLBACK'
        TABLES
          VALUE_TAB        = T_ZUONR.
         RETURN_TAB       = T_ZUONR.
      PERFORM F4CALLBACK.
    *&      Form  F4CALLBACK
          text
    -->  p1        text
    <--  p2        text
    FORM F4CALLBACK.
    *TABLES   RECORD_TAB  STRUCTURE SEAHLPRES
    *CHANGING SHLP        TYPE SHLP_DESCR
            CALLCONTROL LIKE DDSHF4CTRL.
      DATA :  SHLP        TYPE SHLP_DESCR,
              CALLCONTROL LIKE DDSHF4CTRL.
      SHLP-INTDESCR-DIALOGTYPE = 'C'.             " Dialog type ( Dialog with value restriction )
      CALLCONTROL-NO_MAXDISP   = '500'.           " For getting Maximum no of hits tab
    ENDFORM.                    " F4CALLBACK
    *But it is not working, Please help. There is some problem with the Perform F4CALLBACK Module. Please help.

  • F4IF_INT_TABLE_VALUE_REQUEST- how to add Maximum No. of hits

    Hi Experts,
    I am using F4IF_INT_TABLE_VALUE_REQUEST. Can someone please help me. I am getting 2,100 hits I need to limit it to 500 hits. There is no Maximum number of hits when you click the Downward pointing arrow above the toolbar. How can I add the field for maximum number of hits just like in the standard F4 help function.
    Thanks!

    Dispay the source code of this function module in Se37.. you will notice that the following is commented out..
    CALLCONTROL-MAXRECORDS = 500.
    deleteing lines in your program is probably the only option..
    ie
    data w_lines type i.
    w_lines  = lines( itab ).
    delete itab from 201 to w_lines.
    ~Suresh

  • How to add a "Maximum no. of hits" - field in SQ01 query?

    Hi all,
    Is it generally possible to add the field "maximum no. of hits" to a query / quickview in transaction SQ01? And if yes, how?
    I have created a test query but I cannot find any solution. I don't mean the popup asking for database accesses which occurs when trying to test this query. I really want to have it as selection criteria.
    My system is a R/3 Enterprise 4.7 Ext. Set 2.00.
    Thanks in advance!
    Michael

    Well,
    You're talking about COLLECTIVE search help. You won't definie Max No of hit at this level.
    Define an elementary search help and assign to this one a dialog mode (retriction or set of values).
    Regards,
    Bertrand
    PS : Don't forget reward points

  • "MAXIMUM NO OF HITS" field in selection screen for Product Search

    Hi all,
       We are  running on SRM 4.0.I have a query regarding the Selection screen which appears for the Product Search when we click on the "inetrnal Goods/Servcies" link...
        I have developed a Z-serch help for the Product search wherein i have control of  all the other fields lik "Product ID"," Product description " etc..But not "Maximum no of hits" (since it is  a part of the std functionality)...In the selection sceen field " Maximum  no of hits" ,whatever value i enter  that value is not considered...So is there any way that this field is not diplayed on screen/can be disabled(made an O/p field)...
      All suggestions are  welcome....Please  help...
    Thanks & Regards,
    Disha.

    Well,
    You're talking about COLLECTIVE search help. You won't definie Max No of hit at this level.
    Define an elementary search help and assign to this one a dialog mode (retriction or set of values).
    Regards,
    Bertrand
    PS : Don't forget reward points

  • Search help: default value for 'Maximum no of hits'

    Hello,
    I have a request from a user to change the default value for maximum number of hits in the search help.
    Any quick hint?
    Regards,
    Michal

    Not sure if this is possible and don't have a SAP system available at the moment ...
    But check this out...
    Is there anything in user profile ..
    or check if the number of hits field has a PARAMETER ID associated with it...
    Then in that case you might default a value other than 500 in your user profile.
    Cheers,
    Ram

  • How to increase maximum no. of hits in F4

    Hi Experts,
    I have a client requirement as to increase the maximum no. of hits in F4 search.
    Client wants it to become 5000 as default instead of 500.
    Would you please let me know if this is possible?
    And how to do this change in the system?
    Thank you.
    Chetan Barokar.

    Dear Friend,
    THERE IS NO ABAP DEVELOPMENT REQUIRED HERE.
    Your requirement can be fullfilled thru changing standard settings.
    Login to SAP. Click on Help (From Menu bar).
    Here go to the Settings option.
    Here select F4 Help Tab.
    Here you have option to set Max. number of Hits. The default SAP is 500 you can change it to 5000 or 9999.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • Change maximum no of hit in report

    Hi Guys,
    Can any one help me to solve the following:
    In KSB1 reprot the maximum number of hit by default is 5000.
    It appear in KSB1 --> More Setting ---> Maximum Number of Hit
    where can we set the default maximum number of hit so that every time I don't need to change it.
    Thanks in advance.
    Regards,
    sp sahu

    this table    RSEUMO stores that value
    fieldname is TBMAXSEL , if there is maintenance for that table u can set it

  • Maximum number of hits when searching in PA20

    Hi,
    when in PA20, I perform a search based on (for example) last name and I only enter a * as search criteria (in other words I perform a search on all employees), in our development system the maximum number of hits displayed is 5000.
    In our testsystem the maximum number of hits is not maximized.
    Does anyone know whether this is a general setting? If yes, which setting is this?
    If this is not a general settings, how is determined whether the hit list is maximied to a certain number of hits or not.....
    Wilfred.

    Hi
    You can change the Maximum No.Of Hits in the below manner.
    Go to your desired transaction .Here PA20 there select the menu Help where u can see in the screen top.
    From Help,select the last sub menu i.e Settings.
    You will get Tabstrips with 3 tabs.select the tab F4 Help.
    There u can find the option to change the "Maximum Number of Hits to be displayed"
    Regards,
    Sree

  • Maximum number of hits in Document overview (ME21N/ME22N/ME23N)

    This number is defaulted to 5000. The help text states that it is the maximum number of hits that are to be displayed.
    In my opinion this relates to the result.
    In reality I notice that it relates to the first selection in the database.
    For example.
    All purchase order for a given vendor (+9000 PO-items in the database, 110 without history).
    Selection of PO's without goods receipts.
    Using the the default value of 5000, the program gives the message "No suitable documents found"
    After clearing the max. number of hits, the correct selection is made.
    Suppose I would like to see the 10 oldest open PO's, this would not be possible.
    Is my assumption correct ?

    Hi,
    I think there´s something not working correctly in your search, as the 5000 refers to the maximum number of hits that will be shown. I would recommend to open a ticket at SAP.
    Best Regards,
    Arminda Jack

  • Change of maximum number of hit  in a report

    Hi Guys,
    Can any one help me to solve the following:
    In KSB1 reprot the maximum number of hit by default is 5000.
    It appear in KSB1 --> More Setting ---> Maximum Number of Hit
    where can we set the default maximum number of hit so that every time I don't need to change it.
    Thanks in advance.
    Regards,
    sp sahu

    Hi ,
    go to SE16 , enter table name RSEUMOD, enter ,
    select "TBMAXSEL" and execute, u will get a list of all users , against a username , there will be a field TBMAXSEL, click on the pencil icon on top of table, inside the table against the field TBMAXSEL , enter the desired number of hits and save
    Regards
    Mangesh
    Reward points if it helps

  • Change Max no. of hits in search help

    Dear all,
    I want to change the max no hits to more then 1000 .
    please help to resolve this problem.
    Regards,
    Chintan

    Hi Chintan,
    Please refer the below threads,
    Search help: default value for 'Maximum no of hits'
    /message/3786486#3786486 [original link is broken]
    Best Regards.

  • Max number of Hits Account Identification

    Hi all,
    we are currently having the problem in IC that when somebody try to identify an account of an BP with more that 100 related sold to parties, that no account is displayed because of the standard max number of hits 100.
    I have found the path to customize this in the SPRO but this sentence in the SAP help is making me some headache:
    The higher the number you enter here, the more results the system will search for, and in turn, the more performance is affected. The maximum number of hits that the system allows is 100, which is also the default value.
    I understand the point of the performance, but does this mean that the performance is also affected the account identification of the other BP with less than 100 related sold to parties?
    Can anybody help in this issue?
    We are working on CRM 5.0.
    Regards
    Abosi
    Edited by: Abosi_3li2 on Feb 8, 2012 11:08 AM

    Hello
    The bug of nothing displayed if over 100 accounts are found is solved with [SAP note 1467929|https://service.sap.com/sap/support/notes/1467929.]
    The code you are referring to is:
    IF bpident_profile-max_hits IS INITIAL.
    max_hits = 100.
    ELSE.
    max_hits = bpident_profile-max_hits.
    ENDIF.
    It means that, if blank, 100 hits is considered. You can modify the customizing up to 255 results since that is the limit of accounts to be found.
    Regards
    Joaquin

  • BP search by role brings no hits although BPs exist...

    Hi All,
    This is a bit of a long message but please bear with it....
    We currently have a system issue that is causing duplicate BPs to be created.
    We have configured: Customer Relationship Management->Interaction Center WebClient->Master Data->Accounts->Define Account Identification Profiles
    to define the "Maximum number of hits that appear in the results list." (this is from the documentation provided in SPRO) to be 100 and in the filters we define a role we have setup for "Customers".
    What is actually being done in the system is that the the search goes off and searches the main business partner table (BUT000) and returns the first 100 entries it finds and It then trawls through the 100 hits and filter out those that are "Customers" and returns the hits to the screen.
    So, if we do a search for "Smith"  the search returns the first 100 hits (who are all Employees) and then filters this 100 for "Customers". This will return no hits as none of these have the Customer role against them.
    Therefore the user will just create a new customer of that name and this is why we are getting loads of duplicates in the system.
    It would be nice if we could ignore any BPs who's number starts with EM, as these are the employees imported from R/3 and cannot be used (as a customer) in our system due to Data Protection issues.
    I have raised an OSS for this and the answer is, basically, is to increase to max hits (which will have an impact on performance) or implement our own code as this is standard functionality.
    I am hoping others have came accross this issue and resolved the problem (I have searched the forums and not come accross anyone with the same though).
    Many thanks in advance
    Gary Hawkins

    Hi,
    Removing the Max hits has solved the problem.
    I think we need to implement our own logic to restrict the number of hits brought back to the Web IC, but the fix will stop us creating duplicates.
    Many thanks for your help
    Gary Hawkins
    Edited by: Gary Hawkins on Jul 31, 2008 4:07 PM

  • Maximum number of filter values in BEx web

    Hi
    Is it possible to change the maximum number of filter values displayed when running a query?
    Example: When the user runs a query and has to put in a material number, he pushes the button which shows him the possible values for input. The number of values displayed per page is 14 and the maximum number of pages is 72. The maximum number of values is 1000. If the user tries to search, he only searches amongst the 1000 possible values. Is it possible to change the number of possible values shown to unlimited?
    We use NW04s BI SP09.
    Kind regards
    Erik

    Hi Experts
    I have the same problem , the maximum number of hits si set to 200 , ant the variable contains over 300 values , it is a variable based on  a time charactersitic , and the values appear in ascending order , i mean the first 01.1900 , and the last value 03.2012 . i wonder if there is a way to change the order of sort  to descending order . I mean the  first value 03.2012 and the last one 01.1900 . I attach the image .
    Thanks for your help.

Maybe you are looking for

  • Question:  ipod no longer appears in itunes and my computer.

    iPod Nano no longer appears in iTunes or in my computer. Songs are there but the device is not recognized

  • Lack of audio in on a MBP

    A processor failure has forced me to buy a new MBP. I make films and used my old MBP for editing and most importantly, capturing audio real time in stereo (live music) and mono for key interviews. Interviews often in remote places so I cannot cart th

  • ADF independent transactions

    Hi all, I'm trying to implement independent transactions in JSF/ADF. At the next lines I'll try to explain the process that I have followed: - First of all we know there are two ways to obtain independent transactions (e.g. different executions of th

  • Quick Selection messing up!! NEED HELP!!

    On the quick selection tool when i click on the photo it just lags for a second then does everything by itself and not what I want!!

  • DVD archival storage

    Is there a best brand/type of DVD for archival storage of digital video? Secondly, I'm using a Sony DVD recorder to transfer old Hi8 analog tapes to DVD (since it cannot be done with iMovie). What DVD format should I use to then play and edit on my i