Problem in event handling using oo abap code

Hi,
My requirement is i need to disply 3 blocks in ALV format.I have done that.Now my problem is if i double click on aufnr of the first block, it should call the transaction code. I have written the code in oo abap but i have used function modules for ALV.Now my doubt is 'How to write an event  once the user double click on the particular field of the first block, it should call the tcode " using object oriented code.
How to populate the heading for each block using oo abap code.
Thanks & Regards
Anus

hi.....
Use Double_click event handler method of class cl_gui_alv_grid of first block....
if not solved .
Send me Your program lines ...........
Best Regards
Prabhakar

Similar Messages

  • Problem with event handling

    Hello all,
    I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
    To be more eloborate here is a basic definition of my classes
    class SystemPanel{
             SystemPanel(FTP ftp){ app = ftp};
             FTP app;
             private JButton b = new JButton("ChgDir");
            b.addActionListener(app);
    class FTP extends JFrame implements ActionListener{
               SystemPanel rem = new SystemPanel(this);
               SystemPanel loc = new SystemPanel(this);
               FTP(){
                       add(rem);
                       add(loc);
                       pack();
                       show();
           void actionPerformed(ActionEvent evt){
            /*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
               BOTH HAVE SAME ID AND getSouce() ?
               In this case..it if was from rem or loc ?
    }  It would be really helpful if anyone could help me in this regard..
    Thanks
    Hari Vigensh

    Hi levi,
    Thankx..
    I solved the problem ..using same concept but in a different way..
    One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
    So the code
    private JButton b = new JButton("ChgDir");
    b.setActionCommand ("1");
    wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
    Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
    public void setActionCommandsRemote()
         for(int i = 0 ; i <cmdButtons.length ; i++)
         cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
    This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
         if(button.getActionCommand().equals("DeleteRem") )          
                        deleteFileRemote();
          else if(button.getActionCommand().equals("Delete") )
                     deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!!

  • Best event handling way making the code simple

    Hi all,
    I want to develop a JFrame thats all the componets inside the JFrame have methods (that are owned by JFrame the class) like "compNameClicked", "compNameChanged", "compNameArranged". The JFrame would be like this below...
    class MyFrame extends JFrame
          //Datamembers
          comp1Name declaration
          comp2Name declaration
          comp3Name declaration
          //Methods
          comp1NameClicked() {...}
          comp1NameChanged() {...}
          comp1NameArranged() {...}
          comp2NameChanged() {...}
          comp3NameClicked() {...}
    How will i register this "event handling" methods to the componets? I want to use this techique to retain the simplicity of the code. If there is a more simple way for event hadling, please let me know about it.
    thank you for advance, kostas

    There cannot be a single approach which will apply to all the Programs or application.
    You can try and refere to :
    http://www-106.ibm.com/developerworks/edu/j-dw-javadeliv-i.html
    This tutorial explains all the available approaches you can find out what best suits your need.

  • Event handling using htmlb

    Hi,
    I am creating a small bsp application where I have Test.htm and error.htm pages. Test.htm page contains a button which when clicked should traverse to the second page which does not occur. Then code I have for the event handling is given below.
    CLASS cl_htmlb_manager DEFINITION LOAD.
    IF event_id = cl_htmlb_manager=>event_id.
      DATA: event TYPE REF TO cl_htmlb_event.
      event = cl_htmlb_manager=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
    <b>    DATA: button_event TYPE REF TO cl_htmlb_event_button.
        button_event ?= event.
    </b>
      ENDIF.
        CASE event->id.
          WHEN 'mybutton'.
            navigation->next_page( 'ERROR' ).
          WHEN OTHERS.
        ENDCASE.
    ENDIF.
    Also please explain me the lines of code given in bold fonts.
    Regards
    Noufal

    hi Noufal,
    The difference is that :
    When you are not using HTMLB library but using simple HTML buttons ussing <INPUT TYPE = BUTTON > then
    to capture that event you should use
    onclick = OnInputProcessing(button_id)  ,
    where "button_id" is the value in "event_id" variable in "OnInputProcessing" Event.
    But if you are using HTMLB then no need for this .
    Just use :
    onClick = "button_id"
    where "button_id" is the value you can capture in event_id attribue of an object that belongs to CL_HTMLB_EVENT class.
    For ex :
    data event type ref to CL_HTMLB_EVENT.
    event->event_id = "id of the element that has generated  
                       the event, and in this case button_id".
    I hope this will solve all your issues.
    Regards,
    Ankur

  • LSMW--- I am not seeing some variables, which r using in abap code!

    Hi Experts,
    Am enhancing the LSMW---> Create_Material, so I hv some basic doubts, pls. clarify,
    1 - In the following satemenrts of the code, the programmer used my_langu(variable?), so, Where the programmer has declared(attributes & value) the my_langu ? I searched in FIXED VALUES radio button, Global data, double clicking, abap code radio button, I culd not find it!
    Target Field: E1BP_MLTX-LANGU Language key
    E1BP_MLTX-LANGU = my_fv_langu. (like theses many variables r using in the abap code, but I culd not track them to see, thrier attributes!)
    2 - In abap code, the programmer is using <b><i>skip_transaction</i></b>! but, we dont hv skip_transaction in ABAP code?
    thanq.

    Hi,
    skip_transdaction is a LSMW Global Function and not an ABAP command:
    Global function     Description
    transfer_record.     Transfers the current record (i.e. for the current target structure) to the output buffer.
    transfer_this_record '...'.     Transfers a record of another target structure to the output buffer. The name of the target structure has to be specified as argument in single quotes.
    at_first_transfer_record.     Transfers the current record to the output buffer, if it is the first transaction.
    on_change_transfer_record.     Transfers the current record to the output buffer, if it has changed compared to the last record.
    transfer_transaction.     Writes the current transaction to an output file. All records of the output buffer are transferred to the output file.
    skip_record.     The current record is not transferred to the output buffer.
    skip_transaction.     The current transaction is not written to the output file.
    I'm not sure about the my_langu(variable?).
    Hope it helps some.

  • Event handling using CAN?

    I am aware of how to make LabView respond to user interface events (keyboard presses, button presses, mouse moves, etc) and I'm also aware that the same event handling structure can be used to handle external (non-GUI) events- like those generated by a digital edge on a DAQmx input.  My question is whether the same event handling structure can be used to handle external events coming in on a CAN network- via NI-CAN or otherwise?
    Is there a good reference which summarizes ALL general types of events that can be handled in this way- not just the standard GUI events?  I have a feeling that ActiveX and VISA are other ways to generate events, but can't find a good resource in general - or specifics on the NI-CAN side.
    Thanks!
    Nate 

    Thanks Mike-   still not sure I understand.  What should I wire to the Create User Event block in order for available events to show up in the dialog which allows me to configure events in a given frame?  For example, I have an external micro-controller communicating with LabVIEW using a CAN network.  Usually the communication is started by LabVIEW and sends commands out- but I also want to be able to handle asynchronous messages generated by this micro-controller in an event fashion without having do any polling.   Is there some reference I can wire to the Create User Event block which will make an event like "Incoming CAN Network Traffic" available to be handled in an event structure?
    Thanks again! 

  • Problem in cookie handling using CookieManager java1.6

    Hi all...
    I found that there is a no cookies are catched from http response for some web sites are requested by using CookieManager() in jdk1.6.
    following is source code where i test this case....
    import java.io.;
    import java.net.;
    import java.util.*;
    public class Fetch {
    public static void main(String args[]) throws Exception {
    String urlString = "http://www.google.com";
    //urlString = "http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1";
    CookieManager manager = new CookieManager();
    manager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
    CookieHandler.setDefault(manager);
    URL url = new URL(urlString);
    URLConnection connection = url.openConnection();
    if (connection instanceof HttpURLConnection) {
    HttpURLConnection httpUrlConnection = (HttpURLConnection) connection;
    httpUrlConnection.setInstanceFollowRedirects(true);
    httpUrlConnection.connect();
    BufferedReader bufferedReader
    = new BufferedReader(
    new InputStreamReader(
    httpUrlConnection.getInputStream()));
    StringBuffer stringBuffer = new StringBuffer();
    String line = null;
    while ((line = bufferedReader.readLine()) != null) {
    stringBuffer.append(line);
    stringBuffer.append("\n");
    System.out.println(stringBuffer.toString());
    CookieStore cookieJar = manager.getCookieStore();
    List<HttpCookie> cookies = cookieJar.getCookies();
    for (HttpCookie cookie: cookies) {
    System.out.printf("\nCookie: %s%n", cookie);
    }It is working well using for google web site but not working for ubs.com. i give the requested page in variable urlString remove the comment at lineno 8 after finish the normal test. It will not print any cookies for this website..But i found Cookies for both web site using httprequesttracker.
    Here is Mozilla firefox request and response for both web site....
    http://www.google.com/
    GET / HTTP/1.1
    Host: www.google.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Location: http://www.google.co.in/
    Cache-Control: private
    Set-Cookie: PREF=ID=8117eafc8d1868c5:TM=1213001085:LM=1213001085:S=iJitvzgWFvKmDTZm; expires=Wed, 09-Jun-2010 08:44:45 GMT; path=/; domain=.google.com
    Date: Mon, 09 Jun 2008 08:44:45 GMT
    Content-Type: text/html; charset=UTF-8
    Server: gws
    Content-Length: 221
    http://www.google.co.in/
    GET / HTTP/1.1
    Host: www.google.co.in
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 200 OK
    Cache-Control: private
    Content-Type: text/html; charset=UTF-8
    Set-Cookie: PREF=ID=707e00e4cd0dddda:TM=1213001085:LM=1213001085:S=kXfAKdv-DMuiSWXp; expires=Wed, 09-Jun-2010 08:44:45 GMT; path=/; domain=.google.co.in
    Content-Encoding: gzip
    Date: Mon, 09 Jun 2008 08:44:45 GMT
    Server: gws
    Content-Length: 2930Following is for usb.com website
    http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1 HTTP/1.1
    Host: apps1.ubs.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Date: Mon, 09 Jun 2008 04:47:06 GMT
    Server: Apache
    Pragma: no-cache
    Connection: close
    Location: http://apps.ubs.com:80/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    Cache-Control: no-cache
    Content-Length: 318
    Content-Type: text/html; charset=utf-8
    http://apps.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1 HTTP/1.1
    Host: apps.ubs.com:80
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    HTTP/1.x 302 Found
    Date: Mon, 09 Jun 2008 04:47:08 GMT
    Server: Apache
    Pragma: no-cache
    Set-Cookie: NavLB_Apps=apps1.ubs.com; Domain=.ubs.com; Path=/; Version=1; HttpOnly
    Connection: close
    Location: http://apps1.ubs.com:80/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828
    Cache-Control: no-cache
    Content-Length: 345
    Content-Type: text/html; charset=utf-8
    http://apps1.ubs.com/locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828
    GET /locationfinder/searchForm.do?GeoEntityId=1&GeoEntityType=1&NavLB_Apps=1212986828 HTTP/1.1
    Host: apps1.ubs.com:80
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: NavLB_Apps=apps1.ubs.com
    HTTP/1.x 200 OK
    Date: Mon, 09 Jun 2008 04:47:08 GMT
    Server: Apache
    Content-Language: en-US
    Set-Cookie: JSESSIONID=0000vHz5HlsSRtRwAgUVx0Il0oW:-1; Path=/; Version=1; HttpOnly
    Cache-Control: no-cache="set-cookie,set-cookie2"
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Content-Type: text/html;charset=ISO-8859-1
    Connection: close
    Transfer-Encoding: chunkedI dont know wat is the problem with this CookieManager() in java1.6...
    But it is working well and print cookiees
    By replace line 10
    CookieHandler.setDefault(manager);to
    CookieHandler.setDefault(new ListCookieHandler());code for ListCookieHandler.java is avalible in
    [http://java.sun.com/developer/JDCTechTips/2005/tt0913.html#1|http://java.sun.com/developer/JDCTechTips/2005/tt0913.html#1]
    please give some idea for solve this problem....

    You are using Firefox 2.x, so i think that the cookie for the usb.com website is no http cookie, it's probably a "DOM Storage"
    (if you use an actual IE instead, then the "Set-Cookie" lines may stay anyway then it will be the "userData behavior" feature of MS).
    They both are looking similar to http-cookies because they are a kind of cookie too, but with another (more common) format.
    I'm not so familar to their format, so it is only an assumption (maybe another can affirm or disprove this), but i remembered that
    DOM Storage and userData behaviour Cookies were designed to manage persist data across multiple browser sessions -
    and on the usb.com website it is indeed starting a session (JSESSIONID=0000vHz5HlsSRtRwAgUVx0Il0oW).
    (To be sure, that this is a DOM storage you have to watch the behaviour of this cookie and the server, or you can watch the
    size of this cookie over a longer periode, if it grows much greater than 4KB it is one (DOM Storage and userData behavior can
    grow of up to nearly 6 MB), or the easiest way if you can login, do it and look if you are logged in the next day, too)
    So there is no problem with the CookieManager() in java1.6, that is only providing "HTTP cookie management"
    (see CookieManager and CookiePolicy), while ListCookieHandler seems to be a more common approach.
    Edited by: penpen on Jul 6, 2008 4:41 AM

  • Problem in event handling of combo box in JTable cell

    Hi,
    I have a combo box as an editor for a column cells in JTable. I have a event listener for this combo box. When ever I click on the JTable cell whose editor is combo box,
    I get the following exception,
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setDispatchComponent(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Can any one tell me how to over come this problem.
    Thanks,
    Raghu

    Here's an example of the model I used in my JTable. I've placed 2 comboBoxes with no problems.
    Hope this helps.
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • Problems with event handling in JmenuItem

    Hello:
    I'm trying to handle an event for a menuItem and tool bar item: with this code:
    newBallotAction = new AbstractAction("newBallot")
    public void actionPerformed(ActionEvent e)
    try{
    System.out.println("MainWindow newBallotAction");
    Ballot ballot = new Ballot();
    System.out.println("MainWindow newBallotAction 2nd");
    DDNewBallotWindow ddNewBallotWindow = new DDNewBallotWindow(ballot);
    if (ballot != null) // <ballotName>, <ballotOptionsNumber> , <ballotOption1>, <ballotOption2>, .., <ballotOption(optionsNumber)>
    brothers.msgToBrothers("<Ballot>" + "<origin>" + myName + "</origin>"+ ballot.toRep() +"</Ballot>" , myName);
    else
    System.out.println("MainWindow ballot null");
    }catch(Exception f){
    System.out.println("MainWindow newBallotAction exception" + e);
    JMenuItem ballotMIDdMenu = new JMenuItem("New Ballot");
    ballotMIDdMenu = fileMenu.add(newBallotAction);
    ddMenu.add(ballotMIDdMenu);
    It produces the next exception:
    MainWindow newBallotAction exceptionjava.awt.event.ActionEvent[ACTION_PERFORMED,cmd=newBallot] on javax.swing.JMenu$2[,1,49,137x21,alignmentX=null,alignmentY=null,border=javax.swing.plaf.metal.MetalBorders$MenuItemBorder@55a338,flags=264,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2],paintBorder=true,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=newBallot]
    It's really complex ... I'm desperado ;)
    Thanks in advance, Nacho.

    Hi,
    The exception is propably occuring in the Ballot() constructor (which you didn't post).
    And, as dukeman already mentionned, you are printing out the ActionEvent object and not the Exception itself.

  • VBA and Bex 7- Event to use in VB code BEFORE Query Refresh ?

    Gurus.. is there a Bex Event that I can use to 'intercept' a Refresh Query command to Bex and run some VBA first ? I'm trying to find a way to solve the analysis grid overlap problem when two queries are provided on one Excel worksheet, and navigation takes place.
    I've been able to figure out how to bring the results areas together (by deleting blank rows between them), but I'd like to be able to add a chunk of blank rows between analysis grids before the queries actually refresh.

    Hi Charlie,
    if you're interested:
    I've found a way to move the areas after the refresh - using the callback event.
    The logic is generally:
    - Check where analysis-grid for DP1 ends
    - Leave some empty lines
    - Move the offset of DP2 here.
    - Repeat the same for further DP's.
    There's only one hatch: I've got some trouble to reactivate the BEx-context-menu after this momvement.
    So far I found only the workaround "do another refresh" to solve this issue; that's ok but not 'beautiful'.
    Let me know if you need further input.
    Maybe you've got an idea for my issue:
    I'm looking for a way to execute the a routine only once after refresh - even if there are multiple queries in a workbook.
    The problem is that I do not know the order of the query-refresh or any flag that I could use to identifiy the "last query to be processed in this refresh-run".
    Kind regards,
      Marco

  • Problem about event handling or dispatching

    I created a JFrame with a JButton in it. A keyListener is add to the jframe.
    Key events can be catched if JDK1.3.1_08 is employed. However, it doesn't work if JDK1.4.1_02 is empolyed. Can anyone tell me the problem? Thanks a lot!
    The following is the source code:
    public class drawa extends JFrame implements KeyListener
    public static void main(String[] args) {  
         drawa frame = new drawa();
    public drawa() {   
         super("drawa");
         Container c=getContentPane();
         c.setLayout(null);
         JButton jb=new JButton("L");
         jb.setSize(80,40);
         c.add(jb);     
         addKeyListener(this);
         setSize(500,450);          
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setVisible(true);          
    public void keyPressed(KeyEvent evt){
         System.out.println("a");
    public void keyTyped(KeyEvent evt){}
    public void keyReleased(KeyEvent evt){}

    Your frame must return true for isFocusable ().
    Kind regards,
      Levi

  • Problem in BDC program using MIGO_GO transaction code

    Hi Gurus
    I have developed a BDC session upload program. The program is
    running fine except for the issue that when it goes the subscreen in
    MIGO_GO transaction (same as MIGO) it does not generates any code
    for page down or next page key. While recording after 15 entries
    (end of page) it moves automaticaly to the next page on line 2 but
    when I have used my own itab to fill data into this screen it
    passes/generates the code for page down with clear screen. It does
    go to item 2 but overwrites earlier entries instead of generting new
    one.
    Any suggestions?
    Guys this is very urgent so need ur feedback immediately?
    Lots of thanks in advance.
    The code is as follows:
    PURPOSE: The purpose of this upload program is to upload
    receipt
    against Production Order. Data is uploaded into SAP
    via text
    file which is converted from pre-defined excel file
    pattern.
    REPORT zmm_migo_rec
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    *Excel column sequence SAP Material Number Batch # Crop Year
    Process Date Net Weight Plant Area Gross
    Weight Plant Number Shift Mat.Desc Prod.Ord#
    TYPES : BEGIN OF st_barcode,
    m_matnr LIKE mara-matnr,
    m_batch_no LIKE mseg-charg,
    m_crop_year TYPE c LENGTH 4,
    m_process_date LIKE mkpf-bldat,
    m_net_wt TYPE c LENGTH 7,
    m_plant_area TYPE c LENGTH 5,
    m_gross_wt TYPE c LENGTH 7,
    m_plant_num TYPE c LENGTH 1,
    m_shift TYPE c LENGTH 1,
    m_matnr_desc TYPE c LENGTH 30,
    m_prod_ord LIKE mseg-aufnr,
    text(200),
    text1(200),
    END OF st_barcode.
    DATA : itab_barcode TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : itab_log TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : itab_log1 TYPE TABLE OF st_barcode WITH HEADER LINE.
    DATA : g_filename TYPE rlgrap-filename.
    INCLUDE bdcrecx1.
    Start of Selection Screen for document data, screen data and
    posting date fields.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-000.
    PARAMETERS :
    p_dummy TYPE i DEFAULT 0,
    p_bldat LIKE sy-datum OBLIGATORY DEFAULT sy-
    datum, "Document date
    p_budat LIKE sy-datum OBLIGATORY DEFAULT sy-
    datum, "Posting date
    p_frmplt LIKE t001l-werks OBLIGATORY,
    p_frmloc LIKE t001l-lgort OBLIGATORY,
    p_toloc LIKE t001l-lgort OBLIGATORY,
    p_rsnmov LIKE mseg-grund OBLIGATORY,
    p_bsarea LIKE mseg-gsber OBLIGATORY,
    cb_simul AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK a1.
    START-OF-SELECTION.
    *to remove unnecessary fields from selection screen
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-group4 LT '060' AND screen-group3 NE 'BLK'.
    screen-active = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    *to Process Call Transaction in Error Mode
    ctu = 'X'.
    ctumode = 'A'.
    nodata = space.
    END-OF-SELECTION.
    Get data from file
    PERFORM f_get_data.
    Validate data retrieved from excel file
    PERFORM f_validate_data.
    Batch data / simulate.
    IF cb_simul IS INITIAL.
    PERFORM f_prized_data.
    PERFORM f_write_log.
    ELSE.
    PERFORM f_write_log.
    ENDIF.
    *& Form F_GET_DATA
    This module is used to read text file data into SAP itab.
    FORM f_get_data .
    Select the file to be uploaded
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    filename = g_filename
    filetype = 'DAT'
    TABLES
    data_tab = itab_barcode
    EXCEPTIONS
    conversion_error = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    OTHERS = 7.
    ENDFORM. " F_GET_DATA
    *& Form F_VALIDATE_DATA
    text
    FORM f_validate_data .
    DATA : BEGIN OF lt_marc OCCURS 0,
    matnr LIKE mard-matnr,
    werks LIKE mard-werks, " Plant
    END OF lt_marc.
    RANGES : lr_matnr FOR mara-matnr.
    READ TABLE itab_barcode INDEX 1.
    Prepare Ranges to check/verify Material from Table MARD i.e.
    respective plant
    lr_matnr-sign = 'I'.
    lr_matnr-option = 'EQ'.
    LOOP AT itab_barcode.
    Add leading zeros incase of numeric value.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = itab_barcode-m_matnr
    IMPORTING
    output = itab_barcode-m_matnr.
    lr_matnr-low = itab_barcode-m_matnr.
    APPEND lr_matnr.
    MODIFY itab_barcode TRANSPORTING m_matnr.
    ENDLOOP.
    IF NOT lr_matnr[] IS INITIAL.
    SORT lr_matnr BY low.
    DELETE ADJACENT DUPLICATES FROM lr_matnr COMPARING low.
    SELECT matnr werks FROM marc
    INTO TABLE lt_marc
    WHERE matnr IN lr_matnr AND
    werks = p_frmplt.
    ENDIF.
    LOOP AT itab_barcode.
    READ TABLE lt_marc
    WITH KEY matnr = itab_barcode-m_matnr
    werks = p_frmplt.
    IF sy-subrc <> 0 .
    CONCATENATE 'Material' itab_barcode-m_matnr
    ' does not exist in Plant ' p_frmplt
    INTO itab_barcode-text SEPARATED BY space.
    MOVE-CORRESPONDING itab_barcode TO itab_log.
    APPEND itab_log.
    MODIFY itab_barcode TRANSPORTING text.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    ENDFORM. " F_VALIDATE_DATA
    *& Form F_WRITE_LOG
    text
    FORM f_write_log .
    LOOP AT itab_log.
    WRITE :/ itab_log-text.
    ENDLOOP.
    LOOP AT itab_log1.
    WRITE :/ itab_log1-text1.
    ENDLOOP.
    ENDFORM. " F_WRITE_LOG
    *& Form f_prized_data
    text
    --> p1 text
    <-- p2 text
    FORM f_prized_data.
    DATA: ld_lines LIKE sy-tabix,
    ld_sw TYPE i,
    lh_loop TYPE i,
    ld_recno TYPE i,
    lremain TYPE i,
    ld_total TYPE i,
    ld_counter LIKE sy-index,
    ld_counter TYPE i,
    ld_save LIKE sy-index,
    ld_last TYPE i,
    sc_counter(2) TYPE n,
    ld_budat(10),
    ld_bldat(10).
    DATA: wa_matnr(40) TYPE c,
    wa_bwtar(40) TYPE c,
    wa_erfme(40) TYPE c,
    wa_charg(40) TYPE c.
    WRITE: p_budat TO ld_budat,
    p_bldat TO ld_bldat.
    ld_recno = 300. " Number of records in the upload file.
    ld_last = 0.
    Open BDC session.
    PERFORM open_group.
    DESCRIBE TABLE itab_barcode LINES ld_lines.
    CLEAR: lh_loop, lremain.
    lh_loop = ld_lines DIV ld_recno.
    lremain = ld_lines MOD ld_recno.
    IF lremain > 0.
    lh_loop = lh_loop + 1.
    ENDIF.
    ld_sw = 1.
    LOOP AT itab_barcode.
    ADD 1 TO ld_counter.
    ADD 1 TO sc_counter.
    ADD 1 TO ld_total. " Check for 300
    IF ld_sw = 1.
    Header data.
    PERFORM open_group.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_ACTION'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-ACTION'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R02'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GO'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_DETAIL_OP
    EN'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GO'.
    PERFORM bdc_field USING 'GODYNPRO-
    ACTION' 'A01'.
    PERFORM bdc_field USING 'GODYNPRO-
    REFDOC' 'R08'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GODYNPRO-
    ORDER_NUMBER'.
    PERFORM bdc_field USING 'GODYNPRO-
    ORDER_NUMBER' itab_barcode-m_prod_ord.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_LINE_CLIC
    K'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_SPLIT_QUA
    N'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    ld_sw = 0.
    ENDIF.
    IF sc_counter = 16.
    CLEAR sc_counter.
    PERFORM bdc_field USING 'BDC_OKCODE' 'DOWN'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '/00'.
    add 2 to sc_counter.
    ELSE.
    PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
    ENDIF.
    CLEAR wa_matnr.
    CONCATENATE 'GOSPLIT-ERFMG(' sc_counter ')' INTO wa_matnr.
    CLEAR wa_bwtar.
    CONCATENATE 'GOSPLIT-CHARG(' sc_counter ')' INTO wa_bwtar.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_SP_CH'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    PERFORM bdc_field USING wa_matnr itab_barcode-
    m_gross_wt.
    PERFORM bdc_field USING wa_bwtar itab_barcode-
    m_batch_no.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    *When end of itab
    AT LAST.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_GOON'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOSPLIT-CHARG
    (sc_counter)'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_NEXT_IT'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field USING 'GOHEAD-
    WEVER' '3'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-ZEILE(01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=MIGO_OK_TAKE_VALU
    E'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GOITEM-TAKE_IT
    (01)' 'X'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_CHECK'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_TAKE' 'X'.
    PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=&ONT'.
    PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
    PERFORM bdc_field
    USING 'BDC_OKCODE' '=OK_POST1'.
    PERFORM bdc_field USING 'GODEFAULT_TV-
    BWART' '101'.
    PERFORM bdc_field USING 'GOHEAD-
    BLDAT' ld_bldat.
    PERFORM bdc_field USING 'GOHEAD-
    BUDAT' ld_budat.
    PERFORM bdc_field USING 'GOHEAD-
    XNAPR' 'X'.
    PERFORM bdc_field
    USING 'BDC_CURSOR' 'GOITEM-TAKE_IT
    (01)'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_ZEILE' ' 1'.
    PERFORM bdc_field USING 'GOITEM-
    ERFME' 'KG'.
    PERFORM bdc_field USING 'GOITEM-
    MIGO_ELIKZ' '1'.
    PERFORM bdc_field USING 'GOITEM-
    BWART' '101'.
    PERFORM bdc_field USING 'GODYNPRO-
    DETAIL_TAKE' 'X'.
    PERFORM bdc_transaction USING 'MIGO_GO'.
    ENDAT.
    ENDLOOP.
    PERFORM close_group.
    ENDFORM. "f_prized_data

    Hi
    Thanks Peram for your swift reply but I am a newbie to BAPIs ...... is there anyway i can do this from within the code i had written ....
    for BAPIs I have to do R & D in detail and I need to complete this urgently. If BAPI is the only solution kindly provide my some quick guideline to proceed.
    Thanks,
    Imran

  • Problem in call transaction using FD33 t code

    Hi all i'm developing a report in that in that i'm calling a tcode FD33.
    I want to skip the initial screen.For that i need to pass Customer , Credit control area and status from my program to that tcode.
    But my problem is that how to pass the value to check box.
    i.m writing the following code
       "Set parameter ID for transaction screen field
            SET PARAMETER ID 'KUN' FIELD W_ALV-KUNNR.
            SET PARAMETER ID 'KKB' FIELD W_ALV-VKORG.
           "Execute transaction FD33, and skip initial data entry screen
            CALL TRANSACTION 'FD33' AND SKIP FIRST SCREEN.
    So how to set the value of the STATUS check box.
    thanks in advanced.
    Dheeraj

    use:
    data: dynnr(40) value '/210'.    "or number of another dynpro you wish to go
    SET PARAMETER ID 'CDY' FIELD dynnr.
    A.

  • Bex Query- Use of ABAP code in Calculated Keyfigure/formula

    Dear Experts.
    I am wondering if there is any way to use ABAP in the formula editor of the Bex Query desinger.
    I have to build a report with very complex formulas (a lot of key figures, comporations, If then else ) an I think it would be easier to build all then in ABAP.
    So what I am looking for is any kind of user-exit/Badi that allows to calculate a Calculated Key figure/fomula in ABAP with the same data that is availabe in the fomula editor.
    If SAP is not providing this, this is clearlly a must for next releases.
    Thanks a lot and best regards,
    Alfonso.

    Dear Ananda.
    Thnaks for your reply, but could you please extend your answer a little bit more?
    As far as I know, Formula customer exit variables are only called once and they don´t provide the rest of the keyfigures and characteristic use in the drilldown level, so for my needs they are useless.
    Regarding IF-then-else statement in the formula, I already know about it. Actually what I am trying to avoid is to use them. In order to build my query I might need to build really big formulas with a lot of If-then-else, making it quite complex what the formula is doing. This is the reson I want to do it on ABAP.
    Please any other ideas?
    Thanks a lot.

  • Problems with event source using event structure

    Hello!
    I'm using an event structure block. It works correctly when the event source is a control and the event is change value. But i want to use an indicator like event structure or a variable (like a matrix or a vector). I want that when the value changes, an event occurs, but it doen't work, I dont' know why?. What i have to do to work with indicators or variables in a event structure block?
    Thank you in advance
    Larson

    of course!
    regards timo
    Attachments:
    change_detection.vi ‏20 KB

Maybe you are looking for