Passing parametrs to fetch the 'number 'of corresponding entries???

I have passed a parameter p_count at selection screen
parameters : p_count type i,
select
matnr
from mara
into table t_mara
up to p_count
while executing when i give a number at selection screen it is fetching the records depending the entries in the database table.... but if the database entries are 10000 records and the user enters 10,001 it should show an error message and also if any new data is added in the data base record it should fetch that record as well
how can i solve the above query plz help

You can use the COUNT( * ) to know about total number of entries.
AT SELECTION-SCREEN ON P_COUNT.
  SELECT COUNT( * ) INTO L_COUNT FROM MARA.
  IF L_COUNT > P_COUNT.
*     ERROR MESSAGE
  ENDIF.
Regards,
Naimesh Patel

Similar Messages

  • Fetch the number of users in bulk request

    Hi All,
    We are working on OIM 11gR1.
    While raising request "Modify User", when we are submitting the request with multiple users, how can we fetch the number of users selected to be modified in java code?
    Regards,
    Aparna

    Probably the best way would be to have the applet report back to the server when it's being used.
    Or you could just approximate it by counting page loads with your log analysis tool. This is a lot easier but also significantly less accurate. But it might be good enough.

  • How to adjust the number of blog entries on the archive page?

    Does anyone know how to adjust the number of blog entries on the archive page?
    As it stands now the blog archive page lists the archives past the 4000px page length in what appears to be a long endless list.
    Thanks in advance for any help!

    Thanks Wyodor but that just adjusts the entries on the blog page....not the blog archive page.
    On the blog archive page it's just a long endless list of entries. It appears that you simply cannot adjust this on the archive page. Additionally if the blog entries exceed 50 I have to start deleting older entries.
    Overall iWeb has served my needs well but this issue *****. They could probably fix it with a software update if they wanted to.

  • Fetching the number of records in a multi-record block...

    Hi ,
    In Forms10g runtime-and in previous releases too- there is , as a message, the number of records fetched/inserted in a multi-line block such as Record:5/9. Is it possible to catch these two numbers (i mean 5 and 9 , or at least the number of records)...not only in query but in the insert mode as well...?????
    Many thanks ,
    Simon

    No, you can't capture that text, but you can write your own code to do the same thing.

  • Change the number of history entries on the Back Button

    Firefox allows 15 history entries when holding the Back (or Previous) button. If I want to go to the #31 entry in the history, I have to press and hold Back many times to reach it.
    I want to change that number for more entries like 50. Is it possible?

    You cannot change how many are displayed in the back/forward drop down at a time.
    You can change the number but not how many are displayed at a time in the dialog window.
    Select the earliest entry you can on the back button (the lowest entry), and then invoke the Back button again, and go to the earliest entry.
    I have test data you can try:
    I have '''browser.sessionhistory.max_entries''' set to 70 the default is 50
    To test bring up
    * http://dmcritchie.mvps.org/firefox/tab_capacity/001.htm
    What you see on the page are a lot of numbered links '''001 - 060'''
    # start with the 001 entry in a new tab make sure you started it in a new tab
    # then go successively through 002-060 in the same tab then go up into bogus numbers '''to 70'''
    # Right click on the Back button, you will see that you can see 15 entries at a time
    # Click on the earliest visible at the bottom of the heap
    # Click again on the Back button to select the earliest again
    # Repeat previous step until to see 001, all entries were accessible through the Back button, but 15 is the maximum that you will see at a time..

  • Query to fetch the list of Journal Entry without cancelled JE.

    Dear All,
    I have tried the following query to get the list of JE without Cancelled JE.
    SELECT T0.[TransId] FROM OJDT T0 WHERE T0.[TransId] NOT  IN  (SELECT T0.[StornoToTr] FROM OJDT T0)
    It is not working . can any one solve this?
    Thanks in advance,
    Dwarak

    Hi,
    Check this :
    SELECT T0.TransId FROM OJDT T0 WHERE T0.TransId NOT IN (SELECT T0.StornoToTr FROM OJDT T0 where t0.stornototr is not NULL)
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • How can I increase the number of Recently Bookmarked entries?

    There is a blue "Recently Bookmarked" folder in my bookmarks library. I want to increase the number of bookmark entries that are saved to this folder. I'd like to set it to 20 or 25. Can this be done? how do I do it?

    Create a new smart "Recently Bookmarked" bookmark and set maxResults=## to suit your needs.
    *https://developer.mozilla.org/en/Places_query_URIs
    <pre><nowiki>place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&sort=12&excludeQueries=1&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=25&queryType=1
    </nowiki></pre>

  • Maximum Number of Blog Entries on the Main Blog Page

    I would like to increase the number of Blog entries on my Main Blog page beyond the limit of 50 allowed through the Inspector Panel in iWeb 09. Does anyone know a work-around to this limitation?
    Thanks, -JAS

    Try creating a new blog page that looks identical to the current blog you have. Then once you start a new blog on the new blog template you just created, simply make a button or text link to your other blog. If I'm not mistaken you can create as many blog templates as you wish.
    Please let me know if I'm wrong.

  • Function module to find number of table entries in Data base table

    Hi All
       I have the urgent requirement to find out the number of table entries in a table  using the function Module.
    if u know the Function Module name please let me know
    Thanks & Regards
    Rajmohan.G

    You can calculate the total number of records like this.
    TABLES : ztable.
    DATA cnt type I.
    Select count( * ) into cnt FROM ztable.
    Regards,
    Santosh

  • How do you fetch the URL corresponding to a particular ADRNR number?

    I have the address number ADRNR, I want the URL corresponding to the same.
    How do you fetch the URL corresponding to a particular ADRNR number?

    i suppose you want email address if so use this
    select adr6-addrnumber from table adr6 join table lfa1 with key adr6-addrnumber = lfa1-adrnr

  • How to find the number of fetched lines from select statement

    Hi Experts,
    Can you tell me how to find the number of fetched lines from select statements..
    and one more thing is can you tell me how to check the written select statement or written statement is correct or not????
    Thanks in advance
    santosh

    Hi,
    Look for the system field SY_TABIX. That will contain the number of records which have been put into an internal table through a select statement.
    For ex:
    data: itab type mara occurs 0 with header line.
    Select * from mara into table itab.
    Write: Sy-tabix.
    This will give you the number of entries that has been selected.
    I am not sure what you mean by the second question. If you can let me know what you need then we might have a solution.
    Hope this helps,
    Sudhi
    Message was edited by:
            Sudhindra Chandrashekar

  • My iPad conveys that it is disable, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the number board to open with a password.  How do I fix this?

    My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the scree with the number board to open with a password.  How do I fix this?

    You will need to restore it. The sidebar of your iPad appears on itunes even if you dont enter the passcode. There's the option to restore it. More info:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • How to fetch the latest change number from CDPOS Table..?

    Hi All,
    im trying to fetch teh change number from CDPOS with the below select, but my requirement is always i wants to fetch the latest change number.
              SELECT SINGLE objectid changenr FROM cdpos
                     INTO wa_cdpos
                     WHERE objectid = wa_e1kna1m-kunnr
                     AND ( tabname = 'KNA1' OR tabname = 'KNVV')
                     AND   fname = 'AUFSD'
                     AND ( value_new = '01' OR value_new = space ).
    Please let me know how to achive this..?
    Ashok

    try this way
    "           SELECT SINGLE objectid changenr FROM cdpos
    "                 INTO wa_cdpos
               SELECT objectid changenr FROM cdpos
                      INTO table t_cdpos
                      WHERE objectid = wa_e1kna1m-kunnr
                      AND ( tabname = 'KNA1' OR tabname = 'KNVV')
                      AND   fname = 'AUFSD'
                      AND ( value_new = '01' OR value_new = space ).
    SORT t_cdpos by  changenr Descending.
    read t_cdos index 1.    "this is the latest change
    Prabhudas

  • How to fetch the payroll posting run number in a custom report

    Hi Experts,
    We have  a requirement on getting the  payroll posting run from  PCP0.
    We are extracting the report for offcycle payments.
    Could you please share your ideas in fetching the run number of the offcycle posting run.
    Thanks in advance.
    Sairam.

    Thanks Mohan.
    I have tried with PPOIX.But alot of line items are showing up for the same Infotype(Offcycle) with different Run numbers.
    What is the criteria for knowing the posted values Run number from the list of line items from PPOIX.
    Please share your ideas.
    Regards,
    Sairam.

  • How to count the number of signals has been passed

    Dear Sir,
           I am developing an application to send a defined number of square waveform to DAQMx card.  If the number reaches the given value, the generator stops sending, the application will do something else.
    For example the attached code will generate a square wave has freq=1 and dutycycle=50%.  If I want to send 3 waveforms to daqmx,  in principle I can stop the loop after 3 sec.  I was trying to use Elapsed time function to count time elapsed, for low freq, it sort of worked, but didn’t work at high freq.  I think it should  have easy way to handle it. I would very appreciate somebody can tell me.
    Thanks.
    Guang
    Attachments:
    waveformtest.vi ‏16 KB

    Hi Guang,
    In your example code, why are you setting the sampling rate to 20000 and the number of samples to be generated to 5000?
    If you want 1 complete period of the square wave to correspond to one cycle of the loop, then the number of samples generated needs to be equal to sampling rate when the frequency is 1 hertz (as in your code).
    Basically, 1 hertz = 1 cycle / second.  So if the signal is being generated at 1 cycle (period) per second, and you wish to generate exactly 1 period per loop, the number of samples generated needs to be equal to the number of samples generated per second, such that samples are only generated for one second.
    Does that answer your question?
    Eric V
    National Instruments
    Applications Engineer
    Certified LabVIEW Associate Developer
    "I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"

Maybe you are looking for