Regarding Program Logic

Can anyone please lemme know abt the logic used in the Report Customer Payment History. The T code used is f.99.
Points will be awarded

You can hook up a 2nd drive to the 1st drive - this called "daisy-chaining".
Two external disks is optimal - especially if you use large 3rd party Sample libraries. But it is no 'must'. If you only use Logics' own sampled instruments you don't need to use a dedicated disk for that. The same goes for recording; if you only record 1 or 2 tracks at a time you can easily use the startup disk for that. However, depending on how much you record you run the risk of filling up the startup disk, an for efficiency reasons it is advisable to keep at least 20 GB free on the startup disk, or +at least+ 10 % of the disks' capacity if it is 250 GB or bigger.
There is such a thing as a FireWire hub, but in your situation it is not necessary. Plus they tend to cause trouble, that vary depending on what devices are hooked up and how.
regards, Erik (6 feet guy)

Similar Messages

  • 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.

  • 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 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.

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

  • Integration of PLC(programming logic unit) in SAP

    i'm facing problem with this, our client is using PLC (programming logic unit) for there manufacturing ,so with out third part tool how can we integrate in SAP plz any one can help

    kishore.
    i am just throwing ideas now, its impossible to debug over forum. 
    go ahead and just check all switches between qa and prod in OOAC, confirm they are all the same,
    check OOSB - check that the user profile is in both environments, with same dates, and eval paths (display objects).
    DFCON = 1 means Deny 99999999, but Evaluate Organizational Unit (if available).  Check if there are any differences in IT0001 of the org unit ids, in production perphas Org unit ID is not filled on the record where position is = 99999999. 
    in general your team should review this link:  http://help.sap.com/saphelp_47x200/helpdata/en/56/db5bc71a64c94f9f2e3cb63e14c867/content.htm
    review orgpd switch as well: 
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/4aba3b3bf00152e10000000a114084/content.htm
    review how org key works (different than org ID previously mentioned):
    http://help.sap.com/saphelp_47x200/helpdata/en/7f/1a7d3c8015d10ee10000000a11405a/frameset.htm
    run this in both qa and production.  check transaction oosb after as well. 
    1) Call program RHBAUS02 for uploading Table T77UU and enter users.
    2) Call program RHBAUUS00 for generating an index for structural authorization profile

  • Programming logic

    I want help in one programming logic.For that I make small example ,so that can explain clearly.
    public class Mainclass //(situated in package view)
    public s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    public MainRunner
    public static void main(String a[])
    Mainclass m=new Mainclass();
    m.runFunction();
    public MainUser (situated in package Master)
    public static void main(String a[])
    Mainclass m=new Mainclass();
    System.out.println("S0:"+s0+" S1:"+s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    In this ,I first run the MainRunner and then MainUser after compiling the classes and expect that print command of MainUser would give me -S0:Hi S1:Hello as result ,but it is yielding the null values for s0 & s1.
    What should I do in this to get hi for s0 and hello for s1.

    hi friend, plz follow the code. I think this code may be suitable for u r requirements...
    class MainUser
         public String s0,s1;
         MainUser()//Here i am using Constructor
              s0="Hi";s1="Hello";
    public class C extends MainUser
         public static void main(String a[])
              MainUser m=new MainUser();
              System.out.println("S0:"+m.s0+" S1:"+m.s1);
                        (OR)
    class MainUser
         static String s0,s1;//Here i am declaring variables as Static
         public void runFunction()
              s0="Hi";s1="Hello";
    class B extends MainUser
         public B()//Contructor
              MainUser m=new MainUser();
              m.runFunction();
    public class C extends B
         public static void main(String a[])
              B b=new B();//when i am creating new Object b then it will call B constructor
              System.out.println("S0:"+b.s0+" S1:"+b.s1);
    byeeeee

  • Update the data into the ZTABLE fields thru program logic ..?

    hi all,
    i have ZTABLE1,ZTABLE2,ZTABLE3, and this tables like ALV grids using object methods.
    in the same table fields now i wanted to update the data into the ZTABLE fields thru program logic .
    could anyone please help me ....
    please provide if anyone of have any program logic that would be helpfull to me.
    thanks in advance...
    srinivas....

    Hi Srinivas,
      The following statements are used to upload the data into custom tables.
    1. Modify
    2. Update
    3. Insert
    if you are using OO ALV, you should enable the 'SAVE' button in the main toolbar. if the user press the save button, then you should upload the data to the custom table.
    please find the example code, in this example 'PERFORM F_SAVE_DATA'(here i gave the message only, you write your own logic here) is used to save the data in custom table.
    Report Program: ZB_ALVOOPS_TEST
    Line:-----
    REPORT  ZB_ALVOOPS_TEST MESSAGE-ID ZCR_MESSAGES.
    Top Include - Global Data Declaration                        *
    INCLUDE ZB_ALVOOPS_TEST_TOP.
    SEL Include - Selection Screen                               *
    INCLUDE ZB_ALVOOPS_TEST_SEL.
    AT SELECTION SCREEN                                          *
    Initialization Event                                         *
    INITIALIZATION.
    Initialize Screen Number.
      PERFORM F_INITIALIZE.
    Initialize Field Catalog for ALV Grid.
      PERFORM F_INITIALIZE_GRID.
    END-OF-SELECTION.
    Call Display Screen                                          *
      CALL SCREEN 9000.
    Event Handler - Class Definition and Implementation          *
      INCLUDE ZB_ALVOOPS_TEST_CL01.
    PBO Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PBO.
    PAI Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PAI.
    Subroutine Include                                           *
      INCLUDE ZB_ALVOOPS_TEST_F01.
    Include: ZB_ALVOOPS_TEST_TOP
    Line:-------
    Type Declaration For Internal Tables                         *
    Collection Data
    TYPES: BEGIN OF TY_MARA                                                    ,
             MATNR         TYPE  MATNR                                         ,  "  Material
             VPSTA         TYPE  VPSTA                                         ,  "  Maintenance status of complete material
             MTART         TYPE  MTART                                         ,  "  Material Type
             MBRSH         TYPE  MBRSH                                         ,  "  Industry Sector
             MATKL         TYPE  MATKL                                         ,  "  Material Group
             BISMT         TYPE  BISMT                                         ,  "  Old material number
             MEINS         TYPE  MEINS                                         ,  "  Base Unit of Measure
             BSTME         TYPE  BSTME                                         ,  "  Order unit
             BRGEW         TYPE  BRGEW                                         ,  "  Gross weight
             MAKTX         TYPE  MAKTX                                         ,  "  Material Description
             ROWCOLOR      TYPE  CHAR4                                         ,  "  Row Color
           END OF TY_MARA                                                      .
    Flag                                                         *
    DATA: FG_REFRESH  TYPE  XFLD                                               ,  "  Used to Refresh ALV
          FG_SAVE     TYPE  XFLD                                               .  "  Data Saved Or Not.
    Internal Table Declaration                                   *
    DATA: IT_MARA              TYPE  STANDARD TABLE OF TY_MARA                 ,  "  Internal table for Material
          WA_MARA              TYPE  TY_MARA                                   .  "  Workarea for Material
    Variable Declaration For General Constants                   *
    CONSTANTS: C_SCREEN_SELECT      TYPE  SYDYNNR         VALUE '9001'         ,  "  Selection Screen Number
               C_SCREEN_SELECT_NIL  TYPE  SYDYNNR         VALUE '9002'         ,  "  Empty Screen Number
               C_STATUS9000         TYPE  CHAR10          VALUE 'STATUS9000'   ,  "  PF-Status
               C_TITLEBAR           TYPE  CHAR4           VALUE '9000'         ,  "  Title Bar
               C_ISSUE_CONTAINER    TYPE  SCRFNAME        VALUE 'WORKCONTAINER',  "  Container Name (Screen Painter)
               C_BUTTON_TYPE        TYPE  CHAR1           VALUE '3'            ,  "  Button Type
               C_EXECUTE            TYPE  CHAR4           VALUE 'SELE'         ,  "  Functions 'SELE'    -> Execute
               C_BACK               TYPE  CHAR4           VALUE 'BACK'         ,  "  Functions 'BACK'    -> Back to main screen
               C_ENTER              TYPE  CHAR5           VALUE 'ENTER'        ,  "  Functions 'ENTER'   -> No Action
               C_SEL01              TYPE  CHAR5           VALUE 'SEL01'        ,  "  Functions 'SEL01'   -> Toggle Function
               C_SAVE               TYPE  CHAR4           VALUE 'SAVE'         ,  "  Functions 'SAVE'    -> Save Function
               C_REFRESH            TYPE  CHAR7           VALUE 'REFRESH'      ,  "  Functions 'REFRESH' -> Clear and Fres All objects
               C_ADD_MI             TYPE  CHAR6           VALUE 'ADD_MI'       ,  "  Functions 'ADD_MI'  -> Add New Media Issue
               C_TRUE               TYPE  CHAR1           VALUE 'X'            ,  "  Set X value
               C_REQUIRED           TYPE  CHAR1           VALUE '1'            ,  "  Un-Confirmed Qty field obligatory or not.
               C_INPUT              TYPE  CHAR1           VALUE '0'            ,  "  Reason field should not be input.
               C_ALV_SAVE           TYPE  CHAR1           VALUE 'A'            ,  "  ALV
               C_ERROR              TYPE  CHAR1           VALUE 'E'            ,  "  Error Type
               C_SIGN               TYPE  CHAR1           VALUE 'I'            ,  "  Sign
               C_OPTION             TYPE  CHAR2           VALUE 'EQ'           ,  "  Option.
               C_COMMIT_WAIT        TYPE  CHAR1           VALUE '5'            ,  "  Waiting to update in DB
               C_TABNAME            TYPE  CHAR1           VALUE '1'            ,  "  Parameter (ALV)
               C_CANCEL             TYPE  CHAR1           VALUE 'N'            ,  "  Cancel
               C_YES                TYPE  CHAR1           VALUE 'J'            .  "  Yes.
    Variable Declaration For Container and ALV Grid              *
    DATA: OBJ_CUST_CONTAINER  TYPE  REF TO  CL_GUI_CUSTOM_CONTAINER            ,  "  Container Class
          OBJ_CUST_GRID       TYPE  REF TO  CL_GUI_ALV_GRID                    .  "  ALV  Grid Class
    Field Catalog Declaration For Container and ALV Grid         *
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT                                        ,  "  Field Catalog
          IT_EXCLUDE   TYPE  UI_FUNCTIONS                                      ,  "  Standard Function Exclude from ALV
          WA_FIELDCAT  TYPE  LVC_S_FCAT                                        ,  "  For Field Catalog
          WA_LAYOUT    TYPE  LVC_S_LAYO                                        .  "  ALV Layout
    Global Variable Declaration                                  *
    DATA: OK_CODE                  TYPE  SY-UCOMM                              ,  "  OK CODE ( Screen Attribute Don't Change the var.name)
          G_SAVE_CODE              TYPE  SY-UCOMM                              ,  "  OK CODE
          G_ANSWER                 TYPE  CHAR1                                 ,  "  OK or Cancel.
          G_SELECTION_DYNNR        TYPE  SYDYNNR                               ,  "  Screen Number
          G_ERROR_TEXT             TYPE  CHAR128                               ,  "  Error Text
          G_SELECTION_TOGGLE_TEXT  TYPE  CHAR50                                ,  "  Toggle Text, Value: Hide Selection, Show Selection
          G_MATNR                  TYPE  MATNR                                 ,  "  Material
          G_SMATNR                 TYPE  MATNR                                 ,  "  Material
          G_SMTART                 TYPE  MTART                                 .  "  Material Type
    Include: ZB_ALVOOPS_TEST_SEL
    Line:-------
    Selection Screen
    SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE TEXT-001          .
    SELECT-OPTIONS: S_MATNR  FOR G_SMATNR                                        ,  "  Material
                    S_MTART  FOR G_SMTART                                        .  "  Material Type
    SELECTION-SCREEN   END OF BLOCK SELECTION                                    .
    SELECTION-SCREEN   END OF SCREEN 9001                                        .
    Empty Selection
    SELECTION-SCREEN BEGIN OF SCREEN 9002 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION_NIL WITH FRAME TITLE TEXT-002      .
    Nil
    SELECTION-SCREEN   END OF BLOCK SELECTION_NIL                                .
    SELECTION-SCREEN   END OF SCREEN 9002                                        .
    Include: ZB_ALVOOPS_TEST_CL01
    Line:-------
    CLASS lcl_event_handler DEFINITION                                  *
    Event Handler Class Definition                                      *
    CLASS LCL_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS:
        HANDLER_TOOLBAR      FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                                 IMPORTING  E_OBJECT E_INTERACTIVE     ,
        HANDLER_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                                 IMPORTING E_UCOMM                     .
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION                              *
    Event Class Implementation.                                         *
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    Toolbar -----Create 'Add Issue' button
      METHOD HANDLER_TOOLBAR.
        DATA:  L_WA_TOOLBAR  TYPE  STB_BUTTON.                                          "  Toolbar
        CLEAR: L_WA_TOOLBAR.
    Button Type
        L_WA_TOOLBAR-BUTN_TYPE  =  C_BUTTON_TYPE   .            "  3.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
    Add Issue Button.
        CLEAR: L_WA_TOOLBAR.
        L_WA_TOOLBAR-FUNCTION   =  'ADD_MI'   .                                         "  'ADD_MI'   .
        L_WA_TOOLBAR-ICON       =  'ICON_CREATE'.
        L_WA_TOOLBAR-QUICKINFO  =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-TEXT       =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-DISABLED   =  ''.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
        CLEAR: L_WA_TOOLBAR.
      ENDMETHOD.                    "handler_toolbar
    User Actions Events-- Handle 'Add Issue' Button Click.
      METHOD HANDLER_USER_COMMAND.
        CASE E_UCOMM.
    Add Issue Button.
          WHEN C_ADD_MI.
            IF NOT G_MATNR IS INITIAL.
              FG_REFRESH  =  C_TRUE.
              PERFORM F_ADD_MEDIAISSUE.
            ENDIF.
        ENDCASE.
    Refresh Control
        CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2
            OTHERS            = 3.
    Handle Exceptions
        IF SY-SUBRC <> 0.
          CASE SY-SUBRC.
            WHEN 1.
              G_ERROR_TEXT = TEXT-026.                                        "  'Control System Error'.
            WHEN 2.
              G_ERROR_TEXT = TEXT-027.                                        "  'Control CL_GUI_CFW Has Raised Error'.
          ENDCASE.
            MESSAGE G_ERROR_TEXT TYPE 'E'.
        ENDIF.
    Refresh Alv Grid.
        PERFORM F_REFRESH_GRID.
      ENDMETHOD.                    "handler_user_command
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    Object Ref. Event Class.
    DATA: OBJ_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
    Include: ZB_ALVOOPS_TEST_PBO
    Line:----
    Module  STATUS_9000  OUTPUT                                        *
    Set PF-Status                                                      *
    MODULE STATUS_9000 OUTPUT.
    PF Status
      SET PF-STATUS C_STATUS9000  .
      SET TITLEBAR  C_TITLEBAR    .
    ENDMODULE.                 " STATUS_9000  OUTPUT
    Module  Create_Alvgrid  OUTPUT                                     *
    Create Or Refresh ALV Grid                                         *
    MODULE CREATE_ALVGRID OUTPUT.
      PERFORM F_PROCESS_ALV .
      PERFORM F_REFRESH_GRID.
    ENDMODULE.                 " create_alvgrid  OUTPUT
    Include: ZB_ALVOOPS_TEST_PAI
    Line:----
    Module  exit_command  INPUT                                        *
    Exit Command ( Cancel and Exit )                                   *
    MODULE EXIT_COMMAND INPUT.
      LEAVE PROGRAM.
    ENDMODULE.                 " exit_command  INPUT
    Module  user_command_9000  INPUT                                   *
    User Command - Process toolbar Events                              *
    MODULE USER_COMMAND_9000 INPUT.
    Take an Action based on user Input
      G_SAVE_CODE = OK_CODE.
      CLEAR OK_CODE.
      CASE G_SAVE_CODE.
    Back
        WHEN C_BACK .
    Raise the Confirmation Message When User not saved the data.
          IF FG_SAVE = C_YES.
            PERFORM F_EXITCHECK CHANGING G_ANSWER .
            IF G_ANSWER = C_YES.
              PERFORM F_SAVE_DATA.
            ELSE.
              CLEAR G_SAVE_CODE.
            ENDIF.
            CLEAR: FG_SAVE.
          ENDIF.
          LEAVE PROGRAM.
    Enter
        WHEN C_ENTER.
    Execute ( F8 )
        WHEN C_EXECUTE .
          IF IT_MARA IS INITIAL.
            PERFORM F_SELECTMATERIAL.
          ENDIF.
    Toggle Button
        WHEN C_SEL01.
          PERFORM F_TOGGLE_SELECTION_SCREEN.                                  " USING ok_code.
    SAVE  ( CTRL+S )
        WHEN C_SAVE.
          IF NOT G_MATNR IS INITIAL.
            PERFORM F_SAVE_DATA.
            CLEAR: G_MATNR.
          ENDIF.
    New Entry ( CTRL+F1 )
        WHEN C_REFRESH.
          PERFORM F_REFRESH_DATA.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    Include: ZB_ALVOOPS_TEST_F01
    Line:----
    Form  f_toggle_selection_screen                                    *
    Toggle Function - Hide Selection / Show Selection                  *
    FORM F_TOGGLE_SELECTION_SCREEN.
    Toggle Function
      IF G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_DYNNR = C_SCREEN_SELECT_NIL.
        G_SELECTION_TOGGLE_TEXT = TEXT-902.
      ELSE.
        G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_TOGGLE_TEXT = TEXT-901.
      ENDIF.
    ENDFORM.                    " f_toggle_selection_screen
    Form  f_initialize
    Initialize Screen Number and Text
    FORM F_INITIALIZE .
    Initialize Screen Number
      G_SELECTION_DYNNR      = C_SCREEN_SELECT.
      G_SELECTION_TOGGLE_TEXT = TEXT-901.
    ENDFORM.                    "f_initialize
    Form  f_selectmaterial                                           *
    FORM F_SELECTMATERIAL .
    Select the data from Mara Table
      SELECT A~MATNR
             A~VPSTA
             A~MTART
             A~MBRSH
             A~MATKL
             A~BISMT
             A~MEINS
             A~BSTME
             A~BRGEW
             B~MAKTX
        INTO TABLE IT_MARA
        FROM MARA AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
       WHERE A~MATNR IN S_MATNR
         AND A~MTART IN S_MTART
         AND B~SPRAS = 'EN'.
      IF SY-SUBRC = 0.
        FG_REFRESH  =  C_TRUE.
        FG_SAVE     =  C_YES .
        G_MATNR     =  C_TRUE.
        LOOP AT IT_MARA INTO WA_MARA WHERE BRGEW >= 200.
          WA_MARA-ROWCOLOR  =  'C310'.
          MODIFY IT_MARA FROM WA_MARA.
        ENDLOOP.
      ELSE.
        MESSAGE 'No data Found' TYPE 'E'.
      ENDIF.
    ENDFORM.                    " f_selectmaterial
    Form  f_initialize_grid                                            *
    Initialize Field Catalog.                                          *
    FORM F_INITIALIZE_GRID .
      field catalog
      PERFORM F_ATTRFCAT USING :
                       'MATNR'  '1' '0'   TEXT-005       '15' '0' 'X' ' ' ' ',
                       'VPSTA'  '1' '1'   TEXT-006       '15' '0' 'X' ' ' ' ',
                       'MTART'  '1' '2'   TEXT-007       '15' '0' ' ' ' ' ' ',
                       'MBRSH'  '1' '3'   TEXT-008       '15' '0' ' ' ' ' ' ',
                       'MATKL'  '1' '4'   TEXT-009       '15' '0' ' ' 'X' ' ',
                       'BISMT'  '1' '5'   TEXT-010       '15' '0' ' ' ' ' ' ',
                       'MEINS'  '1' '6'   TEXT-011       '15' '0' ' ' ' ' ' ',
                       'BSTME'  '1' '7'   TEXT-012       '15' '0' ' ' ' ' ' ',
                       'MAKTX'  '1' '8'   TEXT-013       '15' '0' ' ' ' ' 'C711',
                       'BRGEW'  '1' '9'   TEXT-014       '15' '0' ' ' ' ' ' '.
    Set Editable Fields in ALV.
      PERFORM F_SETEDIT_FIELDS CHANGING IT_FIELDCAT.
    ENDFORM.                    "f_initialize_grid
    Form  f_setedit_fields                                             *
    Set Editable Fields in ALV                                         *
    C_IT_FIELDCAT  <--  Field Catalog                                  *
    FORM F_SETEDIT_FIELDS  CHANGING C_IT_FIELDCAT TYPE LVC_T_FCAT.
    Local Variable Declaration.
      DATA: LS_FIELDCAT LIKE LINE OF C_IT_FIELDCAT.                           "  Field Catalog
    Create Editable Fields.
      LOOP AT C_IT_FIELDCAT INTO LS_FIELDCAT.
        CASE LS_FIELDCAT-FIELDNAME.
          WHEN 'BRGEW'.
            LS_FIELDCAT-EDIT = C_TRUE.
          WHEN 'MAKTX'.
            LS_FIELDCAT-EDIT = C_TRUE.
        ENDCASE.
        MODIFY C_IT_FIELDCAT FROM LS_FIELDCAT.
      ENDLOOP.
    ENDFORM.                    " f_setedit_fields
    Form  f_attrfcat                                                   *
    Update Field Catalog Internal Table                                *
    U_FIELDNAME     -->  Field Name                                    *
    U_ROW_POS       -->  Row Position                                  *
    U_COL_POS       -->  Column Position                               *
    U_SELTEXT_L     -->  Display Column Heading                        *
    U_OUTPUTLEN     -->  Heading Output Length                         *
    U_DECIMALS_OUT  -->  Number of decimal places in output            *
    U_KEY           -->  Key in ALV Display                            *
    U_FIX           -->  Existence of fixed values                     *
    FORM F_ATTRFCAT USING
                        U_FIELDNAME    TYPE  SLIS_FIELDNAME
                        U_ROW_POS      TYPE  SYCUROW
                        U_COL_POS      TYPE  SYCUCOL
                        U_SELTEXT_L    TYPE  SCRTEXT_L
                        U_OUTPUTLEN    TYPE  OUTPUTLEN
                        U_DECIMALS_OUT TYPE  CHAR1
                        U_KEY          TYPE  CHAR1
                        U_FIX          TYPE  VALEXI
                        U_COL_COLOR    TYPE  LVC_EMPHSZ.
    Update field catalog.
      WA_FIELDCAT-FIELDNAME    = U_FIELDNAME.
      WA_FIELDCAT-ROW_POS      = U_ROW_POS.
      WA_FIELDCAT-COL_POS      = U_COL_POS.
      WA_FIELDCAT-COLTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-SELTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-OUTPUTLEN    = U_OUTPUTLEN.
      WA_FIELDCAT-DECIMALS_O   = U_DECIMALS_OUT.
      WA_FIELDCAT-KEY          = U_KEY.
      WA_FIELDCAT-VALEXI       = U_FIX.
      WA_FIELDCAT-EMPHASIZE    = U_COL_COLOR.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "ATTR_FCAT
    Form  f_refresh_data                                               *
    Clear All the objects used in the program ( Data Related )         *
    FORM F_REFRESH_DATA .
    Clear All the Objects Used in Our Program.
      CLEAR: S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
      FREE:  S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
    Refresh Alv.
      FG_REFRESH  =  C_TRUE.
    ENDFORM.                    " f_refresh_data
    Form  f_process_alv                                                *
    1. Create Custom Container                                         *
    2. Create ALV Grid                                                 *
    3. Exclude Standard Functions                                      *
    4. Display the ALV                                                 *
    5. Register the Events.                                            *
    FORM F_PROCESS_ALV .
    Display ALV
    Custom Container
      IF OBJ_CUST_CONTAINER IS INITIAL.
        CREATE OBJECT OBJ_CUST_CONTAINER
          EXPORTING
            CONTAINER_NAME = C_ISSUE_CONTAINER.
    ALV Grid
        IF OBJ_CUST_GRID IS INITIAL.
          CREATE OBJECT OBJ_CUST_GRID
            EXPORTING
              I_PARENT = OBJ_CUST_CONTAINER.
        ENDIF.
    Exclude Standard Functions
        PERFORM F_EXCLUDETOOLBAR USING OBJ_CUST_GRID
                              CHANGING IT_EXCLUDE.
    Layout.
        WA_LAYOUT-CWIDTH_OPT  =  C_TRUE.
        WA_LAYOUT-INFO_FNAME  =  'ROWCOLOR'.
    ALV Grid Display
        CALL METHOD OBJ_CUST_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           IS_LAYOUT            = WA_LAYOUT
            IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
            I_SAVE               = C_ALV_SAVE
          CHANGING
            IT_FIELDCATALOG      = IT_FIELDCAT[]
            IT_OUTTAB            = IT_MARA.
      ENDIF.
    Register Editable ALV Events
      CALL METHOD OBJ_CUST_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
        EXCEPTIONS
          ERROR      = 1
          OTHERS     = 2.
    *Create Object for Custom Event Handler Class if the ref. object is
    *initial.
      IF OBJ_EVENT_HANDLER IS INITIAL.
        CREATE OBJECT OBJ_EVENT_HANDLER.
      ENDIF.
    Register Events
      SET HANDLER: OBJ_EVENT_HANDLER->HANDLER_TOOLBAR       FOR
      OBJ_CUST_GRID,
                   OBJ_EVENT_HANDLER->HANDLER_USER_COMMAND  FOR
                   OBJ_CUST_GRID.
    Set Toolbar
      CALL METHOD OBJ_CUST_GRID->SET_TOOLBAR_INTERACTIVE.
    ENDFORM.                    " f_process_alv
    Form  f_excludetoolbar                                             *
    Exclude Standard Functions from ALV                                *
    U_OBJ_CUST_GRID  -->  Instant for CL_GUI_ALV_GRID                  *
    C_IT_EXCLUDE     <--  Internal table for Exclude                   *
    FORM F_EXCLUDETOOLBAR  USING  U_OBJ_CUST_GRID  TYPE REF TO CL_GUI_ALV_GRID
                        CHANGING  C_IT_EXCLUDE     TYPE UI_FUNCTIONS.
    Exclude Standard Functions
      CLEAR: C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_CHECK              TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_REFRESH            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY           TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_CUT            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_DELETE_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_APPEND_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_INSERT_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_MOVE_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE          TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE_NEW_ROW  TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_UNDO           TO  C_IT_EXCLUDE.
    ENDFORM.                    " f_excludetoolbar
    Form  f_create_returnrequest                                       *
    Create Return Request based on the Work container ( ALV Grid Data) *
    FORM F_CREATE_RETURNREQUEST.
    Message to save
    ENDFORM.                    " f_create_returnrequest
    Form  f_add_mediaissue                                             *
    Create New Media Issue if the user click 'ADD ISSUE' Button.       *
    1. Get the Input From User                                         *
    2. Get Total Delivery and Return Quantity                          *
    3. Append to Final internal table                                  *
    FORM F_ADD_MEDIAISSUE .
    Local Variable Declaration.
      MESSAGE 'Add Button Clicked' TYPE 'I'.
    ENDFORM.                    " f_add_mediaissue
    Form  f_refresh_grid                                               *
    Refresh ALV Grid                                                   *
    FORM F_REFRESH_GRID .
    Refresh ALV Grid.
      IF FG_REFRESH IS NOT INITIAL.
        CALL METHOD OBJ_CUST_GRID->REFRESH_TABLE_DISPLAY.
        CLEAR: FG_REFRESH.
      ENDIF.
    ENDFORM.                    " f_refresh_grid
    Form  f_getcollectissue                                            *
    FORM F_GETCOLLECTISSUE .
    Collection Plan Data
    ENDFORM.                    " f_getcollectissue
    Form  f_perpare_final                                              *
    FORM F_PERPARE_FINAL .
    Perpare Final Internal table
    ENDFORM.                    " f_perpare_final
    Form  f_validate_data                                              *
    FORM F_VALIDATE_DATA.
    Message if any data validation.
    ENDFORM.                    " f_validate_data
    Form  f_modify_final                                               *
    Update Actual Delivery Qty and Return Qty in Final Internal table  *
    Form  f_save_data                                                  *
    Save the Data When User Click 'Save' Button                        *
    FORM F_SAVE_DATA .
    Message
      MESSAGE 'Save Button Clicked' TYPE 'I'.
    ENDFORM.                    "f_save_data
    Form  f_exitcheck                                                  *
    When User Exit from the Transaction then Raise Confirmation message*
    C_ANSWER  <--  OK or Cancel.                                       *
    FORM F_EXITCHECK  CHANGING C_ANSWER TYPE CHAR1.
    Security Check.
      C_ANSWER  =  C_CANCEL.
      CALL FUNCTION 'POPUP_TO_CONFIRM_DATA_LOSS'
        EXPORTING
          TITEL  = TEXT-039
        IMPORTING
          ANSWER = C_ANSWER.
    ENDFORM.                    "f_exitcheck
    Screen Numer : 9000
    Line:------
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_9000.
      CALL SUBSCREEN: SELECTIONSCREEN INCLUDING SY-CPROG G_SELECTION_DYNNR.
      MODULE CREATE_ALVGRID.
    PROCESS AFTER INPUT.
      MODULE EXIT_COMMAND AT EXIT-COMMAND.
      CALL SUBSCREEN: SELECTIONSCREEN.
      MODULE USER_COMMAND_9000.
    pls reward if it is useful

  • Program logic required

    Hi all,
    I have requirement saying that transfer data from one program to another transaction selection screen.
    Requirement is.
    In a programi will l have final data in one internal table.
    This data i need to send it for another program selection screen as input.
    Please provide me the logic.
    Thanks in advance

    use the first program as an include for the second program
    then in the intilisation of the second program
    use the values of the internal table of 1st program.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Regarding program buffer

    hi sapgurus,
    in st02 ,i checked that the hit ratio of the program buffer is 73%
    in st06 my current swap size is 34,830,140 30,414,708 25,600,000
    the parameter abap/buffersize has certain values
    parmeter value 700000
    unsubstited standard value-150000
    substituted value -150000
    comment
    #old_value :550000
    i want to increase the hit ratio up 99%
    what is change i have to do,and which value i have to change and how much.
    please it is bit urgent
    the windows 64bit machine and the sap release 700
    please do help to get result
    regards
    rahul

    Based on what logic do you raise it to these values?
    You have no idea as to the modules used within the system.
    You have no idea as to the number of users on the system.
    You have no idea as to the number of app servers.
    You have no idea as to how load balancing is happening (SMLG).
    You have no idea as to the amount of memory in the server.
    Before changing anything we need to understand why we have a hit rate of only 73% in the first place, Then and only then do we take the most appropriate action, which may, or may not be changing the value stated.
    This is from a app server thats part of a SAP system for 11,000 users on Z-OS
    abap/heap_area_dia                          10000000
    abap/heaplimit                              10000000
    abap/heap_area_nondia                       10000000
    <b>abap/buffersize                             900000</b>
    rsdb/cua/buffersize                         30000
    sap/bufdir_entries                          9000
    zcsa/presentation_buffer_area               120000000
    zcsa/table_buffer_area                      280000000
    zcsa/db_max_buftab                          60000
    My point is dont just change it, correct the problem! it doesnt need to be the bigest number you can think of or get away with. it needs to be balanced.
    My hit ratio is 99.96 and i wager with 1000s more users.
          Buffer            Hitratio   Allocated         Free space        Dir. size      Free directory         Swaps
                               [%]       [kB]         [kB]         [%]      Entries      Entries       [%]
    Program                   99.96       927,192       24,194     2.69       225,000      206,972    91.99        11,796
    The hit ratio is of what has been provided by the buffer rather than by direct DB access. However the buffer could well have been paged out to disk millions of times and still indicate a 99.9% rate.
    Ask yourself are you doing new things, are you doing them for the first time since a reboot?

  • Question on program logic using SKC1A

    Account -     Using SAKNR and selected company code (BUKRS) get alternative account using table SKB1
    Description - To be obtained from SKA1 using account number found above in chart of accounts  CEFR
    Carry-forward debit - UMSAV
    Debit period from 1 to n - ii=01 to pp UMiiS
    Credit period from 1 to n - ii=01 to pp UMiiH
    In order to obtain this text file, an ABAP program should be written. The extraction program should use structure SKC1A to obtain data and use the following selections:
    BUKRS : Company code
    SAKNR : no selection
    GJAHR : Fiscal Year
    GSBER : no selection
    CURTP : 10 (can be hardcoded and displayed)
    HWAER : EUR (can be hard-coded and displayed)
    Period : pp (from 01 to special period 13)
    I wrote the program using the function 'FOR_ALL_SKC1A'. I have attached it below.
    after the final specs came from the user, this following line was included
    An example of the use of this structure can be found in program RFSSLD00
    I looked at the program RFSSLD00 and it's logic is nowhere near mine. It uses a statement GET SKC1A. after looking at this program,
    I am not I have the program coded correctly based on the specs.
    can somebody let me know if I am doing this correctly or if I need to mirror my program after the RFSSLD00.
    *& Report  ZFI_FR_ETAFI
    REPORT  ZFI_FR_ETAFI.
      TABLES
    TABLES:
        skat.    "G/L Account Master Record (Chart of Accounts: Description)
      TYPES
    TYPES:  BEGIN OF ty_skat,
            saknr TYPE skat-saknr, "Account Number
            txt50 TYPE skat-txt50, "account Description
            END OF ty_skat.
      DATA
    data: begin of itab occurs 0,
          filler1(5)      TYPE C,
          account(6)      TYPE C,
          filler2(4)      TYPE C,
          description(35) TYPE c,
          filler3(39)     TYPE c,
          carryfwdamt(21) TYPE c,
          filler4(70)     TYPE c,
          totdeb(18)      TYPE c,
          filler5(63)     TYPE c,
          totcred(18)     TYPE c,
          end of itab.
    data: iskc1a  TYPE TABLE          of skc1a   with header line.
    data: it_skat TYPE STANDARD TABLE OF ty_skat with header line.
    data: w_totcred   like skc1a-um01s.
    data: w_totdeb    like skc1a-um01s.
    data: w_cramount  like skc1a-um01s.
    data: w_dbamount  like skc1a-um01s.
    *SELECT-OPTIONS:
    PARAMETERS                                                           *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_ktopl TYPE skat-ktopl    OBLIGATORY,
                p_bukrs TYPE skb1-bukrs    OBLIGATORY,
                p_year  TYPE payr-gjahr    OBLIGATORY,
                p_poper TYPE bkpf-monat    OBLIGATORY.
    SELECTION-SCREEN END   OF BLOCK b1.
    *START-OF-SELECTION                                                    *
    START-OF-SELECTION.
    SELECT saknr txt50
      FROM skat INTO TABLE it_skat
    WHERE ktopl = p_ktopl.
    loop at it_skat.
      CLEAR iskc1a. REFRESH iskc1a.
      call function 'FOR_ALL_SKC1A'
        exporting
          xbukrs = p_bukrs
          xsaknr = it_skat-saknr
        tables
          xskc1a = iskc1a
        exceptions
          key_incomplete = 1
          not_authorized = 2
          not_found      = 3.
    loop at iskc1a.
        if iskc1a-gjahr = p_year.
          w_cramount = 0.
          w_dbamount = 0.
          w_totcred  = 0.
          w_totdeb   = 0.
          do p_poper times
            varying w_cramount from iskc1a-um01s next iskc1a-um02s.
            w_totcred = w_totcred + w_cramount.
          enddo.
          do p_poper times
            varying w_dbamount from iskc1a-um01h next iskc1a-um02h.
            w_totdeb  = w_totdeb  + w_dbamount.
         enddo.
        if it_skat-saknr(4) = '0000'.
          itab-account      = it_skat-saknr+4.
        else.
          itab-account      = it_skat-saknr.
        endif.
        itab-description  = it_skat-txt50.
        itab-carryfwdamt  = iskc1a-umsav.
        shift itab-carryfwdamt right deleting trailing space.
        itab-totdeb       = w_totdeb.
        shift itab-totdeb right deleting trailing space.
        itab-totcred      = w_totcred.
        shift itab-totcred right deleting trailing space.
        if itab-carryfwdamt <> 0 or
           itab-totdeb      <> 0 or
           itab-totcred     <> 0.
            append itab.
         endif.
       endif.
      endloop.
    endloop.
    call function 'GUI_DOWNLOAD'
      exporting
        filename = 'C:\ETAFI.txt'
      tables
        data_tab = itab
      EXCEPTIONS
         file_write_error                = 1
         no_batch                        = 2
         gui_refuse_filetransfer         = 3
         invalid_type                    = 4
         no_authority                    = 5
         unknown_error                   = 6
         header_not_allowed              = 7
         separator_not_allowed           = 8
         filesize_not_allowed            = 9
         header_too_long                 = 10
         dp_error_create                 = 11
         dp_error_send                   = 12
         dp_error_write                  = 13
         unknown_dp_error                = 14
         access_denied                   = 15
         dp_out_of_memory                = 16
         disk_full                       = 17
         dp_timeout                      = 18
         file_not_found                  = 19
         dataprovider_exception          = 20
         control_flush_error             = 21
         OTHERS                          = 22.
    IF sy-subrc <> 0.
       write: / ' process unsuccessful'.
    ELSE.
       write: / 'process successful'.
    ENDIF.
    *END-OF-SELECTION                                                      *

    That program uses a logical database to get the data.  This is why it looks different.  Don't worry, as long as you can verify the data against something else, you can do it the way that you are.  Personally, I never use logical databases. 
    REgards,
    Rich Heilman

  • ABAP Report Program Logical Database PNP

    I have a ABAP program using the logical database PNP. The report is config to run on MSS using EP. I have added code to capture the Org Unit when it is pass to the program from MSS.  My issue is how do i capture the org unit value that is passed to the program.   I have added code to capture field pnporgeh  in the START OF SELECTION event.   This works great if you are running the program from R3, but none of my edit checking against field pnporgeh works.

    Hi John,
    I am also having same trouble where in i have added a new custom(Z) report in the MSS ->My Staff -> Reporting under report category -> Time Management (MSS). I am not able to find how the value of org unit which is selected on portal screen is passed to report in R/3 which is using PNP logical db.
    I tested in debugging but selection screen parameter PNPORGEH contains nothing.
    Many Thanks in advance for the help.
    Edited by: Ankit Kashyap on Nov 17, 2010 12:40 PM

  • 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&mdash;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.

  • Regarding the Logical Path and file name

    Hi all ,
    I am using LSMW for creating  the BOM of a material .
    I am getting problem at step 7 , saying the logical path is pointing to physical directory .
    Then i did some R & D . I created the logical path and logical file name using transaction FILE . Then i got the physical path using FM file_get_name.
    But when i give those logical path and logical file names , still i am getting prob.... at step 7 of lsmw.
    Pls let me know . I did my best unti l now ....
    Regards

    Hi Raj,
    Can you send the Error which you got at Step 7??
    It would be of great help if you can send the File Path and the file names you have used.
    Regards,
    -Syed.

Maybe you are looking for

  • Posting of duty paid material

    Hi All, I have a issue of duty posting after PGI. A customer is duty suspended so he is not suppose to pay any duty on material he is ordering. But the maerial he is ordering is duty paid. Now as per the pricing procedure condition value of Duty is a

  • Powernap consuming lots of power?

    Hi all, This morning my Mac (Retina) was 100% and the lid was closed. 8 hours after, I open the lid and it's now 91%. Anybody experiences this power drain? ... and is it powernap? Thanks! Mojo

  • SALES AREA TAB NOT ENABLED IN BP -SOLD TO PARTY

    Hi All, I have created Sales Org in Org Model and tupel assignment is also done. Object is permitted for determination is also checked. But when i create Sold to Party in  BP then not able to select sales area. Choose Sales Area Tab is disabled. Can

  • How do I disable Content Browser?

    I am a student. I have my class on blackboard. I have been unable to "Add Attachment" to submit my assignments. My assignments are saved on my flash drive. When I hit the "Add Attachment" button, something called the "Content Browser" comes up. It wi

  • Flash 8 login showing strange behaviour

    I am developing a Flash 8 login for my website but the problem is once loaded I fill in my credentials and press login.... It only recieves the password and not the username (alert box used to show this) and once first attempt is over I try again and