Random selection of materials

Hi Experts,
In a selection Screen i have material in select-options and a Parameter item count, now i have to select N materials randomly from the material range choosen in the selection screen and N is the number in the iten count field.
please  tell me how to choose N numbers randomly, we can select upto n numbers from a table but how to select N random materials. the query written for N materials is
SELECT matnr lgort lvorm INTO CORRESPONDING FIELDS OF TABLE it_mard
             FROM mard UP TO p_count rows
             WHERE matnr IN p_matnr
             AND werks IN p_plant
             AND lvorm EQ ' '.
please send me if u have any sample code regarding that. or let me know what to write for random selection
Regards,
Nikhil

DO n TIMES.
  CALL FUNCTION 'QF05_RANDOM_INTEGER'
    (check its parameters by yourself).
  READ TABLE it_tab INDEX random_number.
  do_something with it.
ENDDO.

Similar Messages

  • Ware house Management - Bin selection by materials is random

    Ware house u2013Random Bin selection
    The materials posted after GRN & TO confirmation are moved in to the bins are selecting Random bin numbers.
    Ex: Po materials 4 Numbers, with 4 batch Numbers, I wanted these materials to be placed or selected bins in series.
    How to configure the bin selection  so that the materials select next bin Number in series.
    My bin Structure is
    Template- CCNNNCCCCC
    Structure -  AAA
    Start value : T-001
    End value- T-268
    Increment u2013T-001
    With storage section & indicators mentioned.
    Bins are create from   T-001 ,T-002,u2026u2026T-268
    How to over come this problem?
    Please guide
    Bheema

    Storage section indicators are same for items procured in specified PO & hence no much relevence here
    the storage bins have as well storage sections, the question was if all your bins have the same storage section.
    if not then it can be a root cause why SAP doesnt use certain bins.

  • After ios 8 update has anyones ipad started randomly selecting everything? Even after ios 8.0.1 update it has still continued to do the same thing.

    After ios 8 update has anyones ipad started randomly selecting everything? Even after ios 8.0.1 update it has still continued to do the same thing making it immpossible to use ipad anymore. Has anyone had the same problem and/or knows how to fix this?

    Try a Reboot pess & hold power button & menu button hold both down until you see Apple Logo you will not lose any data This may help but the ipad 2 is a bit under powered for iOS 8 If you can a very good buy now is the iPad Air 32G Since they brought the new one out the price for this model Has come down by £120.00 That's the one I am using and it works great on iOS 8.1 Bsydd uk

  • I synced two of my email accounts via gmail's POP3 thing. But now my iphone's gmail inbox shows a random selection of emails (not most recent ones that are in my inbox). How can I make my iphone inbox match what I see when I log on using a PC?

    I synced two of my email accounts via gmail's POP3 capabilities. But now my iphone's gmail inbox only shows a random selection of emails (i.e. right now it is May 31, 2013 but the emails in my inbox are a couple from Nov 12, a few from Oct 12, and then some way older than that and so on.When I log into my gmail from a computer, I see all my emails in the logical, standard order. How can I make my iphone inbox match what I see when I log on using a PC?

    If you're trying to decide between using POP and IMAP, we encourage you to use IMAP.
    Unlike POP, IMAP offers two-way communication between your web Gmail and your email client. This means when you log in to Gmail using a web browser, actions you perform on email clients and mobile devices (ex: putting mail in a 'work' folder) will instantly and automatically appear in Gmail (ex: it will already have a 'work' label on that email the next time you sign in).
    IMAP also provides a better method to access your mail from multiple devices. If you check your email at work, on your mobile phone, and again at home, IMAP ensures that new mail is accessible from any device at any given time.
    Finally, IMAP offers a more stable experience overall. Whereas POP is prone to losing messages or downloading the same messages multiple times, IMAP avoids this through two-way syncing capabilities between your mail clients and your web Gmail.
    That is from the page that you linked- does highlighted part of message ring a bell?

  • Random selection from a list

    I’m setting up a multiple-choice question, and I want to re-arrange the position of the button sprites representing the correct answer and distractors.
    I can randomly select one of the sprites via gDistractorLoc = random(4). The random function fails me after that.
    Is there a means of randomly selecting one of the entries from a list, e.g. gDistractorList = [1, 2, 4] or [1, 4]?
    I realize that I am perhaps complicating the process, and I'd be grateful for a simpler approach.

    I don't know if this is simpler or not, but here is a method for grabbing a random item from a list:
    gDistractorList = [1, 2, 4]
    put gDistractorList.getAt(random(gDistractorList.count))

  • How to efficiently get hold of N randomly selected keys out of X?

    I am writing some benchmark programs for Coherence caches and would need a way to as efficently as possible get hold of a "fairly random" selection of N keys from the cache out of the total X keys (where X >> N).
    With "fairly random" I am in particular looking for a way to get keys somewhat uniformly spread over all partitions.
    First i tried picking the first N keys obtained when iterating the key-set but they all seemed to come from just a few partitions (perhaps iteration is performed partition by partition?). Next I tried some algortihms I have used in the past to pick random keys from in memory-map (where one basically iterate and if a randomly generated value between 0.0 and 1.0 exceed a percentage calculatwed as the factor N/X the key is included. This does work (one may occasionally need to iterate the map more than once) but is VERY slow since iterating the key-set of a large cache remotly is kind of expensive.
    All sugestions are warmly appreciated - the best would be solutions that do not require anything to be added to the pof-config (i.e. not rely on custome aggregators or invocables etc) - this because I would liek to be able to easilly use my benchmark as part of several applications without having to modify there configuration files!
    /Magnus
    Edited by: MagnusE on Aug 7, 2009 10:21 AM

    Hi Magnus,
    you can go the other way round:
    With key-association you can ensure that your request goes to the partition you want it to go. You just need to generate a reverse mapping array between partition ids and integer associated key values which are mapped to that partititon.
    You can use this method for it:
    public static int[] generateReverseAssociatedKeysForService(DistributedCacheService service) {
         KeyPartitioningStrategy keyPartitioningStrategy = service.getKeyPartitioningStrategy();
         int partitionCount = service.getPartitionCount();
         int[] reverseKeys = new int[partitionCount];
         int i=1;
         while (partitionCount > 0) {
              Integer associatedKey = new Integer(i);
              int partitionId = keyPartitioningStrategy.getKeyPartition(associatedKey);
              if (reverseKeys[partitionId] == 0) {
                   reverseKeys[partitionId] = i;
                   --partitionCount;
              ++i;
         return reverseKeys;
    }After this, you generate an equal amount of entries for each partitions with composite keys which implement key association in a way that it returns an integer which maps to your designated partition id to serve as your data. Alternatively you can sort an existing key-set into per-partition keysets.
    After this, you just generate evenly spread random numbers between 0 and (partitionCount - 1) (both inclusive) which random number you use as an index to the reverse map to get an associated key value. Then you can generate another random number if you have multiple keys within a partition, or choose a key from the per-partition keyset for that partition if you have a set of existing keys.
    This way you get keys which are as evenly spread between partitions as your random generator generating your associated key indexes is spread.
    Best regards,
    Robert
    Edited by: robvarga on Aug 7, 2009 11:55 AM
    Added some more ideas and method implementation.

  • Oracle 11g:Query to return only 1 to 1 relationship & random selection

    Hi
    I have a complex query to modify but I have below the sample tables and data with only very few fields(only affected fields).
    Query based on 2 tables b_test and s_test.
    Pls see below.
    create table b_test(building_id number not null,invalid varchar2(1));
    create table s_test(sub_building_id number not null,building_id number ,invalid varchar2(1),sequence_no number);
    insert into b_test values (1000,'N');
    insert into b_test values(2000,'N');
    insert into b_test values(3000,'N');
    commit;
    insert into s_test values(1,1000,'N',90);
    insert into s_test values(2,1000,'N',91);
    insert into s_test values(3,1000,'N',92);
    insert into s_test values(4,1000,'Y',93);
    insert into s_test values(5,NULL,'N',NULL);
    insert into s_test values(1,2000,'N',94);
    insert into s_test values(2,2000,'N',95);
    insert into s_test values(3,2000,'N',96);
    insert into s_test values(4,2000,'N',97);
    insert into s_test values(5,2000,'N',98);
    insert into s_test values(6,NULL,'N',NULL);
    insert into s_test values(10,3000,'N',99);
    insert into s_test values(11,3000,'N',100);
    commit;The query below returns all rows required:(also see results:)
    select b.building_id,b.invalid,s.sub_building_id,s.sequence_no from b_test b,
    (select * from s_test where invalid='N') s
    where b.building_id = s.building_id(+)
    and b.invalid='N'
    Results:
    BUILDING_ID INVALID      SUB_BUILDING_ID     SEQUENCE_NO
    1000              N     1                     90
    1000             N     2                     91
    1000             N     3                     92
    2000             N     1                     94
    2000             N     2                     95
    2000             N     3                     96
    2000             N     4                     97
    2000             N     5                     98
    3000             N     10                      99
    3000             N     11                     100Now there are 2 requirements:
    1)How can the above query be changed so that 1:1 relationship if sub_building_id is returned?i.e For 1 building_id, only show 1 sub_building(This could be a random selection)
    (Pls help with query)
    The results would be like
    BUILDING_ID INVALID     SUB_BUILDING_ID     SEQUENCE_NO
    1000               N     1                      90
    2000               N     1                      94
    3000               N     11                     1002)How can the same SEQUENCE_NO be shown for all sub_buildings for the same building? (Pls help with query)
    The results will be:
    BUILDING_ID INVALID     SUB_BUILDING_ID     SEQUENCE_NO
    1000             N     1                       90
    1000             N     2                       90
    1000             N     3                       90
    2000             N     1                       94
    2000              N     2                       94
    2000             N     3                       94
    2000             N     4                       94
    2000             N     5                       94
    3000             N     10                       99
    3000             N     11                       99Many thanks!
    Edited by: Krithi on 08-Nov-2012 08:48
    Edited by: Krithi on 08-Nov-2012 08:55

    Krithi wrote:
    Hi
    I have a complex query to modify but I have below the sample tables and data with only very few fields(only affected fields).
    Query based on 2 tables b_test and s_test.
    Pls see below.
    create table b_test(building_id number not null,invalid varchar2(1));
    Thanks for posting the CREATE TABLE and INSERT statements, and your existing query; that's very helpful.
    The query below returns all rows required:(also see results:)
    select b.building_id,b.invalid,s.sub_building_id,s.sequence_no from b_test b,
    (select * from s_test where invalid='N') s
    where b.building_id = s.building_id(+)
    and b.invalid='N'
    Results:
    BUILDING_ID INVALID      SUB_BUILDING_ID     SEQUENCE_NO
    1000              N     1                     90
    1000             N     2                     91
    1000             N     3                     92
    2000             N     1                     94
    2000             N     2                     95
    2000             N     3                     96
    2000             N     4                     97
    2000             N     5                     98
    3000             N     10                      99
    3000             N     11                     100
    When I run your query, I get NULL for sequence_no on the last 2 rows, where building_id=3000. The numbers 99 and 100 don't seem to occur in either table. Did you post the worng sample data and/or results?
    >
    Now there are 2 requirements:
    1)How can the above query be changed so that 1:1 relationship if sub_building_id is returned?i.e For 1 building_id, only show 1 sub_building(This could be a random selection)
    (Pls help with query) Here's one way:
    WITH       got_r_num  AS
         SELECT  sub_building_id
         ,     building_id
         ,     sequence_no
         ,     ROW_NUMBER () OVER ( PARTITION BY  building_id
                                   ORDER BY          sequence_no
                           )         AS r_num
         FROM    s_test
         WHERE     invalid     = 'N'
    SELECT    b.building_id
    ,       b.invalid
    ,       r.sub_building_id
    ,       r.sequence_no
    FROM             b_test     b
    LEFT OUTER JOIN      got_r_num  r  ON  r.building_id  = b.building_id
    WHERE     NVL ( r.r_num
               , 1
               )          = 1
    ORDER BY  b.building_id
    ;This is called a Top-N Query , because we're picking N items (N = 1 in this case) from the top of an ordered list. What makes one item the "top", and another one "lower"? That's determined by the analytic ORDER BY clause, in this case
    ORDER BY      sequence_noThat means the row with the lowest sequence_no (for each building_id) will get r_num=1. If you want a random row from that building_id to be chosen as #1, then you can change the analytic ORDER BY clause to
    ORDER BY      dbms_random.valueYou can ORDER BY anything you like, even a constant, but you must have an analytic ORDER BY clause. ROW_NUMBER requires an analytic ORDER BY clause.
    The results would be like
    BUILDING_ID INVALID     SUB_BUILDING_ID     SEQUENCE_NO
    1000               N     1                      90
    2000               N     1                      94
    3000               N     11                     100
    Again, I don't see where the 100 comes from. The results I get are:
    BUILDING_ID I SUB_BUILDING_ID SEQUENCE_NO
           1000 N               1          90
           2000 N               1          94
           3000 N              11
    2)How can the same SEQUENCE_NO be shown for all sub_buildings for the same building? (Pls help with query)
    SELECT    b.building_id
    ,       b.invalid
    ,       s.sub_building_id
    ,       MIN (s.sequence_no) OVER ( PARTITION BY  s.building_id)
                            AS seq_no
    FROM             b_test  b
    LEFT OUTER JOIN      s_test  s  ON  s.building_id  = b.building_id
                                AND s.invalid      = 'N'
    The results will be:
    BUILDING_ID INVALID     SUB_BUILDING_ID     SEQUENCE_NO
    1000             N     1                       90
    1000             N     2                       90
    1000             N     3                       90
    2000             N     1                       94
    2000              N     2                       94
    2000             N     3                       94
    2000             N     4                       94
    2000             N     5                       94
    3000             N     10                       99
    3000             N     11                       99
    Again, I don't see where you get sequence_no = 99. The results I get are:
    BUILDING_ID I SUB_BUILDING_ID     SEQ_NO
           1000 N               1         90
           1000 N               2         90
           1000 N               3         90
           2000 N               1         94
           2000 N               2         94
           2000 N               5         94
           2000 N               3         94
           2000 N               4         94
           3000 N              10
           3000 N              11Edited by: Frank Kulash on Nov 8, 2012 12:12 PM
    Added explanation and results
    Edited by: Frank Kulash on Nov 8, 2012 12:28 PM
    It looks like you cahnged your sample data from
    insert into s_test values(10,3000,'N',NULL);
    insert into s_test values(11,3000,'N',NULL);to
    insert into s_test values(10,3000,'N',99);
    insert into s_test values(11,3000,'N',100);The queries I posted are niow getting 99, like you requested.

  • Can a script randomly select an action within a specific set for use on multiple images?

    Hi there.
    I have a folder of 200+ similar images (taken in a photobooth).
    I have made 8 seperate actions within the same set that apply slightly different textures to a image. Actions are titled 1, 2, 3 ...etc.
    I am wanting a way to get all the images to have one of the actions (randomly selected) applied to them.
    I'm pretty confident that this could be achieved with scripting, but have no idea how to write one.
    If the images were sequecnially applied to action 1 then 2 then 3 and so on (repeating when back to 8) this would also be suitable.
    I am fairly new to scripting so please keep answers simple where possible,
    Many thanks.
    Wil Stevens

    Something like this?
    // make variable to hold the name of the action set
    var actionSet = "myActionSet";
    // make variable to hold an array of action names you want to use from that set
    var actionArray = ["Action 1","Action 2","Action 3","Action 4","Action 5","Action 6","Action 7","Action 8"];
    // either hard code the folder path
    // var sourceFolder = new Folder('~/desktop/booth');
    // or prompt for folder
    var sourceFolder = Folder.selectDialog("Select the booth pix folder");
    // if prompting user make sure they didn't cancel the dialog without selecting a folder
    if(sourceFolder != null ) {
        // make variable for processed folder
        var processedFolder = new Folder(sourceFolder+'/processed');
        // make sure it exists
        if(!processedFolder.exists) processedFolder.create();
        // get the files from the folder using a mask to only get certain file extensions
        var files = sourceFolder.getFiles(/\.jpg$/i);// here we are only getting jpeg files with .jpg or .JPG extension
        // now loop through the files and apply random action
        for(var f=0;f<files.length;f++){
            // open a file in the files array
            var currentDoc = app.open(files[f]);
            // generate a random number between 0 and 7 ( array index is zero based )
            var rand = Math.floor((8)*Math.random());
            // apply a random action to the opened document
            app.doAction(actionArray[rand], actionSet );
            // make variable for the new file path
            var saveFile = new File(processedFolder+'/'+files[f].name);
            // save the file
            SaveAsJPEG( saveFile, 8, true );
            // close the doc
            currentDoc.close(SaveOptions.DONOTSAVECHANGES);
            // done with this file so loop to next
         }// end of loop
        // done with all the files in the files array
        alert('Done');
    }// end of if valid folder
    // function to save jpeg
    function SaveAsJPEG( inFileName, inQuality, inEmbedICC ) {
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = inQuality;
    jpegOptions.embedColorProfile = inEmbedICC;
    app.activeDocument.saveAs( File( inFileName ), jpegOptions );

  • Smart playlists that grab a random selection make zero sense.

    Because the random selection only ever happens ONCE making it utterly useless.
    For example: I have created a smart playlist that grabs 1 hour's worth or randomly selected 3 - 5 star rated tracks from my music library. But it NEVER re-randomises! This makes no sense.
    Also: this forum remains very broken (it is impossible to login using another Apple ID once logged into another ID) and the Bold, Italic and Underline buttons don't work (I'm using Camino Version 1.6b3pre (1.8.1.12pre 2008012000) ).

    Yeah, I've been to Doug's scripts before - great site.
    As for just hitting the spacebar - no help when I want a falling asleep playlist. I don't want to wake up hours later to discover iTunes still playing in the middle of the night. Thanks anyway
    You know - I do not properly comprehend the thinking behind having random selection mean random ONCE, then the same FOREVER

  • ITunes has deleted random selection of library and refuses to import

    A week after installing iTunes 9.1, it has deleted a large random proportion of my tirelessly preened library. Upon attempting to re-import my files, iTunes runs a loading bar as if it's accepting them, but imports only some randomly selected, if any.
    Has anybody else encountered this problem upon installing iTunes 9.1?
    I'm considering reinstalling an older version and importing my last saved library?
    Any help would be o so very appreciated and rewarded handsomely
    Thanks,
    Diaz

    check if you have read & write permissions for your iTunes music folder. in finder, right-click on it and +get info+. unlock the little padlock (you may have to enter your admin password) and change the permission settings. next, click on the little gear-shaped icon and +apply to enclosed items+ like so
    you may also give everyone read & write access. if this doesn't help, try the same on your iTunes folder (not just the iTunes music folder).
    any help ?
    if not, try reinstalling iTunes the proper way. click here and follow the instructions.
    if you want to install a previous version after all, here are the steps:
    to downgrade to a previous iTunes version, you could try this user tip that seemed to have worked for some:
    +1) Quit iTunes.+
    +2) Delete iTunes from your Applications folder.+
    +3) Go to your ~/Music/iTunes folder. Delete or rename the "iTunes Library" file.+
    +4) Open the "Previous iTunes Libraries" folder and look for the backup of your old pre-9 library; it should be dated at about the time you first ran iTunes 9. Copy it back out to the ~/Music/iTunes folder, and rename it to "iTunes Library".+
    +6) click here to download iTunes 8.2.1. The page says it's for G3, but the Read Me file says it'll run on G4, G5, and Intel too. Open the disk image and run the installer.+
    +You should now be able to run iTunes 8.2.1 again.+
    +And your iTunes will restore to before you upgraded and you won't lose anything+.
    JGG
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

  • How to random select photos in slideshow mode with iPhoto 7 ?

    iPhoto 6 would do random selection of photos during a slideshow. After I installed iPhoto 7, I am unable to find the random key? Do you know if the feature was dropped?
    Gary

    You need software for it. Do you have iPhoto installed? That is one possibility, but there are many others - you create the slideshow from your photos. Or, you can simply use Quicklook - see here:
    http://osxdaily.com/2012/09/06/8-tricks-mac-os-x-full-screen-slideshow/

  • Random Selection in SQL query

    I have a query or SQL I am writing where I need to select records in this fashion.
    At most 2 records for each username, and those 2 records should be random.
    there are many fields that I am bringing in via my SQL; but the username there are typically around 20 unique usernames.
    The data itself without a random statement added to it returns approximately 2000 records.
    If someone could assist me in the syntax of the portion of the SQL that could attain the results I am looking for, I would appreciate it.
    I've never delved into a Random selection method before.
    Someone mentioned to me that I could use a rank() statement; but I have no clue how to use that.
    then someone else mentioned to use dbms_random.value which is another one I don't know how to use.
    Please let me know if you have any ideas that could assist me.
    Thank you

    my query just needs a slight modification:
    SQL> select   deptno, ename
      from   (select   deptno, ename, row_number () over (partition by deptno order by dbms_random.value) rn
                from   emp)
    where   rn <= 2
        DEPTNO ENAME    
            10 CLARK    
            10 KING     
            20 JONES    
            20 ADAMS    
            30 MARTIN   
            30 JAMES    
    6 rows selected.in my case deptno plays the role of your users!

  • Digital clock which randomly selects different colors from Applet

    Hi,
    I relatively new to java, what I'm trying to do is list about five colours in my Applet and pass the colours into my java code, and maybe the font.....
    I want to be able to Display a digital clock which randomly selects different colours which were passed from my Applet
    Thanks for any help
    Zip
    Clock Code:
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    import java.text.*;
    public class dclock extends Applet implements Runnable{
    Thread animThread = null;
    int delay = 1000;
    public void init(){}
    public void paint (Graphics g){
    // get the time
    Calendar cal = Calendar.getInstance();
    Date date = cal.getTime();
    // format it and display it
    DateFormat dateFormatter =DateFormat.getTimeInstance();
    g.drawString(dateFormatter.format(date), 5, 10);
    public void start(){
    if(animThread == null){
    animThread = new Thread(this,"Animation");
    animThread.start();
    public void stop(){animThread = null;}
    public void run(){
    while(animThread !=null){
    try{ Thread.sleep(delay);}
    catch(InterruptedException e){};
    repaint();
    //sec++;
    }

    Why doesn't the clock just decide what colour it is going to be? If you need to pass the colour choices in, just let the clock accept a collection of colours in its constructor or something. I don't understand what bit of this you are having problems with as you haven't really explained. Please also use code tags.

  • Random select using multiple tables

    Hello World!!!
    I'm trying to fix a form I modified last month and it's causing me fits!
    I need to add another validation element (email address) to my password validation Form. The problem lies in the fact that I can't simply add an additional SELECT Statement to the query because it won't randomly select the same number that the first one did (records won't match). When I try to JOIN on the tables inside the inner SELECT, basically the same thing happens. I get an a result for the "e-mail" column but it doesn't match the same record as the first two.
    Is there an easier way of doing this??? Here's the code I'm using that works for my first two column returns (from the agent_sec_questions Table). I'm trying to add one more column (email) from the agent_data Table.
    Thanks in advance for any suggestions.
    SELECT security_question, question_number
    FROM (SELECT security_question, question_number
    FROM agent_sec_questions
    WHERE agent_id =
    (SELECT agent_id
    FROM agent_data
    WHERE username = 'john doe')
    ORDER BY DBMS_RANDOM.VALUE (1, 9))
    WHERE ROWNUM = 1;

    Here's the solution I came up with if interested. I got the random number first, then joined my tables. If you have a better one, please let me know...
    Chow!
    M
    SELECT DBMS_RANDOM.VALUE(1,3) INTO Sel_Num FROM DUAL;
    MESSAGE ('Sel_Num= '||Sel_Num||' ID= '||UPPER(:LOGON_BLOCK.USERID));
    pause;
                   SELECT b.email, a.security_question, a.question_number
                   INTO L_email, L_sec_q, L_q_num
              FROM lookup.agent_sec_questions a, lookup.agent_data b
              WHERE b.agent_id = a.agent_id
              AND b.username = TRIM(UPPER(:LOGON_BLOCK.USERID))
              AND a.question_number = sel_Num
                   AND ROWNUM = 1;

  • How to randomly select links in e-tester and how to get VU# in e-load

    1. How to randomly select one from links in a webpage in e-tester?
    For example: there is a root-page. On it, there are about 2000 links to its subpages. They all have the following pattern:
    <pre>
    multiline<TD width="50%"><NOBR>
    <img src="/images/tfold.gif" border="0" alt="GXC_.+?" align="texttop">
    {a href="(.+?)"}<font class="titleorimageid1siteid0">GXC_.+?</font>{a} </NOBR>
    </TD>
    </pre>
    So how can randomly select one link and then navigate to it?
    2.how to get VU# in e-load?
    For example: we launch 4000 VU to load-stress our server. But we want to use different user names to login for different VU#. such as VU#1's username is ADF1, VU#2's username is ADF2, VU#100's username is ADF100 and so on. How can we implement the feature?
    Thanks a lot.
    Edited by: user783927 on Dec 1, 2008 5:57 AM
    Edited by: user783927 on Dec 1, 2008 5:59 AM

    Thanks a lot for VU#. Also i got an idea about how to randomly select a link:
    Private Sub RSWVBAPage_afterPlay()
    Dim objReg As New RegExp
    Dim objMatchCol As MatchCollection
    Dim objMatch As Match
    Dim objSubMatch As SubMatches
    Dim doc As String
    Dim str As String
    Dim rNumb As Integer
    RSWApp.GetHtml doc
    With objReg
    .Global = True
    .IgnoreCase = True
    'the kind of urls have the following special pattern
    .Pattern = "pageid=34,([\d]{5})"
    End With
    Set objMatchCol = objReg.execute(doc)
    Randomize
    rNumb = objMatchCol.Count * Rnd
    If objMatchCol.Count >= 1 Then
    If rNumb = objMatchCol.Count Then
    rNumb = objMatchCol.Count - 1
    End If
    End If
    Set objMatch = objMatchCol.Item(rNumb)
    Set objSubMatch = objMatch.SubMatches
    str = objSubMatch.Item(0)
    Call RSWApp.setCustomVariable("var_url", str)
    RSWApp.WriteToLog str
    Set objMatchCol = Nothing
    Set objMatch = Nothing
    End Sub

Maybe you are looking for

  • Where do previews go when deleted

    When I upgraded to 1.5 I had aperture make previews of my library of about 12000 images. The size of my library jumped and I decided I did not want the previews after I learned I had little use for them (slideshows were fast enough on dual processor

  • Screen boots into Darwin/BSD

    I restarted my computer one day and it booted into a Black screen (Darwin/BSD). I've tried the suggestions on various forums below: http://missionitgroup.com/blog/?p=1490 http://discussions.apple.com/thread.jspa?threadID=320663 But I am still unable

  • What is highest security on router that is compatible with iBook clamshell running OS X 10.4.11

    I want to have a secure router but i want my iBook Clamshell to be able to connect to it. I have a Netgear N router and a Graphite iBook Clamshell. Thanks!

  • Creating build.xml

    Hai, I am using IntelliJ IDEA 4.5 for my project. How can I create the build.xml file using Ant? Do I need to write the coding or the build.xml will be automatically created by IntelliJ (like web.xml is created in Weblogic8.0)? Thanx, S.Yogesh.

  • Regarding Screen flow

    hi guys, Can somebody tell me wht are the OK_CODES used for particular Screen name and Screen number. Scrname : SAPMV45A Scrnumber : 101. I need to compare BDC flow between 46C and E47 version. I dont have necssary Screen data to be used to check the