Calling a exit from a FM

Hi,
I have written the coding in an include (i.e for an exit), now i would like to call it from a FM, how?. help is appreciable.
Thanks.

Hi Mudassir,
USER EXITS->
1. Introduction:
User exits (Function module exits) are exits developed by SAP.
The exit is implementerd as a call to a functionmodule.
The code for the function module is writeen by the developer.
You are not writing the code directly in the function module,
but in the include that is implemented in the function module.
The naming standard of function modules for functionmodule exits is:
EXIT_<program name><3 digit suffix>
The call to a functionmodule exit is implemented as:
CALL CUSTOMER.-FUNCTION <3 digit suffix>
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
CUSTOMER EXITS-> t-code CMOD.
As of Release 4.6A SAP provides a new enhancement technique, the Business Add-Ins.
Among others, this enhancement technique has the advantage of
being based on a multi-level system landscape (SAP, country versions, IS solutions, partner,
customer, and so on)
instead of a two-level landscape (SAP, customer) as with the customer exits.
You can create definitions and implementations of business add-ins at any level of the system landscape.
To unify enhancements of the SAP Standard you can migrate customer exits to business add-ins.
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
In order to find out the user exits for any tcode,
1. get the developement class of the tcode from SE93.
2. Now goto transaction SMOD and press F4,
3. give in the Deve class in the dev class and Press ENTER
this will show u the exits for any tcode.
or execute this report
http://www.erpgenie.com/sap/abap/code/abap26.htm
which gives the list of exits for a tcode
http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
For information on Exits, check these links
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
Regards,
Younus
<b>Reward Helpful Answers!!!</b>

Similar Messages

  • Calling System.exit() from multiple threads

    Hi,
    Why would calling System.exit() from multiple threads cause all the threads to block?
    Laith

    Thanks for your replies.
    I made further tests and the problem is actually not as I described it first.
    I'm using a shutdown hook that would stop all running threads if the program is stopped externally (using ctl-c for example) (I'm not using Thread.stop(), but setting a boolean value to false that would make the thread exit a while() loop in run()) .
    One of the running threads would call System.exit(-1) just before it would exit run().
    This thread is getting blocked if it is stopped by the shutdown hook.
    I know that this is a bad coding practice, bout would still appreciate an explanation to the reason why the thread is actually blocked by System.exit().
    Laith

  • Call an applications 'user exit' from a PL/SQL procedure

    My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it?
    (i.e. I am attempting to call the AR user exit SALESTAX)
    Thanks,
    Michelle Dodge

    Hi,
    Read this thread, perhaps is there your response :
    Host...
    Nicolas.

  • Calling System.exit(0) from an applet

    Hello,
    I have a weird problem.
    First... my applet has full permissions in the java.policy file.
    problem:
    When I call System.exit(0) from the applet (jbutton's action listener), the applet disappears from the browser window and the browser freezes.
    but
    if I display a messagedialog (JoptionPane) before calling System.exit(0) ... everything works fine (after I press ok on the message dialog, the browser window disappears)
    here's my code
    <CODE>
    public class testApp extends JApplet{
    public void init(){
    System.err.println("hello");
    JButton button = new JButton("Exit");
    button.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    JOptionPane.showMessageDialog(new JFrame(),"Exiting...");
    System.exit(0);
    this.getContentPane().add(button);
    </CODE>
    what am I missing?

    an applet has security restrictions that forbids it from accessing a client file system. BUT there are ways like signing your applet or just asking the user to change the security setting when he calls the applet.
    This link shows the steps involved in signing an applet very clearly. :-http://developer.java.sun.com/developer/technicalArticles/Security/Signed/
    Or the user(client) can go to the "Internet Option" under the Tools of the web browser(IE). Go to security and change to custom security for the Internet.(Caution the user needs to return the security to default after finishing accessing the applet). Click to "Custom Java Setting" button. If you don't see a "Custom Java Setting" button below then scroll down to "Java Permissions" option and select custom. Now you will see the "Custom Java Setting" button. Go there and select "edit permission" tab. Under "Unsigned Content" select enable. This will grant full permission.

  • Unable to call a procedure from inside a another procedure

    Dear members
    I am trying to call a procedure from inside an another procedure.Both the procedures are present within the same package.I am trying to call the second procedure just before the end of the first procedure.Both the procedures are compiling fine but the tables are not getting populated inside the second procedure.Also the DBMS_OUTPUT statements present in second procedures are not getting displayed.(I feel the second procedured is not getting called).
    The package specification is as follows:
    CREATE OR REPLACE package ANVESH.conv_api_pkg
    is
        PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2) ;
        TYPE cts_order_details IS TABLE OF XXCTS_ORDER_DETAILS_STG%ROWTYPE;
        PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details) ;
    end conv_api_pkg;The package body is as follows:
    CREATE OR REPLACE package body ANVESH.conv_api_pkg
    is
    PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2)
    IS
        v_file_type utl_file.file_type;
        v_buffer VARCHAR2(1000);
        V_CUSTOMER_NAME VARCHAR2(100);
        V_MANUFACTURER VARCHAR2(100);
        V_PRODUCT_NAME VARCHAR2(100);
        V_QUANTITY NUMBER;
        V_REQ_SHIP_DATE DATE;
        V_REQ_PRICE NUMBER;
        V_LOG_FILE utl_file.file_type;
        V_COUNT_CUST NUMBER;
        V_COUNT_PROD NUMBER;
       L_ORDER_LINES CONV_API_PKG.cts_order_details:=CONV_API_PKG.cts_order_details();
    BEGIN
        DBMS_OUTPUT.PUT_LINE('Inside begin 1');
        v_file_type := UTL_FILE.fopen(FILE_PATH, FILE_NAME, 'r',null);
            DBMS_OUTPUT.PUT_LINE('Inside begin 1.1');
        LOOP
            BEGIN
                        DBMS_OUTPUT.PUT_LINE('Inside begin 2');
                         UTL_FILE.GET_LINE (v_file_type,v_buffer);
                        DBMS_OUTPUT.PUT_LINE('Inside begin 2.1');
                        DBMS_OUTPUT.PUT_LINE('the  buffer is '||v_buffer);
                        DBMS_OUTPUT.PUT_LINE('the length of buffer is '||length(v_buffer));
                         V_CUSTOMER_NAME := trim(substr(v_buffer, 1, 30));
                         DBMS_OUTPUT.PUT_LINE('Customer Name is '||V_CUSTOMER_NAME);
                         V_MANUFACTURER  := trim(substr(v_buffer, 31, 40));
                         DBMS_OUTPUT.PUT_LINE('Manufacturer is '||V_MANUFACTURER);
                         V_PRODUCT_NAME  := trim(substr(v_buffer,  71, 20));
                         DBMS_OUTPUT.PUT_LINE('Product Name is '||V_PRODUCT_NAME);
                         V_QUANTITY      := to_number(trim(substr(v_buffer, 91, 5)));
                         DBMS_OUTPUT.PUT_LINE('Quantity is '||V_QUANTITY);
                         V_REQ_SHIP_DATE     := to_date(trim(substr(v_buffer, 96, 20)), 'DD-MON-YYYY');
                         DBMS_OUTPUT.PUT_LINE('Requested Ship Date is '|| V_REQ_SHIP_DATE);
                        V_REQ_PRICE        :=nvl(substr( trim(v_buffer), 116, length(v_buffer)-116),0);
                        --DBMS_OUTPUT.PUT_LINE('Requested Price is1 '||substr(v_buffer, 116, 5));
                        DBMS_OUTPUT.PUT_LINE('The requested price is  '||V_REQ_PRICE);
                V_LOG_FILE := UTL_FILE.FOPEN(FILE_PATH, 'LOG_FILE.dat', 'A');
                    IF (V_QUANTITY > 0)
                     THEN
                     DBMS_OUTPUT.PUT_LINE('The quantity is '||V_QUANTITY);
                       SELECT COUNT (*)
                       INTO V_COUNT_CUST
                       FROM CONVERSION_CUSTOMERS
                       WHERE CUSTOMER_NAME = V_CUSTOMER_NAME;
                       DBMS_OUTPUT.PUT_LINE('The Customer count is '||V_COUNT_CUST);
                       IF(V_COUNT_CUST > 0)
                       THEN
                           SELECT COUNT(*)
                           INTO V_COUNT_PROD
                           FROM conversion_products
                           WHERE PRODUCT_NAME = V_PRODUCT_NAME;
                           DBMS_OUTPUT.PUT_LINE('The Product count is '||V_COUNT_PROD);
                          IF(V_COUNT_PROD >0)
                           THEN
                                INSERT INTO XXCTS_ORDER_DETAILS_STG VALUES (V_CUSTOMER_NAME, V_PRODUCT_NAME, V_MANUFACTURER, V_QUANTITY, V_REQ_SHIP_DATE, V_REQ_PRICE, 'ACTIVE', 'ORDER TAKEN');  
                           ELSE
                                DBMS_OUTPUT.PUT_LINE('PRODUCT SHOULD BE VALID');
                                UTL_FILE.PUT_LINE(V_LOG_FILE, 'PRODUCT SHOULD BE VALID');                   
                           END IF;
                       ELSE
                          DBMS_OUTPUT.PUT_LINE('CUSTOMER SHOULD BE VALID');
                          UTL_FILE.PUT_LINE(V_LOG_FILE, 'CUSTOMER SHOULD BE VALID');
                       END IF;      
                    ELSE
                        DBMS_OUTPUT.PUT_LINE('QUANTITY SHOULD BE VALID');
                        UTL_FILE.PUT_LINE(V_LOG_FILE, 'QUANTITY SHOULD BE VALID');
                    END IF;
                    EXCEPTION
                    WHEN NO_DATA_FOUND THEN
                        EXIT;
                    END;
        END LOOP;
    SELECT CUSTOMER_NAME, PRODUCT_NAME, MANUFACTURER, QUANTITY, REQUESTED_SHIP_DATE, REQUESTED_PRICE, STATUS,MESSAGE
    BULK COLLECT
    INTO L_ORDER_LINES
    FROM XXCTS_ORDER_DETAILS_STG;
    DBMS_OUTPUT.PUT_LINE('values inserted');
    proc_conversion_api2(p_orderdetails=>L_ORDER_LINES);
    END;
    PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details)
      IS
      V_AVL_QUANTITY CONVERSION_PRODUCTS.AVL_QUANTITY%TYPE;
      V_REQ_SHIP_DATE DATE;
      V_LIST_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_NET_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_NET CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_EXTN_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_CUST_DISC CONVERSION_CUSTOMERS.DISCOUNT%TYPE;
      V_CERT_DISC CONVERSION_CERTIFICATION.DISCOUNT%TYPE;
      V_CUST_ID XXCTS_ORDER_DETAILS.CUSTOMER_ID%TYPE;
      V_PROD_ID XXCTS_ORDER_DETAILS.PRODUCT_ID%TYPE;
      V_DISC_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
      V_DISC_NAME CONVERSION_CERTIFICATION.CERTIFICATION%TYPE;
      V_TOTAL_DISC_AMT NUMBER;
      V_TOTAL_DISC NUMBER;
      V_LIMIT NUMBER;
    BEGIN
        DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 1');
            FOR i IN p_orderdetails.FIRST..p_orderdetails.LAST
            LOOP
                 BEGIN
                DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 2');
                SELECT PRODUCT_ID,AVL_QUANTITY,LIST_PRICE
                INTO V_PROD_ID,V_AVL_QUANTITY,V_LIST_PRICE
                FROM CONVERSION_PRODUCTS
                WHERE PRODUCT_NAME=p_orderdetails(i).PRODUCT_NAME;
                DBMS_OUTPUT.PUT_LINE('PRODUCT QUANTITY is '||V_PROD_ID);
                DBMS_OUTPUT.PUT_LINE('AVAILABLE QUANTITY is '||V_AVL_QUANTITY);
                DBMS_OUTPUT.PUT_LINE('LIST PRICE is '||V_LIST_PRICE);
                SELECT CUSTOMER_ID,NVL(DISCOUNT,0)
                INTO V_CUST_ID,V_CUST_DISC
                FROM CONVERSION_CUSTOMERS
                WHERE CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                DBMS_OUTPUT.PUT_LINE('CUSTOMER ID is '||V_CUST_ID);
                DBMS_OUTPUT.PUT_LINE('CUSTOMER DISCOUNT IS '||V_CUST_DISC);
                SELECT A.DISCOUNT,A.CERTIFICATION
                INTO  V_CERT_DISC,V_DISC_NAME
                FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
                WHERE A.CERTIFICATION=B.CERTIFICATION(+)
                AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                DBMS_OUTPUT.PUT_LINE('CERTIFICATION DISCOUNT IS '||V_CERT_DISC);
                V_NET:=((V_LIST_PRICE)-(V_LIST_PRICE)*(V_CERT_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER CERTIFICATION DISCOUNT IS '||V_NET);
                V_NET_PRICE:=((V_NET)-(V_NET)*(V_CUST_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER COMPLETE DISCOUNT IS '||V_NET_PRICE);
                V_EXTN_PRICE:=(V_NET_PRICE)*(p_orderdetails(i).QUANTITY);
                DBMS_OUTPUT.PUT_LINE('EXTENDED PRICE IS '||V_EXTN_PRICE);
                V_TOTAL_DISC:=((V_CERT_DISC)/100+(V_CUST_DISC)/100);
                DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT IS '|| V_TOTAL_DISC);
                V_TOTAL_DISC_AMT:=(V_LIST_PRICE)-(V_NET_PRICE);
                DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT PRICE IS '|| V_TOTAL_DISC_AMT);
                SELECT MAX(A.LIMIT)
                INTO V_LIMIT
                FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
                WHERE A.CERTIFICATION=B.CERTIFICATION(+)
                AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
                IF p_orderdetails(i).QUANTITY<V_AVL_QUANTITY THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'QTY HOLD','REQ QNTY LESS THAN AVL QTY',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
                IF p_orderdetails(i).REQUESTED_SHIP_DATE<SYSDATE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'DATE HOLD','SHIPDATE CANNOT BE LESS THAN CURR DATE',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
                IF V_NET_PRICE>p_orderdetails(i).REQUESTED_PRICE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'PRICE HOLD','NET PRICE CANNOT BE MORE THAN REQ PRICE',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;
               /* IF V_LIMIT<p_orderdetails(i).REQUESTED_PRICE THEN
                INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'ORDER LIMIT HOLD','PRICE CANNOT EXCEED ORDER LIMIT',SYSDATE);
                INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
                END IF;*/
                EXCEPTION
                WHEN NO_DATA_FOUND THEN
                DBMS_OUTPUT.PUT_LINE(' INSIDE EXCEPTION BLOCK');
                END;
            END LOOP;
    END;
    end conv_api_pkg;
    /the pl/sql block to invoke the the procedure :
    declare
    begin
    PROC_CONVERSION_API('/usr/tmp' ,'Walmart_Orders_062908.dat');
    end;please let me know what is wrong in the program.
    Thanks
    Anvesh

    Hi Walter
    Yes 'Inside begin 1' and 'Inside begin 2' were printed.Please find the the DBMS_OUTPUT statements that were printed.
    Inside begin 1
    Inside begin 1.1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       SONY ERICSSON                           W580i               25   1-AUG-2008          50
    the length of buffer is 118
    Customer Name is BESTBUY
    Manufacturer is SONY ERICSSON
    Product Name is W580i
    Quantity is 25
    Requested Ship Date is 01-AUG-08
    The requested price is  50
    The quantity is 25
    The Customer count is 1
    The Product count is 0
    PRODUCT SHOULD BE VALID
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       SAMSUNG                                 BLACKJACK           50   15-JUL-2008         150
    the length of buffer is 119
    Customer Name is BESTBUY
    Manufacturer is SAMSUNG
    Product Name is BLACKJACK
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  150
    The quantity is 50
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       APPLE                                   IPHONE 4GB          50   15-JUL-2008        
    the length of buffer is 116
    Customer Name is BESTBUY
    Manufacturer is APPLE
    Product Name is IPHONE 4GB
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  0
    The quantity is 50
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       ATT                                     TILT                100  15-JUN-2008        
    the length of buffer is 116
    Customer Name is BESTBUY
    Manufacturer is ATT
    Product Name is TILT
    Quantity is 100
    Requested Ship Date is 15-JUN-08
    The requested price is  0
    The quantity is 100
    The Customer count is 1
    The Product count is 1
    Inside begin 2
    Inside begin 2.1
    the  buffer is BESTBUY                       NOKIA                                   N73                 50   15-JUL-2008         200
    the length of buffer is 118
    Customer Name is BESTBUY
    Manufacturer is NOKIA
    Product Name is N73
    Quantity is 50
    Requested Ship Date is 15-JUL-08
    The requested price is  20
    The quantity is 50
    The Customer count is 1
    The Product count is 0
    PRODUCT SHOULD BE VALID
    Inside begin 2In the first procedure I am trying to read the data from a flat file and store it in a table.Here is the sample data from the flat file.
    BESTBUY                       SONY ERICSSON                           W580i               25   1-AUG-2008          50
    BESTBUY                       SAMSUNG                                 BLACKJACK           50   15-JUL-2008         150
    BESTBUY                       APPLE                                   IPHONE 4GB          50   15-JUL-2008        
    BESTBUY                       ATT                                     TILT                100  15-JUN-2008        
    BESTBUY                       NOKIA                                   N73                 50   15-JUL-2008         200When tried to execute the second procedure independently using the PL/SQL block,the tables in second procedure were populated and the DBMS_Output statements were also displayed.I have made use of the same query in that case
    Thanks
    Anvesh
    Edited by: Anvesh Reddy on Dec 23, 2008 12:40 PM

  • Calling A Form From Another One

    hi i am trying to call a form that i have constructed before named "MENU_form" from the "LOGIN" form. I have imported the "MENU_form" but i can't use it as an another frame inside the LOGIN form.
    At Login Form, after the user enters the correct usrname and password, i want to redirect the form to Menu_Form. Need your help...
    Also here is the code...
    package project;
    import java.sql.Connection;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import project.IConnect;
    import project.MENU_form;
    * @author buro
    public class login extends javax.swing.JFrame {
    /** Creates new form login */
    public login() {
    initComponents();
    private void initializeComponent()
    /** 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 ">
    private void initComponents() {
    jLabel1 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setText("KULLANICI G\u0130R\u0130S\u0130");
    jButton1.setText("G\u0130R\u0130S");
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton1MouseClicked(evt);
    jLabel2.setText("Kullan\u0131c\u0131 Ad\u0131");
    jLabel3.setText("\u015eifre");
    jLabel4.setForeground(new java.awt.Color(255, 0, 51));
    jLabel4.setText("a");
    jButton2.setText("\u00c7IKI\u015e");
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton2MouseClicked(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(20, 20, 20)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGap(24, 24, 24)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
    .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 146, Short.MAX_VALUE)
    .addComponent(jButton2)
    .addGap(23, 23, 23))
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(27, 27, 27)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel2))
    .addGap(20, 20, 20)
    .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(jLabel3))
    .addGap(15, 15, 15)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jButton2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE))
    .addGap(20, 20, 20)
    .addComponent(jLabel4)
    .addContainerGap(281, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {                                     
    // TODO add your handling code here:
    System.out.println("User exited application");
    System.exit(3);
    private void methodName22()
    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {                                     
    // TODO add your handling code here:
    String nul="";
    if( (nul.equals(jTextField1.getText())) || (nul.equals(jTextField2.getText())) )
    jLabel4.setText("Bos Alanlar? Doldurunuz!!!");
    else
    String usr= jTextField1.getText();
    String pwd= jTextField2.getText();
    try {  
    Connect baglan= new Connect();
    Connection connection=baglan.Connect();
    Statement stm = connection.createStatement();
    String sql;
    //SELECT
    ResultSet rs=stm.executeQuery("select * from login where username='"+usr+"' and passwor='"+pwd+"'");
    if(rs.next()==true)
    jLabel4.setText("Success!!!");
    this.setVisible(false);
    // ************* HERE I want to call "MENU_form". HOW ??????
    else
    jLabel4.setText("fault!!!");
    } catch(Exception e)
    {  e.printStackTrace(); }//end of catch
    }//end of else
    private void initialize()
    jLabel4 = new JLabel();
    jLabel4.setText("");
    public static void main(String args[])
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new login().setVisible(true);
    //initialize();
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    // End of variables declaration

    Hi,
    this is the way i am showing a password dialog: i derive this class from JDialog (not from JFrame).
    In its constructor, i make it a modal dialog.
    public class PasswordDlg extends JDialog {
    private boolean ok; // this flag should indicate whether the User has pressed OK or CANCEL
                                 // i omit the code for OK and CANCEL here...
    public PasswordDlg(JFrame owner, String DisplayText) {
         super(owner,DisplayText,true); // true -> modal!
      public boolean showDialog()
        { ok = false;
          show();
          return ok;}
    } Now in my main frame (this is derived from JFrame) in its constructor, i make an instance of my PasswordDlg, call its showDialog method, ask the password from the dialog (i have omitted this method), and then i decide, whether the program should go on or whether i call System.exit(0) in case the password is wrong.
    regards
    BugBunny

  • Example of how to call a BadI from an Abap and use the NEW OO ALV Grid

    Very easy to do.
    <b>REPORT  Z_BADI_TEST.
    test call Badi from standard abap.
    *Only from rel 6.40
    do the following
    1) define the Badi  (SE18).
    For Abap call test uncheck multiple use
    and filter boxes
    2) Implement the badi (SE19).
    Add any methods here in the implementation
    3) activate
    4)  define the standard class exithandler to the
    Abap. This class is the "Badi caller
    5)  define an exit variable referring to your Badi
    Implementation interface
    this interface  will normally be
    called something like 
    ZIF_EX***************
      You will see the actual name in SE18/SE19.
    6)  Instantiate your instance of the badi
    via  method call get_instance
    7)  Now call any method(s) in the Badi.
    *****************start of abap code **************
    Define the Badi calling class (standard sap class)
      class cl_exithandler definition load.   "Declaration
    *Interface reference  
      data exit type ref to zif_ex__jimbotest.    
         data yes type c.
    Used in Fmod call in Badi methods
        data: v_knvv type knvv.
        start-of-selection.
        yes = ' '.
      selection-screen  begin of block b1.
      parameters: r1  radiobutton  group rad1,
                  r2  radiobutton group rad1,
                  r3  radiobutton group rad1.
      selection-screen end of block b1.
        parameters: p_kunnr type knvv-kunnr.
        select  single * into v_knvv
        from knvv
         where kunnr eq p_kunnr.
         export v_knvv to memory id 'CUST6A'.
    *Save customer data for the function module call
    call method cl_exithandler=>get_instance 
           exporting 
           exit_name    = 'Z_JIMBOTEST' "Your Badi Name
           null_instance_accepted = yes
              changing instance = exit.
       if not exit is initial.
           if r1 = 'X'.
         call method exit->dispord .  "Badi call
          endif.
    if r2 = 'X'.
    call method exit->dispfakt.     "Badi Call
    endif.
    if r3 = 'X'.
    call method exit->dispmat.      "Badi call
    endif.
    end of calling abap******** </b>
    In the badi   methods code as shown
    1)
    method ZIF_EX__JIMBOTEST~DISPORD.
    CALL FUNCTION 'Z_DISPLAY_CUST'.
    endmethod.
    2)
    method ZIF_EX__JIMBOTEST~DISPFAKT.
    CALL FUNCTION 'Z_DISPLAY_FAKT'.
    endmethod
    3)
    method ZIF_EX__JIMBOTEST~DISPMAT.
    CALL FUNCTION 'Z_DISPLAY_CUST'.
    endmethod.
    Copy via SE 41 the status SALV_STANDARD from  standard SAP program SALV_DEMO_METADATA into the main program where you've created the 3 function modules below (SAP______TOP)
    Global Data for the three function modules I'm calling
    FUNCTION-POOL Z_BADI_KNVV.                  "MESSAGE-ID ..
    include <color>.
    include <icon>.
    include <symbol>.
    tables: zknvv.
    data: v_zzkvgr6  TYPE KNVV-ZZKVGR6.
    data: choice1  type c.
    data: choice2 type c.
    data: choice3 type c.
    data: choice4 Type c.
    data: ok-code(5) type c.
    data: answer type string.
    data: value1 type SPOP-VARVALUE1.
    data: answer1  type string.
    tables:  vbak, vbap,  vakpa, vbrk, vrkpa.
    data: lr_functions type ref to cl_salv_functions_list.
    constants: gc_true  type sap_bool value 'X',
               gc_false type sap_bool value space.
    add for colour displays
       data: ls_color type lvc_s_colo.
       DATA : LV_SALV_COLUMNS_TABLE TYPE REF TO CL_SALV_COLUMNS_TABLE.
      data: lr_columns type ref to cl_salv_columns_table,
            lr_column  type ref to cl_salv_column_table.
    Data:
            gr_table TYPE REF TO cl_salv_table.
    data: z_datum type sy-datum.
    data: v_knvv type knvv.
    data : begin of s_vbak,
              vkorg   type vakpa-vkorg,
              vkgrp   type vakpa-vkgrp,
              vtweg   type vakpa-vtweg,
              spart   type vakpa-spart,
              auart   type vakpa-auart,
              vbeln   type vakpa-vbeln,
              bstnk   type vakpa-bstnk,
              audat   type vakpa-audat,
              netwr   type vbak-netwr,
           end of s_vbak.
    data : begin of s_vbrk,
              vbeln   type vrkpa-vbeln,
              vkorg   type vrkpa-vkorg,
              fkart   type vrkpa-fkart,
              fkdat   type vrkpa-fkdat,
              netwr   type vbrk-netwr,
           end of s_vbrk.
      data: begin of s_vbap,
             matnr   type vbap-matnr,
             arktx   type vbap-arktx,
             netwr   type vbap-netwr,
             kwmeng  type vbap-kwmeng,
          end of s_vbap.
    data: t_vbap like table of s_vbap.
    data:   t_vbak
            like table of s_vbak.
      data:   t_vbrk
            like table of s_vbrk.
    data:   s_name  type tabname.
    data: gr_selections type ref to cl_salv_selections.
    data: gr_events type ref to cl_salv_events_table.
    Source code of the function modules.
    Function modules themselves
    FUNCTION Z_DISPLAY_CUST.
    s_name = 'S_VBAK'.
    orders in last 6 months
    z_datum = sy-datum - 180.
    import v_knvv from memory id 'CUST6A'.
    get data
       select avkorg aaudat avkgrp avtweg aspart aauart abstnk avbeln b~netwr
          into corresponding fields of  table t_vbak
          up to 100 rows
             from (  vakpa as a
              inner join vbak as b
               on avbeln eq bvbeln )
            where a~kunde eq v_knvv-kunnr
            and a~parvw eq 'AG'
           and a~vkorg eq 'EN01'
            and a~trvog eq '0'
            and a~audat gt z_datum.
    sort t_vbak by audat descending.
    *data: gt_hyperlink type standard table of g_type_s_hyperlink.
    Instead of if_salv_c_bool_sap=>false, you can pass the
    value if_salv_c_bool_sap=>true to this method to
    see your ALV as a list.
    display data in Grid / List
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              list_display   = if_salv_c_bool_sap=>false
            IMPORTING
              r_salv_table   = gr_table
            CHANGING
              t_table    = t_vbak.
        CATCH cx_salv_msg.
      ENDTRY.
    try.
    LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
          ls_color-col = col_negative.
          ls_color-int = 0.
          ls_color-inv = 0.
          lr_column->set_color( ls_color ).
      catch cx_salv_not_found.
    endtry.
    try.
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
    ls_color-col = col_negative.
          ls_color-int = 1.
          ls_color-inv = 1.
          lr_column->set_color( ls_color ).
    catch cx_salv_not_found.
    endtry.
    try.
    *LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
    lr_column->set_short_text( 'Short' ).
    lr_column->set_medium_text( 'Medium' ).
    lr_column->set_long_text( 'Net Value' ).
    *lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
    catch cx_salv_not_found.
    endtry.
    gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
    report = sy-repid
    set_functions = gr_table->c_functions_all ).
    this statement actually does the display.
      gr_table->display( ).
    ENDFUNCTION.
    FUNCTION Z_DISPLAY_FAKT.
    s_name = 'S_VBRK'.
    invoices in last 6 months
    z_datum = sy-datum - 180.
    import v_knvv from memory id 'CUST6A'.
    get data
       select avbeln afkart avkorg afkdat
         b~netwr
          into corresponding fields of  table t_vbrk
          up to 100 rows
             from (  vrkpa as a
              inner join vbrk as b
               on avbeln eq bvbeln )
            where a~kunde eq v_knvv-kunnr
            and a~parvw eq 'RG'
           and a~vkorg eq 'EN01'
            and a~vbtyp eq 'M'
            and a~fkdat gt z_datum.
    sort t_vbrk by fkdat descending.
    *data: gt_hyperlink type standard table of g_type_s_hyperlink.
    Instead of if_salv_c_bool_sap=>false, you can pass the
    value if_salv_c_bool_sap=>true to this method to
    see your ALV as a list.
    display data in Grid / List
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              list_display   = if_salv_c_bool_sap=>false
            IMPORTING
              r_salv_table   = gr_table
            CHANGING
              t_table    = t_vbrk.
        CATCH cx_salv_msg.
      ENDTRY.
    try.
    LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
          ls_color-col = col_negative.
          ls_color-int = 0.
          ls_color-inv = 0.
          lr_column->set_color( ls_color ).
          catch cx_salv_not_found.
    endtry.
    try.
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
    ls_color-col = col_negative.
          ls_color-int = 1.
          ls_color-inv = 1.
          lr_column->set_color( ls_color ).
    catch cx_salv_not_found.
    endtry.
    try.
    *LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
    lr_column->set_short_text( 'Short' ).
    lr_column->set_medium_text( 'Medium' ).
    lr_column->set_long_text( 'Net Value' ).
    *lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
    catch cx_salv_not_found.
    endtry.
    gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
    report = sy-repid
    set_functions = gr_table->c_functions_all ).
    this statement actually does the display.
      gr_table->display( ).
    ENDFUNCTION.
    FUNCTION Z_DISPLAY_MATERIAL.
    s_name = 'S_VBAP'.
    invoicesrs in last 6 months
    z_datum = sy-datum - 180.
    import v_knvv from memory id 'CUST6A'.
    get data
    select avbeln bmatnr barktx bnetwr b~kwmeng
    into corresponding fields of  table t_vbap
          up to 100 rows
    from (  vakpa as a
              inner join vbap as b
               on avbeln eq bvbeln )
            where a~kunde eq v_knvv-kunnr
            and a~parvw eq 'AG'
           and a~vkorg eq 'EN01'
            and a~trvog eq '0'
            and a~audat gt z_datum.
    TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              list_display   = if_salv_c_bool_sap=>false
            IMPORTING
              r_salv_table   = gr_table
            CHANGING
              t_table    = t_vbap.
        CATCH cx_salv_msg.
      ENDTRY.
    try.
    LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
          ls_color-col = col_negative.
          ls_color-int = 0.
          ls_color-inv = 0.
          lr_column->set_color( ls_color ).
      catch cx_salv_not_found.
    endtry.
    try.
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'ARKTX' ).
    ls_color-col = col_negative.
          ls_color-int = 1.
          ls_color-inv = 1.
          lr_column->set_color( ls_color ).
    catch cx_salv_not_found.
    endtry.
    try.
    *LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
    lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
    lr_column->set_short_text( 'Short' ).
    lr_column->set_medium_text( 'Medium' ).
    lr_column->set_long_text( 'Net Value' ).
    *lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
    catch cx_salv_not_found.
    endtry.
    gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
    report = sy-repid
    set_functions = gr_table->c_functions_all ).
    this statement actually does the display.
      gr_table->display( ).
    ENDFUNCTION.
    You can extend this as far as you like -- it's really easy and MUCH MUCH easier than the old way with fieldcatalogs etc etc.

    If the pagecontainer_mc holds another movieclip that contains the button you are trying to target, then you need to include that loaded movieclip in the targeting.  And if contacts is that movieclip, then you should be able to target it directly using...
    var contacts:contatti = new contatti;
    contacts.contacts_btn.addEventListener(MouseEvent.CLICK,showContacts);

  • Redirecting control to portal page after exiting from SAP R/3 transaction

    Hai,
    In my portal Top Level Navigtion, I have two Option, "HOME", "HR FUNCTION".
    When a user login to portal by default the first node "Home" is opened and its content is opened in detailed navigation. Then the first content from detailed navigation which is  URL iview is opened on the content area.
    When a user opens the second node "HR Function", in the detailed navigation, SAP transcaction IViews are shown. When a SAP transaction IView is clicked, its content are opened in content area. After the user finished working with that transaction, he/she is exiting from the transaction by clicking the "Exit" button. This action, makes the content area to show as blank screen.
    Is it possible to show the URL ivew from the "Home" menu when ever the control is coming out of SAP transaction IView.  In otherwords in need to fill the blank screen with  URL Iview. I don't know from where and how to call this URL IVIEW.
    Please let me know how to do this.
    Thanks & Regards,
    H.K.Hayath Baha.

    Hai Anant,
    Thanks for the suggestion. Can you tell me where I have to give the code.
    Regards,
    H.K.Hayath Basha.

  • How do we exit from a sub procedure

    Hi,
    I am calling a sub procedure from my plsql procedure. If an error occurs in the sub-procedure, it should exit from the appilcation.
    return gets the control back to the called procedure. but is there a way to stop the execution totally?
    Thanks,
    Narayan

    Raise an exception that is not handled in the sub-procedure nor in the main procedure.

  • Call BEX-Query from VBA with BEX-automatic login?

    Hi,
    I'm trying to call a query from VBA. I have two problems/questions:
    1. Automatic login?
    I want to do an automatic login. I found this peace of code here, but I get an error:
    Public Function  LogonToYourBW()
    ' create Logon & RFC-Handle
    logonToBW = False ‘ clear connect Flag the flag can be used to find out if connected or not
        'load SAP functionality by opening BEX file ( use your installation path)
            Workbooks.Open (“c:\sappc\bw\sapbex.xla”)
        With Run("sapbex.xla!sapbexGetConnection") ‘ call the connection
           ' Set the params for Auto logon
           .client = “YOUR CLIENT NO”
           .user = “YOUR BW USER”
           .Password = “YOUR BW PWD” ‘ I recommend to create a dummy reporting user for this task
           .Language = “YOUR LANGUAGE YOU LIKE TO USE FOR QUERY DISPLAY ( i.E.  “EN”)”
           .SystemNumber = “YOUR SYSTEM NO” ‘
           .ApplicationServer = “YOUR SERVER Name OR IP-ADDRESS”
           .UseSAPLOgonIni = FALSE 'important for automatic connection
           .logon 0, True ‘ This will provide a dialog to appear
            If .IsConnected <> 1 Then
                .logon 0, False
                If .IsConnected <> 1 Then Exit Function
            Else
                Set g_oFunction = CreateObject("SAP.Functions")
                Set g_oFunction.Connection = g_oConnection
            End If
        End With
        Run "sapbex.xla!sapbexinitConnection" ‘ this will enable the connection you just created
        logonToBW = True
    End Function
    The error is by this row:
    Set g_oFunction.Connection = g_oConnection
    Object is needed! How is the g_oConnection-object defined?
    2. How can I pass values for the parameters from VBA?
    If I open the query usually from SAP-BEX-Toolbar, after selecting the query, I get a parameter mask, where I must put in a value. How can I this automatize from VBA? Has anybody a short samplecode for that?
    Thank you for your help
    Stefan
    [email protected]

    Peter and others:
    What I really want to do … is write a stand-alone application that I can run from windows scheduler … that queries our BW for sales data for certain items (in a tabular form) … and pulls that data into a VB recordset, or a .NET dataset … so that I can insert the rows into another database (SQL Server, or Access) … I already know how to do all the data movement to/from datasets and databases … I just cannot figure out how to programmatically grab this sales data from BW … our company has “workbooks” already set up that aggregate WW sales information by region (IE, there is a separate workbook for each region of the world) … I can manually go into the Excel interface, tell it which items to pull the sales info for, and it dumps the data into the worksheet (organized by customer, and then by cat #) …
    So, what I’d like to do is write an app that will pull data every week or so from the BW (from each region’s sales invoice detail “workbook”), and insert it into another database that we use for reporting other, non-sales, data.
    Thoughts on this ?  Is there another, non-BEx method that is better ?
    thanks !!

  • Exit from a pl/sql block

    Hi all. I'm on oracle 9i.
    I have a problem: I launch my sql file, which has a part made of some SQL commands and then inside it there is a part that is a PL/SQL block.
    What I want is that if a certain if condition is verified it must exit from PL/SQL block and also it must exit from all the file!
    Here is a part of code:
    drop table test1;
    create table test1
    as select * from test2;
    create table prova_test1
    as select * from test_1
    where 1=2;
    DECLARE
    conta number := 0;
    valore number := 0;
    contap number := 0;
    valorep number := 0;
    istruzione varchar2(2000) := null;
    BEGIN
    select count(1), sum(val) into contap,valorep
    from prova_test1;
    select count(1), sum(val) into conta,valore
    from test_1;
    if conta <> contap or valore <> valorep then
    istruzione := 'exit';
    execute immediate istruzione;
    else
    others sql statements.....
    end if;
    end;
    So what I want is that if the condition is verified it must exit from pl/sql block and also from all the process.
    How can I achieve that??
    Thanks for collaboration,
    Fabrizio

    Fabrizio Delli Priscoli wrote:
    whenever sqlerror exit 99
    whenever oserror exit 98
    Number 99 or 98, are SQLCODE returned from my exception?No, they are NOT SQLCODE.
    SQLCODE is an oracle database error code.
    Now,
    sqlerror is how 'Sql*Plus' (the one that is calling the pl/sql block) would handle ANY SQL ERROR coming out of pl/sql block OR other parts of the sql you are running within the SQL*Plus construct.
    99 and 98 are the error numbers that SQL*Plus is returning to the script or code that is calling SQL*Plus. In this case, probably the 'shell script' that calls this SQL*Plus construct.
    So, you would handle that error in the shell script.
    Maybe something like this: (this is the shell script that is calling a sqlplus session).
    1>>$LOGFILE 2>>$LOGFILE sqlplus -s $DBCONN <<EOF
    whenever sqlerror exit 99
    whenever oserror exit 98
    set serveroutput on
    set feedback off
    BEGIN
    some_code;
    END;
    exit
    EOF
    ret_value=$(echo $?)
    case "$ret_value" in
        99) mail -s "Error: Some sqlerror on the script on $(date)" $SOME_EMAIL <$LOGFILE ;;
        98) mail -s "Error: Some oserror on the script on $(date)" $SOME_EMAIL <$LOGFILE ;;
    esac

  • How to track exit from the PageFragment Lifecycle

    Hi,
    I have a requirement of keeping track of exit from a pageFragment.
    My structure contains: a TaskFlow which contains a train . This train node contains the page Fragments. Now when i navigate from one PageFrag to another ie. when i exit the currently selected node having a page Fragment, i need to fire a logic.
    I tried using creating a bean which implements RegionController interface which has refreshRegion(RegionContext ) method.I got hold of RegionBinding interface which has only one of the following values: Entry, Execute_Model, Prepare_Model, Refresh_Unknown, Render_Model and Type_executable_region.
    Also in this case i am not exiting the TaskFlow during the navigation.
    My doubt is how do i or can i use RegionController to keep track of exit from the currently rendered PageFragment's  Lifecycle.
    Also , can i use PagePhaseListener to keep track of the PageFragment lifecycle stage. (My understanding is PagePhaseListener is to be used for Jspx not Jsff). Plz do correct me if i am wrong.
    Thanks,
    Prasenjit
    Edited by: user586616 on Aug 31, 2009 3:54 AM
    Edited by: user586616 on Aug 31, 2009 3:57 AM

    Hi Frank,
    I have created a ControllerClass which implements RegionController. I have registered the same as controller class in my pageFragments PageDef.
    So, on navigation from one train node to another. due to post back call to leaving node and freshcall to the arriving node in the train flow. i am able to get the leaving as well approaching node.
    My doubt is can i get similar or better control over the nodes traversed using trainModel or anyother adfinternal controller class? Kindly suggest any better way of getting handle to the navigating train nodes.
    Sample Code which i have implemented:
    public class RegionControllerBean implements RegionController {
    public boolean refreshRegion(RegionContext regionContext) {
    System.out.println("**********************************");
    System.out.println("inside refreshRegion method call");
    String selectedView = ControllerContext.getInstance().getCurrentViewPort().getViewId(); ------> this gives me the handle to the viewId of the curently selected pageFragment
    System.out.println(ControllerContext.getInstance().getCurrentViewPort().getViewId().toString());
    String pageName = selectedView.split("/")[2];
    System.out.println("Current PageName:"+pageName);
    System.out.println("name: "+regionContext.getRegionBinding().getName());
    int refreshFlag = regionContext.getRefreshFlag();
    if(refreshFlag == RegionBinding.PREPARE_MODEL){
    System.out.println("Inside prepare Model phase"); ------> on entering of that node i need to call some logic before prepare_model phase
    if(refreshFlag == RegionBinding.EXECUTE_MODEL){
    System.out.println("Inside execute model phase");
    if(refreshFlag == RegionBinding.RENDER_MODEL){
    System.out.println("Inside render model phase");
    // propagate refresh to inner binding container
    regionContext.getRegionBinding().refresh(refreshFlag);
    return false;
    public boolean validateRegion(RegionContext regionContext) {
    // propagate the validate to inner binding container
    System.out.println("inside validate region method");
    regionContext.getRegionBinding().validate();
    return false;
    thanks,
    Prasenjit

  • How to call html webpage from forms 9i

    Dear friend,
    I have installed oracle 9i Forms and have developed an application wherein, the first page is in html and from there goes to my application. Everything works well except when i exit from the forms it should go to the html page but instead a blank webpage on runtime occurs. Please tell how to get it done.
    When i installed oracle 9i forms to single dedicated server, on runtime it displays nothing instead asking atlease one computer to be connected through network and ie displays Offline not connected to internet explorer. How could I work on forms 9i without getting connected to network and use runtime on webpage.

    Hi,
    you can use a post form trigger and call web.show_document('URL Here','_this');
    Frank

  • Regarding exit from the module pool screen

    h experts,
    i have developed a module pool report in which in the selection screen i have four fields which are mandatory ,when i execute the program without entering in the selection screen it do not allow to come out of the module pool screen ...what i want that without entering any input in the selection screen if i press exit button push button it will allow to come out of the screen for this what sud i do plz help me....

    Hi
    keep a button called <b>EXIT</b> on the screen
    Make the function type of that field as <b>E</b>
    in Flow logic write
    PROCESS AFTER INPUT.
    Forced Exit from the transaction from screen
      MODULE exit AT EXIT-COMMAND.
    double click on exit module and
    then in PAI write
    *&      Module  exit  INPUT
    Exit from the Transaction
    MODULE exit INPUT.
      CASE okcode.
        WHEN 'EXIT' OR 'CANCEL'.
          CLEAR okcode.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " exit  INPUT
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Can we call another transaction from the Userexit

    Hi all,
            Can we call another transaction from the Userexit?
    Thanks,
    Balaji

    Hi
    Because the statament CALL TRANSACTION triggers the end of the LUW so COMMIT WORK, so you should be sure not to insert that statament while some updating actions are been doing.
    So that exit shouldn't be triggered while updating
    Max

Maybe you are looking for

  • Not able to run a JSP file in Tomcat 5.5

    Hello friends i am new to JSP programming. I recently designed a application to enter values of certain field in a database (Using SQL Server Database) i used a file name Register.jsp, so when the action is performed by clicking submit button it use

  • Working with AS3 External Classes

    Ok... trying to work with AS3 external classes. I have a movieClip that I want to also function as a button. Instance name is "_onDemand". This movieClip is on the stage of my Home.fla.  "_onDemand" movieClip properties   Class:HomePage  Base clase:

  • New training videos on YouTube

    http://www.youtube.com/user/zeditsolutions "How to", best practices and more to come

  • Webserviceclient.jar does not have weblogic/xml/schema/binding/SequenceCodecBase

    Hello, I am building JSP client for webservice. The client is deployed on tomcat 4.x. This time fortunatelly clientgen swallowed WSDL and I got client code generated. I added webserviceclient.jar to WEB-INF/lib. However I am getting java.lang.NoClass

  • Oracle ODBC Driver 10.02.00.04 sqora32.dll with /*+ RULE */ base hints

    Hi Everybody, I have a problem with SQL queries with /*+ RULE */ base hints being posted to an Oracle database. I have reason to believe that these queries are generated by the Oracle ODBC Driver itself. Although I don't have a performance problem pe