Program Logic to read a table.

Hi,
Program is to be created which reads the (third party named: ABC) table and populates table content into local table(XYZ)...
The program will be scheduled to run several times daily.  It compares table content between ABC shared table and XYZ local table.
-    For ABC record that does not exist in XYZ local table, update ABC record in XYZ local table with current timestamp.
-    For XYZ record that does not exist in ABC shared table, remove XYZ record.
-    For ABC record = XYZ record, no action. 
Hope the requirement is clear.
Thanks in advance.
Regards,
Syed.

Syed,
>30 (27 unresolved) questions
and...
> Hi ,
>
> It is bit urgent.
>
> regrds
I already deleted cross-posted versions of your question in another forum.
So those are 3 forum rules (see sticky thread at the top of the forum) which you are not keeping.
Mike is right. You need to write a program and discuss aspects of it here.
These forums are not intended to be used for posting program specs and expecting the program code in return.
Thread locked.
Julius

Similar Messages

  • How to add business logic before populating the read only tables.

    Hi All
    Could you please suggest something for the following requirement:
    I want to populate read only tables from the data control pallete(Based on VO) into the jsff. But Before populating the table I want to add conditions based on what the data should appear in the table.
    For e.g:
    There is a VO fetching the completed and pending tasks by the user. Only one VO is there to fetch the tasks but different tables are used to show the pending and completed tasks..I have created the bind variable for the task status.
    Shall I need to add business logic in the backing bean for jsff which is having the setter and getter for the tables.
    Regards,
    Kanika

    Hi,
    why don't you specify ViewCriteria on the View Object you use and use a bind variable to filter the table data? You can apply ViewCriteria in the AM data model so that they only show e.g. completed tasks, or you can assign a view criteria that uses bind variables, in which case the table is filtered dynamically by the value of the bind variable, or you use Java code to dynamically apply the View Criterias
    Frank

  • Programming logic, passing data from a page to another

    Hi,
    I just began with developing with APEX 4.1.1, and I think I don't get how I should use it efficiently, I am more used to C-like programming.
    I have a table which contains the state of some electricity meters taken at some non-regularly spaced dates. I want to make a chart of the electricity consumption, e.g for each month. This (I think) implies that the application must do that (I used this logic for the same application made with php and sqlite and it worked):
    - User chooses a meter
    - Application tells him the available range of dates and the mean interval between measurements
    - User chooses the range of dates and the interval
    - Application verifies that the range of dates is valid (not outside the real data)
    - Interpolate the state of the meters at the requested regular interval
    - Calculate the consumption for each interval (simply a difference)
    - Draw the chart
    For now, I created some procedures which should pass a custom data type containing all the meta-data about the chart and a PL/SQL table containing the actual data to be charted, but I'm stuck at the point of interacting with the user (meaning writing the output of the procedures on a page and passing them to the next procedure and also charting that pl/sql table).
    Maybe should I create a temporary table ? But of what I read, this is a "real" table stored on the disk, and I just need this data once (and it is a small dataset, at most 20 points or so) for drawing a chart. This table should also be specific to the chart currently being created, it could happen that the same user or different users make multiple charts at the same time (like in two firefox tabs).
    I hope my post is not too confused..
    Ben

    940065 wrote:
    Hi,
    I just began with developing with APEX 4.1.1, and I think I don't get how I should use it efficiently, I am more used to C-like programming.Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "940065".
    APEX is intended for the development of database centric applications. It's a physical implementation of Tom Kyte's philosophy of database application development—possibly replacing Java with JavaScript ;-) .
    To use it efficiently you need to stop thinking procedurally in C-like terms and think in terms of the set operations that SQL uses effectively.
    I have a table which contains the state of some electricity meters taken at some non-regularly spaced dates. I want to make a chart of the electricity consumption, e.g for each month. This (I think) implies that the application must do that (I used this logic for the same application made with php and sqlite and it worked):
    - User chooses a meter
    - Application tells him the available range of dates and the mean interval between measurements
    - User chooses the range of dates and the interval
    - Application verifies that the range of dates is valid (not outside the real data)
    - Interpolate the state of the meters at the requested regular interval
    - Calculate the consumption for each interval (simply a difference)
    - Draw the chart
    For now, I created some procedures which should pass a custom data type containing all the meta-data about the chart and a PL/SQL table containing the actual data to be charted,
    but I'm stuck at the point of interacting with the user (meaning writing the output of the procedures on a page and passing them to the next procedure and also charting that pl/sql table).It seems that you don't really get APEX yet: have you read the introductory documentation and taken the <i>Oracle® Database 2 Day + Application Express Developer's Guide</i> tutorial in order to understand basic APEX techniques and terminology?
    You should be aiming to collect and validate the required parameters in APEX session state values and use the built-in charting capability with SQL data sources that use these parameter values in query predicates.
    If you really can't generate the chart series from queries run on the original table, generate the chart data using an APEX collection rather than a "PL/SQL table" (preferred terminology is "collection type", but it's even better to specifically say "associative array", "nested table" or "varying array") or temporary database table.
    Maybe should I create a temporary table ? But of what I read, this is a "real" table stored on the disk, and I just need this data once (and it is a small dataset, at most 20 points or so) for drawing a chart. This table should also be specific to the chart currently being created, it could happen that the same user or different users make multiple charts at the same time (like in two firefox tabs).Temporary tables are rarely required in any Oracle application, but standard Oracle Global Temporary Tables are database-session specific and so have no concurrency issues. However there are issues when using them in APEX, so APEX collections are the preferred method for temporary, session-based storage.

  • Programming Logic required for pulling the records for past month /week

    Hi All
    I need help in the SQL programming logic.
    Oracle Database Version: 10.2.0.3.0
    Requirement
    In a data warehouse environment, I need to programme for weekly and monthly automated batch jobs to insert the data from Data_tbl to Reporting_tbl for generating reports. Tables descriptions are given below.
    Table1 - Data_tbl (Source table –this table gets updated everyday).
    Record_dt     first_name     last_name
    Table2 - Reporting_tbl_(Target table)
    Cycle_dt     first_name     last_name
    1. Monthly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’
    Using the above condition in development, I am pulling the data from source table for the past month data. This will be repeated every month and it should be automated.
    i.e., if I run this report any time in dec 2008, it should pick records of dates from Nov 01st to Nov 30th 2008. if I run this report any time in Jan 2009, it should pick records of dates from Dec 01st to Dec 31st 2008.
    Date Values should be assigned for past month. Value of Cycle_dt in target table should be end date of past month like 30-nov-2008, 31-dec-2008.
    2. Weekly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’
    Here week start day is Monday and end day is Sunday.
    If I run the report between Dec 08th to Dec 14th , it should pull records of dates from Dec 01st to Dec 07th 2008.
    On Dec 15th, it should pick from Dec 08th to Dec 14th.
    Value of Cycle_dt in target table should be end date of past week like 07-Dec-2008, 14-Dec-2008.
    Please help me with the logics for both Monthly and Weekly reports.
    Thanks

    Hi,
    For the monthly report, instead of
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’say:
    Where   Record_dt >= TRUNC (ADD_MONTHS (SYSDATE, -1), 'MM')
    and     record_dt <  TRUNC (SYSDATE, 'MM')SYSDATE is the current DATE.
    TRUNC (SYSDATE, 'MM') is the beginning of the current month. (Notice the condition above is less than this date, not equal to it.)
    ADD_MONTHS (STSDATE, -1) is a date exactly one month ago, therefore it is in the previous month.
    For the weekly report, instead of:
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’say
    Where   Record_dt >= TRUNC (SYSDATE - 7, 'IW')
    and     record_dt <  TRUNC (SYSDATE, 'IW')TRUNC (dt, 'IW') is the beginning of the ISO week (Monday-Sunday) that contains dt. Again, notice the end condition is strictly less than the beginning of the current week.

  • Problem with programming logic in code

    I have hit a programming logic problem. What I wanted is for my main program to create a jDialog according to user's choice selection from a jOptionPane and the code in the main body to stop running and rather wait for the user to select the option in the jDialog and then go back to running the main code body but somehow my program doesn't work that way. Anyone have any ideas how to fix it ?
    Object[] obj = {"Specific Date","Month/Year"};
                String input = (String) JOptionPane.showInputDialog(this,"Choose the following ways to select a date.","Select Date",JOptionPane.INFORMATION_MESSAGE,null,obj,obj[0]);
                if(input.equals("Specific Date")){
                    jDialog1.setSize(400,250);
                    jDialog1.setVisible(true);
                    //while(option!=1){
                    //System.out.println("waiting");
                    if(option==1){
                        System.out.println("Year: "+chosenYear);
                        //break;
                        data.append("<H1>Other Day / Month / Year Record</H1>");
                        data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                        System.out.println("breaking out soon...");
                } else if(input.equals("Month/Year")){
                    jDialog2.setSize(300,200);
                    jDialog2.setVisible(true);
                    //while(option!=1){
                    //System.out.println("waiting");
                    if(option==1){
                        System.out.println("Year: "+chosenYear);
                        //break;
                        data.append("<H1>Other Day / Month / Year Record</H1>");
                        data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                        System.out.println("breaking out soon...");
    //            data.append("<H1>Other Day / Month / Year Record</H1>");
    //            data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                System.out.println("break executed...");As you can see...I was originally thinking to use a while loop but it failed so I commented it out. I have been stuck in this programming logic of waiting for the user to choose an option form the jDialog before continuning in the main body. The jDialogs are already initiatized and both jDialogs would set the 'option' variable which has been init earlier on (the code is really too long to be placed here to '1' when it is ready for the program to resume to run the main body of the codes as you can see.
    So anyone have any ideas how to get it solved ?
    I do need a solution fast because these codes have a deadline in 2 weeks time.
    null

    Here's the entire code for this java class.
    * ExportRecord.java
    * Created on September 7, 2007, 2:03 PM
    package lkgaccount;
    import java.util.ArrayList;
    import java.util.Calendar;
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    * @author  Owner
    public class ExportRecord extends javax.swing.JInternalFrame {
        export exp = new export();
        String filepath = "";
        File toFile;
        StringBuffer data;
        HTMLBrowser htmlbrowser;
        int subOption = 0;
        int chosenDay;
        int chosenMonth;
        String chosenMth;
        int chosenYear;
        CodeManager cm = new CodeManager();
        /** Creates new form ExportRecord */
        public ExportRecord() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            jPanel2 = new javax.swing.JPanel();
            jButton6 = new javax.swing.JButton();
            jLabel6 = new javax.swing.JLabel();
            jCalendar1 = new com.toedter.calendar.JCalendar();
            jDialog2 = new javax.swing.JDialog();
            jPanel4 = new javax.swing.JPanel();
            jButton10 = new javax.swing.JButton();
            jLabel7 = new javax.swing.JLabel();
            jComboBox2 = new javax.swing.JComboBox();
            jSpinner1 = new javax.swing.JSpinner();
            jLabel8 = new javax.swing.JLabel();
            jLabel1 = new javax.swing.JLabel();
            jComboBox1 = new javax.swing.JComboBox();
            jButton1 = new javax.swing.JButton();
            jLabel2 = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            jLabel3 = new javax.swing.JLabel();
            jTextField2 = new javax.swing.JTextField();
            jButton2 = new javax.swing.JButton();
            jLabel4 = new javax.swing.JLabel();
            jTextField3 = new javax.swing.JTextField();
            jLabel5 = new javax.swing.JLabel();
            jPanel1 = new javax.swing.JPanel();
            jButton5 = new javax.swing.JButton();
            jButton4 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            jDialog1.setTitle("Search By Date");
            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Search By: Date ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            jButton6.setText("Submit");
            jButton6.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton6ActionPerformed(evt);
            jLabel6.setText("Date Parameter:");
            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel6)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jCalendar1, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap(255, Short.MAX_VALUE)
                    .addComponent(jButton6)
                    .addContainerGap())
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel6)
                        .addComponent(jCalendar1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                    .addComponent(jButton6)
                    .addContainerGap())
            jDialog1.getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
            jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Search By: Month/Year", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            jButton10.setText("Submit");
            jButton10.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton10ActionPerformed(evt);
            jLabel7.setText("Month: ");
            jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "*" }));
            jLabel8.setText(" Year:    ");
            javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
            jPanel4.setLayout(jPanel4Layout);
            jPanel4Layout.setHorizontalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel7)
                                .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jSpinner1)
                                .addComponent(jComboBox2, 0, 167, Short.MAX_VALUE)))
                        .addComponent(jButton10, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap())
            jPanel4Layout.setVerticalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel7)
                        .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel8))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton10)
                    .addContainerGap())
            jDialog2.getContentPane().add(jPanel4, java.awt.BorderLayout.CENTER);
            setTitle("Export Record");
            jLabel1.setText("Export by: ");
            jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Daily Record", "Current Month's Record", "Current Year's Record", "Other Day / Month / Year Record", "Supplier Names", "All Account Records" }));
            jButton1.setText("Close");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jLabel2.setText("Export as: ");
            jTextField1.setEditable(false);
            jTextField1.setText(".html");
            jLabel3.setText("Save to: ");
            jButton2.setText("...");
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
            jLabel4.setText("File Name: ");
            jLabel5.setText("( do not add a file extension behind )");
            jButton5.setText("Clear");
            jButton5.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton5ActionPerformed(evt);
            jPanel1.add(jButton5);
            jButton4.setText("Preview");
            jButton4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton4ActionPerformed(evt);
            jPanel1.add(jButton4);
            jButton3.setText("Export");
            jButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton3ActionPerformed(evt);
            jPanel1.add(jButton3);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel3)
                                        .addComponent(jLabel2)
                                        .addComponent(jLabel4))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
                                        .addComponent(jTextField1)
                                        .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
                                        .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE))))))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(12, 12, 12)
                            .addComponent(jButton1))
                        .addGroup(layout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jButton2)
                        .addComponent(jLabel3))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)
                    .addComponent(jButton1)
                    .addContainerGap())
            pack();
        }// </editor-fold>//GEN-END:initComponents
        private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
    // TODO add your handling code here:
            String mth = (String)jComboBox2.getSelectedItem();
            Integer yr = (Integer)jSpinner1.getValue();
            subOption = 2;
            chosenMth = mth;
            chosenYear = (int)yr;
        }//GEN-LAST:event_jButton10ActionPerformed
        private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
    // TODO add your handling code here:
            Calendar calendar = jCalendar1.getCalendar();
            int day = calendar.get(Calendar.DATE);
            int month = calendar.get(Calendar.MONTH);
            int year = calendar.get(Calendar.YEAR);
            month ++;
            System.out.println("calendar: "+day+"/"+month+"/"+year);
            subOption = 1;
            chosenDay = day;
            chosenMonth = month;
            chosenYear = year;
        }//GEN-LAST:event_jButton6ActionPerformed
        private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
    // TODO add your handling code here:
            int index = jComboBox1.getSelectedIndex();
            String folderExt = jTextField2.getText();
            String fileName = jTextField3.getText();
            String urlpath = folderExt+"\\"+fileName+".html";
            System.out.println(urlpath);
            if(folderExt.equals("")||fileName.equals("")){
                JOptionPane.showMessageDialog(this,"Please specific which folder and the name of the file you want to save your exported documents.","Folder and file not specified",JOptionPane.INFORMATION_MESSAGE);
            } else{
                toFile = new File(urlpath);
                if(toFile.exists()){
                    JOptionPane.showMessageDialog(this,urlpath+" has already existed. Please enter a new file name. ","File Exist",JOptionPane.WARNING_MESSAGE);
                data = new StringBuffer();
                data = getData(data,index,fileName);
                exp.writeHTML(data,toFile);
                if(htmlbrowser!=null){
                    htmlbrowser.dispose();
                    htmlbrowser = new HTMLBrowser("file:/"+urlpath);
                    htmlbrowser.setVisible(true);
                } else{
                    htmlbrowser = new HTMLBrowser("file:/"+urlpath);
                    htmlbrowser.setVisible(true);
        }//GEN-LAST:event_jButton3ActionPerformed
        private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
    // TODO add your handling code here:
            int index = jComboBox1.getSelectedIndex();
            toFile = new File("C:\\Documents and Settings\\Owner\\LKGAccount\\dist\\preview.html");
            if(toFile.exists()){
            data = new StringBuffer();
            data = getData(data,index,"Preview");
            exp.writeHTML(data,toFile);
            if(htmlbrowser!=null){
                htmlbrowser.dispose();
                htmlbrowser = new HTMLBrowser("file:/C:\\Documents and Settings\\Owner\\LKGAccount\\dist\\preview.html");
                htmlbrowser.setVisible(true);
            } else{
                htmlbrowser = new HTMLBrowser("file:/C:\\Documents and Settings\\Owner\\LKGAccount\\dist\\preview.html");
                htmlbrowser.setVisible(true);
        }//GEN-LAST:event_jButton4ActionPerformed
        private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
    // TODO add your handling code here:
            jComboBox1.setSelectedIndex(0);
            jTextField2.setText("");
            jTextField3.setText("");
        }//GEN-LAST:event_jButton5ActionPerformed
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    // TODO add your handling code here:
            this.dispose();
        }//GEN-LAST:event_jButton1ActionPerformed
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    // TODO add your handling code here:
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                filepath = chooser.getSelectedFile().getAbsolutePath();
            jTextField2.setText(filepath);
        }//GEN-LAST:event_jButton2ActionPerformed
        public StringBuffer getData(StringBuffer data, int option, String filename){
            ArrayList aList = new ArrayList();
            Date date = new Date();
            int todayDay = date.getDay();
            int todayMonth = date.getMonth();
            int todayYear = date.getYear();
            data.append("<html>");
            data.append("<head>");
            data.append("<title>Lim Kim Guan Accounting Record: "+filename+"</title>");
            data.append("</head>");
            data.append("<body>");
            if(option==0){
                data.append("<H1>Daily Record</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                aList = cm.searchByDate(todayDay,todayMonth,todayYear);
                if(aList==null||aList.isEmpty()){
                    data.append("<p><center><b>There is no data transaction for today.</b></center></p>");
                } else{
                    data.append("<center><table border=\"1\">");
                    data.append("<tr>");
                    data.append("<td colspan=\"7\"><center><b>Accounting Records</b></center></td>");
                    data.append("</tr>");
                    data.append("<tr>");
                    data.append("<td><center><B>Acct ID</B></center></td>");
                    data.append("<td><center><B>Supplier Name</B></center></td>");
                    data.append("<td><center><B>Invoice #</B></center></td>");
                    data.append("<td><center><B>Original $ before GST</B></center></td>");
                    data.append("<td><center><B>GST(%)</B></center></td>");
                    data.append("<td><center><B>$ after GST</B></center></td>");
                    data.append("<td><center><B>Date</B></center></td>");
                    data.append("</tr>");
                    for(int i=0;i<aList.size();i++){
                        account acct = (account)aList.get(i);
                        if(acct != null) {
                            data.append("<tr>");
                            data.append("<td>"+Integer.toString(acct.getId())+"</td>");
                            data.append("<td>"+acct.getSupplierName()+"</td>");
                            data.append("<td>"+acct.getInvoiceid()+"</td>");
                            data.append("<td>"+Double.toString(acct.getBeforeGST$())+"</td>");
                            data.append("<td>"+Integer.toString(acct.getGst())+"</td>");
                            data.append("<td>"+Double.toString(acct.getAfterGST$())+"</td>");
                            data.append("<td>"+acct.getDay()+" / "+acct.getMonth()+" / "+acct.getYear()+"</td>");
                            data.append("</tr>");
                    data.append("</table></center>");
            } else if(option==1){
                data.append("<H1>Current Month's Record</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                aList = cm.searchByIntMonthYear(todayMonth,todayYear);
                if(aList==null||aList.isEmpty()){
                    data.append("<p><center><b>There is no data transaction for current month.</b></center></p>");
                } else{
                    data.append("<center><table border=\"1\">");
                    data.append("<tr>");
                    data.append("<td colspan=\"7\"><center><b>Accounting Records</b></center></td>");
                    data.append("</tr>");
                    data.append("<tr>");
                    data.append("<td><center><B>Acct ID</B></center></td>");
                    data.append("<td><center><B>Supplier Name</B></center></td>");
                    data.append("<td><center><B>Invoice #</B></center></td>");
                    data.append("<td><center><B>Original $ before GST</B></center></td>");
                    data.append("<td><center><B>GST(%)</B></center></td>");
                    data.append("<td><center><B>$ after GST</B></center></td>");
                    data.append("<td><center><B>Date</B></center></td>");
                    data.append("</tr>");
                    for(int i=0;i<aList.size();i++){
                        account acct = (account)aList.get(i);
                        if(acct != null) {
                            data.append("<tr>");
                            data.append("<td>"+Integer.toString(acct.getId())+"</td>");
                            data.append("<td>"+acct.getSupplierName()+"</td>");
                            data.append("<td>"+acct.getInvoiceid()+"</td>");
                            data.append("<td>"+Double.toString(acct.getBeforeGST$())+"</td>");
                            data.append("<td>"+Integer.toString(acct.getGst())+"</td>");
                            data.append("<td>"+Double.toString(acct.getAfterGST$())+"</td>");
                            data.append("<td>"+acct.getDay()+" / "+acct.getMonth()+" / "+acct.getYear()+"</td>");
                            data.append("</tr>");
                    data.append("</table></center>");
            } else if(option==2){
                data.append("<H1>Current Year's Record</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                aList = cm.searchByMonthYear("*",todayYear);
                if(aList==null||aList.isEmpty()){
                    data.append("<p><center><b>There is no data transaction for today.</b></center></p>");
                } else{
                    data.append("<center><table border=\"1\">");
                    data.append("<tr>");
                    data.append("<td colspan=\"7\"><center><b>Accounting Records</b></center></td>");
                    data.append("</tr>");
                    data.append("<tr>");
                    data.append("<td><center><B>Acct ID</B></center></td>");
                    data.append("<td><center><B>Supplier Name</B></center></td>");
                    data.append("<td><center><B>Invoice #</B></center></td>");
                    data.append("<td><center><B>Original $ before GST</B></center></td>");
                    data.append("<td><center><B>GST(%)</B></center></td>");
                    data.append("<td><center><B>$ after GST</B></center></td>");
                    data.append("<td><center><B>Date</B></center></td>");
                    data.append("</tr>");
                    for(int i=0;i<aList.size();i++){
                        account acct = (account)aList.get(i);
                        if(acct != null) {
                            data.append("<tr>");
                            data.append("<td>"+Integer.toString(acct.getId())+"</td>");
                            data.append("<td>"+acct.getSupplierName()+"</td>");
                            data.append("<td>"+acct.getInvoiceid()+"</td>");
                            data.append("<td>"+Double.toString(acct.getBeforeGST$())+"</td>");
                            data.append("<td>"+Integer.toString(acct.getGst())+"</td>");
                            data.append("<td>"+Double.toString(acct.getAfterGST$())+"</td>");
                            data.append("<td>"+acct.getDay()+" / "+acct.getMonth()+" / "+acct.getYear()+"</td>");
                            data.append("</tr>");
                    data.append("</table></center>");
            } else if(option==3){
                data.append("<H1>Other Day / Month / Year Record</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                Object[] obj = {"Specific Date","Month/Year"};
                String input = (String) JOptionPane.showInputDialog(this,"Choose the following ways to select a date.","Select Date",JOptionPane.INFORMATION_MESSAGE,null,obj,obj[0]);
                if(input.equals("Specific Date")){
                    jDialog1.setSize(400,250);
                    jDialog1.setVisible(true);
                    while(true){
                        System.out.println("waiting");
                        if(subOption==1){
                            System.out.println("Year: "+chosenYear);
                            break;
                } else if(input.equals("Month/Year")){
                    jDialog2.setSize(300,200);
                    jDialog2.setVisible(true);
                    while(true){
                        System.out.println("waiting");
                        if(subOption==2){
                            System.out.println("Year: "+chosenYear);
                            break;
                System.out.println("break executed...");      
            } else if(option==4){
                data.append("<H1>Supplier Names</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                aList = cm.getCompanyList();
                if(aList==null||aList.isEmpty()){
                    data.append("<p><center><b>There is no data transaction for today.</b></center></p>");
                } else{
                    data.append("<center><table border=\"1\">");
                    data.append("<tr>");
                    data.append("<td colspan=\"1\"><center><b>Supplier Names</b></center></td>");
                    data.append("</tr>");
                    for(int i=0;i<aList.size();i++){
                        String result = (String)aList.get(i);
                        if(result != null||result.isEmpty()) {
                            data.append("<tr>");
                            data.append("<td>"+result+"</td>");
                            data.append("</tr>");
                    data.append("</table></center>");
            } else if(option==5){
                data.append("<H1>All Account Records</H1>");
                data.append("<p>Date: "+todayDay+"/"+todayMonth+"/"+todayYear+"</p><br>");
                aList = cm.getAccountRecords();
                if(aList==null||aList.isEmpty()){
                    data.append("<p><b>There is no data transaction for today.</b></p>");
                } else{
                    data.append("<center><table border=\"1\">");
                    data.append("<tr>");
                    data.append("<td colspan=\"7\"><center><b>Accounting Records</b></center></td>");
                    data.append("</tr>");
                    data.append("<tr>");
                    data.append("<td                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

  • Help to read a table with data source and convert time stamp

    Hi Gurus,
      I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
    As follows:
    Enter Data Source Name: 
    Then user enters : 2lis_11_vahdr
    Then out put should be "Data source  :"  10-15-2008.
    The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
    Thanks,
    Ram

    Hi Jayanthi Babu Peruri,
    I tried to extract YEAR, MONTH, DAY separately and using
    EDIT MASK written it.
    Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
    DATA : V_TS      TYPE TIMESTAMP,
           V_TS_T    TYPE CHAR16,
           V_YYYY    TYPE CHAR04,
           V_MM      TYPE CHAR02,
           V_DD      TYPE CHAR02.
    START-OF-SELECTION.
      GET TIME STAMP FIELD V_TS.
      V_TS_T = V_TS.
      CONDENSE V_TS_T.
      V_YYYY = V_TS_T.
      V_MM   = V_TS_T+4(2).
      V_DD   = V_TS_T+6(2).
      V_TS_T(2) = V_MM.
      V_TS_T+2(2) = V_DD.
      V_TS_T+4(4) = V_YYYY.
      SKIP 10.
      WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
              /10 V_YYYY,
              /10 V_MM,
              /10 V_DD,
              /10 V_TS_T USING EDIT MASK '__-__-__________'.
    If you want DATE alone, just declare the length of V_TS_T as 10.
    Regards,
    R.Nagarajan.
    We can -

  • Logical system entry for table entry

    Hi,
      After system copy from one system name to another , I am facing some inconsistenices in various tables.
    The table entry can be seen in se16.But when I try to select entries from the same table using SELECT statement, table are not getting populated.
    I ran the BDLS also . How do I check the logical system entried for table where I have inconsistent entries?
    Thanks,
    Chitta

    Hello Chitta,
    But when I try to select entries from the same table using SELECT statement, table are not getting populated.
    what are you trying to populate?
    If your question is, its not showing anything... what error message you're getting? are you trying to run in the DB level?
    If you're getting error, that this object doesn't exist in the database then you might not be logging with correct user. its an SAP table, then its owner is the SAP schema user. If you login with the schema user, it should show in a normal select statement. But if you login with <sid>adm then you have to give the correct schema id before tablename.
    select * from <SchemaID>.<tablename>
    SchemaID may be sapr3, sapsr3, or sap<SID> depending on your release.
    Regards,
    Debasis.

  • Read only table, need help

    I have an read only table with a check box(updatable) for each row which is the first column and it is part of the table field. The value for the
    checkbox field is Y/N in the database. I replaced the first column with a Select Boolean Checkbox, I can able to see the unchecked check box for each
    row in the browser. But, it doesn't allow me to check/uncheck. How do I make it work and how do I collect checked rows, so that I can update db. Thanks.

    you need to use the converter for Y / N value
    To make custom converter, implement javax.faces.Converter and implement following two methods
    public class ConvertYesNo implements Converter {
    public ConvertYesNo() {
    public Object getAsObject(FacesContext context,
    UIComponent component,
    java.lang.String value){
    //return value that you want to use for your business logic e.g original value from db - in this case,so when you check the chekbox, t will convert back to "Y" or N for unchecked value
    public String getAsString(FacesContext context,
    UIComponent component,
    Object value){
    //return actual 'value' for the component - for e.g "true" or "false" in this case, so when you reterive the Y/N from some static list/db it will convert to true/false
    in your jspx , assuming you will have outputtext
    &lt;af:selectBooleanCheckbox converter="{color:#3366ff}ConvertYesNo{color}" simple="true" value="#{row.bindings.dispFlag.inputValue}"
    autoSubmit="true" immediate="true"
    valueChangeListener="#{DisplayTable.displayFlagHandler}"
    id="searchFlagCheckbox"&gt;
    &lt;f:converter converterId="{color:#3366ff}ConvertYesNo{color}"/&gt;
    &lt;/af:selectBooleanCheckbox&gt;
    and make sure you have the custom converter registered in faces-config.xml
    &lt;converter&gt;
    &lt;converter-id&gt;{color:#3366ff}ConvertYesNo{color}&lt;/converter-id&gt;
    &lt;converter-class&gt;myproject.view.backing.{color:#3366ff}ConvertYesNo{color}&lt;/converter-class&gt;
    &lt;/converter&gt;
    hope this helps

  • Error messages in ABAP program are stored in which table

    hi all,
    Can anyone tell
    error messages in ABAP program are stored in which table??

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    Fuction module for storing error messages  ->'format_message'
    for example...
    data : v_message(100) type c.
    call transaction NNNN mode A update S messages into it_messages.
    loop at it_messages where msgty = 'E'.
    call function 'format_message'
    exporting
    *it_messages details
    importing
    v_message.
    write :/ v_message.
    clear v_message.
    endloop.
    Anothe method - ->
    Here is a sample of the program code for that:
    LOOP AT it_messtab.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = it_messtab-msgid
    lang = it_messtab-msgspra
    no = it_messtab-msgnr
    v1 = it_messtab-msgv1
    v2 = it_messtab-msgv2
    IMPORTING
    msg = g_msg
    EXCEPTIONS
    OTHERS = 0.
    IF it_messtab-msgtyp = 'S'.
    it_sucess-sucess_rec = g_msg.
    it_sucess-lifnr = it_header-lifnr." Based on your field
    it_sucess-tabix = v_lines.
    APPEND it_sucess.
    ELSEIF it_messtab-msgtyp = 'E'.
    it_error-error_rec = g_msg.
    it_error-lifnr = it_header-lifnr.
    it_error-tabix = v_lines.
    APPEND it_error.
    ELSE.
    it_info-info_rec = g_msg.
    it_info-lifnr = it_header-lifnr.
    it_info-tabix = v_lines.
    APPEND it_info.
    ENDIF.
    ENDLOOP.

  • Ho to read intern table in update rule?

    Hello experts,
    I have the following start routine:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BIC/AZD_ODS_C00.
    DATA: ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AZD_ODS_C00
          WITH HEADER LINE
          WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    DATA: gv_flag type c.
    $$ end of global - insert your declaration only before this line   -
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    SELECT * FROM  /BIC/AZD_ODS_C00 INTO TABLE ITEM_TABLE.
    SORT ITEM_TABLE BY /BIC/ZABOOKID ASCENDING.  
           LOOP AT ITEM_TABLE.
            AT NEW /BIC/ZABOOKID.
            GV_FLAG = 'X'.
            ENDAT.
           ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    How can I read intern table ITEM_TABLE in a update rule?
    And will gv_flag be still available in update rule?
    thanx
    hiza
    Message was edited by:
            Hiza
    Message was edited by:
            Hiza

    Hi,
    I am just giving you a sample code which I had used
    just try to read this will help you
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CSZRINF001.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    break-point.loop at DATA_PACKAGE.if DATA_PACKAGE-/BIC/ZREMPID GE 5.delete DATA_PACKAGE.endif.endloop.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    Regards
    Rahul

  • Specify program logic at runtime

    Hi,
    I have this requirement where the program logic is specified at runtime. My class is fairly complete except that few variables are to be created and set at runtime. Also I need to evaluate an expression made up from these created variables.
    Any suggestions ?
    In case anyone is thinking whats the need for this - I am writing a translator that is going to translate a program written in some language say 'L' to Java. One way is I can output Java code and compile and run it. But this leaves me with the situation that the users of my application have Java compiler (I can't assume that). Other way is do runtime programming - create required variables, expressions on the fly and evaluate them at runtime.
    Thanks,
    Taran

    tasingh wrote:
    I was looking for some framework or at least a design pattern hmmm,.. Strategy ?

  • Program/Logic behind the Copy functionality in SE38 Transaction

    Hi,
    In SE38 by using the copy option, Program along with sub-objects can be copied to another object.
    Please let me know the Program/Logic behind that functionality.
    Also let me know is there any option in SAP to copy program from one system to another system.
    Thanks,
    Madhuri.

    Hi Madhuri
    This is tha Program logic behind copying object thru se38
    where p_operation would have the value 'COPY'' in it.
      DATA: l_request TYPE REF TO cl_wb_request,
            l_wb_todo_request TYPE REF TO cl_wb_request,
            l_object_name TYPE seu_objkey,
            l_object_type TYPE seu_objtyp,
            l_program_state TYPE REF TO cl_wb_program_state.
      IF trdir-subc = 'I'.
        l_object_type = swbm_c_type_prg_include.
        CALL METHOD cl_wb_object_type=>get_concatenated_key_from_id
          EXPORTING
            p_key_component1 = space
            p_key_component2 = rs38m-programm
            p_external_id    = l_object_type
          RECEIVING
            p_key            = l_object_name.
      ELSE.
        l_object_type = swbm_c_type_prg_source.
        l_object_name = rs38m-programm.
      ENDIF.
      CREATE OBJECT l_program_state.
      CREATE OBJECT l_request
          EXPORTING p_object_type =  l_object_type
                    p_object_name = l_object_name
                    p_operation   = p_operation
                    p_object_state = l_program_state .
      CALL METHOD
        wb_pgeditor_initial_screen->mngr->request_tool_access
        EXPORTING
          p_wb_request      = l_request
        IMPORTING
          p_wb_todo_request = l_wb_todo_request
        EXCEPTIONS
          action_cancelled  = 1
          no_tool_found     = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        EXIT.
      ENDIF.

  • Abap TIME_OUT sequencial read of table D010INC

    Dear all,
    I installed SAP ECC 6.0 SR3 in Linux SLES10 with Oracle 10.2.0.2.0.
    Most of the SAP transactions hangs.
    If I check transaction SM50 I find that SAP is making a sequential read of table D010INC.
    The programs dumps with timeout in instructions like:
    "insert report repname from report. "
    It seams that the generation of programs, like the first time we run transaction SE16 for a table, atempts to add lines to table D010INC and generate a timeout.
    Help needed, answer will be rewarded
    Jorge

    I have a similar problem.
    Following query returned the following results
    SQL> select count(*) from SAPSR3.D010INC;
    COUNT(*)
    16084840
    I have already executed SGEN, it took more than 20 hours to complete, but completed successfully.
    Shall I "create optimizer statistics with brtools" or increase timeout duration ?
    I have restarted the instance many num of times.
    Kindly refer
    Tmeout in creating company
    for details
    Thanks in advance
    Ruhi

  • Programs which can trigger GLPCA table entries

    Hi SAP Community,
    I am looking for a complete list of programs which can trigger GLPCA table entries. I am currently in the process of running related transactions manually, but to be on the save side, I would really appreciate the feedback from you guys.
    Thanks in advance for your support.
    Cheers,
    Chris

    Hi,
    You can find the programs where the table GLPCA is being used. For this use transaction code SE11 and enter the table name GLPCA and click on the icon where used. A pop up window will be displayed and you can click on Programs only. This will display all the Programs where the table GLPCA is used including any Z programs developed in your system.
    Thanks
    Murali.

  • Problem with program logic

    hi, me havin a very funny prob w one of my mtd. here's a mtd from my bean class.
    public boolean checkForEvent (String searchdate) {
    boolean hasEvent = true;
    try {
    // This is the sql statement to modify.
    sql = "select * from event where eventstart <= to_date('" +
    searchdate + "','dd-mon-yy') and eventend >= to_date('" +
    searchdate + "', 'dd-mon-yy') and eventoption = 'yes' order by eventname asc";
    stmt = conn.createStatement ();
    rs = stmt.executeQuery (sql);
    if(rs.next())
    hasEvent = true;
    else
    hasEvent = false;
    rs.close ();
    } // end try
    catch (SQLException e) {}
    catch (Exception exp) {}
    return hasEvent;
    } // end method
    the thing i dun understand is that my program will return whatever boolean i initialise hasEvent to, regardless of what goes on inside the resultset. i'm quite sure that it's not problem of database or the if-else part. it just seems like the program dun enter the if-else condition statement. i have debugged many many times but still same old prob. any1 has any idea wat is wrong with my program logic?thks

    Looks like your getting some exceptions.
    Try to see that by putting some print statements in your catch blocks.

Maybe you are looking for