Where is a VI-Ref valid?

Hi,
I've got a kind of mystic problem:
A main UI process starts some child processes from a template.
To do this, it opens a Ref to the vit (instantiates it), loads some data (including 'its' VI-Ref) into it and starts it as a new process (run VI-method).
This seemed to work, when I instantiated a whole bunch of those processes and started them later, whenever a new process was needed. I have changed this behaviour to instantiate _and_ start 'em when needed, because this way main can run continuously.
Now with this change, the VI Ref that is sent to the newly instantiated process is invalid, causing error -1026 when I try to do anything with it (for example opening the FP).
Any clue?
Of course I can obtain a Ref to the new instance inside it, but than there is nor 'connection' from main to the new instance?!!!
Confused ;-()

LuI wrote:
Hi,
I've got a kind of mystic problem:
A main UI process starts some child processes from a template.
To do this, it opens a Ref to the vit (instantiates it), loads some data (including 'its' VI-Ref) into it and starts it as a new process (run VI-method).
This seemed to work, when I instantiated a whole bunch of those processes and started them later, whenever a new process was needed. I have changed this behaviour to instantiate _and_ start 'em when needed, because this way main can run continuously.
Now with this change, the VI Ref that is sent to the newly instantiated process is invalid, causing error -1026 when I try to do anything with it (for example opening the FP).
Any clue?
Of course I can obtain a Ref to the new instance inside it, but than there is nor 'connection' from main to the new instance?!!!
Confused ;-()
A VI reference is closed automatically by LabVIEW as soon as the top level VI of the hierarchy which created (opened) that refnum gets idle. This means if you have two independant VIs A and B, with A opening a VI refnum and doing some stuff on it and then writing the refnum to a global and B accessing that global to use the VI refnum, B will see an invalid refnum as soon as A stops executing (goes idle).
In order to avoid that you would need to either make A also part of the hierarchy of B by including it as some subVI or keep A running until B is also finished with the refnum.
That said, sharing refnums over globals is in almost all cases a bad idea anyhow. Better would be to open a new VI reference in the second hierarchy of VI B before VI A goes idle.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Find data where data not in ref cursor

    CREATE OR REPLACE PACKAGE types AS
    TYPE weak_ref_cursor IS REF CURSOR;
    END types;
    CREATE OR REPLACE PROCEDURE procedure_name
    (p_getname OUT types.weak_ref_cursor,
    p_tablename IN VARCHAR2, p_salary IN NUMBER)
    AS
    v_tem VARCHAR2 (4000);
    BEGIN
    v_tem := 'SELECT ENAME FROM ' || UPPER (p_tablename) || ' WHERE sal > :b_salary';
    OPEN p_getname FOR v_tem USING p_salary;
    END procedure_name;
    SQL> EXECUTE procedure_name (:g_getname, 'EMP', 2000);
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> print g_getname;
    ENAME
    ALLEN
    WARD
    MARTIN
    BLAKE
    babu
    JOHN
    TURNER
    7 rows selected.
    Now i want to select data from emp table where ename not in ouput of g_getname
    Please help me

    You cannot select that data from using a query(since the program unit is procedure), instead you can write a code (anonymous pl/sql block) and retrive the records and print them using dbms_output.put_line on console.

  • Displaying "N/A" in report fields where Number data is not valid using a formatting formula

    Post Author: Horizon57
    CA Forum: General
    I have many reports which are populated by "Number" data. However, there are certain charts and tables where the number data is not appropriate and the summation of such data does not add value to the report. In these instances I would like to display "N/A", however the formula I am using keeps giving me an error that I need to use a "Number" data type. Please note this is a formatting formula.
    Formatting Formula
    DO{TREND.EPTP1} = 'N/A' AND{TREND.EPTP2} = 'N/A' AND{@Trend %}    = 'N/A'  WHILE {TREND.POS2} = 'TOTAL';
    Can anyone assist me with displaying "N/A"?

    Post Author: V361
    CA Forum: General
    Try this
    DOtotext ( {TREND.EPTP1} ) = 'N/A' ANDtotext ( {TREND.EPTP2} ) = 'N/A' ANDtotext ( {@Trend %} )    = 'N/A'  WHILE {TREND.POS2} = 'TOTAL'; 

  • Where can I get a valid channel and features linup?

    The FiOS man called today to say that it is now available at my residence.  I want to compare prices and features but when I use the channel linup link it keeps telling me that it is not available at my zip code.  Actually any zip I enter, even ones that I know have Fios say the same thing.  I need to compare channels that I can get now with what Verizon has.
    thanks,  Steve

    Can you give us a general idea of where you are and someone might be able to come up with a link?

  • Where i can find this validator oracle.iam.requestactions.plugins.dataval ?

    Hi,
    I need to modify this validator -> oracle.iam.requestactions.plugins.datavalidator.CreateUserDataValidator.
    this is possible?
    when i create a new validator the create user template doesn't work.
    error:
    [2012-10-10T14:28:13.548-05:00] [oim_server1] [NOTIFICATION] [IAM-0080006] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: e48b78a1878c940d:-1d5fbd71:13a4b638645:-8000-00000000000022b6,0] [APP: oim#11.1.1.3.0] Orchestration process moved to failed stage, and the corresponding error is - {0}[[
    oracle.iam.platform.kernel.EventFailedException: IAM-3050096:An error occurred while generating the Username. Invalid values passed for attribute Email.:Email
         at oracle.iam.identity.usermgmt.utils.UserManagerUtils.createEventFailedException(UserManagerUtils.java:660)
         at oracle.iam.identity.usermgmt.utils.UserManagerUtils.createEventFailedException(UserManagerUtils.java:640)
         at oracle.iam.identity.usermgmt.impl.handlers.create.CreateUserPreProcessHandler.execute(CreateUserPreProcessHandler.java:407)
         at oracle.iam.platform.kernel.impl.OrchProcessData.runPreProcessEvents(OrchProcessData.java:899)
         at oracle.iam.platform.kernel.impl.OrchProcessData.runEvents(OrchProcessData.java:634)
         at oracle.iam.platform.kernel.impl.OrchProcessData.executeEvents(OrchProcessData.java:227)
         at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.resumeProcess(OrchestrationEngineImpl.java:749)
         at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.resumeProcess(OrchestrationEngineImpl.java:780)
         at oracle.iam.platform.kernel.impl.OrhestrationAsyncTask.execute(OrhestrationAsyncTask.java:129)
         at oracle.iam.platform.async.impl.TaskExecutor.executeUnmanagedTask(TaskExecutor.java:101)
         at oracle.iam.platform.async.impl.TaskExecutor.execute(TaskExecutor.java:71)
         at oracle.iam.platform.async.messaging.MessageReceiver.onMessage(MessageReceiver.java:68)
         at sun.reflect.GeneratedMethodAccessor1738.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy352.onMessage(Unknown Source)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.iam.identity.exception.UserNameGenerationException: IAM-3050096 : An error occurred while generating the Username. Invalid values passed for attribute Email.:Email
         at oracle.iam.identity.usermgmt.utils.UserNameGenerationUtil.checkEmailFormat(UserNameGenerationUtil.java:439)
         at oracle.iam.identity.usermgmt.utils.UserNameGenerationUtil.validateInputData(UserNameGenerationUtil.java:290)
         at oracle.iam.identity.usermgmt.utils.UserNameGenerationUtil.generateUserName(UserNameGenerationUtil.java:111)
         at oracle.iam.identity.usermgmt.utils.UserNameGenerationUtil.generateUserName(UserNameGenerationUtil.java:95)
         at oracle.iam.identity.usermgmt.impl.handlers.create.CreateUserPreProcessHandler.execute(CreateUserPreProcessHandler.java:386)
         ... 33 more
    any idea??
    thanks.!

    The DataSetValidator element is an optional element in request dataset. It is one of the child elements of the request-data-set element that describes the user-defined plug-in details meant for validating the dataset attribute values. The request engine runs the implemented plug-in to validate request data during submission. If the validation is successful, then the request gets created. Otherwise, the request is not created. You must implement the plug-in logic. Each dataset can have only one DataSetValidator defined.
    These are the attributes:
    name: This attribute specifies a logical name of the DataSetValidator plug-in.
    classname: This attribute specifies the fully qualified name of the implemented plug-in class.
    The following example shows the DataSetValidator element:
    <DataSetValidator name="CreateUserDataValidator" classname="oracle.iam.requestactions.plugins.datavalidator.CreateUserDataValidator"/>
    And yes, The classname in the DataSetValidators in these default request datasets can be changed to a customized class to have customized validation.
    Check this out:
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14309/request.htm#CIHCFIAE
    I hope this really helps you,
    Thiago Leoncio.

  • Where is Hint Box for Validation Text Field widget?

    I want to enter a hint for my form.
    I am following the instructions on the Adobe Using Dreamweaver CS4 page for Insert and edit the Validation Text Field widget page:
    <http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSEB5440BC-453A-4101-928C-302199E7E02F. html#WS8E6EA74E-87AC-4a81-A5CC-2DB6FB451DE0a>
    It says:
    Create a hint for a text field
    Because there are so many different kinds of formats for text fields, it is helpful to give your users a hint as to what format they need to enter. For example, a text field set with the Phone Number validation type will only accept phone numbers in the form (000) 000-0000. You can enter these sample numbers as a hint so that the text field displays the correct format when the user loads the page in a browser.
       1. Select a Validation Text Field widget in the Document window.
       2. In the Property inspector (Window > Properties), enter a hint in the Hint text box.
    However, the is no hint box in my Propeties area.
    How do I get this hint box to show up?
    Dreamweaver CS4, Windows Vista

    Hi David,
    My Property inspector looks different than what you have below.
    I do not have a Hint box and I do not have the Customize this widget.
    I did have a Hint box and the Customize this widget for CS3, howver not for CS4
    Alison

  • HT202157 Where is the iTunes store validation ?

    I can´t find the "validation" tab for a new account to purchase films from Apple TV

    That is done via your computer

  • Where is Start Year value validated?

    Hi All,
    In classic planning application we need to specify the Start year, end year, start period and end period properties of each member of scenario dimension. Based on these properties our data form becomes read only or editable. I just want to conform where do hyperion validate the values these properties? e.g IF i specify FY12 as start year then where does hyperion compares it? I guess from the date of server on which the Hyperion is installed.

    In general we define the start year when creating the application as per the business requirement of "how many years of historical Data needs to be captured in the newly implemented hyperion app". it may be current year or any prior year to start with. this is going to be 1st member of year dimension and later on you can map to Scenario member for making your webform editable/non-editable for different planning cycle..
    -KP

  • Where can I add MBST validations (date checking)?

    Hello everyone!
    I need to add the following logic to MBST:
    If posting date of doc. to be cancelled is not equal to posting date of cancellation doc (posting date in MBST), raise an error message.
    Where should I put this?
    Thank you!

    Hi,
    goto SMOD and give this exit MB_CF001 and see its documentation
    Cheers,
    Will.

  • Where are the validations of the fields done in  BAPI_GOODSMVT_CREATE ?

    Hi ,
    I have to more or less simulate bapi_goodsmvt_create and perform the same validations as that in this bapi.....can anyone tell me exactly where the validations are done for the required data ...for example if my batch has crossed the sled date it populates the return table..i want to know where the checking for batch is done ........Please help.....

    Hi ,
    you can search the message class and message number from the returntab.
    Example:
    i am Getting the Retuntab with following details
    E M8                   374 Fill in mandatory field DOC_DATE (import parameter HEADERDATA)
    in this case Message Class in M8 and Message number is 373. So in your Bapi you can search with '374'
    So that i will display where ever it is being validated and how it has been validated. the return tab will fill with the following perform.
    PERFORM bapireturn_fill USING  'M8'          
                                    'E'           
                                    '374'         
                                    'ACC_1_TIME'  
                                    'ADDRESSDATA' 
                                    space         
                                    space         
                           CHANGING te_return.    
    Here you can see before this statement what are the validations done.
    Hope it will answer your question.
    Regards,
    Venkat

  • OTL Time card: Where to write custom validations

    Hi,
    I need to write some validations after the user submits time card.
    WHat is the package in which I can write these custom validations? Does oracle recommend any specific package?
    Also, If i have two projects,
    Time card period: 01-01-12 to 01-08-12
    Project 1 ends on 01-05-12
    Project 2 starts from 01-06-12
    Would it be possible to restrict project lov if user tries to enter project on 01-07-12, not to use project 1?
    if not possible where can I make that validation in the code?
    Appreciate your help.

    Hi,
    I will answering your doubts no 3 and 4
    Instead of using XML template, I would suggest you to use WED Adi, which can be called from the OTL page
    button. And at that time the only thing u have to upload server with the WebAdi template.
    Here you will not need to build a custom table, a view will solve the purpose. And there is not need of further maintenance
    For the file to be read only you can include it in the code while extending your respective controller class.
    But Oracle recommend not to extend controller class. Let the client be aware of it, that it requires the extension
    of controller class of the page. If he thumps up the extension of controller class then your life becomes pretty simple.
    Regards,
    Pankaj Kedia

  • Validation with jaxp 1.3 and xml-schema

    I'm totally green when it comes to xml&jaxp. Using jse 1.5 (jaxp 1.3), I'm trying
    to have my app parse and validate an xml doc with xml schema. I want the validation to
    happen using the schema specified in the xml doc. Also, I'd prefer if my application didn't have to set
    the schema to use. As far as I can make out though, it appears that I need to parse the schemaLocation when
    I want to validate using xml schema. Anyone know a way to avoid that step?
    If not, then any idea why I'm getting the following err?
    Error...
    junit.framework.AssertionFailedError: null/null:4,9: Document is invalid: no grammar found.null/null:4,9: Document root element "catalog", must match DOCTYPE root "null".
         at junit.framework.Assert.fail(Assert.java:47)
         at com.rwd.toolbox.junit.AbstractRwdTestCase.printAndFail(AbstractRwdTestCase.java:229)
         at com.rwd.util.xml.XmlUtilsTests.testXmlValidationUsingSchemaDefinedInXmlDoc(XmlUtilsTests.java:57)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Code... obviously taken from junit test case...
         DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
         documentFactory.setNamespaceAware(true);
         documentFactory.setValidating(true);
         DocumentBuilder builder = documentFactory.newDocumentBuilder();
         com.rwd.util.xml.Validator v = new com.rwd.util.xml.Validator(_validationStyle);
         builder.setErrorHandler(v);
         Document document = builder.parse(_document);
         where com.rwd.util.xml.Validator extends DefaultHandler. Note that if I add following
         code, then validation works as i expect it... but that's not really an option I care for (at least in this case).
         I would anticipate being able to have the parser see the XSD reference in the XML and
         apply it. Anyway, here's code to programmatically specify an XSD to use for validation....                    
         documentFactory.setAttribute(
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
         "http://www.w3.org/2001/XMLSchema");
         documentFactory.setAttribute(
         "http://java.sun.com/xml/jaxp/properties/schemaSource",
         "file:///C:/workspace31m4/LMSTester/testData/util/xml/o.xsd");
    Finally, the XML file... (example from onJava site)... Note that I've tried changing the URI to file:///c:/..., same result:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--A OnJava Journal Catalog-->
    <catalog
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="file://C:/workspace31m4/LMSTester/testData/util/xml/o.xsd"
    title="OnJava.com" publisher="O'Reilly">
    <journal date="April 2004">
    <article>
    <title>Declarative Programming in Java</title>
    <author>Narayanan Jayaratchagan</author>
    </article>
    </journal>
    <journal date="January 2004">
    <article>
    <title>Data Binding with XMLBeans</title>
    <author>Daniel Steinberg</author>
    </article>
    </journal>
    </catalog>
    and its XSD file (also from onJava)...
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="catalog">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="journal" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="title" type="xs:string"/>
    <xs:attribute name="publisher" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="journal">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="article" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="date" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="article">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="title" type="xs:string"/>
    <xs:element ref="author" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="author" type="xs:string"/>
    </xs:schema>
    Thanks,
    -Paul

    There are other applications using Xerces1.0 so the requirement is that I cannot replace the Xerces jar. Any suggestions.

  • Validation URI: hostname could not be parsed

    Hi there,
    I freshly installed a new BPC 7.0 SP04 environment (Windows 2003, SQL Server 2008). Everything seems to work fine except in BPC for Excel where I constantly receive this "Validation URI: hostname could not be parsed". The data manager also failed to launch jobs. It returns an empty msg box.
    However the data retrieve works.
    Any suggestion to solve this problem would be greatly appreciated.
    Thanks,
    Regis

    I actually figured it out. It was due to a special setting in Parallels, a virtual machine software that I use to run Windows on my laptop.
    The profile sharing setting should be disabled.
    Ref: http://kb.parallels.com/6504

  • How to give ref cursor in VB procedure call

    This is my Oracle Sp
    CREATE OR REPLACE PROCEDURE CRD_DMAN.infy_usp_trades_by_broker_bkr
    ** Procedure name: CRD_DMAN.USP_TRADES_BY_BROKER
    ** Author's name: Infosys
    ** Date written: 04/11/07
    ** Description: Compliance Trade by Borker
    ** Maintenance history:
    ** Date Chg req# Name Remarks
    ** 04/11/07 Infosys Created
    p_ordercursor IN OUT infy_pkg_compliance_transact.cur_compliancetrade,
    p_startdate IN VARCHAR,
    p_enddate IN VARCHAR,
    p_fundcode IN cs_fund_config.parent_acct_cd%TYPE,
    p_clientcode IN ts_order_alloc.acct_cd%TYPE,
    p_brokercode IN ts_order_alloc.exec_broker%TYPE,
    p_reportname IN report_log.report_name%TYPE,
    p_callingapplication IN report_log.calling_application%TYPE,
    p_callinguser IN report_log.calling_user%TYPE
    IS
    --Declaring Local Variables
    v_owner VARCHAR2 (30);
    v_startdate VARCHAR2 (10);
    v_enddate VARCHAR2 (10);
    v_rowcount NUMBER:=0;
    v_logrec base_util_pkg.crd_log_record;
    exp_error EXCEPTION;
    v_fundcodevalue NUMBER;
    BEGIN
    BEGIN
    /*checking if the start date and end date are null and
    assigning the sysdate accordingly*/
    IF (TRIM(p_startdate) IS NULL )
    THEN
    v_startdate := TO_CHAR (SYSDATE, 'mm/dd/yy');
    ELSE
    v_startdate := p_startdate;
    END IF;
    IF (TRIM(p_enddate) IS NULL )
    THEN
    v_enddate := TO_CHAR (SYSDATE, 'mm/dd/yy');
    ELSE
    v_enddate := p_enddate;
    END IF;
    /*checking if fund code is null and assigning value accordingly*/
    IF TRIM (p_fundcode) IS NULL
    THEN
    v_fundcodevalue := 0;
    ELSE
    v_fundcodevalue := 1;
    END IF;
    /*checking if the reportname or calling user or calling
    application name*/
    IF (p_reportname IS NULL OR p_callinguser IS NULL
    OR p_callingapplication IS NULL)
    THEN
    RAISE exp_error;
    END IF;
    END;
    --opening and fetching the data into cursor
    v_logrec.start_time := SYSDATE;
    BEGIN
    OPEN p_ordercursor
    FOR
    SELECT
    oa.exec_broker EXEC_BROKER_CODE,
    b.bkr_name          EXEC_BROKER_NAME,
    oa.acct_cd CLIENT_CODE,
    f.acct_name               CLIENT_NAME,
    CASE WHEN (Exists (SELECT 1
                                       FROM cs_fund_broker fb
    WHERE rel_typ_cd IN('P','M')
    AND oa.exec_broker=fb.BKR_CD
                                       AND oa.acct_cd =fb.acct_cd))
                   THEN 'Y'
    ELSE 'N' END          DIRECTED_BROKER,
    COUNT ( distinct o.order_id) COUNT_TICKNUM,
    MAX (o.trade_date) TRADE_DATE,
    SUM (oa.exec_amt)               BASE_COST,
    SUM (oa.commision_amt)          TOTAL_COMMISSION,
         (SELECT ab.bkr_typ_cd FROM au_broker ab
         WHERE ab.au_change_date =(SELECT TO_TIMESTAMP(MAX(ab.au_change_date))
         FROM au_broker ab WHERE b.bkr_typ_cd != ab.bkr_typ_cd AND b.bkr_cd = ab.bkr_cd))
                                  BROKER_HISTORY
    FROM
    ts_order o
    JOIN ts_order_alloc oa ON (o.order_id = oa.order_id)
    JOIN cs_broker b ON(oa.exec_broker = b.bkr_cd)
    JOIN cs_fund f ON(oa.acct_cd = f.acct_cd)
    WHERE
    o.status = 'ACCT'
    AND oa.exec_broker = CASE WHEN TRIM (p_brokercode) IS NULL
              THEN oa.exec_broker
              ELSE TRIM(p_brokercode) END
    AND oa.acct_cd = CASE WHEN TRIM(p_clientcode) IS NULL
    THEN oa.acct_cd
    ELSE TRIM(p_clientcode) END
         AND ((0 = v_fundcodevalue) OR EXISTS (SELECT 1 FROM crd.cs_fund_config cf
              WHERE cf.parent_acct_cd =TRIM (p_fundcode)
         AND oa.acct_cd = cf.child_acct_cd))
         AND o.trade_date BETWEEN TO_DATE (v_startdate, 'mm/dd/yy')
    AND TO_DATE (v_enddate, 'mm/dd/yy')
    GROUP BY oa.exec_broker, b.bkr_name ,oa.acct_cd ,f.acct_name,oa.directed_broker,b.bkr_typ_cd,b.bkr_cd;
    END;
    BEGIN
    SELECT
    owner
    INTO
    v_owner
    FROM
    all_objects
    WHERE
    object_name = 'INFY_USP_TRADES_BY_BROKER_BKR';
    v_logrec.end_time := SYSDATE;
    v_logrec.user_code := v_owner;
    v_logrec.input_param_values := 'INFY_USP_TRADES_BY_BROKER_BKR,'
    || v_startdate
    || ','
    || v_enddate
    || ','
    || p_fundcode
    || ','
    || p_clientcode
    || ','
    || p_brokercode;
    v_logrec.report_name := p_reportname;
    v_logrec.object_name := 'INFY_USP_TRADES_BY_BROKER_BKR';
    v_logrec.rows_returned := v_rowcount;
    v_logrec.calling_application := p_callingapplication;
    v_logrec.calling_user := p_callinguser;
    END;
    BEGIN
    --calling the procedure to insert values into the report_log table
    COMMIT;
    SET TRANSACTION READ WRITE;
    base_util_pkg.crd_base_util_proc (v_logrec);
    SET TRANSACTION READ ONLY;
    END;
    EXCEPTION
    WHEN exp_error
    THEN
    DBMS_OUTPUT.put_line ('ERROR');
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line ('ERROR OCCURED' || SQLCODE);
    DBMS_OUTPUT.put_line (SQLERRM);
    END infy_usp_trades_by_broker_bkr;
    END OF CRD_DMAN.USP_TRADES_BY_BROKER
    This is my Pakage from where i am using ref cursor
    CREATE OR REPLACE PACKAGE CRD_DMAN.infy_pkg_compliance_transact
    AS
    ** Package name : CRD.INFY_PKG_COMPLIANCE_TRANSACTIONS
    ** Author's name : Infosys
    ** Date written : 06/11/07
    ** Project/System : CRD
    ** Description : Compliance Trades By Borker Package
    ** Maintenance history:
    ** Date Chg req# Name Remarks
    ** 06/11/07 CRD Infosys Created
    --Defining The ComplianceTrade Record DataType
    TYPE rec_compliancetrade IS RECORD (
    exec_broker_code crd.ts_order_alloc.exec_broker%TYPE,
    exec_broker_name crd.cs_broker.bkr_name%TYPE,
    client_code crd.ts_order_alloc.acct_cd%TYPE,
    client_name crd.cs_fund.acct_name%TYPE,
    directed_broker crd.ts_order_alloc.directed_broker%TYPE,
    count_ticknum crd.ts_order.order_id%TYPE,
    trade_date crd.ts_order.trade_date%TYPE,
    base_cost crd.ts_order_alloc.cur_base_mkt_val%TYPE,
    total_commission crd.ts_order_alloc.commision_amt%TYPE,
    broker_history     crd.au_broker.bkr_typ_cd%TYPE
    --Declaring a variable of rec_auditdata data type
    TYPE cur_compliancetrade IS REF CURSOR
    RETURN rec_compliancetrade;
    END infy_pkg_compliance_transact;
    END OF CRD.INFY_PKG_COMPLIANCE_TRANSACTIONS
    How to call this SP from VB code with ref cursor parameter?

    I'm fairly sure that's not possible, since there's nothing in the ODBC spec to allow for ref cursors. The driver has built in support to check for ref cursors that are returned via a stored procedure call, but there's nothing built into the driver to pass one IN. Since a ref cursor can't be constructed on the client side, you'd have to have some sort of structure that allowed you to reference the ref cursor directly in order to be able to pass one back to the database.
    Since you're using VB.NET anyway, the better solution is probably just to use ODP.NET instead, which DOES allow you to reference a ref cursor directly, and there are samples that install with ODP.NET that show you how to do that.
    Greg

  • Report for Validity Start and End Date in PO

    Dear All
    Is there any report where I can get PO validity start and end date which user input in addtional data header tab of PO?
    Regards
    Satish Kumar

    Hi,
    Yes, It is available standard report using T-code ME2N - Purchasing Document (PO) Per Document Number, enter the T-code and provide the following input data's are as follows.
    Scope of List                 :  ALV ( for Ms-Excel format report)
    Plant                               :   __________ to __________ (if required)
    Document Date              : ____________ to ___________ (if Required)
    Execute the report shown by default in excel format and if required PO validity start and end data, you have to select Change Layout button and open new window options screen right side field option as Validity Per.Start, Validity Period End, Commutative number field data's are selected and click <--- arrow button and then click bottom tick marked button. Now, the report shown your requirement.
    Hope, it is useful for you,
    Regards,
    K.Rajendran

Maybe you are looking for

  • How do you change the iTunes ID when updating apps? 3 people use the same iPad with different iTune IDs.

    When trying to update apps on iPad2, someone elses iTunes ID is already showing when it asks for a password. (all in the family) How do I change to my iTunes ID? I checked settings & it is correct there.

  • I can't install OS (Windows 8)

      Hello to everyone! I have a laptop  HP dv6922et  with core 2 duo t8100 ,2 gb Ram. What I want to do is  to install an operating system. I wish to have Windows 8 on it,because this run ok,and Xp is outdate*.  I have a bootable USB stick with windows

  • How do i get my airplay to work

    I'm trying to get my airplay to work from my ipod to my itunes on my mac desktop.  Can't seem to get it but I've never really used it before so I'm trying to get it to load.  any help would be great

  • My ibook has become inefficient/bogged down

    When I am browsing the web or using mail, I see at times the cursor changes to a hourglass (or its mac version i.e a circle with rainbow colour pattern) and I cannot do anything for a minute or 2 -until it returns to a normal cursor. Also, switching

  • Calculating Business Days(Start_dt - End_dt)

    Hi Friends, Could anyone of you help me to find out the business days(Excluding Saturdays and Sundays) between two dates. The difference should be calculated of both the Start_dt and End_dt values truncated. The result should be calculated and stored