Selecting from a list to a table

need help.i have items in a list and combo box in which i want it in such away that when item is selected from the list and combo box it goes to the table i have in a panel.i want to discard the text area i used.thanks in advance
my code:
'\n'
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.table.*;
public class BreakFast extends JFrame implements ActionListener{
     private JList ingredient;
     private JTextArea meal;
     private JTable table;
     private DefaultTableModel model;
     private JButton move;
     private String[] food;
     private JComboBox box,box1;
     private String[] units;
     private double[] price={100,150,200,250,300,350,400};
     public BreakFast(){
          Container c=getContentPane();
          c.setLayout(new FlowLayout());
          food = new String[] {"Corn Flakes","Beans","Shredded Bread","Mushroom",
          "eggs","Milks","Butter","Sugar","water","Oil"};
          ingredient = new JList(food);
          ingredient.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
          ingredient.setVisibleRowCount(4);
          JPanel p = new JPanel();
          p.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
          //move = new JButton(">>>");
          //move.addActionListener(this);
          meal = new JTextArea(5,20);
          meal.setEditable(false);
          p.add(new JScrollPane(ingredient),"Wast");
          //p.add(move,"Center");
          p.add(new JScrollPane(meal),"East");
          JPanel p2 = new JPanel();
          p2.setBorder(new BevelBorder(BevelBorder.RAISED));
          units = new String[]{"2 cups","3 cups","4 cups","5 cups","1 mudu","2 mudu",
                    "3 mudu","4 mudu","5 mudu","6 mudu","7 mudu","8 mudu","9 mudu",
                    "1 bag"};
          box = new JComboBox(units);
          box.addActionListener(this);
          box1 = new JComboBox();
          //box1.setEditable(true);
          box1.addActionListener(this);
          for(int i=0;i<price.length;i++){
               box1.addItem(price);
          model = new DefaultTableModel();
          model.addColumn("No.");
          model.addColumn("Food Items");
          model.addColumn("Units");
          model.addColumn("Price");
          String[] cell={"1","Rice","2 cups","#20"};
          model.addRow(cell);
          table = new JTable(model);
          JScrollPane pane = new JScrollPane(table);
          pane.setPreferredSize(new Dimension(200,100));
          p2.add(box,"North");
          p2.add(box1,"South");
          p2.add(pane,"East");
          c.add(p);
          c.add(p2);
          setSize(450,300);
          setVisible(true);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     public void actionPerformed(ActionEvent e){
               Object[] value = ingredient.getSelectedValues();
               if(e.getSource() instanceof JComboBox){
                    for(int i=0;i<value.length;i++){
                         String word = (String)value[i];
                         meal.append(box.getSelectedItem()+" "+"of"+" "+word+" "+box1.getSelectedItem()+"\n");
     public static void main(String[] arg){
          new BreakFast();

So the problem is?
All you need to do is to create the JTable first of all (which you haven't done). Secondly, you create a TableModel for it so can manage its data effectively.
Thirdly, you replace the code in your actionPerformed method to add a new row containing the data you received from the list and combo box.
Now is that so hard? Okay, here is some code
DefaultTableModel model = new DefaultTableModel(0,3);
JTable table = new JTable(model);
public void actionPerformed(ActionEvent e){
    Object[] value = ingredient.getSelectedValues();
    if(e.getSource() instanceof JComboBox){
        for(int i=0;i < value.length;i++){
            String word = (String)value;
Vector<Object> data = new Vector<Object>();
data.addElement( box.getSelectedItem() );
data.addElement( "of" + " " + word );
data.addElement( box1.getSelectedItem());
model.addRow( data );
ICE

Similar Messages

  • Why does "SELECT * FROM [database].[schema].[table]" not work in Azure ?

    Hi all
    In Microsoft Azure I have 2 databases.
    I work since more than 10 years with T-SQL and I always use
    fully qualified object names, means "[database].[schema].[table]".
    When I now make a connection to my database "A" in Azure and
    write a Query against database "B" ("SELECT * FROM [B].[schema].[table]")
    I get an exception. Of course when I connect to database "B" it works
    but again not to database "A". When I use "SELECT * FROM [schema].[table]"
    with the right database connected, it also works in Azure.
    Hope you understand what I mean :-)
    In MS-SQL, this of course works fine.
    Well my question is: What sense does this make ??
    Do I now have to re-write everything just for azure or will this behavior changed sometimes ?
    I know MS-SQL is not the same like Azure-SQL, but hey; does Microsoft think all projects have only one database ?? :-)
    Thanks for any answer
    Frank

    Hi Frank,
    According to your description, you want to retrieval data cross database in SQL Azure, right?
    As June said, Currently cross database joins are not supported in SQL Azure. Also you cannot change database mid query so you cannot, for example, put a USE [MyDB] in your query either. Please refer to the link below to see the details.
    http://www.britishdeveloper.co.uk/2011/11/cross-database-joins-in-sql-azure.html
    If you have any concern about this behavior, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Invalid Table Name SQL ReporError From Unsubmitted List of Value Table Name

    I have an application in which a user selects a table name from a list of values and a SQL report shows data from the table selected. On entry into this page the "invalid table name" error shows until you select a table name.
    My list of values is a LOV with redirect.
    Is there any way to remove this error or not show the report?
    Any help is appreciated.
    Thanks,
    Kyle

    I resolved my issue by doing the following:
    Create a process
    Process Point - On Load - Before Header
    Run Process - Once Per Session or When Reset
    Process Source:
    (item in list of value set equal to return value in list of value)
    :P10_VERSION := 'ALLVERSIONS';

  • How to remove a number from a list controlling a table

    i'm controlling data that enter to a table by using a specific one from them,let's call it "number of the user", when a client has the num 5 and enters his data ;it will be stocked in the 5th row.i want this number 5 to be removed from the list ,so when a new user try to enter num 5 he gets a message"number already used" so he have to enter a different number than 5,for instance 8,consequently i'll get all his data in the 8th row.
    if anyone know a little trick to solve this problem
    thanks

    this number has to be a shared variable,every client is concerned .
    "There is no need to keep track of anything seperately. Simply check if the requested row has already been filled or not." i'm not sure if i get your point,because i don't want a new user to even try to fill data in same row,for example 5,the moment he enters 5 in "NR_ORDRE" he gets a message"it's already taken" or use a combo box containing numbers when a client use one it gets deleted for the upcoming client.
    Attachments:
    NR_ORDRE unique.vi ‏14 KB

  • When clicking on a lookup, firefor does not allow me to select from the list

    When I use firefox, the website I am on has lookup fields located on it, firefox does not allow me to select my preferred option from the list. also when I slect another lookup from a list it displays the message 'invalid lookup value located in field ......'
    This does not happen in IE

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Random selection from a list

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

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

  • Error while selecting from view that references external table

    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)
    SQL> CONNECT sys AS SYSDBA
    Connected as SYS@ as sysdba
    SQL> CREATE USER user1 IDENTIFIED BY user1
    User created.
    SQL> CREATE USER user2 IDENTIFIED BY user2
    User created.
    SQL> GRANT CONNECT, CREATE TABLE, CREATE VIEW TO user1
    Grant complete.
    SQL> GRANT CONNECT TO user2
    Grant complete.
    SQL> GRANT READ, WRITE ON DIRECTORY EXT_DATA_DIR TO user1, user2
    Grant complete.
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> CREATE TABLE emp_xt
      emp_id     NUMBER,
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30),
      phone      VARCHAR2(15)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'           
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    Table created.
    SQL> SELECT COUNT(1) FROM emp_xt
      COUNT(1)
             4
    1 row selected.
    SQL> CREATE OR REPLACE VIEW emp_xt_view AS SELECT first_name, last_name FROM emp_xt;
    View created.
    SQL> SELECT COUNT(1) FROM emp_xt_view
      COUNT(1)
             4
    1 row selected.
    SQL> GRANT SELECT ON emp_xt_view TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
    SELECT COUNT(1) from user1.emp_xt_view
    Error at line 0
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    ORA-04043: object "USER1"."EMP_XT" does not exist
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> GRANT SELECT ON user1.emp_xt TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
      COUNT(1)
             4
    1 row selected.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    user503699 wrote:
    user1983440 wrote:
    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)As you have demonstrated, I guess the view approach only works for database tables. External tables are actually files on the file system. Even through OS, it is not possible to grant READ/WRITE access to only part of the file. The access is for entire file. An "External Table" is just a "wrapper" provided by oracle (using data cartridge) to allow user to be able to access the file as a "table". So it can definitely not do something that underlying OS can not do.
    p.s. In fact, oracle does not even allow to edit data in external tables using SQL.Why not just make a second external table (only including the 2 columns you need) and grant select directly on that to the user. I know you say "views only" but there's an exception to every rule ... just because it's called a table doesn't make it so. You could argue an external table is nothing more than a fancy view.
    Worst case, make a view on top of the second external table.
    CREATE TABLE emp_xt_less_information
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'   
             emp_id      number,
             first_name  char,
             last_name   char,
             phone       char
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    {code}
    Should do it, but my syntax may be off a touch ....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Cannot select from dropdown list

    This is very weird. I am a long-time FF user. Suddenly, I find that I cannot select from a dropdown list. Clicking on the list shows all the options but moving the mouse doesn't change the highlighted option.
    Safe Mode - Didn't help
    New profile - Didn't help
    What is going on here? Please help. Thanks

    Troubleshooting plugins
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins
    Check and tell if its working.

  • Value of a cell dependent on a data selected from the list in another cell

    Hello Everyone,
    Could you please help to solve this puzzle.
    I need to make a value of cells in the 2nd column dependent on the selection made in the cells in the 1st column, i.e.:
    Header 1
    Header 2
    List An
    LIst Bn
    Lists A and B have 10 items each
    A1    B1
    A2    B2
    A10  B10
    If A1 is selected I need a B1 appear in the second column in the same row, if A2 selected then B2,...and so on.
    Could you please hep to resolve this, if at all this is possible?
    Many thanks,
    Andrew

    Supposing that your list is a drop down list, you could put a script like the following on the exit event of List A. (very approximate, since I don't know any of your field names)
    switch (this.rawValue)
    case "A1":
         ListB.rawValue = "B1";
         break;
    case "A2":
         ListB.rawValue = "B2";
         break;
    Obviously, you'll want to replace "ListB" with the name of your field, and possibly the references to it (ie. TableName.RowName.FieldName) and fill in more case statements all the way to A10 if that's what you need. If List B is going to be a read-only field, you may even want to make it simply a text input box and have it display the values you want it to have based on the selection from List A.

  • How to use insert into...select * from...if source table is huge in size

    The source tables are having crores of data (growing tables). Tables with 4crores, 17cr. We want these tables to be copied frequently to our local database. Previously it was done by export-import through windows scheduled task. but now we are planning to do it as database jobs. We are fetching the datas with query
    insert into dest_tablee( select * from source_table@dblink) when we tried with this it was throwing exception like enough table space is not there. And also it was found that frequent commits has to be used while populating datas from big tables. So tried with cursor But it was very slow and again we got the exception like 'the table space unable to extend segment by 16 in undo tablespace 'UNDOTBS1'.
    After that we tried with the group by. In this case we got the exception like unable to extend table and also index in the table space. For this the solution is to add datafile. Again we have increase the table space. Now the procedure is running very slow(taking much time. It might be because of the conditions used in the query).
    Is there any other option to copy the datas from such a big tables? can we use the same sort of query?
    Friends please help me to sort it out.
    Thanks in Advance

    Hi,
    you have lot of data DONT use cursor, did you try using the COPY command.
    How frequently you will be doing the COPYING of the data ?
    If you have any constraints you can disable and enable after all the records have been copied.
    Please look at this link this should help.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5280714813869
    Thanks
    Message was edited by:
    hkandpal
    Link added

  • Tab pages not changed when selecting from TAB LIST

    Hi All,
    I have a form which has 15 tabs, 1st 10 Tabs are dynamic (enabled at new form instance, depending on configuration) and 11 to 15 are Static tabs visible for all.
    My problem is when i am clicking on tabs iam able to switch tabs, but when I select tab from Tab List I am not going to the selected TAB.
    Ex: when I am in TAB 1 and Select TAB15 from Tab list My form Still Stays in TAB1 and not moving to TAB 15
    Please provide me a Solution.
    My code in WHEN TAB PAGE CHANGED is
    DECLARE
    l_curr_rec NUMBER;
         BEGIN
              l_curr_rec := :SYSTEM.CURSOR_RECORD;
              --Get the Top Default Tab Page for the Form
              SHOW_VIEW('HDR_CANVAS_FIXED');
              :global.headers:=GET_CANVAS_PROPERTY('TAB_CANVAS', topmost_tab_page);
         IF(:GLOBAL.HEADERS='AS_REC_IMAGE')THEN      
    SHOW_VIEW('AS_REC_IMAGE');
    SET_VIEW_PROPERTY('AS_REC_IMAGE',VISIBLE,PROPERTY_TRUE);
    SET_TAB_PAGE_PROPERTY('AS_REC_IMAGE',ENABLED,PROPERTY_TRUE);
              GO_BLOCK('AS_REC');
                   --Hide the other canvases except the Pricing Canvas                     
         ELSIF(:GLOBAL.HEADERS='TRIM_REC_IMAGE')THEN      
    SHOW_VIEW('TRIM_REC_IMAGE');
    SET_VIEW_PROPERTY('TRIM_REC_IMAGE',VISIBLE,PROPERTY_TRUE);
    SET_TAB_PAGE_PROPERTY('TRIM_REC_IMAGE',ENABLED,PROPERTY_TRUE);
              GO_BLOCK('TRIM_REC');
                   --Hide the other canvases except the Pricing Canvas                     
         ELSIF(:GLOBAL.HEADERS='AS_SHIP_IMAGE')THEN      
    SHOW_VIEW('AS_SHIP_IMAGE');
    SET_VIEW_PROPERTY('AS_SHIP_IMAGE',VISIBLE,PROPERTY_TRUE);
    SET_TAB_PAGE_PROPERTY('AS_SHIP_IMAGE',ENABLED,PROPERTY_TRUE);
              GO_BLOCK('AS_SHIP');
                   --Hide the other canvases except the Pricing Canvas                     
         ELSIF(:GLOBAL.HEADERS='TRIM_SHIP_IMAGE')THEN      
    SHOW_VIEW('TRIM_SHIP_IMAGE');
    SET_VIEW_PROPERTY('TRIM_SHIP_IMAGE',VISIBLE,PROPERTY_TRUE);
    SET_TAB_PAGE_PROPERTY('TRIM_SHIP_IMAGE',ENABLED,PROPERTY_TRUE);
              GO_BLOCK('TRIM_SHIP');
                   --Hide the other canvases except the Pricing Canvas                     
         ELSIF(:GLOBAL.HEADERS='EXTRA')THEN      
                   ---Show the Export Canvas---------     
    SHOW_VIEW('EXTRA');
    SET_VIEW_PROPERTY('EXTRA',VISIBLE,PROPERTY_TRUE);
    SET_TAB_PAGE_PROPERTY('EXTRA',ENABLED,PROPERTY_TRUE);
              GO_BLOCK('EXTRA');
                   --Hide the other canvases except the Pricing Canvas                     
         ELSE -- DYNAMIC TABS
    --Hide all the other  static canvases
    IF (:GLOBAL.HEADERS='CT01')THEN
         GO_BLOCK('CT01');
    ELSIF (:GLOBAL.HEADERS='CT02')THEN
         GO_BLOCK('CT02');
    ELSIF (:GLOBAL.HEADERS='CT03')THEN
         GO_BLOCK('CT03');
    ELSIF (:GLOBAL.HEADERS='CT04')THEN
         GO_BLOCK('CT04');
    ELSIF (:GLOBAL.HEADERS='CT05')THEN
         GO_BLOCK('CT05');
    ELSIF (:GLOBAL.HEADERS='CT06')THEN
         GO_BLOCK('CT06');
    ELSIF (:GLOBAL.HEADERS='CT07')THEN
         GO_BLOCK('CT07');
    ELSIF (:GLOBAL.HEADERS='CT08')THEN
         GO_BLOCK('CT08');
    ELSIF (:GLOBAL.HEADERS='CT09')THEN
         GO_BLOCK('CT09');
    ELSE --ELSIF (:GLOBAL.HEADERS='CT10')THEN
         GO_BLOCK('CT10');
    END IF;
              END IF;
         END;
    Thanks,
    Durga Srinivas.
    Edited by: DurgaSrinivas_886836 on Dec 3, 2012 8:12 PM

    In your trigger, you are doing a SHOW_VIEW ('HDR_CANVAS_FIXED'); before you select the :GLOBAL.HEADERS information. I'm not sure what HDR_CANVAS_FIXED is, but I am wondering if that is what is messing you up. What happens if you either comment that out:
    DECLARE
      l_curr_rec     NUMBER;
    BEGIN
      l_curr_rec := :SYSTEM.CURSOR_RECORD;
      --Get the Top Default Tab Page for the Form
      --SHOW_VIEW ('HDR_CANVAS_FIXED'); /* <-------------------------------------------------------Comment it out */
      :global.headers := GET_CANVAS_PROPERTY ('TAB_CANVAS', topmost_tab_page);
      IF (:GLOBAL.HEADERS = 'AS_REC_IMAGE') THEN
        SHOW_VIEW ('AS_REC_IMAGE');
        .or if it is necessary move it to after the :GLOBAL.HEADERS:
    DECLARE
      l_curr_rec     NUMBER;
    BEGIN
      l_curr_rec := :SYSTEM.CURSOR_RECORD;
      --Get the Top Default Tab Page for the Form
      :global.headers := GET_CANVAS_PROPERTY ('TAB_CANVAS', topmost_tab_page);
      SHOW_VIEW ('HDR_CANVAS_FIXED'); /* <------------------------------------ Swap it with :global.headers */
      IF (:GLOBAL.HEADERS = 'AS_REC_IMAGE') THEN
        SHOW_VIEW ('AS_REC_IMAGE');
        SET_VIEW_PROPERTY ('AS_REC_IMAGE', VISIBLE, PROPERTY_TRUE);
        SET_TAB_PAGE_PROPERTY ('AS_REC_IMAGE', ENABLED, PROPERTY_TRUE);
        GO_BLOCK ('AS_REC');
      --Hide the other canvases except the Pricing Canvas
      ELSIF (:GLOBAL.HEADERS = 'TRIM_REC_IMAGE') THEN
        SHOW_VIEW ('TRIM_REC_IMAGE');
        .

  • Problem in selection from data base with RANGE-TABLE.

    Dear folks,
                   I am facing weird problem with range table in selection query.I have problem with bold part of code.Here when i give input to both ranges r_salesno,r_brandid then and the selection occurs ,when i put black in one of those it does not work.I haev passed Empty table to range if no inpiut in elements..although it does not work..I dont know why it is happening...By the i m using this code in Webdynpro ABAP.Please help points will be awarded..
    if  Stru_Cn_Selcrtr-ca_slsrl is not initial.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = Stru_Cn_Selcrtr-ca_slsrl.
        APPEND wa_salesno TO r_salesno.
        CLEAR : wa_salesno .
      else.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = space.
        APPEND wa_salesno TO r_salesno.
         CLEAR : wa_salesno .
      endif.
      if  Stru_Cn_Selcrtr-ca_brand is not initial.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
        wa_brandid-LOW = Stru_Cn_Selcrtr-ca_brand.
        APPEND  wa_brandid TO  r_brandid.
        CLEAR :  wa_brandid .
      else.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
         wa_brandid-LOW = space.
        APPEND wa_brandid  TO  r_brandid.
        CLEAR : wa_brandid  .
      endif.
    *If any of these are given then select data accordingly.
        <b>select * from ZNSLVWHDIMMD_LCL
                 into corresponding fields of table IT_VIEW
                 WHERE SALESRLNO in  r_salesno
    *             and   CREATEDBY in It_crtby_selopt
    *            and   STARTDATE in It_validfrm_selopt
    *             and   ENDDATE   in It_validto_selopt
    *             and  STATUS     in It_status_selopt1
                 and   BRANDID   in r_brandid.
    *             and   MODELNO   in It_model_selopt.</b>

    Hello Nirad
    Your coding is problematic. I assume that field SALESRLNO (of table ZNSLVWHDIMMD_LCL) probably means sales number (or sales order) and, thus, must not be empty. If this is correct then the first IF statement is probably wrong:
    if  Stru_Cn_Selcrtr-ca_slsrl is not initial.
        wa_salesno-sign = 'I'.
        wa_salesno-option = 'EQ'.
        wa_salesno-LOW = Stru_Cn_Selcrtr-ca_slsrl.
        APPEND wa_salesno TO r_salesno.
        CLEAR : wa_salesno .
      else.
        REFRESH: r_salesno.  " means: select all sales numbers
    " NOTE: If you fill the range like below this means that only sales order
    "            with no sales number (= ' ', space) should be select.
    " Thus, there will never be any sales order selected.
    *   wa_salesno-sign = 'I'.
    *   wa_salesno-option = 'EQ'.
    *   wa_salesno-LOW = space.
    *   APPEND wa_salesno TO r_salesno.
    *    CLEAR : wa_salesno .
      endif.
    The same logic applies to the second IF statement. If you want to select all BRANDID if none has been provided as selection criteria then code:
      if  Stru_Cn_Selcrtr-ca_brand is not initial.
        wa_brandid-sign = 'I'.
        wa_brandid-option = 'EQ'.
        wa_brandid-LOW = Stru_Cn_Selcrtr-ca_brand.
        APPEND  wa_brandid TO  r_brandid.
        CLEAR :  wa_brandid .
      else.
        REFRESH: r_brandid.  " means: select all BRANDID
    *    wa_brandid-sign = 'I'.
    *    wa_brandid-option = 'EQ'.
    *     wa_brandid-LOW = space.
    *    APPEND wa_brandid  TO  r_brandid.
    *    CLEAR : wa_brandid  .
      endif.
    Regards
      Uwe

  • ARQ: Manager Id manual selection from the list???

    Hi,
    I had discussed in my other thread here that, in some of the cases, a user may not have manager id for some reason either in HR or AD. For such users, the option is to select manager id manually from the list by pressing F4.
    The problem is that, as soon as a manager id is searched, this will display "all" the users available in GRC system: requester, manager, role owner, other dialog users and even background users!
    This causes the requester to select incorrect manager id and exposes all the irrelevant users from GRC system.
    May I know how I can control this? Or do we have any other way to handle this?
    As I know, there are following options:
    1. Maintain users' details properly either in AD or SAP HR systems
    2.In case of non-availability of manager id, route request to appropriate team/person who can take proper decision (which I have done currently)
    Does any also suggest/endorse an idea to modify the default search ability of ARQ?
    I would appreciate if we can have ideas/suggestions on this.
    Would be waiting for kind responses.
    Regards,
    Faisal

    Dear Alessandro,
    Thanks for your reply.
    Regarding :
    I understand your concern regarding correct/wrong mangers. But in case that manager information is wrong in LDAP/HR from which source should GRC get the correct managers?
    I would share on thing and that is, for contractors (for example) some how manager details are not maintained in LDAP (as in SAP HR only permanent employees' HR data is maintained).
    I could not get the first 3 lines of next paragraph and I think this is not the issue
    Basically you can say who ever is a manager can also be a manager from someone else. But it is possible that someone who is not yet a manager can be a new manager and has to be defined as manager in ARQ.
    The issue that, for some type of employees (contractors), manager details are not maintained neither in LDAP nor in SAP HR system. Therefore, in such cases, manager field is empty. But let me tell you there are managers for even contractors, but not maintained in LDAP due to the maintenance responsibility and gathering this information from different department is assumed to be a big and painful task.
    But these managers (for contractors) are definitely available in GRC system as approvers. Therefore, for users (contractors) whose manager is not maintained, manually it is to be selected from the search option. If we start searching for a "suitable" manager, then it displays all the users available in GRC system (because they are created in SU01).
    Also, we might face similar problem at the time of forwarding a request! Actually, a manager should only see the list of other managers, not all users!
    Similarly, a role owner will intend to forward his responsibility to another role owner only!
    Therefore, we should only see the relevant users from the search, but not all!
    Please share your valuable inputs.
    Regards,
    Faisal

  • Link an image field to a value selected from a list

    Hello!
    I'm newbie to Dreamweaver - PHP and I have a problem. I have
    made a list that displays the names of all the images of my
    database. Now, I want every time the user selects a value from the
    list the corresponding image appears on the same page. How can I do
    this?
    Please help me!!!

    Hi Stefan,<br /><br />Thanks for responding to my last mail. I am talking about the XFA(xml form architecture). Actuallly i am working on Picture form field in PDF which Adobe has newly introduced. In this type of form field , user can add an image. But i am not able to differentiate between the "Picture form field" and "push button". The only thing i have found that the picture form field entry exist in dataset but not the Push button.<br /><br />29 0 obj<br /><<<br />/Length 13533<br />>><br />stream<br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><IMAGE href="" xfa:contentType="image/jpg"></IMAGE></form1></xfa:data></xfa:datasets><br />endstream<br />endobj<br /><br />In the above case the "Image" is a picture form field.<br /><br />Another difference i found between "push Button" and "Picture Form Field" is the MK dictionary as below.<br /><br />Pushbutton<br />-----------<br />/MK <<<br />/BG [ 0.831375 0.815689 0.784317 ]<br />/CA (Print Form)<br />/BC [ 0 0 0 ]<br />>><br /><br />Picture form Field<br />-------------------<br />/MK <<<br />/TP 1<br />/I 17 0 R<br />>><br /><br />But i want to find the exact difference. May be some bit in Form Field Flag(ff) signify the picture form field. It will be very helpful to me if you could tell me the exact difference.<br /><br />Kind Regards,<br />Shekhar Kumar Keshri

  • Selection from T-list giving error 'Fied is protected against update'

    hii all,,
    i have manged to make charater based search, for this
    i am accepting characters 'as user types-in' in a text item 'vchar' .
    As the user types in characters,the t-list item (vlist) gets populated with the matching characters
    typed by the user .
    i am testing it on on a non-db block (jmaster) fields..
    Once i make any selection from the tlist,i want the field 'vchar' to hold the value/label selected from the
    t-list (vlist).
    the problem is when i click enter and make selection from the t-list
    populated elements, and navigate to next field 'tcode'
    'vchar' remains blank and the error... 'Fied is protected against update' gets displayed on the status bar.
    here are my triggers ;
    PRE-FORM  at form-level
    SET_ITEM_PROPERTY('VLIST',DISPLAYED,PROPERTY_FALSE);
    WHEN-TIMER-EXPIRED at form-level
    If GET_APPLICATION_PROPERTY(TIMER_NAME) = 'COUNT_TIMER' Then
    SET_ITEM_PROPERTY('VLIST',DISPLAYED,PROPERTY_TRUE);
    :GLOBAL.M_SRCH := :VCHAR;
    declare
    v_char varchar2(200) := 'select VLIST,VLIST
                             from JRNY_MASTER
                             WHERE VLIST like '||'''%'||:GLOBAL.M_SRCH||'%''';
    v_rg_id recordgroup;
    v_err NUMBER:= 0;
    BEGIN
    v_rg_id := create_group_from_query('recgrp1',v_char);
    v_err:= populate_group(v_rg_id);
    clear_list('JMASTER.VLIST');
    populate_list('JMASTER.VLIST',v_rg_id);
    DELETE_GROUP(v_rg_id);
    END;
    Synchronize;
    End if ;
    WHEN-NEW-ITEM-INSTANCE for field 'vchar'
    DECLARE
      timer_id Timer;
    BEGIN
      :GLOBAL.M_SRCH := :VCHAR;
      SET_ITEM_PROPERTY('VLIST',DISPLAYED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('VLIST',ENABLED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('VLIST',UPDATE_ALLOWED,PROPERTY_TRUE);
      timer_id := CREATE_TIMER('COUNT_TIMER', 500, REPEAT);
    END;
    POST-TEXT-ITEM for field 'vchar'
    :vchar := :JMASTER.VLIST;
    Delete_Timer('COUNT_TIMER');
    SET_ITEM_PROPERTY('VLIST',DISPLAYED,PROPERTY_FALSE);
    WHEN-VALIDATE-ITEM for tlist item 'vlist'
    :vchar := :VLIST;Please if some1 have understood my problem, so kindly reply me
    what went wrong in my logic...
    TY

    Andreas Weiden wrote:
    For the VLISt-item, you should set also INSERT_ALLOWED to true, as it is a new record.
    also for the VLIST-item, you should Mouse-Navigable to false.yes it worked this time...Thanks Andreas...
    but one thing..i also would like to add a new value in 'vchar',
    in case, if i don't find a value typed in 'vchar' in 'vlist'.
    when i try to enter new value in 'vchar' and navigate to the next item,
    so based on my above codes..especially the 1 in POST-TEXT-ITEM
    where i am assigning ;
    :vchar := :JMASTER.VLIST;
    'vchar' becomes NULL, as soon as i leave the 'vchar' and branch to the next item.
    please suggest..whats should be changed...
    TY once again...
    Edited by: user10967485 on 25-Oct-2010 07:13
    Edited by: user10967485 on 25-Oct-2010 11:29

Maybe you are looking for

  • Apple bluetooth keyboard function keys not working correctly

    My bluetooth keyboard was working fine for a long time, but recently the function keys have stopped behaving normally. The keys labeled for volume controls now affect expose, the brightness keys do nothing. Also, pressing fn+delete doesn't delete cha

  • How to refresh ODI variables from file

    Hi, I followed the fillowing links to implement the dynamic file parameter passing in to the resource name of a datastore. part-1. http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value part-2. http://o

  • Radio Bullet Data  Doesn't Export

    I am having trouble getting the radio bullet the user selects to export to my spreadsheet. One is Vacation and the other is PersonalLeave. I named the subfolder EmployeeInfo Any idea why the selection does not export. I did click the "Specify Item Va

  • How to insert a new charcterstic

    hi i have a infoobject sales document which is not present in a standard cube . and i want to add the sales document in the cube. when i see cube tempalte i can see the my charcter . but when i try to transfer to the structure and assign the dimensio

  • Facing error when activating ODS

    Hi All, i am facing error when activating ODS. THe load was succesfull. when i checked in RSMO detail screen all the data packets are green but under subsequent processing it shows following error message 1.Activation of data records from ODS object