How to call Instance Methods and set property values in BAPI?

In Project systems, for the three business objects viz.
Network, ProjectDefinition and WBS, there are two kinds of methods which are available : class methods and instance methods. We have tried calling some instance methods, for instance, BAPI_PROJECTDEF_GETDETAIL to get details pertaining to a project. While importing this BAPI, it shows two elements for mapping i.e. Current Internal Project(string) and Current External Project(string). We supplied these values for an existing project. Upon running this call through an XML client at our end, it
returned an error "Module Unknown Exception". This general message is present on every instance method thus far. Upon searching in BAPI Explorer for Project System->ProjectDefinition->GetDetail, we found that this BAPI didn't take any input parameter.
Following message was displayed in BAPI Exlorer for this BAPI:
"... Obligatory import parameters are the external and internal keys CURRENTEXTERNALPROJE and CURRENTINTERNALPROJE of the project definition.The system reads parameters contained in the structure
BAPI_PROJECT_DEFINITION_EX ..."
i) How to supply the values of Obligatory import parameters.
ii) What are the possible causes of this exception.
iii) How to call an instance method. We are using same mechanism for calling class as well as instance methods so far, we have been to call only class level methods successfully. Is there anything special that we
need to do to call instance methods.

Hi,
what version is the SAP PS running?  If WebAs or higher,  create an inbound synch interface containing your two parameters in the request structure and as many as you require in your response structure.  Generate an Inbound ABAP proxy, where you can plug in some code, i.e. create and instantiate an object of the required type and make the call to the BAPI.
If SAP PS on lower than WebAs, then create a wrapper function module and make it RFC enabled.  Then plug your code in here and do the same thing.
Watch out for commits!
Cheers,
Mark

Similar Messages

  • RRI?  How to call ITS URL and pass field value from Bex Query.

    I am doing RRI from query to webaddress,
    i have defined jump(report type: webaddress and reicver report as url) from shopping cart bex query(SRM ) to webaddres.
    here url is SRM ITS base link for monitoring shoppingcart(http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN).
    jump is working from portal(from bex query ivew).
    but i want to pass value(shopping cart value) to above url and want to skip first screen.
    i have maintained assignment detail by assigning field name against shopping cart infoobject with type url parameter, but its not directly call reciver url with given input field.
    i tried the diffrent combination of url and field assignment as like below:
    1: web address url:http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN
    assigned field: GS_HEADER-OBJECT_ID
    but when we call reciver url from portal bex ivew, only initial screen come with page url as below:
    http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN?GS_HEADER-OBJECT_ID='selected number value'
    2: web address url:http://(hostname):(SRM port)/sap(cz1TSUQlM2FBTk9OJTNhc3JtZGV2X0lTRF8wMCUzYUdxdFNqdWdMS2xyTEFEelFTNFlWTnJXRjEzdy05UnhTWXl4TW03c3AtQVRU)/bc/gui/sap/its/bbp_mon_sc/~flNUQVRFPTgzMTcuMDAyLjAxLjAx====#jump_to_selected_sc
    assigned field: flNUQVRFPTgzMTcuMDAyLjAxLjAx
    but when we call reciver url from portal bex ivew, only initial screen come with page url as below:
    http://(hostname):(SRM port)/sap(cz1TSUQlM2FBTk9OJTNhc3JtZGV2X0lTRF8wMCUzYUdxdFNqdWdMS2xyTEFEelFTNFlWTnJXRjEzdy05UnhTWXl4TW03c3AtQVRU)/bc/gui/sap/its/bbp_mon_sc/~flNUQVRFPTgzMTcuMDAyLjAxLjAx====#jump_to_selected_sc?flNUQVRFPTgzMTcuMDAyLjAxLjAx='selected number value'
    I have seen the source code of that url(inital screen and after entring the value to that screen) too.
    how to call webadress(SRM ITS base shopping cart URL) with passing the one of field value of that url screen?
    Thanks and regards,
    Dushyant.

    Declare the gv_orderid in modulepool program.
    And Declare the parameter as import parameter in smartform.
    CALL FUNCTION  lv_form
       EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
         i_input                    =  gv_orderid
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5

  • Calling a method and setting an ImageIcon with source from anoth class

    I am trying to make a simple game, first I am trying to set up a game board, and make it possible to place units on the board. (This game will probably never be possible to play, I am just using it to try to understand Java, GUI, Swing, and using more than one class).
    So far I have 4 classes: Board (extends JFrame, sets up a gameboard, on which to place the pieces), Unit (a class from which the specific units types will inherit), Horse (my only type of unit, which extends the Unit class), and Game (which calls methods from the other classes).
    (These don't do much now.. this is what they will do, hopefully).
    All these classes are in a package called Gamev1.
    In the main method of Game, I do:
    ---code--
    public static void main (String[]args){
    new Board().show();
    Horse horseUnits[] = new Horse[1];
    horseUnits[0] = new Horse();
    horseUnits[0].moveUnit(squares[0]);
    end of code--
    when I debug it I get:
    myjava/FirstGraphics/Gamev1/Game.java [25:1] cannot resolve symbol
    symbol: variable squares
    location: class.myjava.FirstGraphics.Gamev1.Game
    horseUnits[0].moveUnitsquares[0]);
    1 error
    ---code----
    moveUnit(JLabel moveTo)
    is a method in Unit class:
    public void moveUnit(JLabel moveTo){
    target=moveTo;
    target.setIcon(this.image);
    if (this.position !=null)
    this.position.setIcon(noUnit);
    this.position=moveTo;
    ---end of code---------
    squares[] is an array of JLabels which is set up in the Board class, whenever a new Board is created:
    ---code---
    JLabel squares[] = new JLabel[100];
    for (int s=0; s<100; s++){
    squares[s] = new JLabel();
    ---end of code---
    I tried changing the reference from squares[0] to Board.squares[0] but I got the same error message in debug.
    Any idea what is wrong?
    I have another problem, which is probably similar.
    in the Board class I call:
    squares[s].setIcon(Unit.noUnit);
    and in the Unit class I have:
    static ImageIcon noUnit = new ImageIcon("images//none.gif");
    I don't get an error message mentioning it, but (without the attempt to place the horse on the board) the program compiles, but doesn't put this image on the labels. Any idea what is the porblem here?
    If I have not given enough information for anyone to help me, please tell me what further information I should give.
    Thanks to anyone who answers.

    I got it to work with
        Board board = new Board();
        horseUnits[0].moveUnit(board.squares[0]);To use Board.squares[0], squares would have to be static.
    The ImageIcon seemed to work okay. I noticed that your post had two slashes in the url [/] - that might throw things off . . .
    The code below has the icon call at the end of setLabeLProperties.
    I got carried away playing with the graphics so the squares don't work very well.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class HumaniBlue {
      public static void main(String[] args) {
        Board board = new Board();
        board.show();
        JLabel label5 = board.getLabel(5);
        //System.out.println("label5 name = " + label5.getText());
        Horse[] horseUnits = new Horse[1];
        horseUnits[0] = new Horse();
        horseUnits[0].moveUnit(board.squares[0]);
    class Unit {
      static ImageIcon noUnit = new ImageIcon("images/bclynx.jpg");
      public void moveUnit(JLabel square) {
    class Horse extends Unit {
      public Horse() {}
    class Board {
      JFrame f;
      JPanel gameBoard;
      int labelSize;
      JLabel[] squares = new JLabel[16];
      GridBagConstraints gbc = new GridBagConstraints();
      public Board() {
        gameBoard = new JPanel(new GridBagLayout()) {
          public void paintComponent(Graphics g) {
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            double width  = getSize().width;
            double height = getSize().height;
            g2.setPaint(Color.white);
            g2.fill(new Rectangle2D.Double(0, 0, width, height));
            g2.setPaint(Color.black);
            Shape line;
            double
              gridSize = (width < height ? width : height) * 0.8,
              gridUnit = (width < height ? width : height) / 5,
              x = (width  - gridSize) / 2,
              y = (height - gridSize) / 2;
            labelSize = (int)gridUnit;
            for(int j = 0; j < 5; j++) {
              line = new Line2D.Double(x, y, x, y + gridSize);      
              g2.draw(line);
              x += gridUnit;
            x = (width - gridSize) / 2;
            for(int j = 0; j < 5; j++) {
              line = new Line2D.Double(x, y, x + gridSize, y);
              g2.draw(line);
              y += gridUnit;
          //System.out.println("width = " + width + "\theight = " + height + "\n" +
          //                   "x = " + x + "\ty = " + y + "\n" +
          //                   "gridSize = " + gridSize + "\tgridUnit = " + gridUnit);
        f = new JFrame();
        f.getContentPane().add(gameBoard);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setSize(400,400);
        f.setLocation(600,200);
        //f.setVisible(true);
        setLabelProperties();
      private void setLabelProperties() {   
        int
          r   = 30,
          g   = 30,
          b   = 0,
          inc = 55;
        //System.out.println("labelSize = " + labelSize);
        for(int j = 0; j < squares.length; j++) {
          squares[j] = new JLabel("Square " + j, JLabel.CENTER);
          squares[j].setOpaque(true);
          squares[j].setPreferredSize(new Dimension(73, 73));
        // add labels
        int index = 0;
        gbc.gridx = 0;
        gbc.gridy = 0;
        for(int y = 0; y < 4; y++) {
          for(int x = 0; x < 4; x++) {
            index = y * 4 + x;
            squares[index].setBackground(new Color(r,g,b,90));
            gameBoard.add(squares[index], gbc);
            gbc.gridx++;
            r += inc;
          gbc.gridy++;
          gbc.gridx = 0;
          r = 90;
          g += inc;
        squares[9].setIcon(Unit.noUnit);
      public void show() {
        f.setVisible(true);
      public JLabel getLabel(int index) {
        return squares[index];
    }

  • How Can I Dynamically Name and Set Variable Values?

    First one with a correct answer will have the FUNCTION named after them......
    What I want to do is create 'new' variables based on the index of the parent.
    So, if I have 4 subforms called 'Panel' (Panel[0], Panel[1], Panel[2], Panel[3]), I want do declare a local variable in my function to count from 0 to n  for each Panel.
    We won't know how many Panels we will have until runtime. So, I need the variables to keep track of the count (it's tracking the number of errors) - for each Panel.
    Something like this:
     if(obj.rawValue==null || obj.rawValue=="")
    var errorCount[obj.parent.parent.index]=errorCount[obj.parent.parent.index]+1;
    app.alert(errorCount[obj.parent.parent.index]);
    I am assuming it has something to do with Arrays.  But I suck at Arrays.
    Thanks for the help.

    You're correct, arrays are the way to go.  Define your error array like this:
    var errorCounts = [];
    Then, understand that when an array entry is not set it will have the value 'undefined', so you can know if an entry has been initialized.  So to increment the count for a particular index (subform occurance) use:
    // If entry is being set for the first time, set it to 1.  Otherwise increment count.
    if ( errorCounts[index] == 'undefined' )
        errorCounts[index] = 1;
    else
         errorCounts[index]++;
    You can also loop through and initialize the array to zero; then you can remove the check for undefined.  How and where you do this and how you figure out what 'index' is depends on how your form is set up and which event you're using to kick off the error check.  Give me a little more detail on what you're trying to do.

  • How to call the method from the java bean and pass it to JSP textbox

    i'm quite new to java thats why i'm asking how to call a method in the java bean file and pass it to the JSP textbox. My projects are communicating JSP with C#. i had successfully created a C# client bean file for JSP. The whole process is to type something on the server(C# programming) and it would appear in the textbox.

    your question doesn't provide much informartion. provide some other information and coding so that we could tell exactly what you are looking for?

  • How to call a method defined in AM when I select any value in LOV

    Lets say there is a LOV. The scenario is as soon as I select any value in LOV, a method needs to be called which I have written in the AM. And the output of the method is displayed in a output text box.
    I am not able to understand how to call a method when the user selects any value in LOV.
    This is wht I did. I had created the binding for the method. Changed the autosubmit property of the LOV to True, and in the properties of the output box, in the partial submit trigger property, passed the ID of the LOV. But I didnt get any place where I need to call the method. I am also not able to drop an action listener on the LOV

    Hi,
    +"its showing an error(underlined in orange)."+
    Any reason you don't share this error with us? Anyway, here is how it goes
    1. LOV, set autosubmit="true" and configure a value change listener
    2. Expose the AM method as a method binding in the PageDef file
    3. In the value change listener:
    BindingContext bctx = BindingContxt().getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    OperationBinding method = (OperationBinding) bindings.get("name of method binding in PageDef");
    method.getParamsMap().put("argument name1", value1);
    method.getParamsMap().put("argument name2", value2);
    Object retVal = method.execute();
    if(!method.getErrors().isEmpty()){
      //handle errors
    else{
      //write retVal to the managed bean variable that is referenced by the outputText value property
      //PPR output text component
      ADFFacesContext.getCurrentInstance().addPartialTarget(outputTextRef);
    }Note that you may have to set clientComponent = "true" on the output text component
    Frank

  • How to call java method from xsl

    hi friends,
    How to call a java method from xsl, i have a xsl file which will call the java method and retrieve the value and display it to the user. but its work well when i set xalan.jar and xerces.jar and the java class files in my classpath and run as
    java org.apache.xalan.xslt.Process -in navigate.xml -xsl nav-exst.xsl -HTML -out navoutpage.html[b]
    in the command prompt but when i deploy it as web application it gives error as
    [b]Namespace 'MyPack' does not contain any functions[b]

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to call a method in the servlet from an applet

    I want to get the data for the applet from the servlet.
    How to call a method that exits in the servlet from the applet? I want to use http protocol to do this.
    Any suggestions? Please help.
    thanks

    Now that Web Services is around, I'd look at possibly implement a Web Service call in your applet, which can then be given back any object(s) on return. Set up your server side to handle Web Service calls. In this way, you can break the applet out into an application should you want to (with very little work) and it will still function the same

  • How to call a method from class interface

    Hi ,
    I want to call a method from a 'class interface' in a BADI .
    Class Interface -- /SAPSRM/CL_PDO_DO_BASE
    Method -- /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS
    Please let me know how can I call this method in my BADI.
    Thanks-

    Hi Harmeet,
    Follow these simple steps.
    1. Create an instance of class interface /SAPSRM/CL_PDO_DO_BASE if method /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS is instance method and
    call instance -> /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS
    2.if method /SAPSRM/IF_PDO_DO_PARTNER_BASEUPDATE_ITEM_PARTNERS is static method ,call directly using class interface like /SAPSRM/CL_PDO_DO_BASE=> /SAPSRM/IF_PDO_DO_PARTNER_BASEUPDATE_ITEM_PARTNERS.
    If you feel any dificulty in declaring instances and call methods, 
    Goto EDIT-> Pattern ->ABAP Object Patterns, Give class name , instance name and method, you got the required code.
    Thanks,
    Prasad.

  • How to call a method of another class ?

    Hello,
    I�d like to know how to call a method of another class. I have to classes (class 1 and class 2), class 1 instantiates an object of class 2 and executes the rest of the method. Later, class 1 has to call a method of class 2, sending a message to do something in the object... Does anybody know how to do that ? Do I have to use interface ? Could you please help me ?
    Thanks.
    Bruno.

    Hi Schiller,
    The codes are the following:
    COMECO
    import javax.swing.UIManager;
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    //Main method
    class comeco {
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    AGORA testeagora=new AGORA();
    // Code for socket
    int port;
         ServerSocket server_socket;
         BufferedReader input;
         try {
         port = Integer.parseInt(args[0]);
         catch (Exception e) {
         System.out.println("comeco ---> port = 1500 (default)");
         port = 1500;
         try {
         server_socket = new ServerSocket(port);
         System.out.println("comeco ---> Server waiting for client on port " +
                   server_socket.getLocalPort());
         // server infinite loop
         while(true) {
              Socket socket = server_socket.accept();
              System.out.println("comeco ---> New connection accepted " +
                        socket.getInetAddress() +
                        ":" + socket.getPort());
              input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              // print received data
              try {
              while(true) {
                   String message = input.readLine();
                   if (message==null) break;
                   System.out.println("comeco ---> " + message);
    testeagora.teste(message);
              catch (IOException e) {
              System.out.println(e);
              // connection closed by client
              try {
              socket.close();
              System.out.println("Connection closed by client");
              catch (IOException e) {
              System.out.println(e);
         catch (IOException e) {
         System.out.println(e);
    AGORA
    import javax.swing.UIManager;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.net.*;
    //public class AGORA {
    public class AGORA {
    boolean packFrame = false;
    //Construct the application
    public AGORA() {
    try {
    Main frame = new Main();
    System.out.println("agora ---> Criou o frame");
    //Validate frames that have preset sizes
    //Pack frames that have useful preferred size info, e.g. from their layout
    if (packFrame)
    frame.pack();
    else
    frame.validate();
    //Center the window
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    if (frameSize.height > screenSize.height)
    frameSize.height = screenSize.height;
    if (frameSize.width > screenSize.width)
    frameSize.width = screenSize.width;
    frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
    frame.setVisible(true);
    catch(Exception e)
    { System.out.println("agora ---> " +e);
    // Tem que criar a THREAD e ver se funciona
    public void remontar (final String msg) {
    try {
                   System.out.println("agora ---> Passou pelo Runnable");
    System.out.println("agora --> Mensagem que veio do comeco para agora: "+ msg);
    Main.acao(msg);
    catch(Exception x) {
    x.printStackTrace();
    MAIN
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import com.borland.jbcl.layout.*;
    import javax.swing.border.*;
    import java.net.*;
    import java.io.*;
    public class Main extends JFrame {
    // ALL THE CODE OF THE INTERFACE
    //Construct the frame
    public Main() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    public void acao() {
    // C�digo para mudar a interface
    Runnable setTextRun=new Runnable() {
    public void run() {
    try {
                   System.out.println("main ---> Passou pelo Runnable");
    TStatus.setText("main ---> Funcionou");
    catch(Exception x) {
    x.printStackTrace();
    System.out.println("main ---> About to invokelater");
    SwingUtilities.invokeLater(setTextRun);
    System.out.println("main ---> Back from invokelater");
    // Aqui vai entrar o m�todo para ouvir as portas sockets.
    // Ele deve ouvir e caso haja alguma nova mensagem, trat�-la para
    // alterar as vari�veis e redesenhar os pain�is
    // Al�m disso, o bot�o de refresh deve aparecer ativo em vermelho
    //Component initialization
    private void jbInit() throws Exception {
    // Initialize the interface
    //Setting | Host action performed
    public void SetHost_actionPerformed(ActionEvent e) {
         int port;
         ServerSocket server_socket;
         BufferedReader input;
    System.out.println("main ---> port = 1500 (default)");
         port = 1500;
         try {
         server_socket = new ServerSocket(port);
         System.out.println("main ---> Server waiting for client on port " +
                   server_socket.getLocalPort());
         // server infinite loop
    while(true) {
              Socket socket = server_socket.accept();
              System.out.println("main ---> New connection accepted " +
                        socket.getInetAddress() +
                        ":" + socket.getPort());
              input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    String espaco=new String(": ");
         JLabel teste2=new JLabel(new ImageIcon("host.gif"));
              PHost.add(teste2);
    System.out.println("main ---> Adicionou host na interface");
              repaint();
    System.out.println("main ---> Redesenhou a interface");
              setVisible(true);
              // print received data
              try {
              while(true) {
                   String message = input.readLine();
                   if (message==null) break;
                   System.out.println("main ---> " + message);
              catch (IOException e2) {
              System.out.println(e2);
              // connection closed by client
              try {
              socket.close();
              System.out.println("main ---> Connection closed by client");
              catch (IOException e3) {
              System.out.println(e3);
         catch (IOException e1) {
         System.out.println(e1);
    public void OutHost_actionPerformed(ActionEvent e) {
              repaint();
              setVisible(true);
    //Help | About action performed
    public void helpAbout_actionPerformed(ActionEvent e) {
    Main_AboutBox dlg = new Main_AboutBox(this);
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.setModal(true);
    dlg.show();
    //Overridden so we can exit on System Close
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
    fileExit_actionPerformed(null);
    public void result(final String msg) {
    // C�digo para mudar a interface
    Runnable setTextRun=new Runnable() {
    public void run() {
    try {
                   System.out.println("main ---> Chamou o m�todo result para mudar a interface");
    System.out.println("main --> Mensagem que veio do agora para main: "+ msg);
    TStatus.setText(msg);
    catch(Exception x) {
    x.printStackTrace();
    System.out.println("main --> About to invokelater");
    SwingUtilities.invokeLater(setTextRun);
    System.out.println("main --> Back from invokelater");
    []�s.

  • How to call a method in jsf after stop typing in test box?

    Hi all,
    In my jsf page i have a text box in which user type some text field like "abc". i want after stop the typing i want a method to be called automatically and a datatable will be populated sith some result. my problem is is how to call the method automatically so that the user does not have to click any button after typing in the text box? plz help..
    Edited by: sailajoy on Dec 23, 2008 3:36 PM

    If it is after certain characters that the user types you can ascertain that the entry is done you can use onkeyup and within the javascript count the characters an when the necessary characters are set do the action you need to do.
    There should be some way by which you can suggest that the user has stopped typing i.e. either the max length has reached or the user has hit tab or went to another field. Going on other field too you can bring the focus back to your original field from where the user had hit tab. If you are thinking of something liek google suggest then AJAX is the best way to implement it.

  • How to call java method having array as argument from c++ ?

    Hello sir,
    how to call java method having array as arguments from c++;
    here is java code which is called from c++
    class PQR {
         public void xyz(int[] ia) {
         System.out.println("hi");
              for (int i = 0; i < ia.length; i++)
                   System.out.println(ia);
    suppose all jvm invocation is done...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    For someone well versed in java, C++ and JNI although tedious that should be obvious.
    For someone not well versed in all three it is going to be very difficult.
    Even for someone that does have knowledge in all of those areas coming up with a C++ interface that reflects that functionality in a dynamic way such that anyone is will to use it is going to be quite an adventure.
    At any rate to start building it you do exactly the same thing that you would in java.
    1. Extract everything in the jar via the zip package
    2. For each found instance extract all of the methods, return types, parameters, etc and build a description tree for each class.
    Doing all of that in C++ is going to take a LOT of code. If someone wanted an estimate from me it would take me 6 months to do it. And before I would even attempt it I would get them to explain to me in detail exactly how they thought they were going to use it when I was done because I can't see any reasonable way to do that.
    I left out the description tree itself. I suppose you could duplicate the entire reflection api in C++.
    Now perhaps if it was much, much more constrained, like to only those classes that implement a single interface then that would be more reasonable.

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to call a method in private section of a class in the public section

    Hi Everybody,
    i have written a method(meth1) in the private section of a class(C1).
    it is as follows
    class C1 definition.
    private section.
    methods: meth1 importing im_dt1 like tp1
                                             im_dt2 like tp2
                                             im_dt3 like tp3
                                             im_dt4 like tp4
                               returning value(re_dt1) like tp5.
    endclass.
    i have the final data that has to be displayed in internal table re_dt1.
    now my question is how to call  this method present in private section into public section and display the data present in re_dt1.
    Thanks,
    learning.abap.

    Hi,
    what you need is one public method being called at start-of-selection. Within this the private methods have to be called.
    The question is, why has the method for reading the database tables to be private? If you have only one private method reading all database tables the public method being called at start-of-selection will only consist of a call-method statement.
    This seems to be one call to much.
    The logic for reading the different database tables is hidden inside the class anyway.
    Is there any further logic reading the different database tables?
    Have always all table to be read? If not another approach would be one private method for each database table being called by a public method deciding which table has to be read:
    public section.
    methods get_data returning value(re_Dt1).
    private section.
    methods:
    get_table_a returning value(im_dt1),
    get_table_b returning value(im_dt2),
    get_table_c returning value(im_dt3),
    get_table_d returning value(im_dt4),
    combine_data importing im_dt1
                                    im_dt2
                                    im_dt3
                                    im_dt4
                            returning value(re_dt1).
    *- implementation of public method:
    method get_data.
      data: lt_dt1 ...
               lt_dt2,
               lt_dt3,
               lt_dt4.
    * here decide which tables have to be read:
    lt_dt1 = get_table_a( ).
    lt_dt2 = get_table_b( ).
    lt_dt3 = get_table_c( ).
    lt_dt4 = get_table_d( ).
    re_dt1 = combine_data( i_dt1 = lt_dt1
                                           i_dt2 = lt_dt2
                                           i_dt3 = lt_dt3
                                           i_dt4 = lt_dt4 ).
    endmethod.
    *- implementation of private methods
    method get_table_a.
    endmethod.
    method get_table_b.
    endmethod.
    method get_table_c.
    endmethod.
    method get_table_d.
    endmethod.
    method combine_data.
    endmethod.
    Regards
    Dirk

Maybe you are looking for

  • New Macbook - Airport connection problem

    Hi All, wondering if someone can help. I have just bought a new MacBook (yesterday) and have been trying to connect to the wireless network that I currently use with my Powerbook. I can connect the new MacBook to the Airport Express to play AirTunes

  • Reverb sound come out from my mac mini

    Hi my mac mini sound output always include sound like reverb/echo . No matter i try phone jack out or usb out to speaker and headphone. its easy to hear the reverb sound when play any sound file(voice over). my mac mini up to date version Please help

  • Illegal characters in SOAP message

    Hi I consistently get the following in the server log (I'm using JAX-WS 2.1): Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolo

  • How to make firefox render fonts as google-chrome does? (screenshot)

    How do I make firefox render fonts as google chrome does as shown in screenshot? (Chrome below and firefox above) Notice for instance the dash "/", "Explore", "Features" etc and the text at the bottom "added git_fixes". I'm no expert but is it antial

  • External DVD burner, Mini Form Factor

    There are cases out there for external hard drives with a Macmini form factor, but is there one for an external dvd burner.