Displaying a Partial List Array?

Hi, I'm trying to figure out how to take an existing array of
elements (for sake of argument, earth, air, fire, water), and have
a text display list as the base, +/- based on button behavior.
So, for example, if I begin with earth, air
and click the add button, it will switch to "earth, air,
fire"
if I click the add button again, it will display the four
elements "earth, air,fire, water", and if I click the subtract
button, it will subtract from the list (earth, air, fire... earth,
air.... earth... undefined).
The idea is to be able to go from a completely empty list
(undefined) to completely full (such as four elements) and back, in
increments of one. String(aElements.pop()); works fine for removing
elements from the list, but
aElements.push("___"); is completely insufficient for the
task.
Ideas?

integer should be restricted so it's never less than zero.
but there's no reason to use a variable to track the next index of
the element to add to aNewElements:
to remove: aNewElements.pop();
to add:
aNewElements.push(aElements[aNewElements.length]);

Similar Messages

  • "ls" not working and Finder displaying only partial list of files

    On a PowerMac G5 2.5GHz with 10.3.9 client installed, I've come across a problem where, when trying to list the files in ~/Library/Fonts (i.e., the user's fonts folder, not the system-wide font folder) using the Unix "ls" command, it merely hangs for a short while (around 10 seconds) and then returns to the prompt without listing any files whatsoever. And using the Finder to do the same thing in the same folder only shows a partial list of the font files (no font files listed beyond those beginning with the letter "F"). This only occurs when trying to display the contents of the above directory--there is no problem listing the contents of any other directory using either "ls" in Terminal or the Finder, not even the /Library/Fonts directory. I am logged into that user's account as that user (he's a standard user) and not the admin user. This is a standard installation and there are no third-party installations (i.e., /usr/local doesn't exist; nor /opt). I have already deleted .DS_Store in ~/Library/Fonts and have rebooted the machine afterwards to no avail. Any ideas would be appreciated.

    The code is now very expensive! but thats the result of avoiding the cd command. Right? Is there a max length for the ls and other commands? a limit of 128KB?
    Mac OS X command line length limit is 256 kilobytes
    Btw
    done < <(ls -1 -d $myPath 2>&1)
    Gives me, a known error. Happens a lot for me.
    syntax error near unexpected token <
    done < <(ls -1d $myPath 2>&1)
    Are you using the bash shell? This is a bash shell feature. Does your script begin with
    #!/bin/bash
    So I did try to use a pipe
    (ls -1d $__myPath 2>&1) | while read file
    do
    __filesArr[$index]="${file}"
    #echo "filesArr$index ="${__filesArr[$index]}
    index=$((index+1))
    done
    if [ -z "${__filesArr[*]}" ]; then # removed the 0 test, was never called.
    echo "${__ErrHeader}Error - No files found" 1>&2
    return
    fi
    But then, of course, I lose my variable (scope) outside the while loop
    The while loop runs in a sub-shell, so when the while loop finishes, the filesArr disappears along with the sub-shell.
    The < space <(...) notation in bash allows the while loop to run in the current shell, so filesArr will be visible after the loop finishes.
    <div class="jive-quote">Anyway came up with,
    done <<<"$(ls -1d $__myPath 2>&-)"
    and that works, but why isn't your line working? Any idea?
    The <<<word is a form of the "HERE DOCUMENTS". According to "man bash", the 'word' is expanded and supplied to the command on its standard input.
    I have not played with <<<word with respect to spaces in file paths. If this works, then it would be similar to the < space <(...) for this example. But I did test < space <(...) to make sure spaces were preserved. You get to test <<<word for proper space handling.
    <div class="jive-quote">Also why
    (ls -1d $__myPath 2>&1)
    instead of
    (ls -1d $__myPath 2>&-)
    Because 2>&1 comes from when I first learn shell scripting back in '85, so I'm more comfortable with it.
    The last avoid/catch an error message when there are no matching files.
    As always, thanks for your helpfull knowledge!

  • How to display a bulletted list

    Hi All,
    I'd like to display a list of agreements to the user as a bulleted list.  It's all the things that the user is agreeing to when they submit the application.
    What would be ideal is if there is a controller that I can bind to an array, and it will display each item in the array as a single bulleted list item.  The list of agreements will vary depending on how the user as filled out the application, and if I do it this way I could simply pass in a collection with all the items they are agreeing to.
    But I haven't been able to even figure out how to display a bulleted list.  I've found some posts online that address how you might do this if you're working on an editor, but I don't need editable text--I just want to display a bulleted list to users.  It seems like this is a basic feature that must be in Flex 4 somewhere, and I don't want to go reinventing the wheel.
    Thanks!
      -Josh

    Ok, here's what I came up with for a bulleted list that you can bind an ArrayCollection of String items to.  Thoughts?  Any issues with this implementation?
    I looked into a custom ItemRenderer, but this seemed much simpler and it's all I need in my case--a bulleted list.
    I'm aware that no escaping of the input strings is being done, but that's actually intentionally--I may wish to pass in strings that include additional markup to make certain words/phrases bold.
    The reason for the getter and setter on the dataProvider property is to ensure that anytime a new assignment is made to that property the change listeners are setup.
    I'm interested in feedback on how I could do this better or differently, to best take advantage of the facilities Flex offers.
    Thanks!
      -Josh
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               width="100%">
         <s:layout>
              <s:VerticalLayout/>
         </s:layout>
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <fx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   import mx.events.CollectionEvent;
                   import mx.events.FlexEvent;
                   private var _dataProvider:ArrayCollection;
                   public function get dataProvider():ArrayCollection{
                        if(_dataProvider == null){
                             dataProvider = new ArrayCollection();
                        return _dataProvider;
                   public function set dataProvider(value:ArrayCollection):void{
                        _dataProvider = value;
                        this.ensureBulletedListTextIsBuilt(dataProvider);
                        this.dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,handleItemsChange,false,0,true)
                   protected function handleItemsChange(event:CollectionEvent):void{
                        var collection:ArrayCollection = event.target as ArrayCollection;
                        this.ensureBulletedListTextIsBuilt(collection);
                   protected function ensureBulletedListTextIsBuilt(collection:ArrayCollection):void{
                        var html:String = "";
                        for each(var item:String in collection){
                             html += "<li>" + item + "</li>";
                        bulletedListText.htmlText = html;
              ]]>
         </fx:Script>
         <mx:Text id="bulletedListText" width="100%" />
    </s:Group>

  • How to display options from List  in JSF

    Hi ,
    How can I display the options in JSF,because jsf wont support the forEach tag.
    I'm using Tomcat 5.5 ,Java 5 and Eclipse .
    I'm using the tag like this
    <h:selectOneMenu id="assignTo" value="#{courseDetails.assignTo}" >
                                              <f:selectItem itemLabel="#{courseControl.processList}" itemValue="#{courseControl.processList}" />          
                                       </h:selectOneMenu>how can i assign the values to the selectItem throug List/Array.
    Can any help on this please.
    Regards,
    PB.

    Instead of using
    <f:selectItem> use
    <f:selectItems>.
    Pass list to this componenet. is this your question?
    Message was edited by:
    KrishnaS

  • HELP: Trouble with partial filled arrays

    For HW, I have to write a deleteRepeats static method for an array of characters that deletes any character previously listed and returns the new array size. The example the problem gives is:
    char a[10];
    a[0]='a';
    a[1]='b';
    a[2]='a';
    a[3]='c';
    int size = 4;
    size = deleteRepeats(a, size);
    The problem then says after the code is executed, a[0] should be 'a', a[1] should be 'b', a[2] should be 'c' and size is 3. I read the section in my book on partially filled arrays, but I still can't get this method to work properly. Here is my code:
    public static int deleteRepeats(char[] a, int size) {
    size=a.length;
    for(int i=0; i<size; i++) {
    for(int j=1; i+j<size; j++) {
    if(a==a[i+j]) {
    a[i+j]=a[(i+j)+1];
    size--;
    return size;
    With that code, when I put in the test array [aabcd], it returns 3, when it should be 4 and it changes the array to [abccd]. I'm sure there's numerous problems with my code. Any help is greatly appreciated.

    Please post code in code tags.
    First, I have no idea why they make you work with partially-filled arrays. It seems like the worst idea in the world. You should use ArrayLists for this kind of thing.
    Why do you do "size=a.length;" at the beginning of the method? You lose the size information.
    And I don't see how the algorithm does what you want. When you "delete" an element from your list of numbers in the array, you need to shift all later elements backwards to fill the gap.

  • Problem Sorting Partially Filled Arrays

    I am having trouble sorting a partially filled array. What I want to have happen is have the user enter up to 50 numbers(int's only, 0's and negatives are allowed) and store the input in an array. Then sort the array, and display the sorted array from highest to lowest back to the user. The next step, which I haven't addressed yet is counting the number occurrences of each unique int and display that total to the user.
    I have the array fill working correctly. Where I am having problems is when i try and sort the array of user entered values. Instead of only sorting the entered values, it add's "0's" to the array and sorts and displays them as well.
    Here is what I want to have happen:
    The user enters 1 2 3 4 3 2 1, the output should be 4 3 3 2 2 1 1. But what is actually being output is 4 3 3 2 2 1 1 0 0 0 0 0 0 etc.(until the array is full).
    What am I doing wrong? If I display the contents of the array prior to sorting, it will only display the numbers entered, it does not add the extra 0's to fill the array. Any other suggestions on my code are welcome as well, always trying to get better at this, its tough teaching yourself form a book!
    And I have left some of my tracer variables in there as well.
    import java.util.Scanner;
    import java.util.Arrays;
    public class SortNumbers {
        //user can not enter more than 50 numbers to be sorted
        private static final int MAX_NUMBERS_ENTERED = 50;
        public static void main(String[] args) {
            // TODO code application logic here
            int[] sortThis = new int[MAX_NUMBERS_ENTERED];
            int numberUsed = 0;
            int count;
            System.out.println("Enter the numbers you would like to sort. Enter '1234' to stop. ");
            numberUsed = fillArray(sortThis);
            outputArray(sortThis, numberUsed);
        //this receives numbers from the user
        public static int fillArray(int[] a){
            Scanner keyboard = new Scanner(System.in);
            int next;
            int index = 0;
            next = keyboard.nextInt();
            while ((next != 1234) && (index < a.length)){
                a[index] = next;
                index++;
                next = keyboard.nextInt();
            return index;
        //this outputs the content of the array to the user
        public static void outputArray(int[] a, int numberUsed){
            //show the contents of the array
            System.out.println("The numbers you entered are: ");
            for (int i = 0; i < numberUsed; i++){
                System.out.print(a[i] + " ");
            System.out.println();
            System.out.println("***********");
            System.out.println("array length: " + a.length + ", " + "what array length should be: " + numberUsed);
            System.out.println("***********");
            //sort the array and show the sorted output
            Arrays.sort(a);
            for (int i = (MAX_NUMBERS_ENTERED - 1); i >= 0; i--){
                System.out.print(a[i] + " ");
    }

    This is what I've gotten so far...
                   //sort the array and show the sorted output
            Arrays.sort(a, 0, numberUsed);
            int qty = 1;
            //show the headers of the columns
            System.out.println("Num" + "  " + "Qty");
            //go through the numbers and output them along with their qty
            for (int i = (numberUsed - 1); i >= 0; i--){     
                if (a[i] != a[i+1]) {
                    System.out.println(a[i] + "    " + qty);
                    qty = 1;               
                else {
                    qty++;
            System.out.println();However, it's not working. If I only enter 1 instance of each number it works fine. However, if i enter multiple instances of a number, it doesn't work how it should.
    Any suggestions? Should I replace the if statement with a for loop?
    In the same problem, I can't figure out how to only display the entered number once and the number of times that it has been displayed. I think my two problems go hand in hand, if I figure the first one out, the second one should be easy.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • 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

  • Check boxes are not being displayed in any list applets

    Issue: The check boxes are not being displayed in any list applets in the system. A check box can be marked in the system, but as soon as the user clicks anywhere outside of the box the check box 'visibly' disappears. If you hover the mouse over the check box it displays a 'Y'. However, check boxes are working fine for the form applet, the issue is only with the list applet.
    I verified the checkboxes work fine in the thick client and in production. However, it is the testing environment, which belongs to client, that is showing the above behavior. I think there is some setting that is missing for them. But I am unable to figure it. I would really appreciate if someone could help !!
    Thanks in advance

    One way that you could make it work (just tried it out again) is to use the windings font
    and use the checkboxes from there. However, you need to register the font with xml publisher. In the template builder for Word, you can put a configuration file under:
    C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\config
    (depnding on your installation). The file should have the name xdo.cfg or xdoconfig.xml.
    There is an example file: xdo example.cfg that you rename and change accoringly.
    The font is there setup for windows 2000 as an example. Select the correct font
    path - for my XP it is:
    <font family="Wingdings" style="normal" weight="normal">
    <truetype path="C:\WINDOWS\fonts\wingding.ttf" />
    </font>
    Then you can put the symbols into your RTF template and it will be rendered.
    At least it worked for me - with 5.6.2. (Availbable on Wednesday or Thursday), but
    I am pretty sure I tried it before with 5.5.
    Didn't have the 5.5 manual with me - so I have to check what that says again..
    Hope it helps,
    Klaus

  • Is it possible to display the entire list in Background ?

    Hi all,
    I have alv report(Oops) , it is grid display and having more than 300 columns , when i execute that report in background i am getting only 132 columns and 65 lines per page, Is it possible to display the entire list , If it is possible then how we can do that? if it is not what is the reason? .
    Thanks in Advance.

    Hi,
    If use Grid in BG u will get o/p In ALV List Itself, second thing is u will get Croped o/p bcos of Print Format 65255 , in this case u have to create/change a new Print Format only for BG jobs like 651000.
    for more info ask ur basis person to create a new print formats in such cases.
    Regards,
    shiva.

  • I purchased a song on iTunes and it is displayed in my list of SONGS.  However, when I try to add to my iPhone 4, it displays with a small circle of dots to the left of the song title and will not play.  How do I get this song onto my device?

    I purchased a song on iTunes and it is displayed in my list of SONGS.  However, when I try to add to my iPhone 4, it displays with a small circle of dots to the left of the song title and will not play.  How do I get this song onto my device?

    Hi TKCDM1!
    You should try to get this purchase onto your iOS device by using the suggestions in the following article:
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht2519
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • Custom playbar does not display in the list of available widgets

    I followed the steps described in the "Skins" page of the Captivate 5 help outlined here:
    http://help.adobe.com/en_US/captivate/cp/using/WSc1b83f70210cd101126156ac11c7f147d6b-8000. html
    Now my problem is, that my custom playbar is not displayed in the list of available playbars (neither in the Project->Skin Editor->Playbar nor in the list of widgets). If I just duplicate one of the existing playbar files in Gallery/Widgets/Playbars it's listed without problems.
    I use Flash CS5 to edit the playbar and tried to publish it as AS3 and AS2 - no success.
    Are there special settings I need to set in the publishing settings to get my playbar in the list? Anything else I'm missing?!
    Thanks,
    Peter

    Try putting the swf for the playbar in ...\Adobe Captivate 5\en_GB\Gallery\Playbars\AS3\

  • Infopath forms are not displaying in the list

    Hi,
       I have created an info path form template after customizing a list form using infopath designer. But it is behaving weird. After submitting the form it is not displaying in the lists allitems view rather it is displaying from designer but directly
    under the list not in the items folder.
    1) Any idea why this is happening?
    2) What is the use of NaN.xml? why it gets created in the list?

    Yes, it sounds very simply, but there is a very tiny little broken piece causing lots troubles.
     It’s tiny piece, so the solution is going to be very simple. On the other hand, it’s hard to find out because it is very tiny broken piece.
    I have feeling that you made a mistake while saving/publishing or filename in submit option (I don’t think List InfoPath form let you set up different submit option).
    Sometimes, it is much faster and easier to re-do it again. I recommend you to following the article below. You can skip most but please pay attention on the start (beginning of Part 2 – Customizing)) and on the end (Part 4 - Publishing)
    http://msdn.microsoft.com/en-us/library/office/gg180738(v=office.14).aspx
    Once you follow the best practice written in the article and make it work, then you may realize the difference and mistake.
    백상하 - Stop hacking my blog http://blog.naver.com/agilepoint
    쉐어포인트 배움터 http://sharepointkorea.com

  • Display a Linked List ADT in JTree ?

    Most of the Swing examples that I have noticed for building a JTree have used many different ADTs, but I haven't noticed any examples to use a JTree to display a linked list (not necessarily the LinkedList class though). I was studying Data Structures & Algorithms, and the majority of the examples for Binary Trees, Red-Black Trees, and 2-3-4 Trees use a form of a linked list to connect all of the nodes together.
    Isn't it, or should it, be possible to use a JTree to display a linked list ADT ? Or am I missing something somewhere ?

    Maybe, if you only had a reference to one other node in the object that is being linked together.
    What if there was a node object that contained three references ?
    nextNode
    prevNode
    subNode

  • Contacts display first name, last name, except if there's email address then contact info is deleted (?) and email is displayed in contact list.

    Confused on these procedures to post.
    My contacts should list first name last name, however any contact with an email has info phone numbers and addresses deleted and the email address is displayed in contact list. I know how to change to last name first name but that doesn't help... Any suggestions? Should I delete all contacts and reacquire all through icloud? How?

    Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback

Maybe you are looking for

  • Install downloaded software other than on C: drive

    I purchased this morning and downloaded the latest 64 bit version of Elements and Premiere to my E: drive (C: drive has Windows Ultimate 7 64 bit only). I have six files downloaded - one Application file and 7zArchive file set each for Photoshop Elem

  • Reset Did not Erase 1st Backup

    Like everyone else there are many initial hiccups. My first backup was done wirelessly. After firmware upgrade everything went to ****. So I did a rollback on firmware and did a reset. Bought a ethernet cable as advised by many that it is faster and

  • Internal error has occurred. Check log files for details.

    While configuring software library on OEM 11g grid control, i get the error as Internal error has occurred. Check log files for details. On checking emoms.trc i see the following error 2011-08-08 22:15:13,298 [EMUI_22_15_13_/console/provision/admin/a

  • Known Mail Bugs?

    1) I have Mail preferences set to retrieve new messages every 5 minutes.  But whenever I click on Get Mail, it seems to find several messages not yet retrieved and there is a progress bar showing the number of messages being retrieved. Also, these nu

  • How to access data from Cluster table....?

    Hi Experts, Can You plz tell How to import/read data from cluster table? Plz give me the syntaxes also.. Thanx in advance.