How to handle Stored Procedure and Views

Dear All
While dealing with Oracle database related scenario. I came across Stored Procedures and Views. Which are complex in nature. Using SAP XI how we can handle them ?
Is JDBC adaptor is capable of that.? Can you help me Data type structure for oracle.
How max occur play important role in that. How to identify root and item level structure for oracle
I am dealing with stored procedures while inserting data. and using views i need to get data from oracle database.
What is the syntax of query we use to put while using JDBC adaptor?
Please help and provide bit detail information over this so that i can execute scenario
Thanks
Gaurav

1) jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:sid
2)Occurence==> o,1, >1 , Unbounded
Occurrence=> ready to accept 0 / 1 / more than 1/ multiple record  (for source) and how it will be passed to target.
http://help.sap.com/saphelp_erp2004/helpdata/en/b6/0b733cb7d61952e10000000a11405a/frameset.htm
3)
<StatementName5>
<storedProcedureName action=” EXECUTE”>
    <table>realStoredProcedureeName</table>
<param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
  </StatementName5>
refer
http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

Similar Messages

  • How to create stored procedures and use those in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    Hello,
    There is a document explainining how to use Oracle stored proc with Crystal reports.
    Check at:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1084c536-711e-2b10-e48a-924a60745253
    It is for older version but it should work and you can refer to it to get general idea how to start with it. It has a sample oracle stored proc and how to connect it from Crystal Reports.

  • How to handle stored procedure response having multiple queries

    Hi Friends,
    While working in JDBC to RFC scenario,I faced an issue that my stored procedure is having multiple SQL queries in it. First Select and then update and again some select options.So,how to handle the response of the stored procedure. I read that while using sender JDBC
    " db.processDBSQLStatement=<SQL-Select-Statement>
    Either specify a valid SQL SELECT statement to select the data to be sent from the specified database, or specify an SQL EXECUTE statement to execute a stored procedure that contains exactly one SELECT statement  "
    So, please suggest me is there any other way to catch the output of the stored procedure.Because, if select statement is working fine but if any other quires fails then data inconsistencies can happen.Kindly help me out.
    Thanks and Regards,
    Nutan

    Hi nutan,
    >>Already exception is handled in SP.But,issue is that select will never fail so, sender adapter will get the resultset from select and continue process.But if later any other query fails in SP adpter wont be getting any response.
    Along with exception you need to handle the case when some other query fails. A SP is like a procedure which will do a certain list of activities before providing the output. So during this activity if some query fail then you can send back the response with a message!!!! And in XI handle this error (by routing it to some error receiver etc)
    >>I need to try something like creating a temporary table and inserting the resultset of slect statement in that. and perform all other operations and after successful completion of all the queries.Again i want to get all the values from the temporary table. So,whether I can write such query in the sender communication channel.Please suggest me for this.
    Approach looks ok, but think of the delay for JDBC sender adapter. IT will invoke your SP and will wait for it to fill a table and do all the processing. I guess this may become a issue for you.
    Check on the frequency of this interface and message size before taking this design approach
    Regards
    Suraj

  • Decrypt the Encrpted Stored procedure and views

    Hi,
          Anybody can help me, how to decrypt the encrypted stored procedure in SQL server.?

    They are not encrypted. They are obfuscated. ApexSQL can show you the source code with the wink of an eye.
    But before you do that - if this is a vendor application, check your license agreement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to find stored procedures and functions having SET Ansi_Nulls OFF?

    I have query below to find objects with ansi nulls ON. How can i find sql objects with ansi nulls off?
    SELECT
        SCHEMA_NAME(s.schema_id)  + '.' + s.name AS name,
        s.create_date,
        s.modify_date,
        OBJECTPROPERTY(s.object_id,'ExecIsAnsiNullsOn') AS ExecIsAnsiNullsOn
    FROM sys.objects s
    WHERE
        s.type IN ('P','FN')
        AND OBJECTPROPERTY(s.object_id,'ExecIsAnsiNullsOn') = 0
    ORDER BY SCHEMA_NAME(s.schema_id)  + '.' + s.name DESC

    I think my technet article on this topic will be helpful (check script at the end):
    SET
    ANSI_PADDING Setting and Its Importance
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to write stored procedures and triggers in oracle

    hai friends ,
    i don't know about storedprocedures and trigger.please help on this
    issues

    Have you tried the documentation yet? PL/SQL Architecture seems to be a good start.
    C.

  • Oracle stored Procedure and Packages in CR4E

    Hi,
    I want to use Stored Procedure in CR4E. I don't know how to use Stored Procedures and packages in Crystal Reports for Eclipse. In the data source explorer I can only see the Tables, Views and Stored Procedures but not packages from my Schema and when I can only drag & drop the Tables and Views into the Field Explorer, I can't drag & Drop the Stored Procedures.
    I managed to attached the stored procedure from CR studio. I opened the report in CR4E and I can see the stored procedure and can preview the data. When I try to run the report and override the datasource, it throws oracle error saying "ORA-01008: Not all variables bound". When I tried to use the option
    DBOptions._doNotVerifyDB
    while replacing connection I get the this error
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
         at java.lang.Boolean.compareTo(Boolean.java:26)
         at com.crystaldecisions.sdk.occa.report.lib.ClonableMap.hasContent(ClonableMap.java:112)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.ConnectionInfo.hasContent(SourceFile:151)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.Table.hasContent(SourceFile:286)
         at com.crystaldecisions.sdk.occa.report.data.Procedure.hasContent(SourceFile:212)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.haveMatchingContent(ArrayListMerger.java:232)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.mergePass(ArrayListMerger.java:138)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.merge(ArrayListMerger.java:86)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableList.copyTo(ControllableList.java:68)
         at com.crystaldecisions.sdk.occa.report.data.Database.copyTo(SourceFile:105)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableHelper.copyToPreservingReferences(ControllableHelper.java:153)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:2556)
         at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanging(SourceFile:315)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:971)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:4078)
         at com.crystaldecisions.sdk.occa.report.application.bv.new(SourceFile:121)
         at com.crystaldecisions.sdk.occa.report.application.bv.int(SourceFile:91)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.mapFields(SourceFile:4061)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3914)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.replaceConnection(SourceFile:3880)
         at
    Please advice if Stored procedures and packages are supported in CR4E ?

    Hi, Jack76,
    According to the [CR4E Release Notes|http://help.sap.com/businessobject/product_guides/cr4E/en/cr4e_relnotes_en.pdf] (available from the [CR4E Download page|http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp]), stored procedures are supported, as long as they don't use parameters that need null values.
    I don't see any references to packages.
    Bryan

  • MySQL 5.1 Stored Procs and Views not showing, only tables.

    Hi,
    I'm having problems getting stored procedures and views to show up in the Data Source Explorer of CR4E 2.0.
    I've checked the properties of the connection and the Default Stored Procedure Filter is disabled, so things should show Tables are showing. The user within MySQL that I am using to connect also has rights to view sps and views.
    My question is, has any one got views or sps to show within the Data Source Explorer using MySQL 5.1? Am I missing a trick here? Do I need to add anything to the url string of the mysql jdbc driver for the sps and view schemas to show.
    Many thanks,
    Nick

    Hi,
    As a work around you can use the CR2008 to design your reports based on stored procedures and then import the reports in Crystal Report For Eclipse IDE. You will be able to view the fields/Data coming from the Stored Procedures.
    Thanks,
    Neeraj

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • How to use stored procedures in DIAdem and Can the stored procedures be used to return values?

    Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
    Thanks In advance
    spiya

    Hi Spria,
    I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
    The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
    "select function(parameters) from package"
    ...where package defaults to "dual" if you don't use your own package.
    There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
    dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
    Hope this helps,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Calling_ORACLE_Stored_Procedures_from_DIAdem.doc ‏28 KB

  • How to use Stored Procedures in JDBC sender side and receiver side

    Hello,
    Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
    Thanks,
    Soorya

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • How to get a list of values used in the WHERE filter of stored procedures and functions in SQL Server

    How can I get a list of values (one or more) used in the WHERE filter of stored procedures and functions in SQL Server?
    How can get a list of values as shown (highlighted) in the sample stored procedure below?
    ALTER PROC [dbo].[sp_LoanInfo_Data_Extract] AS
    SELECT   [LOAN_ACCT].PROD_DT,
                  [LOAN_ACCT].ACCT_NBR, 
                  [LOAN_NOTE2].OFCR_CD, 
                  [LOAN_NOTE1].CURR_PRIN_BAL_AMT, 
                  [LOAN_NOTE2].BR_NBR,
    INTO #Table1
    FROM
                    dbo.[LOAN_NOTE1],
                    dbo.[LOAN_NOTE2],
                    dbo.[LOAN_ACCT]
    WHERE
                    [LOAN_ACCT].PROD_DT = [LOAN_NOTE1].PROD_DT
                    and
                    [LOAN_ACCT].ACCT_NBR = [LOAN_NOTE1].ACCT_NBR
                    and
                    [LOAN_NOTE1].PROD_DT = [LOAN_NOTE2].PROD_DT
                    and
                    [LOAN_NOTE1].MSTR_ACCT_NBR = [LOAN_NOTE2].MSTR_ACCT_NBR
                    and
                    [LOAN_ACCT].PROD_DT = '2015-03-10'
                    and
                    [LOAN_ACCT].ACCT_STAT_CD IN
    ('A','D')
                    and
                    [LOAN_NOTE2].LOAN_STAT_CD IN
    ('J','Z')
    Lenfinkel

    Hi LenFinkel,
    May I know what is purpose of this requirement, as olaf said,you may parse the T-SQL code (or the execution plan), which is not that easy.
    I have noticed that the condition values in your Stored Procedure(SP) are hard coded and among them there is a date values, I believe some day you may have to alter the SP when the date expires. So why not declare 3 parameters of the SP instead hard coding?
    For multiple values paramter you can use a
    table-valued parameter. Then there's no problem getting the values.
    If you could elaborate your purpose, we may help to find better workaround.
    Eric Zhang
    TechNet Community Support

  • Java stored procedures and triggers in lite

    Hi
    We are using java stored procedures and java triggers in our application for oracle lite database 5.1.
    We would like to know whether these procedures and triggers are uploaded or associated with tables or not because triggers are not being fired for the tables.
    The question is - how to find the uploaded procedures and triggers in system tables.
    We dont find any tables like (all_objects, user_objects) for this in oracle lite system catalogs given in the documentation.
    thanks in advance
    yugandhar

    I don't have much experience with Lite, but I'm running 9i Personal Edition. Any information about triggers can be found in the "ALL_TRIGGERS" view. You will want to filter out any rows where OWNER = 'SYS' unless you created your triggers as SYS. As for procedures and functions, you can see what you have created in the "ALL_OBJECTS" view where OBJECT_TYPE = 'PROCEDURE' or 'FUNCTION', once again filtering out rows where OWNER = 'SYS'. To see the code of any procedure or function, select substr(text,1,80) from ALL_SOURCE where NAME = 'function name' ORDER BY LINE.
    Hope this helps!

  • Administering Stored Procedures and Packages

    I've read about WRAP utility but I don't know exactly what's it about. Here you are what ýI've read:ý
    The code used to create the procedure ,package ,or function is available in the dictionary ýviews DBA_Source ,All_Source,and user_source except when you create them with the ýWRAP utility .the WRAP utility generates encrypted code, which only the Oracle server ýcan interpret .ý
    does any one have any idea .
    Thanks in advance

    Generally, one uses the WRAP utility when
    - You are delivering code to a third party
    - You want to ensure that the third party isn't able to decompile your code.
    If you built a CRM application with stored procedures and packages and you started selling that commercially, for example, you would use the WRAP utility to ensure that competitors couldn't reverse engineer your code and see how you did things.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to create stored procedure that can be read through Hyperion intelligen

    hello everyone out there. I need some help I create a select stored procedure and would like to run it through Hyperion intelligence with some input parameters. The procedure is not working. it is throwing an error when I execute it through Hyperion. Also how do I put multiple values like an array sort of things in a where clause like this where name in('test', 'test1). I place the stored procedure below any help will be greatly appreciated.
    CREATE OR REPLACE PROCEDURE emp_by_dept (
    p_deptno ert_dept_t.dept%TYPE
    IS
    emp_refcur SYS_REFCURSOR;
    v_dept ert_dept_t.dept%TYPE;
    v_deptname ert_dept_t.deptname%TYPE;
    BEGIN
    OPEN emp_refcur FOR SELECT dept, deptname FROM ert.ert_dept_t WHERE dept = p_deptno;
    DBMS_OUTPUT.PUT_LINE('dept deptname');
    DBMS_OUTPUT.PUT_LINE('----- -------');
    LOOP
    FETCH emp_refcur INTO v_dept, v_deptname;
    EXIT WHEN emp_refcur%NOTFOUND;
    END LOOP;
    CLOSE emp_refcur;
    END;

    Chrome has its own PDF viewer plugin that is quite buggy when it comes to PDF forms (as do Firefox and Safari, by the way).
    So yes, the best solution is to download the file and then open it locally using Adobe Reader. However, you can't enforce that. It's up to the user and their browser settings. You can only recommend it to them.

Maybe you are looking for