Block column in Jscrollpane

Hi!
Sorry for my English.
I have a Jtable in a Jscrollpane
i need block first and second column when i scroll horizontal the jtable.
so i can ever see information in this column
is possible?
Can you help me with an example.
THANKS

That doesn't sounds like an appropriate use of a table. Tables show an associated list of rows. If some columns scroll and other don't than the data displayed in a row would not be associated.
Message was edited by: John
Oops, didn't notice the horizontal scroll. Sorry about that. Color me stupid.
BaltimoreJohn

Similar Messages

  • "ctime" and "block" column in V$LOCK!!

    Hi. all.
    What does "block" column in V$LOCK mean?
    The following is from manual.
    "A value of either 0 or 1, depending on whether or not the lock in question
    is the blocker"
    However, V$LOCK.block in my db is all "2".
    As far as I konw, if request = 0 , this is lock holder, if request > 0, this is lock waiter.
    One more question!!
    What is the time unit of ctime column in V$LOCK?
    For example, "594873" for ctime means what seconds?
    Thanks and Regards.

    Thanks for your reply.
    SELECT inst_id, type, lmode, block
    FROM gv$lock
    The result is as followings.
    INST_ID     TYPE     LMODE     BLOCK
    1     PS     4     2
    1     PS     4     2
    1     PS     4     2
    1     XR     1     2
    1     TS     3     2
    1     RS     2     2
    1     CF     2     2
    1     XR     1     2
    1     RT     6     2
    1     RT     6     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     MR     4     2
    1     RT     6     2
    1     DM     4     2
    2     PS     4     2
    2     XR     1     2
    2     TS     3     2
    2     RS     2     2
    2     CF     2     2
    2     XR     1     2
    2     RT     6     2
    2     RT     6     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     MR     4     2
    2     DM     4     2
    2     RT     6     2

  • Blocked columns in BPS Layout

    Hello BPS-enthousiasts,
    We have a problem concerning our input screens. We have recently started a BPS-project on a 7.0-system and ran into - what we think - is a bug.
    These input screens have fiscal year, posting period and currency as data columns. The currency is hardcoded into the screen and the fiscal year and posting period in the screen are defined as follows:
    Fiscyear          Posting period
    FISCYEAR      1
    FISCYEAR      2
    FISCYEAR      3
    FISCYEAR      4
    FISCYEAR      5
    FISCYEAR      6
    FISCYEAR      7
    FISCYEAR      8
    FISCYEAR      9
    FISCYEAR      10
    FISCYEAR      11
    FISCYEAR      12
    FISCYEAR+1  #
    FISCYEAR+2  #
    FISCYEAR+3  #
    FISCYEAR+4  #
    FISCYEAR+5  #
    FISCYEAR+6  #
    Where FISCYEAR is a variable. For the first year we want to input figures every month, for the other years one figure for the whole year
    When we define fiscyear as a range from 2008-2014 our input screen allows input in all columns except for the last three (2012-2014). No data slices or anything are blocking these years.
    Has anybody encountered this before. We did this already on a 3.5-system, without any problems.
    In any case, we are thankfull for your advise
    Edited by: Vandersteen Jorg on Jul 16, 2008 4:19 PM

    The master data of the infoobjects 0fiscper3 and 0fiscyear are filled for the years and periods we want to see in the screen.
    Also the business content 'time-objects' are a bit special in the system and it is not possible to maintain the master data yourself.
    Kind regards,
    Jorg

  • Block, columns, files or individual cells in numbers?

    Hello,
    There's any way to block from editing an individual cell or file or column?
    Normally I use some cells or columns to use specifyc formulas on them, with  automathic results.
    Not being able to block those, it's really easy to delete the formula.
    I could use a Formular for editing data, and block the full table for showing results, but I would prefer to do it on the smae table as in excel, just having some columns editable and others not blocked with automathic formulas.
    Is this possible somehow?
    Thanks
    Sergi.

    I don't think so, unless maybe your formulas were on a different table on a different sheet and you just referenced them from the data entry table.
    Also, have you looked into Forms? I don't use them much, but I do see that you cannot edit formulas from there.

  • How to set "Maximum Lenght" column property for database block at RUNTIME?

    Hi folks,
    Is it possible to somehow set a "Maximum Length" property for database block column at runtime?
    I have a dynamic form, which maintains mostly "STATIC DATA" within all application which are stored in different static data tables (which have similar structure). But now, description column in some of those tables was extended (not in all at this stage). I would like to avoid truncating form error while reading data from those extended tables, so I would like to set an MAXIMUM SIZE to accurate value at the time when I'm specifying TABLE NAME for that database block.
    What property should I use to set it?
       -- before executing query in "MAIN_BLOCK" I always set QUERY_DATA_SOURCE_NAME to user defined value => STATIC DATA TABLE name
       Set_block_Property('MAIN_BLOCK',QUERY_DATA_SOURCE_NAME,:control.table_name);
       Set_block_Property('MAIN_BLOCK',DML_DATA_TARGET_NAME,:control.table_name);
       -- here I would like to set also MAXIMUM LENGHT for particular column (based on some condition, etc.. correct value I can get from ALL_TAB_COLS dictionary
       SET_ITEM_PROPERTY('MAIN_BLOCK.DESCRIPTION', <<XXXXXXX>>, 300);What should I use instead of "<<XXXXXXX>>" if I want to overwrite MAIN_BLOCK.DESCRIPTION column's maximum length to 300?
    Thanks,
    Tomas

    Hi Magoo, thanks for reply.
    Yes, but then user can get other errors while trying to set description with value longer than in database (for all not extended tables).
    Aby idea how to implement SET_CUSTOM_PROPERTY like mentioned here?
    Oracle Forms - "maximum length" property.
    Thanks,
    Tomas

  • Non-Database Item Sort Using Multiple Block Values

    I need to sort the result set of a block based on a calculated item. I found several messages addressing this, however they all speak to using the columns from within the same block as input variables to the function used to calculate the non-database column value.
    My problem is that I need to use values from a different block as input variables. I have not found a way to use them since I need to use the full block.column syntax. Forms does not like this and always thows an error right at the period(.). I need to do this because the column names are the same in each block. the function compares the column values and changes the record instance background a different color based based on how many of the column pairs match. Each block is mutually exclusive from each other and doing a accurate join is not really possible.
    I tried renaming the block column name to something unique, however I get a variable not bound error when I try to use it in the order by function even though their values are in the top most block.
    For Example:
    First Block. Contains a list of cases that need to be worked because the automated process could not find a valid provider based on the values received. This list is created by a background process.
    Table: CASE_MAIN
    TIN
    CASE_ID
    FCLTY_CM
    MEDICARE_CM
    Unrelated Second Block (i.e., no join). It uses the TIN value in the first block to get a list of all of the providers for the TIN associated with the Case so that a person can assign the correct Provider to the case (A TIN has a provider and address associated with it). As a result there is no link to the results of this table and the CASE_ID. That's what the users needs to do manually
    Table: PROVIDER_MAIN
    FCLTY
    MEDICARE
    I need to take the values in the first block and compare them in the second block so that I can recolor the background based on matching logic in the function below.
    order by clause = get_vals( ''||:FCLTY_CM||''
    ,''||:MEDICARE_CM||''
    ,fclty
    ,medicare) desc
    I am able to do the coloring within the form easily, however I need to order them by how many values match exactly so the ones that match to most value pairs show at the top. Hence ordering by the result of the function. I return a 0,1, or 2 based on the matches. 0 for none and 2 for both.
    I cannot create a view because the sources of the information I need to compare are NOT related to each other, yet. that is what the application is designed to do. I have a case without a
    provider assigned, but I have a tax id number that possible identifies the provider. I use this TIN to query the provider table for all of the possible providers under that TIN. As a result there is no link between the case information and provider information. The goal is to get this list compare the values from the target information and put the most likely matches on top, with
    the ones with the most matches first. I can create a function many ways that takes in various parameters. For example Case ID and Provider Id and query the records in subselects
    individually like so;
    select count(*)
    from (select fclty, medicare from case_main where case_id p_case_id) cm
    ,(select fclty, medicare from provider_main where prv_id = p_prv_id) pm
    where cm.fclty = pm.fclty
    and cm.medicare = pm.medicare
    If the number is greater than zero I know I have a match with that provider and I can sort accoringly. I can also pass in the target information from case_main and the provider inforation from provider_main and then do an if/then statement for comparing. Then I can use this function to create a column value for each record and then use the same reference to the function in the order by clause to order by that value.
    The problem comes in trying to reference the case_id or target information from a different block than where the fucntion needs to be used. I get a variable bound not error message. What am I missing here. Why can I not reference a uniquely named block item as a input variable to a function in a different block? Does Forms first figure out what it needs to retrieve and then executes the SQL for each block in isolation, or does the first block's result set get retrieved, then the second, third, etc. Based on the message i am getting I would suspect the former since it appears their is no value in subsequent blocks. If so is there anyway around this? thanks.

    Don't quite understand your problem completely. But this might help. I sure hope your Provider_Main is a single-record block ...otherwise, how would you supply a list of values of FCLTY and MEDICARE to the function that does the sorting? Be awere, too, that the order-by is processed by the server, and NOT by Forms.
    Assuming it is a single-record block, you can put the values into parameters:
    :Parameter.Fclty := :Provider_Main.Fclty;
    :Parameter.Medicare := :Provider.Medicare;
    Execute_Query;
    And your order-by clause would be
    get_vals( ''||:FCLTY_CM||'',''||:MEDICARE_CM||'',
    :Parameter.Fclty,
    :Parameter.Medicare) desc
    By the way, the first line of your order-by looks strange. Shouldn't it be:
    get_vals( FCLTY_CM || ',' || MEDICARE_CM,
    or even better, get_vals should take in 4 parameters:
    get_vals(Fclty_cm, Medicare_cm, :parameter.Fclty, :parameter.Medicare)

  • How to Make MRBR to show the Customised Payment Block Indicator (MIRO) ?

    Hi
    Currently, from what I know of, MRBR only showing Log Payment Block as follows:
    A     Automatically blocked due to existence of blocking reasons
    S     Stochastically blocked
    M     Manual payment block set in header - no blocking reasons
    W     Automatically blocked due to entry via Web Invoice
    However during the manual MIRO creation, I put in customised Payment Block G (Block due to XX) in the Payment Tab of MIRO. This G does not get shown up in MRBR.
    How to make it possible in MRBR as I have configured a few customised Payment Block such as G (Block due to XX) and H (Block due to YY).
    I would like MRBR to show up the exact Payment Block indicators as those in the MIRO.
    Please help.
    Thanks

    Hi Nick.
    I just found out that Payment Block Indicator shown in MIRO will appear in MRBR. The reason that it was not shown in MRBR because during MIRO creation, it was set BLANK and then user went to FB02 to change it with other customised Payment Block Value, thus when we run MRBR, it was showing blank under Payment Block column. Thus, we had to resort to LOG Payment Block which gave rise to this thread.
    Having understand the importance of how FB02 changing  payment block will affect MRBR, we have decided not to let user change the payment block in FB02.
    SAP note: 394370 has explained everything:
    "A document generated with MIRO was blocked for payment. You cancel the payment block from the vendor line item in the FI follow-up document. Transaction MRBR then displays the invoice document nevertheless. Why?
    The invoice document itself cannot be changed by changes to the follow-up documents; this is not programmed. Transaction MRBR therefore continues to display the document as blocked. If this document is released from an MM point of view, the FI follow-up document remains released. Thus the damage caused is restricted to unnecessary work by the user. SAP recommends that you only use the release transactions for releasing invoices."
    Thanks a lot!

  • Block corruption recovery!!

    Hi. all.
    I am testing a recovery in the event of block corruption.
    As far as I know, the solution to block corruption is as followings:
    1. BlockRecover command (RMAN)
    2. drop the table and import from backup dump file
    3. DBMS_REPAIR package
    4. complete recovery from online full backup
    My question is whether No. 4 is possible or not.
    step 1 : bring the datafile offline
    step 2 : restore the datafile from the last backup(online backup)
    step 3: recover the datafile, applying archive logs and online redo logs
    step 4 : bring the datafile online
    The above steps are enough for block corruption recovery?
    I need to make a document about block corruption issue, but
    I have no experience of recovering block corruption.
    Thanks in advance.
    Best Regards.

    If few blocks are corrupted, it is advisable to run the BMR (block media recover, staring with 9i). This option provides the availability of other data present in datafile.
    Option 4 is okay when most of the data block in a datafile got corrupted.
    To know how many blocks got corrupted in the datafile, run the following:
    SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;
    SELECT * FROM V$COPY_CORRUPTION;
    SELECT * FROM V$BACKUP_CORRUPTION;
    You need to look into corrution_type and blocks columns in the v$database_block_corruption view as it gives the reason for block corruption and number of blocks are corrupted in a datafile.
    Jaffar

  • How to update a jscrollpane as new tables are added?

    Following is the code of a search form which searches the address based on some search criteria and places the result in the form of table on the panel p3 which has scrollpane sp1. every time the user searches the address a new table adds to the panel but the problem is that as new tables are added to the panel and they get out of the panel the scrollpane does not show the scroll Knob on the scroll bar. please give me the solution that how to update the scrollbar as the new tables are being added to the panel?
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Search extends JFrame implements ActionListener
         Container c;
         Toolkit tk;
         JLabel l1; int y=30;
         JPanel p1,p2,p3;     
         JRadioButton rbByName,rbBySirName,rbByID,rbByCity,rbByState;
         JButton btSearch,btView;
         ButtonGroup bgSearch;
         JTextField txtSearch;
         ImageIcon i1;
         Connection con;
         Statement st1;
         PreparedStatement pst1;
         ResultSet rs1;
         Object[][] data;
         public Search()
              super("Search-Address Management System");
              c=getContentPane();
              tk=Toolkit.getDefaultToolkit();
              //setLocation(150,100);
              setSize(1024,768);
              c.setLayout(null);
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              defineComponents();
              settingBounds();
              addListeners();
              addComponents();
              JScrollBar sb=new JScrollBar();
              JScrollPane sp1=new JScrollPane(p3,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              sp1.setBounds(30,300,700,380);
              l1.add(sp1);
              setVisible(true);
         public void defineComponents()
              p1=new JPanel();
              p1.setLayout(null);
              p1.setOpaque(false);
              p2=new JPanel();
              p2.setLayout(null);
              p2.setOpaque(false);
              p3=new JPanel();
              p3.setLayout(null);
              //p3.setOpaque(false);
              i1=new ImageIcon("Images/Main1.jpg");
              l1=new JLabel(i1);
              rbByName=new JRadioButton("First Name");
              rbByName.setOpaque(false);
              rbByName.setForeground(Color.CYAN);
              rbBySirName=new JRadioButton("Last Name");
              rbBySirName.setOpaque(false);
              rbBySirName.setForeground(Color.CYAN);
              rbByState=new JRadioButton("State");
              rbByState.setOpaque(false);
              rbByState.setForeground(Color.CYAN);
              rbByCity=new JRadioButton("City");
              rbByCity.setOpaque(false);
              rbByCity.setForeground(Color.CYAN);
              rbByID=new JRadioButton("ID");
              rbByID.setOpaque(false);
              rbByID.setForeground(Color.CYAN);
              btSearch=new JButton("Search");
              bgSearch=new ButtonGroup();
              txtSearch=new JTextField();
              btSearch=new JButton("Search");
              TitledBorder tb=new TitledBorder("Search Criteria");
              TitledBorder tb1=new TitledBorder("Search");
              p1.setBorder(tb);
              tb.setTitleColor(Color.YELLOW);
              p2.setBorder(tb1);
              tb1.setTitleColor(Color.YELLOW);
         public void settingBounds()
              rbByID.setBounds(20,30,50,20);
              rbByName.setBounds(120,30,100,20);
              rbByState.setBounds(20,70,80,20);
              rbByCity.setBounds(120,70,50,20);
              rbBySirName.setBounds(240,30,100,20);
              p1.setBounds(30,40,400,110);
              p2.setBounds(30,180,400,80);
              //p3.setBounds(30,300,700,380);
              p3.setBackground(Color.BLUE);
              l1.setBounds(0,0,1024,768);
              txtSearch.setBounds(50,210,250,25);
              btSearch.setBounds(320,210,80,25);
              rbByID.setSelected(true);
         public void addListeners()
              btSearch.addActionListener(this);
         public void addComponents()
              p1.add(rbByName);
              p1.add(rbBySirName);
              p1.add(rbByState);
              p1.add(rbByCity);
              p1.add(rbByID);
              c.add(txtSearch);
              c.add(btSearch);
              c.add(p1);
              c.add(p2);
              c.add(l1);
              bgSearch.add(rbByID);
              bgSearch.add(rbByName);
              bgSearch.add(rbBySirName);
              bgSearch.add(rbByCity);
              bgSearch.add(rbByState);
         public void drawtable()
              int i=0,rows=0;
              String[] colNames={"ID","First Name","Last Name","City","State","Operation"};
              String stData=txtSearch.getText();
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:dsnAddress");
                   if(rbByName.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where fname=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByID.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where ID=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbBySirName.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where LName=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByCity.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where City=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByState.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where State=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   rs1=pst1.executeQuery();
                   rs1.last();
                   rows=rs1.getRow(); // get no. of rows
                   if(rows==0)
                        JOptionPane.showMessageDialog(this,"***No Record Found***",null,JOptionPane.INFORMATION_MESSAGE,null);
                        return;
                   data=new Object[rows][6]; //     makes an empty two dimensional array of
                                                   //     rows and columns to store data
                   rs1.beforeFirst();
                   while(rs1.next())            //     fills the array with data
                        data[0]=rs1.getString("ID");
                        data[i][1]=rs1.getString("Fname");
                        data[i][2]=rs1.getString("LName");
                        data[i][3]=rs1.getString("City");
                        data[i][4]=rs1.getString("State");
                        data[i][5]="View";
                        i++;
              catch(Exception e)
                   System.out.println("ExceptionSearch="+ e);
              MyTableModel tm=new MyTableModel(data,colNames);
              JTable t1=new JTable(tm)
              // Returning the Class of each column will allow different
    // renderers to be used based on Class
    public Class getColumnClass(int column)
    return getValueAt(0, column).getClass();
              JScrollPane sp=new JScrollPane(t1,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              sp.setBounds(30,y,600,100);
              p3.add(sp);
              y=y+110;
              ButtonColumn buttonColumn = new ButtonColumn(t1, 5);
         }Edited by: erdeepak on Sep 22, 2008 4:12 AM
    Edited by: erdeepak on Sep 22, 2008 4:24 AM
    Edited by: erdeepak on Sep 22, 2008 4:25 AM
    Edited by: erdeepak on Sep 22, 2008 4:30 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Don't use null layouts. Learn how to use layout managers.
    The basic design of your frame should be something like this:
    JPanel tablePanel = new JPanel( set your desired layout manager here );
    JScrollPane scrollPane = new JScrollPane( tablePanel );Now when you invoke your search code to create a new table the code will be something like:
    JTable table = new JTable(...);
    tablePanel.add( table );
    tablePanel.revalidate();The revalidate() will invoke the layout manager and the new preferred size of the panel will be calculated and then scrollbars will be added if required.
    The key is to use a layout manager and to revalidate the panel containing the tables.

  • QM Block not triggered  via EDI orders

    Hello All,
    Please help me with this problem "QM block not triggered via EDI Orders".
    Sales Orders will be created using IDOC. When the sales orders was displayed using VA02, goto >> items >> schedule lines, there's no QM status violated being displayed in the delivery block column.
    Kindly help me what logic will I applied regarding this matter.
    FM used was IDOC_INPUT_ORDERS.
    I need your comments/suggestions ASAP.
    Thanks in advance.
    Carina

    hai,
    Just check this it may help tou.
    Program Name : YX30_UPLOAD_QUALITY_INFO
    Quality Info Record for I30 System *
    Original Transport Number : I30K903055 *
    SYS id: SYS_30_1502_03_41_Upload Quality Info Records *
    TDS id: TD_30_1502_03_41_Upload Quality Info Records *
    UT ID: UT_30_1502_03_41_Upload Quality Info Records *
    ======================================================================
    Change History *
    Date | Change No | Name | Description *
    yyyy/mm/dd | AAAYYYYMMDD | xxxxxxxxxxxx | *
    REPORT YX30_UPLOAD_QUALITY_INFO MESSAGE-ID yx30_conversions
    no standard page heading line-size 255.
    include yx30_upload_quality_info_top. "Include for Variable Declaration & Selection Screen
    include yx30_upload_quality_info_data. "Include for File read & Authority Check
    *& At Selection Screen Output *
    AT SELECTION-SCREEN OUTPUT. "PBO
    PERFORM fill_parameters.
    *& Start Of Selection Event *
    start-of-selection.
    Perform Authority_check. "Subroutine for authority check
    Perform prepare_file. "Subroutine for preparing file
    perform file_read. "Subroutine for File read
    perform update_qi01. "Subroutine for Uploading data
    perform write_error_log1. "Subroutine for writing error log
    *& Form write_error_log
    text
    --> p1 text
    <-- p2 text
    *& Include YX30_UPLOAD_QUALITY_INFO_TOP
    Type Declaration
    Types: Begin of type_qtyinf,
    matnr type matnr, "Material No
    lieferant type char10, "Vendor
    werk type werks_d, "Plant
    frei_dat type char10, "Frei_Dat
    stsma type char8, "Stsma
    anwso_01 type char1, "ANWSO(01)
    anwso_02 type char1, "ANWSO(02)
    anwso_03 type char1, "ANWSO(03)
    end of type_qtyinf.
    Internal Table Declaration
    Data: itab_qtyinf type standard table of type_qtyinf. "Internal table for QTYINF.
    Work Area Declaration
    Data: wa_qtyinf type type_qtyinf. "Work Area for QTYINF.
    Variable Declaration
    Data: v_file_qtyinf type string, "Source File Name
    v1 type string,
    v2 type string,
    v3 type string,
    v_file_return type string,
    v_lin TYPE n.
    *Selection Screen Declaration
    selection-screen *
    SELECTION-SCREEN BEGIN OF BLOCK blk1
    WITH FRAME TITLE text-s01.
    PARAMETER:
    p_sysid(3) TYPE c OBLIGATORY , "Source System
    p_bukrs(4) TYPE c OBLIGATORY , "Source CompCode
    p_samshr type char30 lower case obligatory default '/sap_upload/' , "Samba Share Drive
    p_object TYPE CHAR10 OBLIGATORY default 'MAT' . "Migration Data Object
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN SKIP 3.
    PARAMETER:
    cb_pfill TYPE c AS CHECKBOX DEFAULT 'X' . "Prefill values?
    SELECTION-SCREEN COMMENT /1(79) text-s1a.
    SELECTION-SCREEN BEGIN OF BLOCK blk3
    WITH FRAME TITLE text-s03.
    PARAMETER:
    pa_filn1(500) TYPE c LOWER CASE
    VISIBLE LENGTH 50 , "Filename AppServer
    pa_dlimt TYPE c DEFAULT ';' . "Field Delimter
    SELECTION-SCREEN END OF BLOCK blk3.
    include bdcrecx1. "Include for the subroutine
    *& Include YX30_UPLOAD_QUALITY_INFO_DATA
    *& Form file_read
    Subroutine for reading the source file into internal table
    --> p1 text
    <-- p2 text
    FORM file_read .
    DATA:
    single_line TYPE string .
    *-- read file, split lines into fields and put data into table
    OPEN DATASET v_file_qtyinf FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files
    IF sy-subrc EQ 0.
    DO.
    READ DATASET v_file_qtyinf INTO single_line. "Reading the content of file into line
    IF sy-subrc = 0.
    IF sy-index > 1. "skip header-line
    SPLIT "Split the content of line into work area
    single_line
    AT ';'
    INTO
    wa_qtyinf-matnr "Material No
    wa_qtyinf-lieferant "Vendor
    wa_qtyinf-werk "Plant
    wa_qtyinf-frei_dat "Frei Date
    wa_qtyinf-stsma "STSMA
    wa_qtyinf-anwso_01 "ANWSO_01
    wa_qtyinf-anwso_02 "ANWSO_02
    wa_qtyinf-anwso_03. "ANWSO_03
    APPEND wa_qtyinf TO itab_qtyinf. "Appending Work Area to internal table
    ENDIF.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    CLOSE DATASET v_file_qtyinf. "Closing the files
    ELSE.
    MESSAGE e015 .
    ENDIF.
    DESCRIBE TABLE itab_qtyinf LINES v_lin.
    IF v_lin LT 0.
    MESSAGE e016 .
    ENDIF.
    ENDFORM. " file_read
    *& Form fill_parameters
    Subroutine for getting the file name
    FORM fill_parameters .
    IF cb_pfill = 'X'.
    Preparing QTYINF File
    CONCATENATE p_sysid '_forward' INTO v3.
    CONCATENATE p_sysid '_QTYINF_' p_bukrs '.CSV' INTO v2.
    CONCATENATE p_samshr v3 '/' p_object '/' v2 INTO pa_filn1.
    ENDIF.
    ENDFORM. " fill_parameters
    *& Form Authority_check
    Authority Check
    --> p1 text
    <-- p2 text
    FORM authority_check .
    Authority Check For the Migration
    AUTHORITY-CHECK OBJECT 'YX30_MIGR'
    ID 'SYSTEM' FIELD p_sysid
    ID 'BUKRS' FIELD p_bukrs
    ID 'YX30_DMOBJ' FIELD p_object
    ID 'ACTVT' FIELD '16'.
    IF sy-subrc <> 0.
    MESSAGE e010 WITH p_sysid p_bukrs p_object.
    ENDIF.
    ENDFORM. " Authority_check
    *& Form prepare_file
    text
    --> p1 text
    <-- p2 text
    FORM prepare_file .
    CONCATENATE p_sysid '_forward' INTO v3.
    CONCATENATE p_sysid '_QTYINF_' p_bukrs '.CSV' INTO v2.
    CONCATENATE p_samshr v3 '/' p_object '/' v2 INTO v_file_qtyinf.
    CLEAR v3.
    CLEAR v2.
    Prepare Return File
    CONCATENATE p_sysid '_forward' INTO v3.
    CONCATENATE p_sysid '_RETRUN_LOG_' p_bukrs '.CSV' INTO v2.
    CONCATENATE '/sap_upload/' v3 '/' 'MAT' '/' v2 INTO v_file_return.
    ENDFORM. " prepare_file
    *& Form update_qi01
    text
    FORM update_qi01.
    PERFORM open_group. "Opening a session
    CLEAR wa_qtyinf.
    LOOP AT itab_qtyinf INTO wa_qtyinf.
    PERFORM bdc_dynpro USING 'SAPMQBAA' '0100'. "Subroutine for mapping data
    PERFORM bdc_field USING 'BDC_CURSOR'
    'QINF-MATNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'QINF-MATNR'
    wa_qtyinf-matnr. "Mapping the material
    PERFORM bdc_field USING 'QINF-LIEFERANT'
    wa_qtyinf-lieferant. "Mapping the vendor
    PERFORM bdc_field USING 'QINF-WERK'
    wa_qtyinf-werk. "Mapping the plant
    PERFORM bdc_dynpro USING 'SAPMQBAA' '0101'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=STAN'.
    PERFORM bdc_field USING 'QINF-FREI_DAT'
    wa_qtyinf-frei_dat.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'QINF-STSMA'.
    PERFORM bdc_field USING 'QINF-STSMA'
    wa_qtyinf-stsma. "Mapping the status
    PERFORM bdc_dynpro USING 'SAPLBSVA' '0201'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'J_STMAINT-ANWSO(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=OKAY'.
    IF wa_qtyinf-anwso_01 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
    wa_qtyinf-anwso_01. "Mapping the anwso(01)
    ELSEIF wa_qtyinf-anwso_02 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
    wa_qtyinf-anwso_02. "Mapping the anwso(02)
    ELSEIF wa_qtyinf-anwso_03 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
    wa_qtyinf-anwso_03. "Mapping the anwso(03)
    ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_02 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
    wa_qtyinf-anwso_01.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
    wa_qtyinf-anwso_02.
    ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
    wa_qtyinf-anwso_01.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
    wa_qtyinf-anwso_03.
    ELSEIF wa_qtyinf-anwso_02 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
    wa_qtyinf-anwso_02.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
    wa_qtyinf-anwso_03.
    ELSEIF wa_qtyinf-anwso_01 = 'X' AND wa_qtyinf-anwso_02 = 'X' AND wa_qtyinf-anwso_03 = 'X'.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(01)'
    wa_qtyinf-anwso_01.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(02)'
    wa_qtyinf-anwso_02.
    PERFORM bdc_field USING 'J_STMAINT-ANWSO(03)'
    wa_qtyinf-anwso_03.
    ENDIF.
    PERFORM bdc_dynpro USING 'SAPMQBAA' '0101'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'QINF-FREI_DAT'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=QMBU'.
    PERFORM bdc_field USING 'QINF-FREI_DAT'
    wa_qtyinf-frei_dat.
    PERFORM bdc_field USING 'QINF-STSMA'
    wa_qtyinf-stsma.
    PERFORM bdc_transaction USING 'QI01'.
    ENDLOOP.
    PERFORM close_group. "Closing the session
    ENDFORM. "update_qi01
    *& Form write_error_log
    text
    --> p1 text
    <-- p2 text
    FORM write_error_log1 .
    DATA:
    single_line TYPE string,
    v_msg TYPE string,
    v_msg1 TYPE string.
    *-- read file, split lines into fields and put data into table
    OPEN DATASET v_file_return FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files
    IF sy-subrc EQ 0.
    CONCATENATE text-020 v_lin INTO v_msg SEPARATED BY space.
    CONCATENATE text-021 v_lin INTO v_msg1 SEPARATED BY space.
    TRANSFER: v_msg TO v_file_return.
    TRANSFER: v_msg1 TO v_file_return.
    WRITE:/ v_msg.
    WRITE:/ v_msg1.
    ENDIF.
    ENDFORM. " write_error_log
    with regards.
    sowjanya.b.

  • Block based on "From clause query" and substitution variable

    Hi Folks,
    I have a "From clause query" block type, which is based on query that uses a substitution variable (:BLOCK.COLUMN) from previous block. When I run a query, then I obtain an error: ORA-01008: not all variables bound.
    My query looks like:
    select seq_no, prod_code, descr, curr_code,
           max(decode(sched_type_code,'ROLLOVER',amt,0)) OUTSTD_DRAW,
           max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) OUTSTD_INTEREST_FEE
    from
        select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
          from repay_scheds r,
               fac_prods f
         where r.fac_no = f.fac_no
           and r.prod_code = f.prd_code
           and r.prod_seq_no = f.seq_no
           and r.fac_no = :B2.FAC_NO
           and r.trans_ref_from is not null
           and r.status         <> 'P'
        group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
    group by seq_no, prod_code, descr, curr_code
    having max(decode(sched_type_code,'ROLLOVER',amt,0)) >0 or max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) > 0Once I replace that substitution variable in query condition with some exact test number then it works fine.
    select seq_no, prod_code, descr, curr_code,
           max(decode(sched_type_code,'ROLLOVER',amt,0)) OUTSTD_DRAW,
           max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) OUTSTD_INTEREST_FEE
    from
        select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
          from repay_scheds r,
               fac_prods f
         where r.fac_no = f.fac_no
           and r.prod_code = f.prd_code
           and r.prod_seq_no = f.seq_no
           and r.fac_no = 2012500
           and r.trans_ref_from is not null
           and r.status         <> 'P'
        group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
    group by seq_no, prod_code, descr, curr_code
    having max(decode(sched_type_code,'ROLLOVER',amt,0)) >0 or max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) > 0How can I use substitution variable within query for "From clause query" block type? Or any other way how to get the same result?
    Thanks for your reply.
    Tomas

    I have a solution:
    Before entering block I'm calling function, that populates my block:
    PROCEDURE POP_<<MY_BLOCK>>_BLOCK IS
      query_txt varchar2(2000);
    BEGIN
       query_txt := '(select seq_no, prod_code, descr, curr_code,
                            max(decode(sched_type_code,''ROLLOVER'',amt,0)) OUTSTD_DRAW,
                            max(decode(sched_type_code,''INTCHG'',amt,decode(sched_type_code,''FEEREC'',amt,0))) OUTSTD_INTEREST_FEE
                                                  from
                                                     select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
                                                       from repay_scheds r,
                                                            fac_prods f
                                                      where r.fac_no = f.fac_no
                                                        and r.prod_code = f.prd_code
                                                        and r.prod_seq_no = f.seq_no
                                                        and r.fac_no = '||:B2.FAC_NO||'
                                                        and r.trans_ref_from is not null
                                                        and r.status         <> ''P''
                                                     group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
                                                 group by seq_no, prod_code, descr, curr_code
                                                 having max(decode(sched_type_code,''ROLLOVER'',amt,0)) >0 or max(decode(sched_type_code,''INTCHG'',amt,decode(sched_type_code,''FEEREC'',amt,0))) > 0)';
       Go_Block('<<MY_BLOCK>>' );
       Clear_Block ;
       Set_Block_Property( '<<MY_BLOCK>>', QUERY_DATA_SOURCE_NAME, query_txt) ;
       -- populate my  block --
       Execute_Query ;
    END;Thanks,
    Tomas

  • Identifing which session is blocking which session

    Dear All,
    We are having 500 user we don't have Database administrator.
    All of us are Form6i/Report6i developers.
    We do basic DBA activities liking creation of user, taking backup etc.
    Recently we have started facing follwoing problem:
    1) Our HR department uses 5-10 different types of report.
    Other departments uses 1-5 types of reports.
    HR & Other department even though refering to different reports are using some common tables which are used in HR as wel as Other department's report.
    Report of HR gets hanged.
    What we observe in "Enterprise Manager Console" in session that there are non HR user which are also running report.
    The information we see is "Memory Usage","I/O reads","CPU time","Session","User" and so on. We just see who is using maximum memory or CPU time or I/O reads and on basis of that we kill the user (which may be inappropriate)
    What we are enable to understand is at that point of time which user SQL is blocking which user.
    e.g: user "PKP0001" session is inactive and he calls us and tells my report is hanged. We want to identify which user if we kill will allow "PKP0001" user's report to get executed.
    2) User executes there report and get the result on the screen. User gets what he wants but when we see in Enterprise Manager Console" in session even though his task is complete it shows status as inactive with his high "I/O reads","Memory", "CPU" time. so we have to identify and call that user confirm whether he is running any form or report if not then kill his session or ask him to close the application.
    In this case how would we identify without asking the user whether he doing something or not.
    Any mehtod we need to implement in our form6i and report 6i which will take care of that.
    Kindly suggest as soon as possible.
    Thanking You in anticipation.
    Devendra .

    Devendra,
    It is fairly easy to determine which session is blocking another session. Take a look at the SQL statements in this thread (the SQL statements are not well explained, but the output might be understandable):
    enq TX  locked row
    The first, which queries V$SESSION_WAIT and V$SESSION, shows the wait event (on 10g and above, provides a better clue as to the reason session is waiting), the number of seconds waiting, SQL_ADDR and SQL_HASH_VALUE (may be used to find the SQL statement the session submitted), and details potentially describing the object being waited on, the specific absolute data file number, the block number, and the row within the block (DBMS_ROWID.ROWID_CREATE may be used to generate a ROWID to use to query the table in order to determine the actual contents of the row being waited on). The definition of P1, P2, and P3 vary by the type of wait event. In this case, lock mode and lock type for the waiting session may be derived from the P1 value.
    The second, which queries V$LOCK and V$SESSION, shows the two sessions involved in the lock. SID 150, in all cases is blocking SID 143 (as indicated by the BLOCK column). The other columns returned may be used to determine the SQL statements executed by each session (the SQL statement should have retrieved SQL_ADDR also on 10g and above), and the type of locks involved by both sessions.
    Other examples:
    Thorough example of using the information from V$LOCK:
    http://jonathanlewis.wordpress.com/2008/02/06/trouble-shooting-2/
    "How do you find out who is locking a specific row in a table?"
    http://www.jlcomp.demon.co.uk/faq/row_locker.html
    "Enqueue Waits and Locks" by Kyle Hailey:
    http://www.nocoug.org/download/2006-08/unit5_enqueues.ppt
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Session ids blocking themselves

    theres a scenario where in a session id is blocking itself. the wait type is latch_ex - access_method_database_parent
    I am capturing the queries and will work on optimizing them however am looking for possible reasons for this.
    Environment
    Windows server 2008 sp2, SQL Server 2008 R2 ent sp1, CPU=32 , RAM 32
    Server level MAXDOP=0 tried changing it to 16 but the problem persists.
    Thanks, Ahmad Osama www.ahmadosama.net http://www.sqlservergeeks.com/people/AhmadOsama

    When an SPID is waiting for an I/O page latch, you may notice that the
    blocked column briefly reports that the SPID is blocking itself. This behavior is a side effect of the way that latches are used for I/O operations on data pages. When a thread issues an I/O request, the SPID that issues the I/O request acquires a
    latch on the page. All SQL Server 2000 I/O operations are asynchronous. Therefore, the SPID will try to acquire another latch on the same page if the SPID that issued the I/O request must wait for the request to finish. This second latch is blocked by the
    first latch. Therefore, the blocked column reports that the SPID is blocking itself. When the I/O request finishes, the first latch is released. Then, the second latch request is granted.
    Y'know, maybe I have seen this but not recently, I think I may have seen this in the 2005-2008 era when some of these behaviors were new.  That is I noticed them, I guess they're probably still occurring but these days, any block that clears itself
    within a second or two has not been my highest priority!  Self-deadlocks, that's a whole other thing!
    This may be enough answer for OP - parallel plan, threads fighting over a common page but not really, just queueing up for it.  20-30% CPU is nothing to worry about even as a constant, it's CERTAINLY nothing to worry about if the average is lower and
    30% is the peak!
    Though if that kind of thing *is* the cause, and the condition lasts for more than a second, I'd be curious just what the query is doing!  Maybe a whole bunch of child rows being changed with foreign keys to the same parent?
    Josh
    As I said .. I don't think its related to data pages ...
    http://www.sqlskills.com/blogs/paul/most-common-latch-classes-and-what-they-mean/
    http://www.sqlservercentral.com/Forums/Topic969963-360-1.aspx
    Thanks, Ahmad Osama www.ahmadosama.net http://www.sqlservergeeks.com/people/AhmadOsama

  • Index Usage from SQL query in Oracle Forms

    Would using LIKE/OR in where clause (of an indexed column) will force the the query to NOT use INDEX. We have these where clause in Oracle Forms Records Group.
    Below are two examples...
    1. If we have a where clause with LIKE would that NOT use the index?
    Example: ColumnName like :block.Column||%
    2. How about having an OR clause?
    Example: and (ColumnName = :block.column or :block.column is null)
    Thanks

    Hi
    Answer 1: Where with like clause WOULD use the index.
    In this example index on ColumnName
    Answer 2: Write better where:
    Example: and (:block.column is null or ColumnName = :block.column)
    When :block column is null then statement after 'or' is not used. Index will not be used with RBO, i think.
    The best way to be sure is to look at explain plan on the original query.
    Regards
    Kuba

  • How can I store a form name with path and then call form from a table

    Is it possible that any form that I built I store that form in some table in DB and then call that form from table, if yes, then how can i get this functionality. I am not very experience in form and do not know if it can be done because i think if it is possible then this can be a good security for application and easy to handle as well.
    Thanks in advance
    Maz

    If you have a Forms block based on this table:
    declare
      module varchar2(100);
    begin
      module := :block.column;
      call_form ( module ) ;
    end;If you don't have any blok based on that table
    declare
      module varchar2(100);
    begin
      select  module_name
      into module
      from ...
      where ...
      call_form ( module ) ;
    end;Francois

Maybe you are looking for

  • Help needed in Extending HeaderVO -VERY URGENT!!

    Hello, I need a urgent help. Actually I am trying to modify the exisiting Print Quote Document which is actually getting called from a template cald ASOPRINTQUOTE.xsl This particular xsl uses HeaderVO, LinesVO and PromptVO and hence I had to modify t

  • PO SMS to vendor

    Dear All,               I want to send sms to vendor at the time of purchase order creation (ME21N). but issue is no user exit or BADI (ME_PROCESS_PO_CUST ) works (hit) in ME21N. Pls suggest me for sending sms........ Thanks in advance, Tarun

  • The Connection Was Reset

    Hi. I'm running the latest version of iTunes on a 2011 iMac. For about the last month, whenever I download a purchased TV show or movie and occasionally apps (esp Apple apps), I get a notice that there has been an error. There is no error number list

  • UWL in Federated Portal Network

    Hi All, Can anyone please suggest how UWL works in case of Federated Portal Network? I have a requirement to show the tasks, alerts, notifications from more then one Producer in the same UWL iview on Consumer. I followed the steps as mentioned in the

  • Open Window with Javascript

    Good Morning All, I am trying to open use a button in captivate to launch another .swf movie and am having no luck. I have reviewed all of the posts here in the forums, but I still cannot seem to get it to work. So, I apologize for posting this again