Execute procedure in data base out of sap by dbcon

Hi all
I wish to execute procedure in outside oracle database
And get as a result a cursor/list/table.
The syntax in the abap help is:
EXEC SQL.
EXECUTE PROCEDURE PROC2 ( IN :Y, OUT :Z )
ENDEXEC.
This syntax treat only one filed OUT
I am looking for the correct syntax for:
Call procedure without IN data and get and be able to treat OUT data a cursor.
Thanks

Hi,
Passing more than one input,just try this.
EXEC SQL.
CREATE OR REPLACE PROCEDURE proc_name ( X IN  number
Z in number,
                            Y OUT number  )
Y :=  X + Z;
END proc_name;
I don't think you can get more than one output.

Similar Messages

  • Data base oracle in SAP

    Hi,
    The combination of all dimension id's ideally make the primary(composite) key of the fact table.
    it seems that there is a database restriction of 16 fields to be combined to make a joint primary key.
    I heard that Oracle table join relation is the restriction of 16. I mean foregn key relations from a table ( fact table ) can not exceede 16. and thus we have 16 dimensions as the restriction..
    It is ORacle limitation.. ( data base )
    Any data base can not have more than 16 Fields as primary key in a table and hence 16 dimentions as MAX limit..for our facttable / cube.In database tables level we have only 16 primary keys, thats the reason why we hav 16 dimensions in infocube.
    ( remember oracle is the database we use for SAP ).
    Rds
    vairava ganesh.G

    Yes, you understand the issue.  Not sure about all the other DBs, I think they have 16 column index limits as well.  Even if one of them would support more columns in the index, I doubt SAP would reengineer the BW to support them, until/unless that DB had a major portion of the BW installations.

  • Data Base copy from SAP to SAP

    Hi all,
    I have a question about Data Base copy between two instances, for a subset of data stored on both custom and standard tables.
    The second instance is basically derived from the development environment of the first one, but need to be populated with specific information. I also need to preserve all link between the tables involved.
    What's the best approch to do this?
    Thanks in advance,
    Elena

    Hi Elena
    folloe these threads
    Storage-Based Offline Data Copy
    http://help.sap.com/saphelp_nw04/helpdata/en/70/f3b13a67ea4722e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/70/f3b13a67ea4722e10000000a11402f/frameset.htm
    regards
    sandeep
    if helpful reward points

  • How can we make a call to the Data base in the SAP Scripts?

    Hi All,
            How we make a call to the data base in scripts?
    I think we can use the PERFORM statement to achieve the above functionality.
    Pls correct me if i am wrong?
    Regards
    Abhilash.

    Hello.
    If you want to access database in the script itself (not in print program) yes, you can use PERFORM statement.
    In your script, use:
    /: PERFORM F_FORM IN PROGRAM ZRFIRFS05
    /: USING &VAR1&
    /: CHANGING &VAR2&
    /: ENDPERFORM
    Then, create a program ZPROG (ZRFIRFS05 in my case) with a structure like this one:
    REPORT ZRFIRFS05 .
    FORM f_form TABLES in_par STRUCTURE itcsy out_par STRUCTURE itcsy.
      DATA: l_data1(10).
      READ TABLE in_par WITH KEY name = 'VAR1'.
      CHECK sy-subrc = 0.
      l_data1 = in_par-value.
    *  SELECT .... "YOUR SELECT TO DATABASE
      READ TABLE out_par WITH KEY name = 'VAR2'.
      CHECK sy-subrc = 0.
      out_par-value = l_data3.
      MODIFY out_par INDEX sy-tabix.
    ENDFORM.
    Regards.
    Valter Oliveira.

  • Obtaining the list of data interfaced out of SAP HCM

    Hello,
    we got a good challenge from our partners in the business organization that we support. The Data Privacy officer on the business partner side would like to know:
    - what other systems are "takers" of the data from our SAP HCM instance
    - what data pieces (what tables, fields...) are being interfaced out
    - what is the frequency of that
    We are trying to maintain the document whenever a new interface is being built but in practice you know how it looks like.In order to have 100% confidence in the anwser I would want to pull such list from the system. Is there a way to do that? What would you suggest?
    Regards,
    Pawel

    Try the function below, pass the item name and get the Data provider for that particular item, you will have to do this for all the items in the template.
    function getDPName(item){
         prop = SAPBWGetItemProp(item);
         var tableHidden=true;
         if (prop != null){
           for(i=1;i<prop.length;i++){
             if (prop<i>[0] == "DATA_PROVIDER")
                   return prop<i>[1]
           }//end for
         }//end if
    }//end function
    Thanks.

  • Error while executing procedure having IN and OUT parameters

    Hi,
    I will be really gratified if someone can please help me in solving with the following problem.
    I have one procedure given below
    create or replace procedure abcd1april (
                                            nd_in                IN varchar2,
                                            sal_in           IN number,
                                            success_out      OUT number,
                                            error_code_out OUT number,
                                            error_msg_out      OUT varchar2
    AS
    old_sal number;
    cursor H7 is select SERV_ACC_LINK_CODE_N from pair_bkup where PAIRE_STATUS in (3,4) and nd=nd_in;
    BEGIN
         old_sal:=0;
         open H7;
         fetch H7 into old_sal;
         close H7;
         if old_sal=0
         then
              success_out:=0;
              error_code_out:=01;
              error_msg_out:='Check this error';
         else
                   update pair_bkup set SERV_ACC_LINK_CODE_N=sal_in where nd=nd_in and SERV_ACC_LINK_CODE_N=old_sal;
         success_out:=1;
              error_code_out:=00;
              error_msg_out:='NO ERROR IS THERE';
         end if;
    EXCEPTION
              WHEN OTHERS
              THEN
              success_out:=0;
              error_code_out:=SQLCODE;
              --error_msg_out:=SQLERRM;                                                                                                                 
    END;     
    Now when i try to execute this script it throws an error given below:-
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "TELMATEST.ABCD1APRIL", line 39
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Now i am executing this procedure by following script:-
    DECLARE
              nd_in_n VARCHAR2(10);
              sal_in_n NUMBER;
              success_out_n NUMBER;
              error_code_out_n NUMBER;
              error_message_out_n VARCHAR2(10);
    BEGIN
         nd_in_n := '';
         sal_in_n:= 0;
         success_out_n := 0;
         error_code_out_n:= '';
         error_message_out_n := '';
    abcd1april('02022',3,success_out_n,error_code_out_n,error_message_out_n);
    insert into errormsgs values(&error_code_v,'error_message_v');
    END ;
    Now please help me in above case.
    Regards
    Gursimran Singh

    Gursimran,
    The error message tells you what you need to know -
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.You're calling the procedure and supplying
    error_message_out_n VARCHAR2(10);In each case, the message 'Check this error', 'NO ERROR IS THERE' or SQLERRM is longer than 10 characters - therefore the error.
    Try it with
    error_message_out_n VARCHAR2(1000);Cheers,
    Bryan.

  • How to execute procedure returning data rows from sql plus

    Hi,
    I want to execute a stored procedure that returns data rows from sql plus. please let me know the syntax for the same.
    Thanks,
    YG

    user13065317 wrote:
    Even if i get the result set into the cursor, do i have to do normal fetch into all the coumn variables within a loop
    But suppose no of columns in my result set varies depending on a parameter to the stored procedure.
    Is there any straightforward way to retrieve all the data irrespective of no of columns in the result set.There is no such thing as a "+result set+". Oracle does not create a temporary data set in memory that contains the results of your query. What would happen if this result set is a million rows and is too large to fit into memory? Or there are a 100 clients each with a 100,000 row result set?
    This is not scalable. You will be severely limited in the number and sizes of these "+result sets+" that can be created in server memory.
    A cursor is in fact a "program" that is created by compiling the SQL source code that you provide. This source code is parsed and compiled into what Oracle calls an execution plan. This is nothing but a series of instructions that the cursor will execute in order to return the rows required.
    Thus the result set is actually the output from a cursor (a program). Likewise, bind variables are the input parameters to this program.
    All SQLs are parsed and compiled as cursors and stored in the SQL Shared Pool. Oracle gives you handle in return to use to address this cursor - bind values to it, execute it, describe the output structure returned by the cursor, and fetch the output from the cursor.
    On the client side, this handle is used in different ways. In PL/SQL alone, this cursor handle can be used as an implicit cursor (you do not even see or use the cursor handle in your PL/SQL code). Or you can use a PL/SQL cursor variable. Or a DBMS_SQL cursor variable. Or a reference cursor variable.
    Why so many different client structures for the very same SQL cursor handle returned by Oracle? Because to allow you, the programmer, all kinds of different features and flexibility.
    The ref cursor feature is the ability to pass this cursor handle around, not only between PL/SQL code, but also from PL/SQL to the actual client process (Java. VB, SQL*Plus, TOAD, etc).
    The primary thing to remember - irrespective of what the client calls this (e.g. ref cursor, SQL statement handle, etc), this all refers to the same SQL cursor in the Shared Pool. And that this SQL cursor is a program that outputs data, and not a result set in itself.

  • How to see all the data base tables in sap

    hi all,
    i wanted to see the table ALBTCMON but i cannot and i want to know how to activate a table?
    thanks for your time
    chandu

    Hai,
    Why do you want to create a Table?
    More over the table ALBTCMON you have mentioned should not be created because SAP allows only Tables with names starting with 'Y' or 'Z'.
    Also you should know the fields, Developement class, etc., before creating the Table in SAP.
    Please check the below link to create Table in SAP.
    http://abaplovers.blogspot.com/2008/02/creating-table-in-sap.html
    Use Tcode SE11 to activate your table.
    Regards,
    Yoganand.V
    Edited by: Yoganand Vedagiri on Dec 29, 2008 12:15 PM

  • Creating a Crystal Report from a non-SAP data base

    I have the following scenario
    server1\myDataBase
    server1\SAP\sapDataBases
    in sapDataBases I have about 30 company databases. I am trying to create a report, that gets informatino from a table/view/SP from server1\myDataBase, when I try to PREVIEW or SAVE such report on SAP Business One, I always get errors as
    I understand that this eerror means taht I can't invoke the data from out of SAP; it needs to be inside SAP (at least the SP, incoking some other data bases and stuff..)
    Some bodies have told me that it is beacuase I can only create a report from a table/view/sp that resides in the running/currently SAP company database. Is this right?
    Also, If this is the case, this means that If I have an SP taht I use for a crystal report, and 30 companies, I have to create such SP in the 30 companies?
    This is my software details:
    SQL Server 2012
    SAP Business One 9 PL 11
    SAP BusinessObjects Crystal Reports 2013 Support Pack 2 version 14.1.2.1121
    What I want to do is to create a non-SAP data base to create all the SPs/Views for reports, to centralize it, and the just create one reporte and do the 30-imports in each company database, without the need of creating such sps/views in each company-database. Is this possible?
    Thanks

    Moved to Integration Kit forum.
    The people in this forum will know more about the data structure than the CR Design forum which typically doesn't know much about the SAP Data sources Structure.
    Don

  • How to execute data base view in sender communication channel  ?

    hi experts
    how execute data base view in sender communication channel.?
    when i execute select * from data base . ( Its working)
    When i execute select * from dbo.view (its showing error )
    My Question is there any procedure or syntax execute the views in sender side . ?
    Thanks and Regards
    G.Praveen Kumar

    The Error showing
    Database-level error reported by JDBC driver while executing statement 'select * from  View_abcMap'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'View_abcMap'.'. For details, contact your database server vendor

  • SAP R/3 and JAVA based data base

    hi,
    I have two data base one is SAp r/3 and another is JAVA based.
    i need to link one table from Sap r/3 and one from JAVA based data base.
    using crystal reports how can i do this????
    thanks

    hi,
    in Crystal reports go to data base expert in the pop up link JAVA based data base using JDBC and connect SAp r/3 using SAP.
    You will be able to get SAp menue only if you are using crystal reports version 2008 or version 12.
    Once the connection is established select the tables you require and rest remains same.
    Thanks.

  • Old g4 slow when entering data base

    I have an older g4 which I'm using as a data base with pictures.  I developed this data base out of apple works or like the old file maker pro.  The maching is old, but runs.  I've got 1100 pictures on it that I'm trying to organize and some are in iphoto, then moved to my data base once I take them out of a folder imported from iphoto.  I've attempted to clean up the other space, but un sure what I'm doing.  I've read some of the other threads about slow running machines and have done the basics.  So I'll start a new record, find the picture, drop it into the media window and the spinning color wheel appears and runs 45 seconds?
    Seems to be forever.  Even when I try to save or if I move between desktop and data base, the wheel comes up and I have to wait.  It's now to the point it spins every time and I'm not making process on my project.

    Hello and Welcome to the support Community
    What specification is the PowerBook your are running?
    You have said that you have done the basics, what have you already done so far?

  • How to use 'Execute Procedure' to retrieve table data from an ext. MS SQL ?

    Hi,
    We have to call a stored procedure from an external MS SQL database . We are able to connect to the database and are able to successfully do a SQL (Select ) on the SQL tables. However to maintain data integrity and other security issues, we have to call a stored procedure on that database  from SAP. The stored rocedure will return a table which will contain multiple records .
    We have tried using the EXECUTE PROCEDURE command. However it returns SQL errors?
    Our SAP instance is on MS SQL.
    Please note we have gone through all SAP notes and SDN already. The query is not about connecting to the database. It is solely to find out the correct way for calling the stored procedure. The example in the SAP help documentation is for single IN and OUT parameters. We are able to do that successfully. Our requirement is to get a table back from the stored procedure.
    Please help with the correct syntax and code example if you have one.
    I would be glad to provide any other information that may be helpful.
    Thanks in advance.

    Hi,
    I too have a similar issue, I have a stored procedure written in MS SQL and it executes but I need the result in an internal table; How do I get it into an internal table?
    Following code is being used. Now the output of the query that is being executed, I need it in my internal table
    EXEC SQL.
      EXECUTE PROCEDURE d01.Z_PRICINGREPORT ( IN :i_mandt,
                                              IN :i_kschl,
                                              IN :i_vkorg,
                                              IN :i_vtweg,
                                              IN :i_matkll,
                                              IN :i_matklh,
                                              IN :i_matnrl,
                                              IN :i_matnrh,
                                              IN :i_inco1,
                                              IN :i_inco2,
                                              IN :i_zsalel,
                                              IN :i_zsaleh,
                                              IN :i_kunnrl,
                                              IN :i_kunnrh,
                                              IN :i_chargl,
                                              IN :i_chargh,
                                              IN :i_vkburl,
                                              IN :i_vkburh,
                                              IN :i_vkgrpl,
                                              IN :i_vkgrph,
                                              IN :i_wrkstl,
                                              IN :i_wrksth,
                                              IN :i_mtf,
                                              IN :i_mtt,
                                              IN :i_datbi,
                                              IN :i_werks,
                                              IN :i_stock
    ENDEXEC.
    CATCH cx_sy_native_sql_error.
        MESSAGE `Error in procedure handling` TYPE 'I'.
    endtry.
    Warm Regards,
    Abdullah

  • SAP QUERY -logical data base ADA

    I have created a SAP Query with logical data base ADA,I have selected four tables in it.Do i need to link these tables if yes..where and how?The report is for fields in asset master data.
    .But i get below error when i try to genaret the output :
    Fields from parallel tables within a line
    Line: 01
    Field: Asset description
    (ANLT-TXT50, table ANLT)
    Field: License plate no. of vehichle
    (ANLZ-KFZKZ, table ANLZ)
    i get such similar five messages but they are warning..when i execute with warning however i get the fields with description but not with Value.Ex:i get asset description and not Asset number as required.

    You don't have to link them, they ar linked that is the power of a logical data base
    To get the text in your report you need the key fields
    Like
    (Lanque Key)
    company code
    asset number
    Asset sub number
    Go to info sets and look to the standard ones like /SAPQUERY/AM01

  • SAP Component , Data Base , add-ons

    Dear all,
    Please let me know the ways / function modules to find out the add-ons on the system, database being used on the system, sap component & version of the system. using function module.
    requirement is to run a report and get all the below details displayed. clients, data base, add-ons, components, release on the current system to be displayed
    Kindly let me know the ways to get this info.
    Regards,
    Purshoth

    Hi
    Did you chaecked the similar thread.
    ABAP data type for system information
    Regards
    Sachin

Maybe you are looking for

  • Error while activating in DSO, FIGL, only some months

    Dear Colleagues! I have an activation problem in an ODS, three differnt months loaded isolatedreturns with error when I activate. The error only occurs in June, July and august of 2004. 2005, 2006, 2003, 2002, 2001 and the rest of 2004 loads and acti

  • Invoice Correction Request with reference to Billing plan

    Dear SDN frnds, I'm having one query in Invoice Correction Request (ZBOC) creation, While creating with reference to billing document of billing plan type (ZCI), the net value in Invoice Correction Request is '0' and the net value is not modifiable d

  • How to call a WebService method using HttpsURLConnection?

    Hi, I want to know how i could use HttpsURLConnection to call a WebService method. I can use the following: String endpoint = "https://xyz:8443/axis/services/MSecurity"; System.setProperty("javax.net.ssl.keyStore", keyStorepath); System.setProperty("

  • SRM 7.0 Database Refresh

    Hi everyone, We are going to be performing a database refresh from our production system down to our development system.  We would like to maintain the current org structure that is in development though.  Does anyone know what tables we would need t

  • HISTORICAL DATA FOR HR

    Hi All, I am working on HR design in SAP. My client wants Historical information for every Infotype. I had around 30 NO. Creating DSO for each Infotype is the only option to capture historical data. I am not interested on creating Infosets. PLease ad