Reference to calling vi from subvi

Is there a way fora subvi to get a reference to the vi that called it?
Bill F

Hi Raman,
Generally speaking, using "call by reference" or VI Server with an invoke node accomplish the same goal -- loading a VI dynamically. Many programmers have used this functionality to achieve a "plug in" architecture with their subvi's, since they do not have to be part of the top-level VI's hierarchy. The two methods differ from each other in two main ways:
1. Call by Reference allows to you to wire just like a subvi's (with a connector pane), but the VI must execute in sequence according to the dataflow on the parent block diagram.
2. Using an invoke node allows you to truly launch the VI "in parallel" to the calling (parent) VI. However, you must use Get/Set control value methods to send data to it...which can make your block diagram a little messier
You may also find these links helpful:
Using Call by Reference with VI Server
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DA8056A4E034080020E74861&p_...
Call By Reference Node
http://zone.ni.com/reference/en-XX/help/371361A-01/glang/call_by_reference_node/
Good luck!
Charlie S.
Visit ni.com/gettingstarted for step-by-step help in setting up your system

Similar Messages

  • In EPM10, how do you call/reference a dynamic range from a macro.

    Hi Gurus
    In EPM10, [we are using SP16,P1], how do you call/reference a dynamic range from a macro.
    EG, in the BPC input sheet below, we have BPC reports ‘000’,’001’,’002’. For report ‘001’,users are able to select from diffent versions which each have different number of months. In the forecast version below, there are 7 months. We require a macro to select & delete f'cast data content of report ‘002’, there after we will manipulate it via the macro and return it. However, standard excel named ranges don’t work per BPC7.x and don’t dynamically expand.
    The macro code in 7.x was:
    Range(“REPORT1_RANGE”).Select >> Does any oneknow the replacement in EPM10 please?

    The following macro which accesses API's looks like it would help to define the report range:
    Sub TopLeftCell()
    Range("c26").Select
    Application.Run "EPMExecuteAPI", "GetDataTopLeftCell", "", "Sales Planning", "001"
    End Sub
    Anybody able to assist with the syntax of this macro..it currently runs without error, however does not return any result?? Note:
    * the parameter ''" relates to the text which i believe can be left if using macros
    *the parameter "Sales Planning" is my worksheet name
    *the parameter "001" is my report definition.
    I was hoping to return the result back to cell C26. Thanks All

  • Write multicolumn listbox value from subvi whitout reference

    Hi:
     Is it anyway to write data to multicolumn list box from subVI without pass in reference? Because if pass in reference I have to pass a lot.
    Like I can use Open VI Reference together with "Set Control Value" to set a String indicator text.  But I can't find the way to use open vi reference to set the multicolumn listbox text, I only can highlist which row.
    Thank.

    One thing you could do:
    Write the multicolumn listbox reference to an indicator in your main VI. In the SubVI read that indicator value and unflatten it into a multicolumn listbox reference. Then you'll have the reference available in the SubVI as if you had passed it.

  • How to add indicators from subVIs to main VI

    Hi,
    I have a similar problem as well as a question or two about running subVI's.  Basically, I am trying to create a project that will use both syringe pump injections and the opening and closing of valves to transport a fluid.  As of now, I have a program written for the syringe pump that I was able to modify from an instrument driver from the manufactuer of the syringe.  The goal is to just have the operator press a single run button, as all volume and flow rate conditions will stay the same from trial to trial.  I created two separate syringe pump suvbVI's, one injects 1mL of fluid at 1mL/min and the second injects 2mL of fluid at 1mL/min.  
    I want to use the flat sequence structure to run these two subVI's sequentially, which I am having some difficulty with.  I set this up so that the operator must press an "OK" button in order for the case structre to read "true" and begin the operations in the flat sequence.  Both subVI's work correctly if operated on their own.  However, when I use the highlight data flow function (lightbulb on block diagram) I can see that pressing the OK button causes the case structure to read true, and the program to engage the first subVI.  Upon opening the block diagram of the first subVI and using the same lightbulb tool, I noticed that the information is getting stuck in the first while loop and repeating itself endlessly.  Any suggestions as to why this may be the case?  (I did go into each subVI and changed the VISA resource name to the correct COM port)
    Also, once I figure out how to get the information to flow correctly, I do want my main VI front panel to display some of the front panel indicators on the syringe pump VI's, such as the volume dispense and tank.  I would like to know more information about how to reference a wire to the subVI as previously mentioned in this thread.
    Sorry this was such a long post!  I attached the main VI with the embedded syringe pump subVI's as well as both individual subVI's.  Any suggestions would be greatly appreciated!
    Thanks
    Attachments:
    Test Project_Pumps.vi ‏9 KB
    NE-50X Push Button Example-tester_1mL_3_30_1013.vi ‏289 KB
    NE-50X Push Button Example-tester_2mL_3_30_1016.vi ‏289 KB

    galXE1,
    From my example you can use the invoke node method of "get all" and it will retrieve all the indicator names and values and then you can get the values you want. 
    Sorry for not posting this originally but without modifying your code a bunch your quickest option is to use shared variables. If you have important vital tasks they aren't the best but if you're just looking to pass data between vi's then they are you're easiest option. 
    Creating a Shared Variable - look at single process shared variable section. 
    http://zone.ni.com/devzone/cda/tut/p/id/4679
    So you basically call your subvi every time the loop iterates to perform some execution and then you can update your main front panel with the newest values. Calling the subvi with a loop in it. Nothing special but it gets the job done. Its not very good practice if you have a bunch of values you want to pass. 
    See subvi calculations.jpg
    A better approach to passing data between vi's is detailed in the document. Its called a Functional Global Variable. 
    https://decibel.ni.com/content/docs/DOC-12876
    Kyle Hartley
    RIO Product Support Engineer
    National Instruments
    Attachments:
    Subvi calculations.JPG ‏42 KB

  • Calling method from another class problem

    hi,
    i am having problem with my code. When i call the method from the other class, it does not function correctly?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Dice extends JComponent
        private static final int SPOT_DIAM = 9; 
        private int faceValue;   
        public Dice()
            setPreferredSize(new Dimension(60,60));
            roll(); 
        public int roll()
            int val = (int)(6*Math.random() + 1);  
            setValue(val);
            return val;
        public int getValue()
            return faceValue;
        public void setValue(int spots)
            faceValue = spots;
            repaint();   
        @Override public void paintComponent(Graphics g) {
            int w = getWidth(); 
            int h = getHeight();
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setColor(Color.WHITE);
            g2.fillRect(0, 0, w, h);
            g2.setColor(Color.BLACK);
            g2.drawRect(0, 0, w-1, h-1); 
            switch (faceValue)
                case 1:
                    drawSpot(g2, w/2, h/2);
                    break;
                case 3:
                    drawSpot(g2, w/2, h/2);
                case 2:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    break;
                case 5:
                    drawSpot(g2, w/2, h/2);
                case 4:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    drawSpot(g2, 3*w/4, h/4);
                    drawSpot(g2, w/4, 3*h/4);
                    break;
                case 6:
                    drawSpot(g2, w/4, h/4);
                    drawSpot(g2, 3*w/4, 3*h/4);
                    drawSpot(g2, 3*w/4, h/4);
                    drawSpot(g2, w/4, 3*h/4);
                    drawSpot(g2, w/4, h/2);
                    drawSpot(g2, 3*w/4, h/2);
                    break;
        private void drawSpot(Graphics2D g2, int x, int y)
            g2.fillOval(x-SPOT_DIAM/2, y-SPOT_DIAM/2, SPOT_DIAM, SPOT_DIAM);
    }in another class A (the main class where i run everything) i created a new instance of dice and added it onto a JPanel.Also a JButton is created called roll, which i added a actionListener.........rollButton.addActionListener(B); (B is instance of class B)
    In Class B in implements actionlistener and when the roll button is clicked it should call "roll()" from Dice class
    Dice d = new Dice();
    d.roll();
    it works but it does not repaint the graphics for the dice? the roll method will get a random number but then it will call the method to repaint()???
    Edited by: AceOfSpades on Mar 5, 2008 2:41 PM
    Edited by: AceOfSpades on Mar 5, 2008 2:42 PM

    One way:
    class Flintstone
        private String name;
        public Flintstone(String name)
            this.name = name;
        public String toString()
            return name;
        public static void useFlintstoneWithReference(Flintstone fu2)
            System.out.println(fu2);
        public static void useFlintstoneWithOutReference()
            Flintstone barney = new Flintstone("Barney");
            System.out.println(barney);
        public static void main(String[] args)
            Flintstone fred = new Flintstone("Fred");
            useFlintstoneWithReference(fred); // fred's the reference I"m passing to the method
            useFlintstoneWithOutReference();
    {code}
    can also be done with action listener
    {code}    private class MyActionListener implements ActionListener
            private Flintstone flintstone;
            public MyActionListener(Flintstone flintstone)
                this.flintstone = flintstone;
            public void actionPerformed(ActionEvent arg0)
                //do whatever using flinstone
                System.out.println(flintstone);
        }{code}
    Edited by: Encephalopathic on Mar 5, 2008 3:06 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calling XSQL from java servlet

    I'm able to call XSQL, process the page, and display it. But, how do I set the stylesheet from within my java servlet.
    I tried params.put( "xml-stylesheet", "[path to sheet]" ), and then passing that to process(), but it just ignores it. I want to be able to set the stylesheet dynamicaly like when you call XSQL from the command line or from the XSQL servlet.
    XSQLRequest req = new XSQLRequest( xsql );
    Hashtable params = new Hashtable(2);
    params.put( "mths", "6");
    params.put( "run_id", "30");
    params.put( "grade", "A" );
    params.put( "xml-stylesheet", xsl ); <-- just seems to ignore this.
    ByteArrayOutputStream ostr = new ByteArrayOutputStream(2048);
    req.process( params, ostr, new PrintWriter(System.err) );

    Thanks for the help Steve (and thanks for a really nice book by the way.)
    To answer your first question, I have implemented a report caching servlet. In the application we're writing, reports are generated in HTML or PDF (using XSQL) on demand. However, the data really only changes once a day at most so I wanted to have a way to store the reports once they were generated. So this servlet basically gets the request for a report, checks to see if the report has already been generated and, if not, generates the report using XSQLRequest. Finally it returns the report to the user.
    One benefit to doing this is that it masks the generation process from the user (ie, they can just hit a link like http://somehost/path/to/report.pdf and they get a pdf report.) Of course the other benefit is that reports only need to be generated once, reducing server load.
    I will definitely try your suggestion and just redirect to the XSQL servlet. I guess I was thinking about it too hard, this is a simple solution which will probably address the problem with a minimum of fuss. ;o) Using XSQLRequest directly works, it's just that I want to be able to reference external images using relative paths... it's funny that relative references to XSL pages works though.
    Thanks again,
    Van
    null

  • Calling PopUpManager from a class in a library

    I have a class for logins that I have put in a Flex Library
    Project.
    Part of the login is a popup form(mxml) I have created and is
    in the library.
    The problem I have is this line:
    loginPopUp =
    LoginForm(PopUpManager.createPopUp(this,LoginForm,true));
    The error I get is:
    1067: Implicit coercion of a value of type
    dataManagers:LoginManager to an unrelated type
    flash.display:DisplayObject.
    The parent “this” is no good since its parent
    should be the application that called the logon.
    Can I reference the caller from the LoginManager class I
    created to feed to popupmanager as the parent for the popup?
    The code in the app using the llibray that relates to this
    (to save space) is:
    import dataManagers.LoginManager
    public var lm:LoginManager = new LoginManager();
    lm.initServices();
    //LoginManager.as
    package theLoginManager {
    import flash.events.Event;
    import mx.managers.PopUpManager;
    public class LoginManager {
    import LibraryViews.Login.LoginForm;
    public var loginPopUp:LoginForm;
    public function initServices() : void
    Alert.show("Login start");
    appCFC = new RemoteObject("ColdFusion");
    appCFC.source = "CFC.Users.usersGateway";
    appCFC.addEventListener(FaultEvent.FAULT, server_fault);
    appCFC.init.addEventListener(ResultEvent.RESULT,init_result);
    appCFC.getById.addEventListener(ResultEvent.RESULT,getById_result);
    displayLogin()
    private function displayLogin():void{
    loginPopUp =
    LoginForm(PopUpManager.createPopUp(this,LoginForm,true));//THIS IS
    THE PROBLEM LINE
    loginPopUp.addEventListener("loginSuccessful",
    removeLoginPopup);
    //Removes login form
    private function removeLoginPopup(event:Event):void{
    PopUpManager.removePopUp(loginPopUp);
    }//End Class
    }//End Package
    //LoginForm.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Form width="100%" height="100%"
    defaultButton="{loginBTN}">
    <mx:FormItem width="100%" label="Username"
    required="true">
    <mx:TextInput id="email"
    width="175" text="mltv"/>
    </mx:FormItem>
    <mx:FormItem width="100%" label="Password"
    required="true">
    <mx:TextInput id="password"
    displayAsPassword="true"
    width="175" text="nuffer"/>
    </mx:FormItem>
    <mx:VBox width="100%" horizontalAlign="center">
    <mx:Button id="loginBTN" label="Login"
    click="authenticateUser();" fillColors="[#80ff00, #80ff00]"/>
    </mx:VBox>
    </mx:Form>
    </mx:TitleWindow>

    I solved it by passing the parent when I called it from the
    parent project:
    lm.initServices(this);
    and then created a var in the .as file:
    private var theCallingParent:DisplayObject;
    theCallingParent = theParent;
    Then used that variable when I called the popup:
    loginPopUp =
    LoginForm(PopUpManager.createPopUp(theCallingParent,LoginForm,true));
    Sorry to clog up the board.

  • Calling RFC from JSP : development component

    Hi everyone,
    I created JSP that call RFC from SAP/R3.
    I have problem with the DestinationService.
    Without DCs, it worked very good.
    But since I created a DC for my JSP project, I have exception at run time regarding
    the java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/DestinationService.
    Eventhough I add the specific jar, I get an excpetion.
    Thanks for the help.
    David

    Go to the application-j2ee-engine.xml file and add following reference:
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="interface">tcsecdestinations~interface</reference-target>
         </reference>

  • CVI crashes when calling function from external DLL

    I'm calling a CVI library from Test Stand 4.1.  In that CVI library I load an external DLL (using LoadLibrary) and create a few function pointers (using GetProcAddress).  The DLL loads successfully, and I get addresses for all of the imported functions.  
    However, when I one of the functions is called CVI crashes (Test Stand says it lost the ActiveX connection to CVI) when executing in an external CVI instance.  If executed in the Test Stand process I get a system level exception.
    If I step through the code in CVI, it hangs after trying to step into or over the call to the function pointer from the external DLL.
    I am able to call the functions in a small test project I created in CVI, however when integrating it into an existing test library and calling it through Test Stand it fails.
    Any ideas on how to go about debugging this issue?

    Have you tried calling into the dll that CVI calls directly from TestStand?  I am curious to know if this also crashes.
    I am also curious to know if there are any path references in the dll that is called by the CVI program.  If so are they relative, or absolute paths?
    I ask because one of the possibilities is that relative paths are being used to specify a path from the location of the code that is called, and they are not working because the current working directory is being specified by TestStand, and the paths are not relative to the working directory given by TestStand.
    Jensen
    National Instruments
    Applications Engineer

  • Calling SAPSCRIPT from CLASS-METHOD?

    Is it possible to call SAPSCRIPT from a class-method?
    I have no idea how to use variables - there are no global variables in classes.
    thx

    Hi,
    The super reference can only be used in redefined methods to call superclass implementation . So probably what you can do is use upcasting and access the required superclass implementation. I can think of only this way...;-)
    Ex data lr_super type ref to cl_superclass
    lr_super = lr_subclass.
    lr_super->method().
    ~Piyush Patil

  • What is the interaction between calling VIs and subVIs using VI Server?

    I'm studying for the CLAD and one of the lines in NI's preparation document here is this:
    What is the interaction between calling VIs and subVIs using VI Server?
    I know how to use the "Call By Reference" function to call a VI, but not necessarily a subVI. I thought a subVI is always loaded with the calling VI and has nothing to do with VI Server. What am I missing?
    Solved!
    Go to Solution.

    Hi Bmihura,
    I think this article will clear up how the VI Server works with subVIs called dynamically or statically.
    Calling a VI by Reference
    Best Regards,

  • Any program for calling bapi from ABAP step by step

    any program for calling bapi from ABAP step by step
    points will be rewarded,
    thank you,
    Jagrut BharatKumar Shukla

    Hi Jagrut,
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    ex BAPI:
    API_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    You can get good help form the following links,
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://sap-img.com/bapi.htm
    <b>EG::</b>
    <b>Here is the step by step procedure for creating BAPIs.</b>
    There are 5 different steps in BAPI.
    - Create BAPI Structure
    - Create BAPI Function Module or API Method.
    - Create BAPI object
    - Release BAPI Function Module.
    - Release BAPI object.
    Step1. Creating BAPI Structure:
    - Go to <SE11>.
    - Select Data Type & Enter a name.
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module:
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
    Goto -> Function Groups -> Create Group.
    Enter a name (Note: This name Must start with ZBAPI)
    Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
    Click on the Third ICON that says Inactive Objects.
    Select the group that you just created and click on Activate.
    Notice that the group you created will disappear from the list of inactive objects.
    - Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields
    RETURN TYPE BAPIRETURN (These 3 field values are always same)
    Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object:
    - Enter Tr.Code <SWO1> (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details.
    NOTE: Make sure that that Object Type and Program name are SAME.
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom.
    - Then hit <ENTER>.
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu:
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step.
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    - Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>.
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
    <b>Reward pts if found usefull :)</b>
    regards
    Sathish

  • Calling methods from the Business Object BUS2032

    Hi all,
    Is it possible to call methods from the Business Object BUS2032.
    If so, how can it be done??
    Regards,

    Hi Marv,
    you sure can. Here is an extract from the SAP Help. I found it at http://help.sap.com/saphelp_46c/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/frameset.htm
    <b>Programmed Method Call</b>
    Call (fictitious) method Print of object type VBAK (sales document). The method receives the parameters Paperformat and Printertype as input.
    * Call method Print of object type VBAK
    * Data declarations
    DATA: VBAK_REF TYPE SWC_OBJECT.
    SWC_CONTAINER CONTAINER.
    * Create object reference to sales document
    SWC_CREATE_OBJECT VBAK_REF 'VBAK' <KeySalesDoc>
    * Fill input parameters
    SWC_CREATE_CONTAINER CONTAINER.
    SWC_SET_ELEMENT CONTAINER 'Paperformat' 'A4'.
    SWC_SET_ELEMENT CONTAINER 'Printertype' 'Lineprinter'.
    * Call Print method
    SWC_CALL_METHOD VBAK_REF 'Print' CONTAINER.
    * Error handling
    IF SY-SUBRC NE 0.
    ENDIF.
    Cheers
    Graham

  • Calling Methods from Business Object BUS2032

    Hi all,
              Is it possible to call methods from the Business Object BUS2032.
       If so, how can it be done?? 
    Regards,

    Hi Marv,
    you sure can. Here is an extract from the SAP Help. I found it at http://help.sap.com/saphelp_46c/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/frameset.htm
    <b>Programmed Method Call</b>
    Call (fictitious) method Print of object type VBAK (sales document). The method receives the parameters Paperformat and Printertype as input.
    * Call method Print of object type VBAK
    * Data declarations
    DATA: VBAK_REF TYPE SWC_OBJECT.
    SWC_CONTAINER CONTAINER.
    * Create object reference to sales document
    SWC_CREATE_OBJECT VBAK_REF 'VBAK' <KeySalesDoc>
    * Fill input parameters
    SWC_CREATE_CONTAINER CONTAINER.
    SWC_SET_ELEMENT CONTAINER 'Paperformat' 'A4'.
    SWC_SET_ELEMENT CONTAINER 'Printertype' 'Lineprinter'.
    * Call Print method
    SWC_CALL_METHOD VBAK_REF 'Print' CONTAINER.
    * Error handling
    IF SY-SUBRC NE 0.
    ENDIF.
    Cheers
    Graham

  • Call event from other event or other vi

    I have LabVIEW 6.1.
    1. Can I call an event or a serious of events from another event? How can I do that? It doesn't matter if the events are executed after the event that called them is completed.
    2. Can I call an event from another vi? Let's say I have an event structure in a subvi. Can I trigger an event in the subvi calling it from the main vi? How would I do that?
    Thanks for your help.
    Jerome.

    Salutations,
    In reality, a program should only have 1 event structure. Or so someone much more knowledgable with labview has told me in the past.
    It's an important note to make that when running events or SubVi's, they will run until they are accomplished and then allow the next event or subvi to take place. So if you have multiple event structures, you must wait until one finished before the next one is run (This might...no guarantees, be avoided by multiple while loops and not locking the front panel on the execution of an event). Now, since you don't care, you can handle such a case. Just make multiple events in your one main event structure. I'm not sure what exactly you want to do, just make sure you "unfreeze" the front panel when you're messing with what handles what events.
    Hence, you could have a "run" button that's pressed and it goes about it's business. Then you could have a mouse down response, that you hit while your "run" process is still going, this will be, in a sense, logged and accomplished once the "run" task is done. Now, if you're looking for data to trigger another event, maybe I'd switch over to a case structure that's inside your event structure. For case structures, every case must have an output.
    Can you trigger an event in the subvi calling it from the main vi.... Excellent question... I'm not exactly sure when this would come up, but i'm not super experienced like some of the people around here. It may be possible, but i'd imagine a case structure would be more efficient. Like the ones in error handling. Pass the case to the subvi, it'll operate depending on what you want, and then continue along. Events seem most useful when dealing with events that occur on the front panel.
    Hope this helps,
    ElSmitho

Maybe you are looking for

  • A strange one - setPixels only works against the left of the screen

    setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)My applet's split into different bits. The main game screen (which I'm animating to with pixel[]) starts in the top left hand corner... _consumer.setPixels(0,

  • ReadCursorResponse Items. How Do You Iterate Cursor Items?

    I am working on some C# code that returns a cursor response. The cursor does have items in it. I can access them individually. How can I determine a "count" of items, or how do I control an interation loop of the items returned by the cursor? In othe

  • Starting Windows 7 Backup : Server execution failed(0x80080005) ????

    A MSFT asked me to post here and here is a link to my original post and some troubleshooting already done. http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/8669451c-772e-4bb4-91b0-9b089bf5c2cd/ My original first post in that for

  • What is best way to get dvds onto ipod?

    Hi, i recently got a ipod video and im just wondering how you get dvds onto it. thx compaq presario 6000   Windows XP   its like 4 years oild now but still great

  • Getting top 9, aggregating the rest - challenge with SUM

    Dear, I'd like to get the top 9 customers and aggregate the remaining to one number. My query is: select k.kundenid, k.KDNR, k.FIRMA_1, sum(a.auftrag_total) from auftrag a, kunden k where a.kunde_id=k.kundenid and TO_CHAR(a.DATUM,'YYYY')=TO_CHAR(sysd