Display dropdown by key data with sorting

Hi,
My requirement is to display dropdown by key data with sorting getting this data from XML in KM.
Tell me different possibilities to sort the data.
Regards,
surya.

Hi,
Use DropDownByIndex instead of DropDownByKey
Create a node with a attribute for eg. Colors node with Color attribute and add the values in the elements of the node, Bind attribute to DropDownByIndex UI.
Create a custom comparator class like below
import java.util.Comparator;
import com.sap.tc.webdynpro.progmodel.api.IWDNodeElement;
import com.sap.tc.webdynpro.progmodel.repository.enums.WDComponentLifecycleEnumInfo;
public class CustomComparator implements Comparator {
     String attribute;
     public CustomComparator(String attrib) {
          this.attribute = attrib;
     public int compare(Object o1, Object o2) {
          try
               IWDNodeElement units1 = (IWDNodeElement) o1;
               IWDNodeElement units2 = (IWDNodeElement) o2;
               return units1.getAttributeAsText(attribute).compareTo(units2.getAttributeAsText(attribute));
          catch (Exception e)
               e.printStackTrace();
          //arbitrary order
          return 1;
Once you read values in the Colors node, call the sortElements method of the node as below to sort the elements of the node
wdContext.nodeColors().sortElements(new CustomComparator("Color"));
Regards,
Amol

Similar Messages

  • APD query key date with variable for time dependent MD display attributes

    Hello,
    In a APD I use a query as a source with a query key date that is filled with a customer exit variable.
    When I run the query as a user, the time dependent MD display attributes look fine. However, when I use the query in an APD, I get no values for the time dependent display attributes.
    Any suggestions?
    Thanks

    Hi,
    Try to run query using RSCRM_BAPI Tcode, this you can also schedule in background
    Thanks
    Reddy

  • How to display time duration (NOT dates) with an input mask in a JTable?

    Background: I am trying to display in a JTable, in two columns, the start position and time duration of an audio clip.
    They are stored as type float internally eg. startPosition = 72.7 seconds.
    However I wish to display on screen in the table in HH:mm:ss:S format. eg. 00:01:12:7. The user can edit the cell and input values to update the internal member fields.
    Problem: I am finding it very difficult to implement this - what with the interactions of MaskFormatter, DefaultCellEditor etc.
    Also using SimpleDateFormat and DateFormatter does not work as they insist on displaying the day, month, year also in the table cell.
    Taking the Swing Tutorial TableFTFEditDemo example as a template,
    (http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#TableFTFEditDemo)
    does anyone know how to do this?
    I can post my (buggy) modifications to the example code - if it would help.
    Appreciate any help.
    thanks,
    Anil

    Here are my modifications to the TableFTFEditDemo example. If you run it, you get an exception
    like java.lang.NumberFormatException: For input string: "18:00:03.500"
    The two modified classes are taken from the Tutorial and are listed below:
    =================
    * IntegerEditor is a 1.4 class used by TableFTFEditDemo.java.
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.DefaultCellEditor;
    import javax.swing.JFormattedTextField;
    import javax.swing.JOptionPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    import javax.swing.SwingUtilities;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Toolkit;
    import java.text.DateFormat;
    import java.text.NumberFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import javax.swing.text.DateFormatter;
    import javax.swing.text.DefaultFormatterFactory;
    import javax.swing.text.MaskFormatter;
    import javax.swing.text.NumberFormatter;
    class TimeRenderer {
         float seconds;
         TimeRenderer(String str) {
              int hSec = Integer.parseInt(str.substring(0,2)) * 60 * 60;
              int mSec = Integer.parseInt(str.substring(2,4)) * 60;
              int sSec = Integer.parseInt(str.substring(4,6));
              float tSec = Integer.parseInt(str.substring(6,7))/10.0F;
              seconds = hSec + mSec + sSec + tSec;
    * Implements a cell editor that uses a formatted text field to edit Integer
    * values.
    public class IntegerEditor extends DefaultCellEditor {
         JFormattedTextField ftf;
         static Date zeroTime = new Date(0L);
         private boolean DEBUG = true;
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.S");
         MaskFormatter maskFo = new MaskFormatter("##:##:##.#");
         protected MaskFormatter createFormatter(String s) {
              MaskFormatter formatter = null;
              try {
                   formatter = new MaskFormatter(s);
              } catch (java.text.ParseException exc) {
                   System.err.println("formatter is bad: " + exc.getMessage());
                   System.exit(-1);
              return formatter;
         public IntegerEditor(int min, int max) throws ParseException {
              super(new JFormattedTextField(new MaskFormatter("##:##:##.#")));
              ftf = (JFormattedTextField) getComponent();
              // Set up the editor for the cells.
              ftf.setFormatterFactory(new DefaultFormatterFactory(new DateFormatter(sdf)));
              ftf.setFocusLostBehavior(JFormattedTextField.PERSIST);
              // React when the user presses Enter while the editor is
              // active. (Tab is handled as specified by
              // JFormattedTextField's focusLostBehavior property.)
              ftf.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "check");
              ftf.getActionMap().put("check", new AbstractAction() {
                   public void actionPerformed(ActionEvent e) {
                        if (!ftf.isEditValid()) { // The text is invalid.
                             ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                             ftf.setBackground(Color.PINK);
                             ftf.postActionEvent(); // inform the editor
                        } else
                             try { // The text is valid,
                                  ftf.commitEdit(); // so use it.
                                  ftf.postActionEvent(); // stop editing
                             } catch (java.text.ParseException exc) {
         // Override to invoke setValue on the formatted text field.
         public Component getTableCellEditorComponent(JTable table, Object value,
                   boolean isSelected, int row, int column) {
              JFormattedTextField ftf = (JFormattedTextField) super
                        .getTableCellEditorComponent(table, value, isSelected, row, column);
              System.out.println("value:" + value);
    //          long milliseconds =(long) (Float.parseFloat(value.toString()) * 1000);
              long milliseconds =(long) (((Float) value).floatValue() * 1000);
              Date dt = new Date(milliseconds);
              ftf.setValue(dt);
              return ftf;
         // Override to ensure that the value remains an Integer.
         public Object getCellEditorValue() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              Object o = ftf.getValue();
              try {               
                   Calendar cal = Calendar.getInstance();
                   cal.setTime((Date)o);
                   float seconds = cal.getTimeInMillis()/1000.0F;
                   return sdf.format(o);
                   //return new Float(seconds);
              } catch (Exception exc) {
                   System.err.println("getCellEditorValue: can't parse o: " + o);
                   exc.printStackTrace();
                   return null;
         // Override to check whether the edit is valid,
         // setting the value if it is and complaining if
         // it isn't. If it's OK for the editor to go
         // away, we need to invoke the superclass's version
         // of this method so that everything gets cleaned up.
         public boolean stopCellEditing() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              if (ftf.isEditValid()) {
                   try {
                        ftf.commitEdit();
                   } catch (java.text.ParseException exc) {
              } else { // text is invalid
                   ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                   ftf.setBackground(Color.PINK);
                   return false; // don't let the editor go away
              return super.stopCellEditing();
    //=====================================================
    * TableFTFEditDemo.java is a 1.4 application that requires one other file:
    *   IntegerEditor.java
    import javax.swing.JFrame;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.text.ParseException;
    * This is exactly like TableDemo, except that it uses a
    * custom cell editor to validate integer input.
    public class TableFTFEditDemo extends JPanel {
        private boolean DEBUG = false;
        public TableFTFEditDemo() throws ParseException {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Set up stricter input validation for the integer column.
         //   table.setDefaultEditor(Float.class,
           //                        new IntegerEditor(0, 100));
         //If we didn't want this editor to be used for other
         //Integer columns, we'd do this:
         table.getColumnModel().getColumn(3).setCellEditor(
              new IntegerEditor(0, 100));
            //Add the scroll pane to this panel.
            add(scrollPane);
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            private Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Float(5.7), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Float(3.5), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Float(2.9), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Float(20.8), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Float(10.5), new Boolean(false)}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                 Object obj = getValueAt(0, c);
                 System.out.println("getColumnClass.obj:" + obj);
                return obj.getClass();
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 2) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            private void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
         * @throws ParseException
        private static void createAndShowGUI() throws ParseException {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("TableFTFEditDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            TableFTFEditDemo newContentPane = new TableFTFEditDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    try {
                             createAndShowGUI();
                        } catch (ParseException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    }

  • Stock report on key date with customer information

    Hi Experts,
    Is there an available sap standard report that will show available stock in subcontractors or customers at specific date(posting date)?
    transaction MC.9 only show consignment stock without customer information we would like to know which customer inventoried this quantity
    Thank you for your inputs

    Hello,
    Thank you very much for your responses. I tried to check transaction MB51 but the customer is not displayed in the report. I found another report S_P00_07000140 that seems to fit the requirements. customer and posting date were also displayed in the generated report. However the SAP menu of this report is:
    SAP Menuu21D2Accountingu21D2Financial Accountingu21D2General Ledgeru21D2Reportingu21D2Tax Reportsu21D2Thailandu21D2Inventory and Raw Material for Special Stock Report
    Will there be no implications if this is used instead of MC.9 or MB51? what are the differences of the 3 transactions?
    Best regards.

  • MM19 u0096 Display material at key date

    Hello Guys,
    Can anyone tell me what this T-code is suppose to do?
    When i put the current date and some date in past there are no changes at all,what information is displayed by this t-code?
    Rewards for useful info.
    regards,
    vaibhav

    Hi,
    As per my understanding MM19 shows you the state of material master on a particular date.
    E.g. you can check the state of your material in the past (before certain changes took place) and you can also display the state of it in the future (I guess if you change your mmr by MM12 you should be able to check this change in MM19).
    BR
    Csaba

  • Create the dbf file with java, but cannot display the data with VF

    Dear all,
    i create a dbf file with some java packages, this file can be opened and display all of the data with excel, but just can show the data structure and no any data when i open it with VF, how to solve it?

    Hi, I have got same problem as you. My application generates a DBF file from a resultset. In MS Excel it looks pretty good - all data, but when I try to open same DBF file with Fox or MS Access, I always see ONLY header(column names), but NO data! I don't know why?! The application generates this file using JDBF classes (version 1.0). I guess, maybe it is caused by the size of this file. The DBF file had 18 columns and over 32000 rows.
    Did you find the cause? I'll be grateful for help.

  • Report in Excel format fails for huge amount of data with headers!!

    Hi All,
    I have developed an oracle report which fetches upto 5000 records.
    The requirements is to fetch upto 100000 records.
    This report fetches data if the headers are removed. If headers are given its not able to fetch the data.
    Have anyone faced this issue??
    Any idea to fetch huge amount of data by oracle report in excel format.
    Thanks & Regards,
    KP.

    Hi Manikant,
    According to your description, the performance is slow when display huge amount of data with more than 3 measures into powerpivot, so you need the hardware requirements for build a PowerPivot to display huge amount of data with more than 3 measures, right?
    PowerPivot benefits from multi-core processors, large memory and storage capacities, and a 64-bit operating system on the client computer.
    Based on my experience, large memory, multiprocessor and even
    solid state drives are benefit PowerPivot performance. Here is a blog about Memory Considerations about PowerPivot for Excel for you reference.
    http://sqlblog.com/blogs/marco_russo/archive/2010/01/26/memory-considerations-about-powerpivot-for-excel.aspx
    Besides, you can identify which query was taking the time by using the tracing, please refer to the link below.
    http://blogs.msdn.com/b/jtarquino/archive/2013/12/27/troubleshooting-slow-queries-in-excel-powerpivot.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • To create Key date on 0fiscper

    Hi guys,
    is it possible to create a variable key date on 0fiscper, wat are the limitations
    of key date variables.My kfs are to be restricted on 0fiscper variable entry which i
    want to be the key date (without using a customer exit to derive it)
    Your help will be rightly appreciated.
    Thanks

    Hi,
    0FISCPER is NOT a date therefore can't be used as KeyDate.
    However you could derive the first date of a FISCPER and populate the query key date with it (via exit); since you don't want to use a customer exit to derive it create a variable input by the user for the key date; if you don't want another input for the user then I am afraid that your requirement has no solution.
    hope this helps...
    Olivier.

  • How to display data with the same text and key in the drop down list?

    Hi All,
    Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    REPORT ZTESTING.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST,
          c(20) type c.
    *      c = 'select any'.
    data:begin of itab occurs 0,
          kunnr like kna1-kunnr,
          name1 like kna1-name1,
         end of itab.
    data:begin of jtab occurs 0,
          kunnr like kna1-kunnr,
          land1 like kna1-land1,
         end of jtab.
    PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
                              default 'SELECT'.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'p_list'.
    VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    APPEND VALUE TO LIST.
    VALUE-KEY = '2'.
    VALUE-TEXT = 'Country'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    start-of-selection.
    select kunnr name1 up to 20 rows from kna1 into table itab.
    select kunnr land1 up to 20 rows from kna1 into table jtab.
    case p_list.
    when '1'.
    loop at itab.
    write:/ itab-kunnr,itab-name1.
    endloop.
    when '2'.
    loop at jtab.
    write:/ jtab-kunnr,jtab-land1.
    endloop.
    endcase.
    <Added code tags>
    Moderator Message: Please use the "code" tags to format your code snippet.
    Edited by: Suhas Saha on Nov 17, 2011 11:19 AM

    shawnTan wrote:
    Hi All,
    >
    > Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    >
    >
    REPORT ZTESTING.
    >
    > TYPE-POOLS: VRM.
    >
    > DATA: NAME  TYPE VRM_ID,
    >       LIST  TYPE VRM_VALUES,
    >       VALUE LIKE LINE OF LIST,
    >       c(20) type c.
    >
    > *      c = 'select any'.
    >
    > data:begin of itab occurs 0,
    >       kunnr like kna1-kunnr,
    >       name1 like kna1-name1,
    >      end of itab.
    >
    > data:begin of jtab occurs 0,
    >       kunnr like kna1-kunnr,
    >       land1 like kna1-land1,
    >      end of jtab.
    >
    > PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
    >                           default 'SELECT'.
    >
    > AT SELECTION-SCREEN OUTPUT.
    >
    > NAME = 'p_list'.
    >
    > VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    > VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    > APPEND VALUE TO LIST.
    >
    > VALUE-KEY = '2'.
    > VALUE-TEXT = 'Country'.
    > APPEND VALUE TO LIST.
    >
    > CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    >
    > start-of-selection.
    > select kunnr name1 up to 20 rows from kna1 into table itab.
    > select kunnr land1 up to 20 rows from kna1 into table jtab.
    >
    > case p_list.
    > when '1'.
    > loop at itab.
    > write:/ itab-kunnr,itab-name1.
    > endloop.
    >
    > when '2'.
    > loop at jtab.
    > write:/ jtab-kunnr,jtab-land1.
    > endloop.
    > endcase.
    >
    > <Added code tags>
    >
    > Moderator Message: Please use the "code" tags to format your code snippet.
    >
    > Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
    This surely seems to be a bug to me(if not by design),  did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
    -Rajesh.

  • Bank detials Maintained in Vendor master data with out Sort code / Bank Key

    Hi
    We have a Requirement of creating Japanese bank details in Vendor Master Record. But No Bank key / sort code is available.
    Even for Russian Bank accounts we donu2019t have any bank key / sort code available from client.
    System does not allow to create vendor bank details with out providing Sort code/ Bank key details.
    Is there is any way of creating bank details in Vendor master data with out giving Bank key details.
    Regards,
    Karunakar.

    Hi,
    I assume you fill in Sort Code in bank number field.
    In my company, our bank number is set not to duplicate bank key.
    So bank key is simply a reference.  And our bank number field is not mandatory.
    If you follow these settings, you can create an abitrary bank key for your vendor bank account.

  • Open orders display in BEX report based on Key date

    Hello All,
    I have a requirement:
    We have an existing report which needs to have input selection as Key Date.
    The report should display the Open orders based on the key date mentioned.
    For Eg: if an item A was Opened on 20th Sept, 2010 and now CLEARED and if I run the ECC report today and mention the key date as 20th Sept, 2010, then the report will show me the item A status as OPEN
    Plz help me with the logic for the same at the earliest
    Tthanks..
    Sneha

    Hi Sneha,
    I assume you have open and crear dates in your query. So put an open date in your query filter and restrict it as less then Key date variable(which is a variable of type user-input on 0calday), then create another variable that feeds from keydate variable (it can be a replacement path or simplest user-exit).
    Note: the another variable is needed because as far as i can remember you cant use the same variable to restrict two different chars in the same query/anyway test if it's not possible - then create another variable as i mentioned.
    Take Cleardate in your query filter and restrict it as more than keydate variable andr # (not assigned). (in case if it hasnt been creared at all yet at the key date time)
    Pls let me know if this was helpfull

  • FBL5N - cleared document display by 'Open at key date'

    We are on ECC 6.0 and have recently upgraded from SP9 to SP15 in Financials. The users are saying that the report S_ALR_87012198 (which works the same way as FBL5N transaction) is now displaying the cleared documents differently.
    For example, we have the following documents:
    - invoice (RV) with posting date 11/01/09 and clearing date 11/20/09;
    - payment (DZ) with posting date = clearing date = 11/20/09.
    When the users run the transaction or report for Cleared Documents by using Clearing Date 11/20/09, both documents are displayed. However, when the users run the transaction for Cleared Documents by using 'Open at Key Date' 11/20/09 then only invoice (RV) is displayed.
    The documentation suggests that 'open at key date' should include items that are open before or on the 'key date'. Also our users are saying that it used to display both documents with 'Open at Key Date' before the service pack upgrade, but, unfortunately, we're unable to verify this.
    Could someone with lower version please verify how 'open at key date' option works for cleared documents? And is there any documentation that explains this?
    Thank you.

    >
    NSRobert wrote:
    > as the standard sap doesnt display the cleared and open items on "Open at key date"
    Thanks for your reply. Just to clarify - there are two 'Open at key date' fields in FBL5N. First field pertains to the 'Open documents' radio-button and second field - to the Cleared documents radio-button. When the users choose 'Cleared documents' and fill in the second 'Open at key date' field, they expect to see the items that are currently closed, but that were open on the specified key date. And SAP does, indeed, display them, just in a rather strange manner (it seems that DZ document is never "open", according to the screen's logic).
    It seems that we'll need to write to SAP for clarification, but I was hoping that someone could at least verify whether this, in fact, has anything to do with the support packs.

  • Display key date of hierarchy in the query

    Hello,
    we have a query that uses a hierarchy with the time depending structure. The key date of this hierarchy has been restricted with a variable and can be entered by user in the query selection screen.
    Is there any way to display this key date variable in the query result ? Otherwise the users do not see the key date they had selected before.
    Thanks in advance !
    Regards
    Igor

    Hi Chandamita,
    Thank you so much for your quick response. I'm not sure if it will fix the issue because it has the same properties for other object which we do not encounter the issue.
    Thank you!

  • Key date display.

    Hi
    Our report displays data according to key date given in the variable.
    When a user enters a key date, the report displays the following data
    col1=keydate sales
    col2= MTD
    col3=YTD
    Here our requirement is when a user gives keydate and execute, The key date shuld be displayed in the report. Is it possible in report to display the keydate.
    REgards
    Annie

    i am not sure if any other better way exists.. but we have done as below
    create a formula variable(IX_KEYDT) - customer exit varibale with date dimension, and in the exit, make it as a copy of ur key date.
    CASE i_vnam.
    WHEN 'IX_KEYDT'.
    IF i_step = 2.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = '0P_KEYDA'.
       CLEAR l_s_range.
        l_s_range-low    = loc_var_range-low.
        l_s_range-sign   = 'I'.
        l_s_range-opt    = 'EQ'.
        APPEND l_s_range TO e_t_range.
        EXIT.
       ENDLOOP.
    endif.
    endcase.
    create a new column - selection - just drag drop ur formula variable..
    *'0P_KEYDA' is the technical name of key date.
    hope it helps

  • Optimal read write performance for data with duplicate keys

    Hi,
    I am constructing a database that will store data with duplicate keys.
    For each key (a String) there will be multiple data objects, there is no upper limit to the number of data objects, but let's say there could be a million.
    Data objects have a time-stamp (Long) field and a message (String) field.
    At the moment I write these data objects into the database in chronological order, as i receive them, for any given key.
    When I retrieve data for a key, and iterate across the duplicates for any given primary key using a cursor they are fetched in ascending chronological order.
    What I would like to do is start fetching these records in reverse order, say just the last 10 records that were written to the database for a given key, and was wondering if anyone had some suggestions on the optimal way to do this.
    I have considered writing data out in the order that i want to retrieve it, by supplying the database with a custom duplicate comparator. If I were to do this then the query above would return the latest data first, and I would be able to iterate over the most recent inserts quickly. but Is there a performance penalty paid on writing to the database if I do this?
    I have also considered using the time-stamp field as the unique primary key for the primary database instead of the String, and creating a secondary database for the String, this would allow me to index into the data using a cursor join, but I'm not certain it would be any more performant, at least not on writing to the database, since it would result in a very flat b-tree.
    Is there a fundamental choice that I will have to make between write versus read performance? Any suggestions on tackling this much appreciated.
    Many Thanks,
    Joel

    Hi Joel,
    Using a duplicate comparator will slow down Btree access (writes and reads) to
    some degree because the comparator is called a lot during searching. But
    whether this is a problem depends on whether your app is CPU bound and how much
    CPU time your comparator uses. If you can avoid de-serializing the object in
    the comparator, that will help. For example, if you keep the timestamp at the
    beginning of the data and only read the one long timestamp field in your
    comparator, that should be pretty fast.
    Another approach is to store the negation of the timestamp so that records
    are sorted naturally in reverse timestamp order.
    Another approach is to read backwards using a cursor. This takes a couple
    steps:
    1) Find the last duplicate for the primary key you're interested in:
      cursor.getSearchKey(keyOfInterest, ...)
      status = cursor.getNextNoDup(...)
      if (status == SUCCESS) {
          // Found the next primary key, now back up one record.
          status = cursor.getPrev(...)
      } else {
          // This is the last primary key, find the last record.
          status = cursor.getLast(...)
      }2) Scan backwards over the duplicates:
      while (status == SUCCESS) {
          // Process one record
          // Move backwards
          status = cursor.getPrev(...)
      }Finally another approach is to use a two-part primary key: {string,timestamp}.
    Duplicates are not configured because every key is unique. I mention this
    because using duplicates in JE has more overhead than using a unique primary
    key. You can combine this with either of the above approaches -- using a
    comparator, negating the timestamp, or scanning backwards.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Why do I have to pay to download 'free' Yosemite for a family member?

    I have installed Yosemite on my laptop.  I would now like to install Yosemite on my kids laptops, using their apple IDs, but I get a message to tell me that I have to upgrade OS X and in order to do that I have to buy Yosemite.  I thought this was a

  • How to implement this typical sign workflow? Urgent

    Hi Adobe Experts, I am new to LC (two months only). Recently company is doing some evaluation on LC 8.2 and my boss assigned the following task to me  (I simplified it): Form: (Enclosed) * Two text fields: CommentTextField1 and CommentTextField2 * Tw

  • Difference Between Oracle ADF and ADF Rich Client

    Hello Gurus, I want to know the difference between those two: Oracle ADF: http://goo.gl/6Q1i2 and ADF Rich Client: http://goo.gl/L31ra I downloaded Jdeveloper 11g (11.1.2.3.0) I did this tutorial which It adf right? http://goo.gl/8Mf7c and this other

  • Lumia 925 cc3065 not available in saudi arabia

    i recently got the lumia 925 and its ana amzing phone. However i have not been able to find any covers or cases for it in ksa. Even the official cc3065 is not available. Will it be available soon or are there any alternatives?

  • Blackberry pearl and music files

    I know there's not a way to transfer music files to a Blackberry Pearl from a Mac using Bluetooth, but I was wondering if anyone knows if there is another way to do it? Using the USB cable perhaps? I downloaded PocketMac and I'm using that to sync my