How to get a Random number from a list

Dear Experts,
I have a list in which I have 24 employee number, and from this I have to select 4 employees number Randomly,
So please suggest how can I achieve this.
Warm Regards
Upendra Agrawal

Hello
do 4 times.
CALL FUNCTION 'QF05_RANDOM_INTEGER'
     EXPORTING RAN_INT_MAX = 24
               RAN_INT_MIN = 1
     IMPORTING RAN_INT     = ind.
read table itab index ind.
" do anything here
enddo.

Similar Messages

  • How to get Delivery Doc Number From Picking List Number?

    Helo All...
    How can I get the delivery document numbers from the picking list numbers?
    Thanks

    Try using transaction SE16 and table VBFA- subs. doc category Q should give a list of pick list numbers the preceding document is the delivery. Note you may have to go to settings> fields for selection to choose subs doc categ.  so that it appears as a selection.

  • How to get a random number in a range?

    as title
    how to get a random number in a range?
    like 2000~3000 thks :)

    int between 10 and 20 with the method Math.random():
    public class Rnd
         // Test
         public static void main(String[] args)
             int start=10, end = 30;
             for (int i = 0; i < 10; i++)
                int n = (int)(start + Math.random() * (end-start));
                System.out.println(n);
    }best regards.

  • How to get payment document number from paid column in monthly invoice

    Dear experts
    I use SBO japan version and i need to know how to get payment document number from paid column in monthly invoice ?
    in table MIN1, only contain invoice and credit note document number, there is no payment document number
    thank you for your help
    Best Regards
    JeiMing

    Dear Gordon
    Yeah, you are right, i can use field MIentry in RCT2
    thank you
    Best regards
    jeiming

  • How to get Accounting document number from billing document number

    Hi,
    How to get Accounting document number from billing document number i.e. from VBAK- VBELN.
    Cheta Pant

    Hi,
    VBAK is the Sale Order header table, Billing document table is VBRK.
    Sales tables (VBAK,VBAP,VBRP,VBRK) do not store accounting document numbers.
    You do other way around. Just go to SE16 and enter the Billing document number in field Billing document VBELN in BSEG or BSID or BSAD table and execute, you will find the accounting document number.
    If you just want collect this information once then you can use table BSEG, but if you think to develope a report then use table BSID and BSAD.
    Regards,
    Chintan Joshi

  • How to get purchase order number from delivery number?

    hi all,
    how to get purchase order number and item if i have only delivery.
    and in same way how to get po number and item if i know only batch number.
    kindly give me some solution i need this urgently.
    thanks in advance.

    Check the logic below:
    * Selecting the Sales Documents from VBFA for corresponding Invoice
        SELECT vbelv
                     posnv
          FROM vbfa
          INTO TABLE gt_itab3
         WHERE vbeln EQ gt_itab5-vbeln
           AND posnn EQ gt_itab5-posnr
           AND vbtyp_n EQ 'J'.
        IF sy-subrc EQ zero.
          SORT gt_itab3 BY vbelv posnv.
        ENDIF.
      ENDIF.
      IF NOT gt_itab3 IS INITIAL.
    * Selecting the Purchase Orders from VBFA for corresponding Sales Documents
        SELECT vbeln
               posnn
          FROM vbfa
          INTO TABLE gt_itab4
       FOR ALL ENTRIES IN gt_itab3
         WHERE vbelv EQ gt_itab3-vbelv
           AND posnv EQ gt_itab3-posnv
           AND vbtyp_n EQ 'V'.
        IF sy-subrc EQ 0.
          SORT gt_itab4 BY vbeln posnn.
        ENDIF.
      ENDIF.
    Batch number will be there in delivery item.
    Regards
    Kannaiah

  • How to get Shopping cart number from TECH_INFO Guid approval offline

    Hi,
    When a user approves a shopping cart via e-mail (offline approval), then in transaction SOIN we can the mail which is like this:
    TECH_INFO_A=00F3D1395134D34D34D37DFBE75E81512DB5DB5FBE&submit_a=Approve by e-mail&TECH_INFO_R=444244093D34D34D34DF7EF9D7A0544B6D76D7&NOTM_OUT=&EOM=1
    How can I retrieve shopping cart number from these guids ?
    Thank you very much.
    Regards,
    Peggy

    Hello,
    E-mail data extraction is done by method EMAIL_DATA_EXTRACT from class /SAPSRM/CL_OFFLINEAPP_INBOUND.
    With the exporting parameter EV_WIID, call function BBP_PDH_WFL_OBJECT_WI_GET: you will get the Shopping Cart number.
    To have an idea of the whole mail data extraction process, check report /SAPSRM/OFFLINEAPPROVALGET
    Regards.
    Laurent.

  • How to get Cost Center number from a Customer

    Hi Sap Experts,
    I have a customer number from xd03. But I would like to know which is the cost center used by this customer, how can I find that?
    Because I'm getting an warning message when using FB08, it points to the Tax Jurisdiction issue. I believe at some point, it's checking the Jurisdiction field of the cost center.
    Regards,
    CHL

    Hi,
    Thank you for the reply.
    The thing is, when I run FB08 for a specific document, i'm getting this warning Msg: Account assignment object has jurisdiction code XX, line iten XX AAAAAA.
    I checked already the configurations for jurisdiction code in customer master data and the path "define tax jurisdiction code" with spro.
    I noticed something, during the debug at some point its reading the cost center's jurisdiction number, and will compare it with customer's master data jurisdiction.
    But if there's no cost center it will process fine.
    It's in the program SAPLKAIP, form CostCenter_Check. Not sure if it's SAP standard code.
    Cheers.
    CHL

  • How to get a decimal number from three single byte numbers

    i'am in a difficult situation. I have motor which provides me the number of steps moved as three numbers of length one byte.I 'am attaching the program with this message. Here the commands from index 2-4 outputs will provide the number of steps moved. But these are numbers with a single byte length(<256). So how can I get the corresponding decimal number from these three single byte length numbers. please reply
    Attachments:
    stop2.vi ‏11 KB

    Without knowing what motor you are using, I'm guessing that you probably need to use the Join Numbers to combine the bytes into a U32.  The other option is to use the Type Cast function.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get Purch.Ord. number from trans. /Nmir5 once you have Inv.Doc.nr.

    Does anyone knows how to get in a program PurchaseOrder number from transaction /Nmir5 once you have Inv.Doc.nr.(Invoice nr)
    I was looking for tables having data element RE_BELNR but did not found a suitable table(maybe more tables are included)
    Thank you in advance . I will be glad to award solution

    Hi
    Use the<b> RSEG</b> table which stores the Invoice doc No BELNR and FIscal year GJAHR, PO and Item EBELN and EBELP
    pass them and Take the EBELN and EBELP fields from it
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to get the Personal Number from Address Number

    Hi,
    I have one requirement which is as follows.
    I have one Customer. I am fetching Address Number(ADRNR) of this customer number from table KNA1.
    I want to find the Personal number linked to this Address number and Customer.
    Is there is any table or FM from where i will get the Personal number of the Customer using Customer number and Address number?
    Kindly Help

    Hi Sachin,
    Check this FM BUP_PARTNER_PERSNUMBER_GET
    " Check KNB1 and the Field name is PERNR, Most of the times this is not maintianed.
    " This refers to the Employees who are assigned as Customers
    " In XD03 go to the Company Code Data there you can find this Value
    " For more info contact your Functional Consultant
    " This is to the Best of my knowledge
    Also Check KNB1 but000 Tables
    Cheerz
    Ram

  • How to get the BP number from OBJECT ID or ID rel.Object taken from HRP1001

    Hi Gurus
    I am trying to find the BP number from the OBJECT ID or ID rel.Object which i got from the table HRP1001 in CRM  but i am not able to find the link straightaway to get that details
    Kindly help me to find out the table where i can simply put the OBJECT ID or ID rel.Object to get the BP number for ROLE EMPLOYEE
    Thanks a lot
    Regards
    Soni

    Hi Soni,
    I found this in a different thread:
    first you get the all connected partners to a position by selecting SOBID from hrp1001 (with OTYPE / OBJID of position, RELAT = 008, SCLAS = CP).
    With this SOBID go again to HRP1001 and fill the SOBID into OBJID (with OTYPE = CP, SCLAS = BP) and the SOBID of the result is the connected partner number.
    You can also use FM 'CRM_CENTRALPERSON_GET' instead of the last SELECT-Statement. Here IV_PERSON_ID = SOBID (of first select). You get the partner guid and can get data of the partner from but000.
    In this thread:
    Help needed...Infotype HRP1001--Getting details OF Position Users...
    Hope it helps.
    regards,
    Wim

  • How to get MM Invoice number from FI Accounting document number

    Hi,
    I am writing a query (OPEN ITEMS FOR ACCOUNT PAYABLE)through SQVI. We need to display MM Invoice number from FI Accounting document number . Please let me know the table name from where I can join FI document number and can retreive MM Invoice number.
    Thanks
    Rama

    hi,
    use this.
      SELECT belnr
               awkey
               INTO TABLE it_bkpf
               FROM bkpf
               FOR ALL ENTRIES IN it_mkpf
               WHERE awkey = it_mkpf-awkey.

  • How to get sd major number from my driver

    Hi,
    I have a specific question. I have a driver (mydriver) that acts like a filter driver.
    When it receives IO from the file system through strategy() routine, it wants
    to replace its b_edev with that of sd device instance. mydriver creates minor
    nodes exactly as sd driver. All I need is to know what is the major number
    of sd driver. How do I do this programmatically through mydriver?
    Your help is greatly appreciated.
    Thanks,
    sudhakar

    Hi,
    I am trying to develop a "filter driver" at the file system level for Solaris to get the statistics of some of I/O calls send to a SCSI device. It exists between the VFS and the file-system-dependent layer. Does anyone has experience in developing such a "pseudo file system module". Please share your experience and suggestions.
    Initially I was thinking to develop this by getting the "st" major number. That is the reason it is been posted as a reply to this query.
    Thanks in advance
    -Jiji

  • How do I generate random numbers from a list of numbers without repeating any number

    I am trying to generate a list of random numbers without any repeating numbers.  For example say the list is from 1 to 15, how do I randomly generate a list of numbers using each number only once?

    pb,
    You can build a randomizer by making a 2-column table with 15 rows. In Column A, Fill with the numbers 1 to 15. In column B Fill with RAND(). Then sort on Column B. There will now be a randomized list of the numbers from 1 to 15 in Column A. You can copy this random list and use it in your application.
    Jerry

Maybe you are looking for