Collections.shuffle(list) without repetition.

Hello every one,
I am new to Collections. I have an String ArrayList having 3 strings in it. [A, B, C]. Now all i want is 6 permutations.
[A, B, C]
[A, C, B]
[B, A, C]
[B, C, A]
[C, A, B]
[C, B, A]
Here is the simple code i have written. I hard coded the number of permutations as i know the value to make it simple.
The problem is in those 6 permutations, few are being repeated which I dont want
Please help me out with this problem.
import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public class sample {
     public static void main(String args[]) {
          ArrayList<String> list = new ArrayList<String>();
          list.add("A");
          list.add("B");
          list.add("C");
          int permutations = 6;
          for ( int i = 0 ; i < permutations; i++)
Collections.shuffle(list);
          System.out.println(list.toString());
Thanks in advance
aady

hi,
may be this can help you. i found this code in [http://compsci.ca/v3/viewtopic.php?t=5214|http://compsci.ca/v3/viewtopic.php?t=5214] under the user zylum.
the code is used for integers. but i managed to change is to Strings too and it shuffles without REPETITION. :) so i hope this helps:
int[] numbers = new int[52];
int randNumbers = new int[22];
for (int i = 0; i < 52; i ++) numbers[i] = i;
for (int i = 0; i < 52; i ++) {
    int idx = Math.random()*52; //i forgot how to do random in java so im using the action script way which is prolly the same way
    int temp = numbers[idx];
    numbers[idx] = numbers;
numbers[i] = temp;
for (int i = 0; i < 22; i ++) randNumbers[i] = numbers[i];
Edited by: djmlog103 on Apr 2, 2008 9:53 AM
Edited by: djmlog103 on Apr 2, 2008 9:54 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Playlist shuffles through list without playing

    I have a list of 50 spoken-word cd's that I've added to iTunes as audiobooks.  I put them all in a playlist.  When I play the list on my PC or iPad, it works fine, but when I try to play it on my iPhone, it does one of two things.  Either it shuffles through the list without playing, or it goes back to the previous screen.  I tried deleting the list on my iPhone and recreating it in iTunes and then resyncing, but no luck.. Suggestions? 
    Thanks,
    Amy

    Thank you for taking the time to respond!  I was just on phone with Apple Tech support, and when we disconnected, phone was working perfectly.  60 seconds later, the big black square with turning wheel in middle REAPPEARED saying "connecting to..." And 2 seconds later all music was removed from phone.  I reconnected phone to Air, sync'd AGAIN, and at this MOMENT I have music......go figger!

  • Calls listing,  why repetition of the same contact for each call ?

    Calls listing,  why repetition of the same contact for each call ?

    jasonnPOS,
    you seam to have had the exat same problem I am having now. Have you solved it?
    The link you send in your post :
    http://support.apple.com/kb/TS2326
    As I think you already noticed doesn't solve the problem it merly duplicates the numbers in each contact. One with +and country code and one without that...
    There has to be another solution...

  • Collections.shuffle() for ArrayLists

    I was using Collectins.shuffle with a sigle paramenter(the arraylist name) and noticed that sometimes the result was peculiar, i.e. the same element would come up in the first index every 9 trials or so.
    I know there is another version with the name of the object and an int. Is this latter version more useful than the first if given a random number each time?
    Thanks.

    sometimes the result was peculiar, i.e. the same element would come up in the first index every 9 trials or so. Why do you think that's peculiar? It's certainly not outside the bounds of probability, and "or so" isn't peculiar at all. Now, if you demonstrated that the list is something other than nine elements long and same element always came up in the first index exactly and only every 9 runs, yeah, that might be worth looking into.
    In other words, in a list of nine elements and a several thousand runs of Collections.shuffle(), I'd expect a particular element to show up in a particular index about 1/9th of the time. But over, say, nine runs I wouldn't be surprised if the same element showed up as the first element all nine times. That's just not that crazy of a probabilistic scenario.
    I know there is another version with the name of the object and an int.Not in java.util.Collections, there isn't.
    ~

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time?

    How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time? I have AppleScript but don't see "add address" in any of the boxes/drop-downs. 

    Sorry, but Address Book does not allow you to select more than one email address to send to in a group. There's really no reason why people need multiple copies of a message, anyway; they have the option of forwarding email to another email address of theirs.
    Mulder

  • ICal for iPhone. View all events as a list without having to type into the earth box.

    iCal for iPhone. View all events as a list without having to type into the earth box.
    On the previous software version I used to be able to view all my calendar events as a list by clicking on the magnifying glass. Now you have to type into the search dialog box for a list to populate. This is very frustrating and annoying because I much prefer the list format to populate everything unless I specify what I am looking for into the search box. Is there a way to view all the events as a list without having to type anything into the search box?

    And you are aware of the possible options for listing the months and having an optional export value for each month.
    For listing the months, you can use a number, a 3 character string, or the full name.
    For the export value, the full name, the 3 character value, the 1-2 number, or the 0-11 JavaScript value.
    I would look at deciding how you want to populate the drop down box and build a one page form with just this field. You can then insert that page into a PDF and copy the field as needed and then delete the inserted page. Or you could create an FDF file to create the drop down box.

  • Can we get the data from list without using any change event...

    It is possible to get the current data from list without passing events?...
    Thanks in advance,
    senthil.

    Can you get what you want by accessing the selectedItem/selectedItems and selectedIndex/selectedIndices properties?

  • Collecting spool list into internal table.

    Hey guys,
    Could you pls help me in how to take the output in spool list and collec the list into one internal table?
    i guess using GET_PRINT_PARAMETER does that? how to collect the list from the spool list.
    ambichan.

    Hi ambi,
    e.g.:
    SUBMIT y123...
                    EXPORTING LIST TO MEMORY
                    AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
         TABLES
              listobject = liste
         EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
         EXPORTING
              list_index         = -1
         TABLES
              listasci           = tab
              listobject         = liste
         EXCEPTIONS
              empty_list         = 1
              list_index_invalid = 2
              OTHERS             = 3.
    LOOP AT tab.
    append tab to tab_total.
    endloop.
    free tab.
    regards Andreas

  • Can I insert a space after numbered items in a list without losing auto-renumbering?

    I'm a new Pages user trying to adapt Harvard template for my needs. Can I somehow make a space after each item in a numbered list without losing auto-re-numbering? If paragraph space is used, program does not seem to recognize next number as part of the same list. Again, tried to check for previous question/answer on this but I'm not clear on how to search forum before submiting a question. Thanks Danie

    Hi Danie,
    Use a line feed (shift-return) instead of a paragraph break (return).
    Regards,
    Barry

  • I am trying to sent an e-mail to a large distribution list, without everyone appearing in the "To" field.  Any help would be appreciated?

    I am trying to sent an e-mail to a large distribution list, without everyone appearing in the "To" field.  I do not want anyone else to see who I am sending the e-mail to.  Any help would be appreciated?

    Mail Preferences, Composing:
    Uncheck the option to show all recipients.

  • Fetching prices from price list without condition technique

    Hi,
    I have a situation where i need to create a price list of materials which will not be used in my regular sales process pricing.
    I would require these prices to send the data to an external interface.
    As per my understanding the price list is used to get the customer specific prices and will be used in sales processing for automatic pricing. Kindly let me know how to use the price list without using condition technique.
    As i need to create a condition table, Access sequence, condition type to use the price lists, kindly suggest how to avoid the regular process and directly fetch the price of the material from the price list.
    Is this possible, if so do let me know the steps.
    Regards,
    K.Byla

    hi,
    this is to inform you that,
    PRICE LIST:
    it is applicable for a list of Customer's which are under the same group and share same pricing requriments.
    With out using Condiiton Technique we are not able to do anything.
    this is one of the important field which plays a very important role in pricing determination through CONDITION RECORDS.
    you can go through PRICING REPORT, even this does not give any solution to this issue.
    you can go for ENHANCEMENT, by creating a Z table with the fields:
    KSCHL, AMOUNT & OTHER fields into condideration.
    or
    use SM30 and update into the tables - which is not suggested.
    please test and confirm.
    HOPE THIS CLEARS your issue.
    balajia

  • Feature not appearing in site collection features list using powershell

    I created a custom web part solution which adds a custom web part to the web part gallery - simple.
    I did this on my dev server and used Visual Studio's deploy button to deploy it, and it all worked. The solution was added to the Solution Store, my feature was now in the Site Collection features list and automatically activated. So I checked my web part
    gallery and it was there as well... great.
    Now I'm ready to migrate my simple web part to my Prod server. I managed to use WSP builder to build my wsp. So now i have my wsp file.
    I used Powershell to add my solution to my Prod server, that worked. So I ran the Install-SPSolution command and looking at the logs, it all seemed to install fine. Here are the commands I used: 
    Add-SPSolution “E:\Deployment WSPs\HRFeedbackForm.wsp“
    Install-SPSolution -Identity "HRFeedbackForm.wsp" -GACDeployment
    However, when I go to my Site Collection Features, I can't see my feature. There is nothing in my 14 hive either and as far as I can see, and there are no errors in my log files.
    So what have I done wrong?
    So I tested adding and deploying the same solution on my dev box using Powershell and I had the same problem as what I've experienced on my Prod server. So what's the difference between deploying solutions via Visual Studio Deploy and using those powershell
    commands??? Is there something else I'm meant to change, somewhere?
    I hope someone can shed some light on this issue.
    Danielle :)

    Hi,
    I wonder whether you have to populate this web part by force in your web part gallery.
    For this, go to your Site's Home page. Then...
    Site Action > Site Settings > Galleries > Web Parts
    From here...
    Under Library Tools go to Documents Tab > Click on New Documents > The New Web Parts popup will open
    Here search for your web part. If you find it, select it and Check "Overwrite if file already exisists" and click on Populate Gallery.
    If the above does not work, I am stumped too. I will be curious what other members of the community have to add.
    Thanks, Soumya | MCITP, SharePoint 2010
    Omg it was there and i've added it to the web parts library and it works.... that was soooo strange.
    Thanks Soumya :)
    Can you explain at all why the web part has been added to the web part gallery, but the feature doesn't appear under site collection features?
    Danielle :)

  • How good is the Collections.shuffle() method?

    Hello
    I have an ArrayList which I want to bootstrap from. I did not find any method to randomly select an entry from the ArrayList, so I use the shuffle method first, and then get the first entry (which should be random after each shuffle). However, I do get some strange results from this. On average the numbers gotten when I sample small series is lower then the ones I get sampling longer series. There is no aspect with the data that should imply such behavoiur. Does anyone know how good my way of sampling is (using shuffle), and if the shuffle method really is a good way to randomize?
    Regards
    JT

    I think the API docs probably give the best answer to this question. Notice the word "approximately" In the shuffle(List) method. Also note that shuffle.(List, Random) depends on how "good" Random is.
    I guess you'd have to construct some form of test to see if either shuffle was good enough for your requirements.
    Cheers
    DB

  • Report RMMD07EX for collective MRP list

    Hi all
    I want to use the collective MRP list MD04 but by defining a range of plants and multiple MRP controllers at a time. SAP recommends using a report similar to RMMD07EX. This mimics MD07. Has anybody created a report for collective MRP list using MD04
    thanks

    How do you plan to switch from collective display to individual ? DO you plan to agregate some figures like stock for differents materials?
    Have you tried the LIS, with transactions like MCBZ? This is collective Stock/ Reqmts List !

Maybe you are looking for

  • 'Build stopped' when NWDS generate import statement in Component Controller

    Hi,     I add method in Component Controller the code work fine if the code not require to import class. When the code need to import the class, and NWDS automatically import for them. The error occur like below while the code is complied. Build stop

  • Purchase organisation Field in Vendor master data

    Hi All During the creation of  Vendor master ,Needs to make the Field Purchase organisation as a mandatory. I have checked the in the following configs. Define Account Groups with Screen Layout (Vendors Define Screen Layout per Company Code (Vendors)

  • Working with linked video files in Flash CS5

    Hi, I'm working on a project that involves making decisions that affect how a short film plays out. The basic idea is link some video files to the flash file (don't embed because it loses a lot of quality) and have buttons appear at the end of each c

  • XFI Fatality And Front Audio Ports On C

    Hi guys I have a bit of a question about something that has been nagging me for a while. I have front audio ports on built into my case that I would like to have working. I know that the sound card came with an I/O Dri've with similar ports on it but

  • How to convert mp4 file to m4v file ?

    hi how to convert mp4 file to m4v file ? thanks