How to pass a LogicalSchema as parameter

Hi all,
is there a way to pass the LSchema to a package?
I try to explain my situation.
I have a source with 3 different schema (one for each company) with the same table structure.
I have a target with 3 different schema (one for each company) with the same table structure.
I have done a package that load 1 table in the first schema pair.
To load this table I have created a procedure that make a "create table as" statement (using KM I have poor performance, any suggest for performance KM is appreciated).
Inside procedure command I have to write the logical Schema, but in this way I can't reuse the package, cause I have to create another package equal to the first and modify the logical schema inside the procedure command.
I believe this is not the right way.
Is there a way to reuse code passing logical schema like parameter?
Thanks in advance

Hi CTS,
I have followed your suggestion, but probably I'm missing something.
I have created 3 context (1 enviroment (test) for 3 customer) and mapped the logicl schema with the physical.
Then I have deleted the logical schema "cabled" and left it blank in my procedure command.
Then I have executed the procedure with one of the new context created, but i receive an error (seems can't retrieve the LSCHEMANAME, why, if I have mapped the L and P schema to the context?):
java.lang.Exception: Internal error: object ConnectConnection
ColConnectId:null
ColContextCode:ODS_TEST
ColConName:null
ColIndCommit:null
ColIsolLevel:null
ColLschemaName:null
ColPlanComp:null
ColTechIntName:null
DefConnectId:null
DefContextCode:ODS_TEST
DefConName:null
DefIndCommit:null
DefIsolLevel:null
DefLschemaName:null
DefPlanComp:null
DefTechIntName:ORACLE
ExeChannel:J
IndErr:1
IndLogMethod:null
IndLogNb:null
LogLevDet:3
Nno:1
OrdTrt:0
ScenTaskNo:1
SessNo:396001
TaskName1:Procedure
TaskName2:Create_Table_As
TaskName3:Drop_target_table
TaskType:S
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(Unknown Source)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(Unknown Source)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(Unknown Source)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(Unknown Source)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(Unknown Source)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(Unknown Source)
     at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(Unknown Source)
     at com.sunopsis.dwg.cmd.DwgCommandBase.execute(Unknown Source)
     at com.sunopsis.dwg.cmd.e.i(Unknown Source)
     at com.sunopsis.dwg.cmd.h.y(Unknown Source)
     at com.sunopsis.dwg.cmd.e.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)

Similar Messages

  • How to pass more than one parameter

    Hello,
    This is my code.
    How to pass more than one parameter:
    SELECT:responsibility_name responsibility_name,
    LPAD(' ', 6*(LEVEL-1))
      || menu_entry.entry_sequence sequence ,
      LPAD(' ', 6*(LEVEL-1))
      || menu.user_menu_name SubMenu_Description ,
      LPAD(' ', 6*(LEVEL-1))
      || func.user_function_name Function_Description ,
      LPAD(' ', 6*(LEVEL-1))
      || menu_entry.prompt prompt
      ,menu.menu_id ,
      func.function_id
      --menu_entry.grant_flag Grant_Flag ,
      --DECODE( menu_entry.sub_menu_id , NULL, 'FUNCTION' , DECODE( menu_entry.function_id , NULL, 'SUBMENU' , 'BOTH') ) Type
    FROM fnd_menu_entries_vl menu_entry ,
      fnd_menus_tl menu ,
      fnd_form_functions_tl func
    WHERE menu_entry.sub_menu_id    = menu.menu_id(+)
    AND menu_entry.function_id      = func.function_id(+)
    AND MENU.LANGUAGE(+) = 'US'
    AND FUNC.LANGUAGE(+) = 'US'
    --AND func.user_function_name LIKE '%Primary Care Providers%'
    AND grant_flag                  = 'Y'
      START WITH menu_entry.menu_id =
      (SELECT menu2.menu_id
      FROM fnd_menus_tl menu2,apps.fnd_responsibility_vl resp
      WHERE menu2.menu_id=resp.menu_id
      and resp.responsibility_name= :responsibility_name
      --and menu2.user_menu_name = ('ATCO HR INQ USER'
      AND LANGUAGE = 'US'
      CONNECT BY MENU_ENTRY.MENU_ID = PRIOR MENU_ENTRY.SUB_MENU_ID
       and menu_entry.function_id not in (select func.function_id
                                       from --fnd_form_functions_vl fnc,
                                       apps.fnd_resp_functions exc,
                                       apps.fnd_responsibility_vl res
                                      where func.function_id = exc.action_id
                                      and res.responsibility_name =:responsibility_name
                                      and res.responsibility_id=exc.responsibility_id)
      and menu_entry.sub_menu_id  not in (select menu.menu_id
                                       from --fnd_menus_vl imn,
                                       apps.fnd_resp_functions exc,
                                       apps.fnd_responsibility_vl res
                                       where menu.menu_id = exc.action_id
                                       and res.responsibility_name =:responsibility_name
                                      and res.responsibility_id=exc.responsibility_id)
    ORDER SIBLINGS BY menu_entry.entry_sequence;
    Thank you for your help
    Shuishenming

    Hi, Ming,
    One way is to put the "parameters" in a table, and join to that table in your query.  If you make it a Global Temporary Table, then multiple sessions can run the query at the same time, and each can be seeing different responsibilities.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.  Since this problem involves parameters, you should give a couple of different sets of parameters, and the results you want from the same sample data for each set.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to pass this multi-value parameter via GoURL?

    Currency is equal to / is in 'USD', 'GBR', 'RUR'. How to pass such multi-value parameter via GoURL?
    P0=1&P1=eq&P2=Measures.Currency&P3=?

    Found. P0=1&P1=eq&P2=Measures.Currency&P3=3+USD+GBR+RUR

  • How to pass a combo box parameter on reporting services?

    How to pass a combo box parameter on reporting services?
    For example, a report has a parameter which is a combo box, its items came from a database query.
    Looks like the combo box didn't got populated and greyed out if I didn't pass the parameter.

    Hi LAScorpion,
    In Reporting Services, if we want to pass a combo box parameter (means signal-parameter) from one report (main report) to another report (subreport), we can enable an action with “Go to report” or “Go to URL” option to achieve the requirement. For more details,
    please see:
    Method1: Go to report
    Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
    Enable Go to report action, then select the main report name in the drop-down list.
    Add a parameter as below:
    Select ID (a parameter name from main report) in the drop-down list of Name, and select [ID] (a field name from subreport) in the drop-down list of Value.
    Method2: Go to URL
    Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
    Enable Go to URL action, the URL below is for your reference:
    ="javascript:void(window.open('http://server_name/ReportServer/Pages/ReportViewer.aspx?%2ffolder_name%2fmain_report_name&rs:Command=Render&parameter_name="& Parameters!parameter_name.Value &"'))"
    Besides, if the parameter’s values are based on other parameters, then the combo-box got greyed out when we haven’t select values in preceding parameters. For more details, please see:
    Cascading Parameters
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to pass multi value selection parameter to SAP Function Module?

    Hi ,
    Anyone know how to pass CR multi value parameter - array to SAP Function module ?
    eg  multi selection of customer in CR
    and then pass to Function module
    in SAP FM,  the SQL select these customer only
    How should the import parameter / table of SAP Function module designed?
    and how should CR pass the data to SAP FM
    thx
    John

    Moved to Integration Kit forum

  • How to pass varchar2 in as parameter in SP

    I have a sp which takes dname as parameter (see below code), I
    tried 'ACCOUNTING', ''ACCOUNTING'' (2 single 's)
    and "ACCOUNTING" none of them worked. Could you tell me how to
    pass this in ( from pl/SQL and Java)?
    This is my code:
    CREATE OR REPLACE PACKAGE BODY testpkg1 AS
    procedure test(
    sum_cv IN OUT NOCOPY sumCur,
    name IN VARCHAR2 ) AS
    sql_statement VARCHAR2(100);
    where_statement VARCHAR2(100);
    BEGIN
    if name = ' ' then
    where_statement := ' ';
    else
    where_statement := ' AND d.dname = name ';
    end if;
    sql_statement :='SELECT e.* from emp e, dept d where d.deptno =
    e.deptno ' ||where_statement ;
    OPEN sum_cv FOR sql_statement ;
    END test;
    END;
    and this is how I execute:
         VARIABLE CV REFCURSOR
         EXECUTE testpkg1.test(:cv, 'ACCOUNTING' )
    Thanks

    The problem is in your where_statement; You left out the quotes
    on either side of name.  If you want your code to get executed
    like:
    OPEN   sum_cv
    FOR
    SELECT e.*
    FROM   emp e, dept d
    WHERE  d.deptno = e.deptno
    AND    d.dname = 'ACCOUNTING';
    then, in order to preserve the quotes around ACCOUNTING, your
    sql_statement must look something like:
    'SELECT e.*
    FROM   emp e, dept d
    WHERE  d.deptno = e.deptno '
    || ' AND    d.dname = ''' || name || ''''
    So, in order for the sql_statement to end up as above, the
    where_statement must look something like:
    ' AND d.dname = ''' || name || ''''
    It is a good practice to use DBMS_OUTPUT.PUT_LINE to display the
    sql_statement that you are trying to execute; It can make
    debugging a lot easier.  Please see suggested code below:
    SQL> EDIT testpkg1
    CREATE OR REPLACE PACKAGE testpkg1
    AS
      TYPE sumcur IS REF CURSOR;
      PROCEDURE test
        (sum_cv IN OUT NOCOPY sumcur,
         name   IN     VARCHAR2 DEFAULT NULL);
    END testpkg1;
    CREATE OR REPLACE PACKAGE BODY testpkg1
    AS
      PROCEDURE test
        (sum_cv IN OUT NOCOPY sumcur,
         name   IN     VARCHAR2 DEFAULT NULL)
      AS
        sql_statement VARCHAR2(100);
        where_statement VARCHAR2(100);
      BEGIN
        IF name IS NULL
        THEN
          where_statement := NULL;
        ELSE
    --NOTE THE ADDED SETS OF SINGLE QUOTES IN THE LINE BELOW:
          where_statement := ' AND d.dname = ''' || name || '''';
        END IF;
        sql_statement := 'SELECT e.* FROM emp e, dept d WHERE
    d.deptno = e.deptno '
        || where_statement;
        DBMS_OUTPUT.PUT_LINE (sql_statement);
        OPEN sum_cv FOR sql_statement;
      END test;
    END testpkg1;
    SQL> START testpkg1
    Package created.
    Package body created.
    To execute it from SQL*Plus, you would do just what you have
    been doing:
    SQL> VARIABLE cv REFCURSOR
    SQL> SET SERVEROUTPUT ON
    SQL> EXECUTE testpkg1.test (:cv, 'ACCOUNTING')
    SQL> PRINT cv
    SELECT e.* FROM emp e, dept d WHERE d.deptno = e.deptno  AND
    d.dname =
    'ACCOUNTING'
    PL/SQL procedure successfully completed.
         EMPNO ENAME      JOB              MGR HIREDATE        
    SAL       COMM
        DEPTNO STARS
          7782 CLARK      MANAGER         7839 09-JUN-81       2450
            10
          7839 KING       PRESIDENT            17-NOV-81       5000
            10
          7934 MILLER     CLERK           7782 23-JAN-82       1300
            10 *************

  • How to pass file name as parameter into url: or fo:external-graphic src

    Hello gurus,
    In my rtf I want to dynamically get the name of the image file and display the image in the report. If use hard coded image file name it works but if I try to get the name into a variable and pass that variable it is not working.
    Basically my client is having different logos for each operating unit. in the OA_MEDIA directory there are separate logos for each OU. during run time based on OU name we need to display the corresponding image. If I can get this entire path($OA_MEDIA/logo.jpg') in XML field<?CF_OU_LOGO?> then I'm able to print the logo using url:{CF_OU_LOGO}
    But I'm using seeded data source and I cant modify the data source, I need to handle this in RTF only. I could able to get the file name into a variable but not sure how to pass to url.
    could some one help me on this. I tried the following options
    <fo:external-graphic src="url($ln)" />
    url:{$ln} in web etc...
    here 'ln' is the variable which holds '$OA_MEDIA/logo.jpg'. ln is defined as <xsl:variable name="ln" select=".//CF_OPERATING_UNIT" />
    later I set the values as <?xdoxslt:set_variable($_XDOCTX, 'ln',translate( concat('${OA_MEDIA}/','Logo',.//CF_OPERATING_UNIT,'.jpg'),' ',''))?><?xdoxslt:get_variable($_XDOCTX, 'ln')?>
    thanks,
    Vijay

    Vijay
    What version of EBS is the customer running? I read somewhere that in R12 all of the concurrent parameters are passed to the XMLP template. I have not tried this but if true. You could create a conc program parameter that would hold the location of the image. You could either have the user pick the image or maybe derive it from the other parameter choices.
    Lets assume the token name is DLOGO you can reference that in your template.
    <?param:DLOGO?>
    this needs to be at the top of the template. Then where you need to embed the image just reference the value using
    $DLOGO
    You can embed this in the external graphic field
    As I mentioned I have not tested it yet, hopefully its there, if not there are ways around it. Try it first.
    Tim

  • How to pass Visa Resoure Name parameter to labview dll in labwindows​​/cvi

    Hi, everyone
    I build a dll from labview, the prototype is : double  getchannelpower(double f, uintptr_t *VISAResourceName);
    I don't know how to pass VISAResourceName to this function.How can I get the VISAResourceName of this type(uintptr_t *)?
    Is it related to the paremeter ViPSession in function viOpen(ViSession sesn,ViRsrc rn,ViAccessMode am,ViUInt32 ti,ViPSession vi)?
    BRs,
    lotusky

    1. uintptr_t *VISAResourceName in the labview dll is connected to viOpen function as input parameter internally.
    2.I can call the labview dll in labview via CLF Node, when the VISAResourceName parameter is set  to Numeric(32-bit int or 32-bit usigned int) OR Adapt to data(Handle by Value). And I got the value of the VISAResourceName parameter, which is 0; When I directly connect 0 to the dll, it still works. But in labwindows, when  I pass 0 to the VISAResourceName parameter of the dll function, I got a FATAL RUN-TIME ERROR: The program has caused a 'General Protection' fault.
    mkossmann 已写:
    Could you check what exactly uintptr_t *VISAResourceName in your labview dll does.Might it be that it is connected to the labviews Dll internal ViOpen() ViSession output parameter ?.   And the name VISAResourceName is misleading.
    Another idea would be that Labview uses 32bit Unicode for the ResourceName. And you have to convert the C String to that Unicode first.

  • How to pass refcursor as input parameter to a procedure in a package

    Hi there
    Please can anybody explain me with an small example for
    passing a procedure output(output should be a refcursor) and pass that refcursor values into a procedure in a package as input parameter and this value i want to use as join condition in my procedure ie. ename=refcursor.ename like this).That my exact question is how to pass refcursor values as in parameter
    Pls suggest me with some example statements
    thanks in advance
    prasanth a.s.

    I am giving you a generic example.
    SQL> variable v_out REFCURSOR
    SQL> r
      1  DECLARE
      2  PROCEDURE TEST1(p_out OUT SYS_REFCURSOR) IS
      3  BEGIN
      4  OPEN p_out FOR SELECT EMPNO,ENAME FROM SCOTT.EMP;
      5  END;
      6  PROCEDURE TEST2(p_in IN SYS_REFCURSOR) IS
      7  v_empno NUMBER(10);
      8  v_ename VARCHAR2(30);
      9  BEGIN
    10  LOOP
    11  FETCH p_in INTO v_empno,v_ename;
    12  EXIT WHEN p_in%NOTFOUND;
    13  DBMS_OUTPUT.PUT_LINE(v_ename);
    14  END LOOP;
    15  NULL;
    16  END;
    17  BEGIN
    18     TEST1(:v_out);
    19     TEST2(:v_out);
    20* END;
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.

  • How to Pass a multi-select parameter in BI to a PL/SQL Program

    I am trying to pass a BI report parameter which is multi-select enabled in BI Enterprise Stand-Alone reporting tool. eg. it comes out in the data model like this: <P_CLASS_CODE>[DISABLED_VETERAN_OWNED, HUB_ZONE, LARGE_BUSINESS]</P_CLASS_CODE>
    to a pl/sql stored procedure. (this is some kind of record set)
    This works when passing the parameter as bind variable being passed to and IN CLAUSE. However, In my case I need a little bit more flexibilty with the programming so I need to get the value into PL/SQL so I can work with the individual values in the record set.
    I am trying to figure out which collection type or record type I can use in pl/sql to be able to parse out the elements in the collection from within a stored procedure so I can loop through the elements.
    I am trying to call the BI before report trigger in the data template like this:
    <dataTrigger name="beforeReportTrigger" source="XXAPRPT03_SUPPLIER_DIVERSITY.before_report_trigger(:p_class_code)"/>
    this call refers to the default package
    I get this error: 'Invalid column type'
    what type should I be using in my procedure definition to support the multi-selection record set which my parameter is passing from BI.

    Hi,
    Okie :) please feel free to post any problem :)
    Please apply the patch that has the fix for this issue:
    [Patch 9791839|https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=9791839]
    The above link worked fine for me .
    Ideally, you should pick up the latest patch, which is [ Patch 11846804|https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=11846804]
    Click on View Read me for install instructions. Let me know if you find any problem with patch install.
    Regards,
    Ajay Kumar

  • How to pass more than one parameter using common...

    Hi,
    I am using ODP.NET with my 2005 VB
    I want to create function from where I can pass more than one parameter to execute SP, or query just like i created for SQL SERVER as below
    Public shared Function CreateParameter(ByVal paramname As String, ByVal paramvalue As Object) As DbParameter
    Dim param As DbParameter
    param = New SqlParameter
    param.ParameterName = paramname
    param.Value = paramvalue
    Return param
    End Function
    Public Shared Function ExecuteQuery(ByVal sql As String, ByVal commtype As CommandType, ByVal ParamArray parameter As DbParameter())
    Dim cmd As DbCommand = New SqlCommand()
    cmd.Connection = OpenConnection()
    cmd.CommandType = commtype
    cmd.CommandText = sql
    cmd.Parameters.AddRange(parameter)
    Dim RetVal As Integer = cmd.ExecuteNonQuery()
    Return RetVal
    End Function
    specially part is in bold to be converted
    I tried like but oracleCommand.parameters doesnt support AddRange
    please help me out
    Regards

    Hello,
    I used the following way:
    pCommand.CommandText = "Update " + sDataTable + " set "
    + sColumnName + " = :1 ";
    pCommand.Parameters.Add("ValueToDb",
    this.DefaultDbType,
    this.m_Value,
    System.Data.ParameterDirection.Input);
    Of course, you can add :2,... to your command text, too.
    The way back is:
    sEndOfTheClause += " RETURNING " + sDataTable + "." + sColName + " INTO :iNewValue";
    pCommand.CommandText = ... + sEndOfTheClause;
    pCommand.Parameters.Add("iNewValue", this.DefaultDbType,
    ParameterDirection.Output);
    bool bReturn = (pCommand.ExecuteNonQuery() != 0);
    if ((bReturn == true) && (pCommand.Parameters.Count > 0))
    this.Value = DataService.Convert<DATA_TYPE>(pCommand.Parameters[0].Value);
    ....

  • How to pass a run time parameter in a customized store procedure

    Hi Friend
    I have created customized Store Procedure for some logic. Presently i am executing the Store Procedure through the Data Manager Package.
    But i need to pass a run time parameter at the time of execution the data manager package. Basically i want pass the Materail Dimension Member at the time of data manager execution .
    Looking forward to your views on the same.
    thanks
    krish

    Hi Krish,
    For this, you maintain a script logic and from the script you call the stored procedure alongwith its parameters. Now build a DM on top of the script logic. While running the DM, it should ask the user to select the material members. These members will be automatically passed to the script through %MATERIAL_SET%. In your script, call the stored proc and once of the parameters should be %MATERAIL_SET%.
    Hope this helps.

  • HOW TO PASS NON REMOTE OBJECT PARAMETER

    good day,
    hi im new to java and rmi, and i need help pls, my question is how can i pass a non-remote object/local object as a parameter to a remote method. can u pls give a code for the:
    1. client that will invoke the remote method and pass the object in remote objects method.
    2. object that will be passed to the server/remote object( a serilizable object of course).
    3. the remote object and the method that will receive the object parameter.
    thank you very much for your kindness,
    p.s.
    you can email me to [email protected]
    batusai,

    When you create the object locally, and pass it to the server, at that point it exists on both systems/in both jvms.
    Why don't you write your own example, and try it. If you get in trouble, post the code, and we will help you.

  • How to pass process flow input parameter to unix script external process

    Hi,
    I'm trying to pass a process flow input paramter (string) to an external process which is a unix script. I've been working on this for the last 2 days but can't get it to work. Here is the design. I have a process flow with 3 maps that create a file in the unix file system. I have a suffix, which is an input parameter to the process flow, that will need to be passed to the unix script to rename the file appending the suffix to the filename. I've tried different things and nothing works for me. Has anyone done something similar in OWB?
    Thanks much!

    I tried using useBean inside the Jsp for this.
    But following error comes:
    OracleJSP error: oracle.jsp.parse.JavaCodeException: Line # 13, oracle.jsp.parse.JspParseTagExpression@102e37e
    Error: Java code in jsp source files is not allowed in ojsp.next mode.
    Please explain why?
    How can set POST request params when calling to an external servlet?

  • How to pass a 'one of' parameter value to a sub-report

    I'm using CRXI.
    If I have a parameter which is a 'one of', what are my options for passing the values of that parameter to a subreport?
    Specifically I would like to know:
    Is this a good solution: convert the 'one of' parameter to multiple formulas(one forumula for each of the possible values), and then link the subreport to the main report on each of those values?

    Thanks for responding, but I dont think you understood my question.
    Let me ask the question again a little differently, here are my assumptions, maybe they are incorrect.
    1. Parameters are passed to sub reprots by setting the parameter equal to a forumla, and then linking the sub report to main report through the formula.
    2. If the Parameter is a 'one of' (ie can be multiple values), it can only be set equal to a forumula if you make the forumula an array.
    3. You cant link a sub report to a main report on two formulas which are arrays.
    4.Therefore how do you handle this situation?

Maybe you are looking for