OrderedList

Hi guys I need your help.I have to write java class OrderedList which I will be able to insert string elements and at the same time sorting them in in alphabetical order.I want the insert method to do all this for me.How do I do it?
This is how I wrote my method:
public void insertEntry(String Entry)
for ( int index = 0;(Entry > data[index])&&(Entry < data[index+1]); index ++)
data[index+1] = Entry;
size ++;
//size is the number of elements in the list.

Besides the obvious fact that you can't use ">" and "<" (I'll assume you used that for short notation), once you've found the correct place, you need to "push" it into place. Right now, it looks like you are merely replacing what was there with another String, and that won't increase the size of the list, now will it?

Similar Messages

  • OrderedList sorted by String length

    i am trying to create an orderedlist of strings in ascending order by length. I am a little shacky on comparables this is what i have so far. I think i have to implement the Comparable interface and use length as the comparison in the Word class but im not entirely sure how to do this. So for example lion, pig, crocodile should look like ....
    pig
    lion
    crocodile
    in the ordered list... any help is appreciated.
    WORD.JAVA
    public class Word
         private String word, description;
         private int startPos, direction, used;
         public static final int NOTUSED = 0;
         public static final int USED = 1;
         public static final int DOWN= 0;
         public static final int ACROSS= 1;
         public Word(String w, String d)
              word = w;
              description = d;
              //startPos = num;
              //direction = dir;
              //used = use;
         public void setDirection(int dir)
              direction = dir;
         public int getDirection()
              return direction;
         public void setUsed(int use)
              used = use;
         public int getUsed()
              return used;
         public void setPos(int num)
              startPos = num;
         public int getPos()
              return startPos;
         public String getDescription()
              return description;
         public String getWord()
              return word;
         public String toString()
              String str = "";
              str = word+": "+description;
              return str;
    ORDEREDLIST.JAVA
    import java.util.*;
    public class OrderedLinkedList
         private class LinearNode
              private LinearNode next = null;
              private Comparable element = null;
              public LinearNode(Comparable c)
                   element = c;
              public LinearNode getNext()
                   return next;
              public void setNext(LinearNode n)
                   next = n;
              public Comparable getElement()
                   return element;
              public void setElement(Comparable c)
                   element = c;
              public String toStringRecursive()
                   String result = element.toString();
                   if(next == null)
                        return null;
                   else
                        return result + " " + next.toStringRecursive();
              public void add(LinearNode node)
                   if(node.element.compareTo(next.element) <= 0)
                        node.next = next;
                        next = node;
                   else
                        next.add(node);
         private LinearNode first = null;
         private LinearNode last = null;
         private int count = 0;
         public void add(Comparable c)
              LinearNode node = new LinearNode(c);
              if(isEmpty())
                   first = node;
                   last = node;
              else if(count == 1)//(first == last)
                   if(c.compareTo(first.getElement()) > 0) //one in list add to end
                        last = node;
                        first.setNext(last);
                   }else                                   //one in list add to start
                        first = node;
                   first.setNext(last);
              else if(c.compareTo(first.getElement()) <= 0) //multiple in list add to start
                   node.setNext(first);
                   first = node;
              }else if(c.compareTo(last.getElement()) > 0) //multiple in list add to end
                   last.setNext(node);
                   last = node;
              }else
                   first.add(node);
              count++;
         public Comparable remove(Comparable target) throws EmptyStackException,NoSuchElementException
              if(isEmpty())
                   throw new EmptyStackException();
              boolean found = false;
              LinearNode previous = null;
              LinearNode current = first;
              while(current != null && !found)
                   if(target.equals(current.getElement()))
                             found = true;
                   else{
                        previous = current;
                        current = current.getNext();
              if(!found)
                   throw new NoSuchElementException();
              if(size() == 1)
                   first = last = null;
              else if (current.equals(first))
                   first = current.getNext();
                   else if(current.equals(last))
                             last = previous;
                             last.setNext(null);
                        else
                             previous.setNext(current.getNext());
              count--;
              return current.getElement();
         public boolean isEmpty()
              return count == 0;
              //return first == null;
         public String toString()
              String result = "";
              LinearNode current = first;
              while(current != null)
                   result += current.getElement();
                   current = current.getNext();
              return result;
         public int size()
              return count;
    }

    That's rather a lot of code - and much of it has nothing obvious to do with sorting strings by length. Also I can't see where you have implemented the Comparable interface.
    You are talking about java.lang.Comparable, right? In that case some class (Word?) has to be declared as "implements Comparable".
    Another way to do this is is to have an instance of Comparator that you use when you create an ordered collection like a TreeSet.
    Have you read the JavaWorld article: [http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-sort.html]. It is rather old now and doesn't make any use of generics. But it gives examples of a simple collection - a list - being sorted using Collections.sort(). Both the Comparable and Comparator approaches are illustrated

  • Why isn't there OrderedList/NavigatableList in the standard API?

    Hello,
    there are Ordered and Navigatable Set and Map implementations in the standard java.util APIs, but there is no equivalent for Lists.
    When you need to maintain an ordered list, you have to maintain it manually, using e.g. Collections.sort() and Collection.binarySearch().
    Is there any formal/logical reason why such implementations do not exist, besides pragmatic reasons such as "no budget"?
    Note that such a list might not support method List.add(int index, E element), but this operation is optional anyway.

    maybe because Lists allow duplicate elements, allow multiple null elements if they allow null
    elements whereas Sets do nor allow duplicate elements, null elements,...

  • Issue with export in Excel in WAD

    Hi
    I have an issue with export to excel in WAD. I have a web template with two or more tabs.
    On the webtemplate I have two buttons to export to excel. One to export the content from the active tab and one button to export content in all tabs.
    My problem is that when I export to excel it always add the current/active content twice. I've tried with both buttons and they work as expected except that they export one table to much (the active).
    can anyone help / give a clue what to look for.
    br,
    John
    Edited by: John Dolph on Apr 15, 2010 10:50 AM

    Hi
    Sorry I has been a while but the problem still occurs,
    I've defined my export button group like this in a seperate template and I expected that it would only return the resultset from TAB_A and TAB_B but it also export the resultset from the tab I'm currently on.
    <bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" />
                <bi:BUTTON_GROUP_ITEM name="TAB_BUTTONs" designheight="23" designwidth="300" >
                    <bi:BUTTON_LIST type="ORDEREDLIST" >
                        <bi:BUTTON type="COMPOSITE" index="2" >
                            <bi:CAPTION value="EXCEL" />
                            <bi:TOOLTIP value="Table, Graph and/or Table/Graph download to PDF" />
                            <bi:ACTION type="CHOICE" value="INSTRUCTION" >
                                <bi:INSTRUCTION >
                                    <bi:EXPORT >
                                        <bi:ITEM_REF_LIST type="UNORDEREDLIST" >
                                            <bi:ITEM_REF index="1" value="TAB_A_ANALYSIS" />
                                            <bi:ITEM_REF index="2" value="TAB_A_CHART" />
                                            <bi:ITEM_REF index="3" value="TAB_B_ANALYSIS" />
                                            <bi:ITEM_REF index="4" value="TAB_B_CHART" />
                                        </bi:ITEM_REF_LIST>
                                        <bi:EXPORT_FORMAT value="XLS" />
                                    </bi:EXPORT>
                                </bi:INSTRUCTION>
                            </bi:ACTION>
                        </bi:BUTTON>

  • Web Application Designer - export to XLS/PDF layout

    Hello experts,
    I have a situation when Web Report has 6 different data providers. Each of these data providers is assigned to analysis item. So there are 6 analysis items (let's call them AI1, AI2, AI3, AI4, AI5 and AI6). When I do the export to excel or PDF, the layout of the document looks like this:
    AI1
    AI2
    AI3
    AI4
    AI5
    AI6.
    However, I need the layout to look like this:
    AI1 AI2
    AI3 AI4
    AI5 AI6.
    Is there a way to do that in WAD?
    Thank you in advance!

    Here's the excerpt of HTML code if that's what you mean. In WAD my layout looks like this:
    1 2
    3 4
    5 6.
    And I want it to look like this when it's exported to excel or PDF. However, when I do the export, the layout changes to:
    1
    2
    3
    4
    5
    6
    <bi:CONTAINER_LAYOUT_ITEM name="CONTAINER_LAYOUT_CHARTS_ANALYSIS_1000" designheight="20" designwidth="1000" >
    <bi:WIDTH value="1000" />
    <bi:FULL_WIDTH value="" />
    <bi:HEIGHT value="20" />
    <bi:FULL_HEIGHT value="" />
    <bi:ROW_LIST type="ORDEREDLIST" >
    <bi:ROW index="1" type="ORDEREDLIST" >
    <bi:COLUMN index="1" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_3000" />
    </bi:COLUMN>
    <bi:COLUMN index="2" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_4000" />
    </bi:COLUMN>
    <bi:COLUMN type="COMPOSITE" index="3" />
    </bi:ROW>
    <bi:ROW index="2" type="ORDEREDLIST" >
    <bi:COLUMN index="1" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_5000" />
    </bi:COLUMN>
    <bi:COLUMN index="2" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_6000" />
    </bi:COLUMN>
    </bi:ROW>
    <bi:ROW index="3" type="ORDEREDLIST" >
    <bi:COLUMN index="1" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_1000" />
    </bi:COLUMN>
    <bi:COLUMN index="2" type="COMPOSITE" >
    <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_2000" />
    </bi:COLUMN>
    </bi:ROW>
    </bi:ROW_LIST>

  • Need Calendar Year as a Variable in the Caption of an Analysis Item WAD 7

    I am using Web Application Designer 7.X for the first time.
    I am modifying a template that has the following Analysis Item in it:
               <bi:ANALYSIS_ITEM name="TABLE_4" designheight="300" designwidth="966" >
                    <bi:WIDTH value="966" />
                    <bi:WITH_TRAY value="X" type="CHOICE" text="" >
                        <bi:TRAY_SETTINGS type="COMPOSITE" >
                            <bi:CAPTION value="Employee Information" >
                                <bi:text localkey="1" />
                            </bi:CAPTION>
                            <bi:CAPTION_VISIBLE value="X" />
                        </bi:TRAY_SETTINGS>
                    </bi:WITH_TRAY>
                    <bi:DATA_PROVIDER_REF value="DATAPROVIDER_5" />
                    <bi:LINKED_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" />
                    <bi:ROW_HEADER_VISIBLE value="X" />
                </bi:ANALYSIS_ITEM>
    The Caption of the table is currently set to "Employee Information". I need the Caption of the table to say "2007 Employee Information" where the year is the previous year. In other words, if the web application is executed in 2008, the title would say "2007 Employee Information". If the web application is executed in 2009, the tilte would say "2008 Employee Information".
    I am very new to BW and WAD so a detailed explanation would be greatly appreciated.
    Points will be awarded.

    I am trying to change the caption of the Analysis Item using Javascript, but the caption is showing up blank.  This is my first attempt at writing Javascript so a detailed answer would be greatly appreciated. 
    I would like the caption to read "HR Data 2007" if the function is called in 2008.  I would like the caption to read "HR Data 2008" if the function is called in 2009.  So always use the previous year in the caption.
    I took the following steps: 
    1.  In Web Application Designer, I created a Script item in my Web template.
    2.  I created the function executeJS_SET_ITEM_PARAMTERS_R using the Script Editing Wizard.
    3.  I made modifications to the function to add the year into the caption.
    4.  I modified the XHTML by adding the function to the body onload.  I am not sure if I need to do this part or if my syntax is correct here.  I can't post how I formatted the body onload because this causes 500 errors when I try to post the message.
    Here is the part of the function that I modified using the Script Editing Wizard. 
                    // Create parameter CAPTION
                    var d = new Date();
                    d.getFullYear();
                    var newCaption = "HR Data " + d;
         var paramCAPTION = new sapbi_Parameter( "CAPTION", newCaption );
         paramListTRAY_SETTINGS.addParameter( paramCAPTION );
         // End parameter CAPTION!     
    Here is the XHTML for the Analysis Item showing that the caption is set to be visible.:
               <bi:ANALYSIS_ITEM name="TABLE_4" designheight="300" designwidth="966" >
                    <bi:WIDTH value="966" />
                    <bi:WITH_TRAY value="X" type="CHOICE" text="" >
                        <bi:TRAY_SETTINGS type="COMPOSITE" >
                            <bi:CAPTION />
                            <bi:CAPTION_VISIBLE value="X" />
                        </bi:TRAY_SETTINGS>
                    </bi:WITH_TRAY>
                    <bi:DATA_PROVIDER_REF value="DATAPROVIDER_5" />
                </bi:ANALYSIS_ITEM>
    Here is the XHTML for the Script Item:
                <bi:SCRIPT_ITEM name="SCRIPT_ITEM_1" designwidth="300" designheight="70" >
                    <bi:SCRIPT_CONTENT_TYPE_LIST value="JAVASCRIPT" />
                    <bi:SCRIPT value="biLargeData:9CG1G0CWFS76DYKR0YY9GYHEM" />
                </bi:SCRIPT_ITEM>
    Edited by: Karen Thompson on Apr 10, 2008 5:34 PM
    Edited by: Karen Thompson on Apr 11, 2008 6:21 PM

  • WAD 7.0 - SET_CURRENCY_TRANSLATION does not work???

    hi folks,
    I have a query with one keyfigure. In my webtemplate i want to use the command SET_CURRENCY_TRANSLATION. We have an existing currency translation type in rscur. Name of the transalation type is ZST. I made a button group item in my wad to translate the currency with currency translation type ZST
    <bi:BUTTON_GROUP_ITEM name="BUTTON_GROUP_ITEM_1" designheight="23" designwidth="300" >
                    <bi:BUTTON_LIST type="ORDEREDLIST" >
                        <bi:BUTTON type="COMPOSITE" index="1" >
                            <bi:CAPTION value="SSSS" />
                            <bi:ACTION type="CHOICE" value="INSTRUCTION" >
                                <bi:INSTRUCTION >
                                    <bi:SET_CURRENCY_TRANSLATION >
                                        <bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >
                                            <bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_1" />
                                        </bi:TARGET_DATA_PROVIDER_REF_LIST>
                                        <bi:TRANSLATION_MODE value="ZST" />
                                    </bi:SET_CURRENCY_TRANSLATION>
                                </bi:INSTRUCTION>
                            </bi:ACTION>
                        </bi:BUTTON>
                    </bi:BUTTON_LIST>
                </bi:BUTTON_GROUP_ITEM>
    unfortunately, nothing happens.. when i define the currency translation directly in the bex query, it works perfect.
    I guess there is another problem. When i execute my wad I choose "Calculations and Translations -> Global Currency Translation" on the Pop-Up i can only choose the SAP standard translation type 0HRFIXCUR. Why can't I see my translation type ZST?
    Thanks for your help
    Pascal

    Hi Pascal,
    Does it work if the conversion type with fixed time ref but variable currency(0company-currency)?
    because my problem is we have to use the conversion with variable time ref and variable currency.
    Thanks for the info.
    Regards,
    Tienus

  • BI Report Export Problem - Selection data missing

    Hi all,
    I´m pretty new to Web reports and now I have a problem which might be easy to solve for you experts.
    The problem appears when exporting a report. If the user exports the report to PDF or Excel, the data is exported correctly but the selection settings, that the user set, are missing. Only the field name are shown, but not the selected item. Its somewhat of a cosmetical problem, but important to the users.
    Interestingly enough, we use many other templates which have the exact same functionality and where it works correctly.
    I compared the XML on code on those templates, but there is no major difference.
    Here is the important code (at least in my understanding) of the template:
    <bi:param name="BUTTON_LIST" type="ORDEREDLIST">
                                      <bi:param name="BUTTON" type="COMPOSITE" index="1">
                                        <bi:param name="CAPTION" value="PDF">
                                        </bi:param>
                                        <bi:param name="ACTION" type="CHOICE" value="INSTRUCTION">
                                          <bi:param name="INSTRUCTION">
                                            <bi:command type="EXPORT">
                                              <bi:param name="ITEM_REF_LIST" type="UNORDEREDLIST">
                                                <bi:param name="ITEM_REF" index="1" value="TEXT_ITEM_9">
                                                </bi:param>
                                                <bi:param name="ITEM_REF" index="2" value="INFO_FIELD_ITEM_2">
                                                </bi:param>
                                                <bi:param name="ITEM_REF" index="3" value="ANALYSIS_ITEM_1">
                                                </bi:param>
                                              </bi:param>
                                              <bi:param name="FOOTER_LEFT" value="DATE">
                                              </bi:param>
                                              <bi:param name="FOOTER_RIGHT" value="PAGEOFPAGES">
                                              </bi:param>
                                            </bi:command>
                                          </bi:param>
                                        </bi:param>
                                      </bi:param>
    <bi:item name="INFO_FIELD_ITEM_2" designheight="50" designwidth="300" type="INFO_FIELD_ITEM">
                              <bi:param name="DATA_PROVIDER_REF" value="DP_1">
                              </bi:param>
                              <bi:param name="INFORMATION_ELEMENT_LIST" type="ORDEREDLIST">
                                <bi:param name="INFORMATION_TYPE" type="CHOICE" index="1" value="VARIABLE">
                                  <bi:param name="VARIABLE" value="IP_VERS_CM01" text="Plan Version">
                                  </bi:param>
                                </bi:param>
                                <bi:param name="INFORMATION_TYPE" type="CHOICE" index="2" value="CHARACTERISTIC_LIST">
                                  <bi:param name="CHARACTERISTIC_LIST" type="ORDEREDLIST">
                                    <bi:param name="CHARACTERISTIC" index="1" value="0G_CWW010" text="ProdGr">
                                    </bi:param>
                                    <bi:param name="CHARACTERISTIC" index="2" value="0MATERIAL" text="Material">
                                    </bi:param>
                                    <bi:param name="CHARACTERISTIC" index="3" value="0PROFIT_CTR" text="Planning Unit">
                                    </bi:param>
                                    <bi:param name="CHARACTERISTIC" index="4" value="469EIDJHD8W7F786UEL29ZJVV" text="Country Statement">
                                    </bi:param>
                                    <bi:param name="CHARACTERISTIC" index="5" value="ZXCO_NAV3__ZXCO_BUSN" text="BusSeg Nav">
                                    </bi:param>
                                  </bi:param>
                                </bi:param>
                              </bi:param>
                            </bi:item>
    Any input and hints are appreciated.
    Regards,
    Harald

    Hello Harald,
    As per my understanding, the particular characterisitc is not assigned and that could be the reason for displaying only field name. Please lookinto it.
    all the best,
    Kind regards,
    Praveen

  • Setting security on an InfoProvider query

    I am running into the following issue when trying to restrict access to a web template:
    The web template has DataProvider (DP_2) that is not linked to a query but directly to an InfoProvider:
    <bi:QUERY_VIEW_DATA_PROVIDER name="DP_2" >
                    <bi:INITIAL_STATE type="CHOICE" value="INFOPROVIDER" >
                        <bi:INFOPROVIDER value="EUINVMP3" text="EU Inventory Entity" />
                    </bi:INITIAL_STATE>
                </bi:QUERY_VIEW_DATA_PROVIDER>
    All that this DataProvider is used for is to display the date of the last refresh/rollup of the underlying MultiProvider in an InfoField like so:
    <td valign="top" align="center" >
              <bi:INFO_FIELD_ITEM name="INFO_FIELD_ITEM_3" designheight="37" designwidth="203" >
              <bi:WIDTH value="203" />
              <bi:HEIGHT value="37" />
              <bi:DATA_PROVIDER_REF value="DP_2" />
              <bi:INTERACTION_ALLOWED value="" />
              <bi:WITH_TRAY type="CHOICE" value="" />
              <bi:HEADERS_VISIBLE value="" />
              <bi:STATIC_FILTERS_VISIBLE value="" />
              <bi:GENERAL_INFORMATION_VISIBLE value="" />
              <bi:DYNAMIC_FILTERS_VISIBLE value="" />
              <bi:VARIABLES_VISIBLE value="" />
              <bi:INFORMATION_ELEMENT_LIST type="ORDEREDLIST" >
                   <bi:INFORMATION_TYPE type="CHOICE" index="1" value="GENERIC_TEXT_ELEMENT" >
                        <bi:GENERIC_TEXT_ELEMENT value="ROLLUPTIME" />
                   </bi:INFORMATION_TYPE>
              </bi:INFORMATION_ELEMENT_LIST>
         </bi:INFO_FIELD_ITEM>
    </td>
    The rest of the report shows data a query based DataProvider of the same MultiProvider.
    My problem now is that when I try to restrict access to this web template, I can use S_RS_COMP to control access to the queries allowed on the MultiProvider, but I always get the following error message indicating that I do not have sufficient rights:
    Cannot load InfoProvider "EUINVMP3" (data provider "DP_2": No authorization for requested service)
    Interestingly enough, when I use a star (*) for the "name of the reporting component" and reporting type "query", it works fine. I therefore wonder whether the system runs its own query that I have to grant access to.
    Please note that I have assigned the standard authorization objects to that user and in there access to this Multiprovider is granted. As outlined above, when giving access to all queries based on that particular multiprovider, access is granted. Only when I restrict access to only the query that I have in that web template, I get access denied.
    Thanks for your valuable input,
    Dennis
    Edited by: Dennis Staiger on Jul 11, 2008 2:17 PM

    The system generated query name is !InfoProviderName. However, you cannot use an exclamation mark in S_RS_COMP as a value, which is why you have to use $InfoProviderName instead. The same is true for queries on aggregation levels which start with !!. Use $$ instead.
    Further details can be found in note 1048505.

  • Set filter value for a web template with java

    hi experts,
    i need to set a variable dynamicaly  depending on the Logon Name. Ok first step i did, i made a small script for the Username:
    _var url = this.location.href;
    _var x = url.substring(url.length-6, url.length);
    _var lifnr = ("0000" + x);
    _alert (LIFNR);
    ok if the username i.e B200221 my variable LIFNR gets a valid value  in this case 0000200221. but how can i use this variable in the bi commands ?
    here my xhtml coding from my webtemplate, where i want to use my variable LIFNR as template parameter:
    _var url = this.location.href;
    _var x = url.substring(url.length-6, url.length);
    _var lifnr = ("0000" + x);
    _alert (LIFNR);
        QUERY_VIEW_DATA_PROVIDER name="DP_1"
                    INITIAL_STATE type="CHOICE" value="QUERY"
                    QUERY value="VSAG_MM_VMI_KONS_US" text="VSAG_MM_VMI_KONS_US" /
                    INITIAL_STATE
                QUERY_VIEW_DATA_PROVIDER
                TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS"
                    WEB_TEMPLATE_ACTIONS type="COMPOSITE"
                        ACTION_BEFORE_FIRST_RENDERING type="COMPOSITE" /
                        ACTION_BEFORE_RENDERING type="COMPOSITE"
                            INSTRUCTION
                                SET_SELECTION_STATE_SIMPLE
                                    TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST"
                                        TARGET_DATA_PROVIDER_REF index="1" value="DP_1" /
                                    TARGET_DATA_PROVIDER_REF_LIST
                                   CHARACTERISTIC value="0VENDOR" text="Lieferant" /
                                    RANGE_SELECTION_OPERATOR type="CHOICE" value="EQUAL_SELECTION"
                                        EQUAL_SELECTION type="CHOICE" value="MEMBER_NAME"
                                        MEMBER_NAME value="0000200221" text="0000200221" /
                                        EQUAL_SELECTION
                                    RANGE_SELECTION_OPERATOR
                                SET_SELECTION_STATE_SIMPLE
                            INSTRUCTION
                        ACTION_BEFORE_RENDERING
                    WEB_TEMPLATE_ACTIONS
                TEMPLATE_PARAMETERS
    how can i use my variable LIFNR  at this point :  MEMBER_NAME value="0000200221"    ?
    thanks for any idea's.
    Tony

    hi experts
    does no one have an idea, how i can use my own java variable at   BI Filter  command's in the XHTML Code ?
    thx
    tony

  • Column Headers of Masterdata Query

    Hello experts,
    in a Masterdata Query based on an InfoObject there are many Attributes.
    These Attributes are now listed in the Rows of the Query:
    InfoObject
    Attribut 1
    Attribut 2
    Attribut 3
    Therefore the Query will look like this:
    InfoObject        Attribut 1      Attribut 2     Attribut 3    
    Company A     New York     USA            Industry
    Company B     Toronto         Canada       Healthcare
    Company C     Mexico City   Mexico        Industry
    Now the problem is, that the real column headers are very long (60 chars) and therefore the column with is too wide so that the report shown in Web Reporting is far too wide.
    Question: How can the column header be separated into 2 or more lines so that each column will not be so wide?
    I know that this can be done with Keyfigure-Column-Headers .... unfortunately the report is based on Attributes (chars) of the InfoObject and not on Keyfiugres.
    Thank you for your help!
    Angie

    The following did the trick for the header lines only:
    Note 1292696 - Analysis modification: Fixed column width and line break
                                <bi:MOD_SELECT type="CHOICE" value="MOD_GENERIC_MODULE" >
                                    <bi:MOD_GENERIC_MODULE type="COMPOSITE" >
                                        <bi:MOD_REFERENCE value="com.sap.ip.bi.rig.ColumnWidth" />
                                        <bi:MOD_PARAMETER_LIST type="ORDEREDLIST" >
                                            <bi:MOD_PARAMETER type="COMPOSITE" index="1" >
                                                <bi:MOD_PARAM_NAME value="COLUMN_DEFAULT" />
                                                <bi:MOD_PARAM_VALUE type="CHOICE" value="INTEGER" >
                                                    <bi:INTEGER value="75" />
                                                </bi:MOD_PARAM_VALUE>
                                                &lt;
                                            </bi:MOD_PARAMETER>
                                            <bi:MOD_PARAMETER type="COMPOSITE" index="2" >
                                                <bi:MOD_PARAM_NAME value="WRAPPING" />
                                                <bi:MOD_PARAM_VALUE type="CHOICE" value="BOOLEAN" >
                                                    <bi:BOOLEAN value="X" />
                                                </bi:MOD_PARAM_VALUE>
                                            </bi:MOD_PARAMETER>
                                        </bi:MOD_PARAMETER_LIST>
                                    </bi:MOD_GENERIC_MODULE>
                                </bi:MOD_SELECT>
                            </bi:MOD_SINGLE_MODULE>
                        </bi:MODIFICATION>

  • Xml viewing problem in ie 5

    I get the following error, when i am trying to view this xml file in IE 5. Attached are both the xml and xsl file.
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    System error: -2146697195. Error processing resource ''. Line 7, Position 3
    ]>
    -------------xml file------------
    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="intro.xsl" ?>
    <!DOCTYPE article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "" [
    <!--ArborText, Inc., 1988-1997, v.4001-->
    <!ENTITY ldquo '"'>
    <!ENTITY rdquo '"'>
    ]>
    <?Pub Inc?>
    <article><artheader>
    <title>ArborText XSL Demonstration</title>
    <authorgroup>
    <author><firstname>Norman</firstname><surname>Walsh</surname></author>
    </authorgroup>
    </artheader>
    <sect1>
    <title>Setting Up Your System</title>
    <para>In order to view these pages, you must be using Microsoft <ulink url="http://www.microsoft.com/ie/ie40/">
    Internet Explorer 4.0</ulink> with the <ulink url="http://www.microsoft.com/xml/xsl/downloads/xslctrl.htm">
    Microsoft XSL ActiveX Control</ulink>. (Internet Explorer will automatically
    download and install the XSL ActiveX Control when you visit this page.)</para>
    </sect1>
    <sect1>
    <title>Viewing XML Documents using XSL</title>
    <para>This demonstration uses two XML documents and several XSL stylesheets.
    In every case, the exact same, entire XML document is sent to the browser
    along with a stylesheet, it is the stylesheet <emphasis>only</emphasis> that
    controls what information is displayed.</para>
    <para>To proceed with this demonstration, select one of the links on the left.
    Each of these links will display the selected XML document with the selected
    XSL stylesheet:</para>
    <variablelist>
    <varlistentry>
    <term>Abstract</term><listitem><para>Processes the entire XML document, but
    displays only the title, author, and abstract.</para>
    </listitem></varlistentry>
    <varlistentry>
    <term>Table of Contents</term><listitem><para>Processes the entire XML document,
    but displays only the title and a Table of Contents. Note that the entries
    in the ToC are enumerated by the stylesheet.</para>
    </listitem></varlistentry>
    <varlistentry>
    <term>Full Text</term><listitem><para>Processes and displays the entire XML
    document. Note how the copyright statement from meta-information at the
    top of the article XML file is displayed at the bottom of the document.
    </para>
    </listitem></varlistentry>
    <varlistentry>
    <term>Full Text (Big)</term><listitem><para>Processes and displays the entire
    XML document with a larger body font.</para>
    </listitem></varlistentry>
    </variablelist>
    </sect1>
    <sect1>
    <title>Playing with XML Styler</title>
    <para>You can download the files used in this demo to play with XML Styler
    on your system:</para>
    <orderedlist>
    <listitem><para>Download the <ulink url="xsldemo.zip">demo files</ulink>.
    </para>
    </listitem>
    <listitem><para>Unpack them in a directory on your system.</para>
    </listitem>
    <listitem><para>Using Internet Explorer 4.0, load <emphasis>index.html</emphasis>
    from the directory where you unpacked the files.</para>
    </listitem>
    <listitem><para>Start <ulink url="../index.html">XML Styler</ulink>.</para>
    </listitem>
    <listitem><para>Open the <emphasis>abstract.xsl&lt ;/emphasis>, <emphasis>toc.xsl
    </emphasis>, <emphasis>fulltext.xsl</emphasis>, or <emphasis>bigtext.xsl
    </emphasis> stylesheet.</para>
    </listitem>
    <listitem><para>Modify the stylesheet with XML Styler</para>
    </listitem>
    <listitem><para>Save the stylesheet</para>
    </listitem>
    <listitem><para>To see your changes, reload one of the XML documents using
    the stylesheet you just modified.</para>
    </listitem>
    </orderedlist>
    </sect1>
    <sect1>
    <title>C<?Pub Caret1?>reating Your Own</title>
    <para>It's easy to create new stylesheets with <emphasis>XML Styler</emphasis>,
    but it's a little tricky to get Internet Explorer to display your XML documents
    with them. At present, Internet Explorer relies on some HTML &ldquo;glue&rdquo;
    in order to display documents using the XSL ActiveX Control.</para>
    <para>For more information about the &ldquo;glue&rdquo; layer, please read <ulink
    url="http://www.microsoft.com/xml/xsl/downloads/xslctrl.htm">Using the Microsoft
    XSL ActiveX Control in a Web Page</ulink>. For more general information about
    the XSL ActiveX Control, see the <ulink url="http://www.microsoft.com/xml/xsl">
    Microsoft XSL Homepage</ulink>.</para>
    </sect1>
    </article>
    <?Pub *0000004063?>
    ---------------xsl file-------------
    - <xsl>
    - <rule>
    <root />
    - <HTML>
    - <HEAD>
    - <TITLE>
    - <select-elements from="descendants">
    - <element type="article">
    - <element type="artheader">
    <target-element type="title" />
    </element>
    </element>
    </select-elements>
    </TITLE>
    </HEAD>
    - <BODY>
    <children />
    </BODY>
    </HTML>
    </rule>
    - <rule>
    <target-element type="article" />
    <children />
    </rule>
    - <rule>
    <target-element type="artheader" />
    - <select-elements from="children">
    <target-element type="title" />
    </select-elements>
    - <select-elements from="children">
    <target-element type="subtitle" />
    </select-elements>
    </rule>
    - <rule>
    <target-element type="author" />
    by
    <children />
    </rule>
    - <rule>
    - <element type="artheader">
    <target-element type="title" />
    </element>
    - <CENTER>
    <IMG SRC="atilogo.gif" ALIGN="RIGHT" />
    - <H1>
    <children />
    </H1>
    </CENTER>
    <HR />
    </rule>
    - <rule>
    - <element type="artheader">
    <target-element type="subtitle" />
    </element>
    - <H3>
    <children />
    </H3>
    </rule>
    - <rule>
    - <element type="sect1">
    <target-element type="title" />
    </element>
    - <H3>
    <eval>childNumber(this.parent)</eval>
    <children />
    </H3>
    </rule>
    - <rule>
    <target-element type="sect1" />
    - <DIV>
    <children />
    </DIV>
    </rule>
    - <rule>
    - <element type="sect2">
    <target-element type="title" />
    </element>
    - <H4>
    <children />
    </H4>
    </rule>
    - <rule>
    <target-element type="sect2" />
    <children />
    </rule>
    - <rule>
    <target-element type="itemizedlist" />
    - <UL>
    <children />
    </UL>
    </rule>
    - <rule>
    <target-element type="orderedlist" />
    - <OL>
    <children />
    </OL>
    </rule>
    - <rule>
    - <element type="varlistentry">
    <target-element type="listitem" />
    </element>
    - <DD>
    <children />
    </DD>
    </rule>
    - <rule>
    - <element type="itemizedlist">
    <target-element type="listitem" />
    </element>
    - <LI>
    <children />
    </LI >
    </rule>
    - <rule>
    - <element type="orderedlist">
    <target-element type="listitem" />
    </element>
    - <LI>
    <children />
    </LI>
    </rule>
    - <rule>
    <target-element type="quote" />
    <children />
    </rule>
    - <rule>
    <target-element type="citetitle" />
    - <I>
    <children />
    </I>
    </rule>
    - <rule>
    <target-element type="email" />
    - <I>
    <children />
    </I>
    </rule>
    - <rule>
    <target-element type="address" />
    - <PRE>
    <children />
    </PRE>
    </rule>
    - <rule>
    <target-element type="screen" />
    - <PRE>
    <children />
    </PRE>
    </rule>
    - <rule>
    <target-element type="emphasis" />
    - <I>
    <children />
    </I>
    </rule>
    - <rule>
    <target-element type="literal" />
    - <CODE>
    <children />
    </CODE>
    </rule>
    - <rule>
    <target-element type="ulink" />
    - <A target="_top" href="=getAttribute("url")">
    <children />
    </A>
    </rule>
    - <rule>
    <target-element type="emdash" />
    </rule>
    - <rule>
    <target-element type="bullet" />
    </rule>
    - <rule>
    <target-element type="lt" />
    <
    </rule>
    - <rule>
    <target-element type="amp" />
    </rule>
    - <rule>
    <target-element type="para" />
    - <P>
    <children />
    </P>
    </rule>
    - <rule>
    <target-element type="variablelist" />
    - <DL>
    <children />
    </DL>
    </rule>
    - <rule>
    <target-element type="varlistentry" />
    <children />
    </rule>
    - <rule>
    <target-element type="term" />
    - <DT>
    <children />
    </DT>
    </rule>
    - <rule>
    <target-element type="firstname" />
    - <SPAN>
    <children />
    </SPAN>
    </rule>
    - <rule>
    <target-element type="surname" />
    <children />
    </rule>
    - <rule>
    <target-element type="authorgroup" />
    <children />
    </rule>
    </xsl>
    null

    This is because the Microsoft XML Parser does not know to handle your DOCTYPE when only the Public identifier is specified.
    It's trying to open the dtd resource
    specified in the SYSTEM identifier
    which in your example is "", the empty
    string.
    I changed your:
    <!DOCTYPE article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "" [
    to:
    <!DOCTYPE article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "file:/C:/docbook/docbookx.dtd" [
    And was able to eliminate your parse error.
    However, your XSL file is not XSLT 1.0 compliant and it's not Microsoft-XSLT-in-IE5 compliant (from the December 1998 working draft), so I don't expect the XSL part of what you're trying to do will work.
    null

  • URL Param is not working

    Hi,
    I am passing two variable values through URL for one template to another template. It was passing two variable values to second templates but suddenly after applying new java patch it is not passing the second variable value in the URL.  Is there any other way i can achieve this with out SET_VARIABLES_STATE command.
    URL Params:
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0P_CALYE
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=2008
    &BI_COMMAND_2-BI_COMMAND_TYPE=SET_VARIABLES_STATE
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=Z_RGN
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=EAST
    Any help is appreciated?
    Thanks in Advance,
    Damodhar.

    I think i can set characteristic value directly using URL command instead of setting variable value.Can anyone provide me the <b>URL parameter</b> for the following command.
    <bi:SET_SELECTION_STATE >
                     <bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >
                            <bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_1" />
                                        </bi:TARGET_DATA_PROVIDER_REF_LIST>
                       <bi:CHARACTERISTICS_SELECTIONS type="UNORDEREDLIST" >
                <bi:CHARACTERISTIC_SELECTIONS type="COMPOSITE" index="1" >
                                                <bi:CHARACTERISTIC value="CHAR1" text="" />
                                                <bi:SELECTIONS type="ORDEREDLIST"<bi:SELECTION type="CHOICE" index="1" value="SELECTION_INPUT_STRING" >
                            <bi:SELECTION_INPUT_STRING value="INPUT1" />
                                                    </bi:SELECTION>
                                                </bi:SELECTIONS>
                                            </bi:CHARACTERISTIC_SELECTIONS>
                                        </bi:CHARACTERISTICS_SELECTIONS>
                                    </bi:SET_SELECTION_STATE>
                                    <bi:SET_VARIABLES_STATE >
    Thanks,
    Damodar.

  • Text Variable in Tray Title

    HI BI experts,
    we recently migrated many WAD from BW 3.5 to BI 7.0.
    In BW 3.5 We had (in automatic) every Web Item with the Query (Dataprovider) title.
    In BI 7.0 if we want the title over every Web Item, we have to manage the Tray; i can write the text manually in the Tray Settings but, unfortunately, in some Web Item, we have a text variable (a text variable is in the title of the query developed with the Query Designer).
    My question is: How can i reproduce the right title of the query with the value of the text variable?
    I'm not expert in Javascript, if the solution is in the javascript please give me an example of coding.
    This is the xhtml code of a Web Item where "TXTORDI02" is the name of the text variable
                       <tr >
                            <td valign="top" colspan="2" >
                                <bi:CHART_ITEM name="CHART_1" designheight="325" designwidth="600" >
                                    <bi:WIDTH value="600" />
                                    <bi:HEIGHT value="325" />
                                    <bi:WITH_TRAY value="X" type="CHOICE" >
                                        <bi:TRAY_SETTINGS type="COMPOSITE" >
                                            <bi:CAPTION value="Valori EV Costi x Destinazione(Periodo) -&TXORDI02&" />
                                            <bi:CAPTION_VISIBLE value="X" />
                                            <bi:STYLE value="PLAIN" />
                                            <bi:UPDATE_TYPE value="CLIENT" />
                                        </bi:TRAY_SETTINGS>
                                    </bi:WITH_TRAY>
                                    <bi:CHART_CUSTOMIZING value="biLargeData:99ZXG4E32B0MJ9FP1ISDPVW1C" />
                                    <bi:CHART_TYPE value="COLUMNS" />
                                    <bi:LEGEND_TYPE value="LEGEND_POSITION" />
                                    <bi:DATA_PROVIDER_REF value="DATAPROVIDER_1" />
                                    <bi:LINKED_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >
                                        <bi:LINKED_DATA_PROVIDER_REF value="DATAPROVIDER_1" index="1" />
                                    </bi:LINKED_DATA_PROVIDER_REF_LIST>
                                    <bi:OVERRIDE_AXIS_DESC type="CHOICE" value="" />
                                    <bi:OVERRIDE_AXIS_LABEL type="CHOICE" value="" />
                                </bi:CHART_ITEM>
                            </td>
                        </tr>
    Thanks in advance.
    Fabrizio Modesti

    Hi Fabrizio,
    you could place an infofield item above the analysis item and refer to the Dataprovider with one element: information type = "generic text" and the value of the generic text element "QUERY_DESCRIPTION". Use the same item width as the analysis item.
    Then the Query description is generic.
    If you like you could use a container item with tray which includes these 2 elements.
    <bi:INFO_FIELD_ITEM name="INFO_FIELD_ITEM_1" designheight="300" designwidth="800" >
       <bi:WIDTH value="800" />
       <bi:DATA_PROVIDER_REF value="DP_1" />
       <bi:INFORMATION_ELEMENT_LIST type="ORDEREDLIST" >
         <bi:INFORMATION_TYPE type="CHOICE" index="1" value="GENERIC_TEXT_ELEMENT" >
           <bi:GENERIC_TEXT_ELEMENT value="QUERY_DESCRIPTION" />
         </bi:INFORMATION_TYPE>
       </bi:INFORMATION_ELEMENT_LIST>
    </bi:INFO_FIELD_ITEM>
    Instead the Infofield item you could take a text item with the generic text:
    <bi:TEXT_ITEM name="TEXT_ITEM_1" designheight="70" designwidth="400" >
        <bi:TEXT_BINDING type="CHOICE" value="GENERIC_TEXT_BINDING" >
            <bi:GENERIC_TEXT_BINDING type="COMPOSITE" >
                <bi:DATA_PROVIDER_REF value="DP_1" />
                <bi:GENERIC_TEXT_ELEMENT value="QUERY_DESCRIPTION" />
            </bi:GENERIC_TEXT_BINDING>
        </bi:TEXT_BINDING>
    </bi:TEXT_ITEM>
    best regards
    ARNE

  • Lay-out printing to .pdf

    Hello,
    When we use the new print functionality in 2004s we have a problem with printing to pdf. The filter that we use for our report is shown in the header of the pdf. The filter contains a lot of elements and is shown on one line in a very small character. Our report is sized to this small character size and appears very small in our pdf-report.
    Is there a way to fix this?
    Thanks in advance,
    Guus

    How can I get the filter values on a separate page (the Last one) ?
    My system: 2004s sp11
    My print web template:
    <bi:bisp  xmlns="http://www.w3.org/TR/REC-html40" xmlns:bi="http://xml.sap.com/2005/01/bi/wad/bisp" xmlns:jsp="http://java.sun.com/JSP/Page" >
        <html >
            <head >
                <title >Netweaver BI Web Application</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            </head>
            <body >
                <bi:QUERY_VIEW_DATA_PROVIDER name="DP_1" >
                    <bi:INITIAL_STATE type="CHOICE" value="QUERY" >
                        <bi:QUERY value="" />
                    </bi:INITIAL_STATE>
                </bi:QUERY_VIEW_DATA_PROVIDER>
                <bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" >
                    <bi:WINDOW_MODE value="inplace" />
                </bi:TEMPLATE_PARAMETERS>
                <bi:GROUP_ITEM name="GROUP_EXPORT" designheight="600" designwidth="676" >
                    <bi:CHILD_ITEM_REF value="CONTAINER_EXPORT" />
                    <bi:WIDTH value="676" />
                    <bi:HEIGHT value="600" />
                    <bi:GROUP_DESIGN value="SAPCOLOR" />
                    <bi:WITH_CAPTION type="CHOICE" value="" text="" />
                    <bi:CONTAINER_ITEM name="CONTAINER_EXPORT" designwidth="600" designheight="600" >
                        <bi:WIDTH value="600" />
                        <bi:HEIGHT value="600" />
                        <bi:INFO_FIELD_ITEM name="INFO_FIELD_ITEM_1" designheight="53" designwidth="300" >
                            <bi:WIDTH value="300" />
                            <bi:HEIGHT value="53" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                            <bi:INFORMATION_ELEMENT_LIST type="ORDEREDLIST" >
                                <bi:INFORMATION_TYPE type="CHOICE" index="1" value="GENERIC_TEXT_ELEMENT" >
                                    <bi:GENERIC_TEXT_ELEMENT value="QUERY_DESCRIPTION" />
                                </bi:INFORMATION_TYPE>
                            </bi:INFORMATION_ELEMENT_LIST>
                        </bi:INFO_FIELD_ITEM>
                        <bi:ANALYSIS_ITEM name="ANALYSIS" designwidth="400" designheight="200" >
                            <bi:VISIBILITY value="HIDDEN" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                        </bi:ANALYSIS_ITEM>
                        <bi:CHART_ITEM name="CHART" designheight="200" designwidth="400" >
                            <bi:VISIBILITY value="HIDDEN" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                        </bi:CHART_ITEM>
                        <bi:ANALYSIS_ITEM name="DATA_DISPLAY" designwidth="400" designheight="200" >
                            <bi:VISIBILITY value="HIDDEN" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                        </bi:ANALYSIS_ITEM>
                        <bi:ANALYSIS_ITEM name="DATA_DISPLAY_ADD" designwidth="400" designheight="200" >
                            <bi:VISIBILITY value="HIDDEN" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                        </bi:ANALYSIS_ITEM>
                        <bi:CHART_ITEM name="DATA_DISPLAY_ADDC" designwidth="400" designheight="200" >
                            <bi:VISIBILITY value="HIDDEN" />
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                        </bi:CHART_ITEM>
                        <bi:INFO_FIELD_ITEM name="INFO_EXPORT" designheight="70" designwidth="200" >
                            <bi:DATA_PROVIDER_REF value="DP_1" />
                            <bi:GENERAL_INFORMATION_VISIBLE value="" />
                        </bi:INFO_FIELD_ITEM>
                    </bi:CONTAINER_ITEM>
                </bi:GROUP_ITEM>
    <!-- insert data providers, items and other template content here -->
            </body>
        </html>
    </bi:bisp>
    Regards
    Steffen

Maybe you are looking for