OSS functionality and synchronization of data with SAP SOLMAN 4.0

Hi experts,
I would like to enable the OSS functionality in our SAP SOLMAN 4.0.
I need a document for the settings to activate the OSS functionality.
I am looking forward to hearing from you,
Thanks alot.
Tolga AKINCI

If your system has more than one IP/multiple network cards, take care, that not the wrong addresse is sent to OSS.
We have had quite big trouble last month, when our configuration in OSS got overwritten by wrong IPs, the system was unaccessible and thus support could not access our systems and eventually payroll run one day later and ~ 600 people were angry.
Our connection was working the last 10 years so nobody came to the idea, that SolMan is the root cause. Since there´s no option to choose, which IP is finally sent to OSS but only a "manual coding" (note 1050693 - Several IP addresses when you synchronize system data) we decided finally to delete all systems/solutions from SMSY.
So be VERY careful what you synchronize.
@Rüdiger: I appreciate your enthusiasm, but I got hit just too often with that SolMan things, spent hours and hours because SAPs "labour" environments are clean and tidy. I can just warn people out of my experiences to use too much "automatisms" before any harm is done (and yes, we got substantial harm, not only virtually and in the mind but also $$$).
Markus

Similar Messages

  • Read IDOC WMMBID02 information and compare inventory data with SAP

    Hi All,
    Here is an explanation of the issue:
    I need to read the data from an inbound IDOC, status 64, of standard type WMMBID02 and message type WMMBXY. I do not want to post the IDOC, but only read the IDOC information which is mainly the material number, batch, status(INSMK), quantity and unit. This data I have to compare with SAP data and see if it is same for the selected material numbers. Now to read and process the inbound IDOC we have a program RBDAPP01 (BD20 Transaction) which calls the process code WMMB (WE42 transaction) which in turn calls the function module L_IDOC_INPUT_WMMBXY. This FM posts the IDOC. I have created a function module with the same import, export and tables parameters like this FM and have attached it to a custom process code ZWMMB. This function module should just read the data of the IDOC and put it in the table TB_IDOC_DATA like EDIDD (IDOC data records). I then loop into this table, extract SDATA and split it into the 3 segments of WMMBID02 and then extract my required data, MATNR, CHARG, INSMK, MENGE & MEINS.
    My Question:
    How do I trigger the process code ZWMMB so that I can read the IDOC data when it is fired (status 64), just like program RBDAPP01. Is there any standard code that can be copied and modified or how to do it???
    I have tried to be very clear with the question, please reply if the question is not clear. If I am clear, please help
    Thanks Anirban

    I am able to read the contents of the IDOC, but I need to run the FM when I fire the IDOC of message type ZWMMBXY. I have created a custome FM which will behave as a stndard FM for inbound IDOC processing.

  • Getting Started Sharing Data with SAP?

    Hi Folks, as will be apparent, I'm a complete newbie with SAP.
    Long and short of it is this: I have an App that generates project plans for maintenance systems, costs and budgets them, and reports 'currently' as a stand alone package.
    A number of Clients who use the package already have SAP handling some of these aspect, and therefore would like some degree of integration. Primarily for our package to pass maintenance dates, costs and other performance data to SAP, and update work-scope progress etc. It would be useful if we could have two way linkage though to.
    My view is that we should be able simply to access the relevant columns in a SAP managed table(s), but I may be being very simplistic and naive?
    We use Java - developed with Servoy RAD, and access JDBC Dbs only.
    Q: Is there a Java Bean available that opens some degree of data sharing to SAP?
    Q: Where should I begin looking for info on how to do this?
    Q: Is it likely that we need a SAP Pro to develop this integration.
    Appreciate any feedback or guidance on where to look next!

    Note, that this forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    I don't believe your query addresses any of the above products thus you may want to pose your query to one of the SAP product forums.
    Ludek

  • How to synchronize Outlook 2010 with SAP Calendar

    Hello colleagues,
    How to synchronize Outlook 2010 with SAP Calendar??
    Thanks

    Install MfE (Mail for Exchange), then follow this: http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=147951
    You can sync your mail, contacts and calendar with Google Sync. Tasks and notes are not supported. (Notes syncing is not possible with MfE anyway.)

  • Taking the data from interactive forms and load the data into SAP system?

    hi all,
    I want to know how to take the data from interactive forms and load the data into sap system?
    if u have any sample scenario, explain with that.
    thanks in advance
    Raja

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • Support Pack level for R/3 4.7 and BW 3.5 with SAP CRM2007

    What should be the Support Pack level for R/3 4.7 and BW 3.5 with SAP CRM2007?
    Regards,
    Rajesh Banka

    >
    Rajesh Banka wrote:
    > What should be the Support Pack level for R/3 4.7 and BW 3.5 with SAP CRM2007?
    >
    > Regards,
    > Rajesh Banka
    Hi Rajesh,
    Please see the note '833438', it explains which pack is required in this scenario.
    "You cannont connect ERP (R/3) releases lower than 4.6C to CRM 5.0.
    All subsequent CRM releases (5.0 or higher) cannot be connected to ERP lower
    than (R/3) 4.6C.
    These types of system landscapes are not supported by SAP.
    If you are using CRM 5.0, you must have implemented Plug-in PI 2004.1
    Support Package 10 and, provided you have Basis Release 620 or higher, you
    must import PI_BASIS 2005.1 in R/3. --> After you have imported these
    plug-ins"
    Thanks,
    Nitin Sharma

  • Problem inserting and querying XML data with a recursive XML schema

    Hello,
    I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
    insert into category_a values
    (XMlElement("category",
          xmlattributes('categoryAAA' as "id"),
          xmlforest ('ma categ' as "name"),
          (xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))    
    The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
    Query 1
    select * from category
    Result : the whole row is returned
    Query 2
    select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
    Result: "SYS.XMLTYPE"
    now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
    Query 3
    select  xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from  category_a
    Result: null
    and also tried to extract the text portion of element <text> using this query
    Query 4
    select  xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from  category_a
    Result: "SYS.XMLTYPE".
    On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "&lt;". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
    My questions are about
    1. How to properly insert the XML data while preserving the tags (especially the opening tag).
    2. How to display the data (the text portion of the main Element or of the nested elements).
    The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
    In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
    I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "&lt;"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
    LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
    So, my third question is why are not the tags recognized during the insertion?
    Can anyone help please?

    Hello,
    indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
    I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
    Thank you very much.
    To answer your question Marco, I registered the XML Schema using the following code
    declare
      doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>';
    begin
      dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc,     LOCAL      => FALSE, 
            GENTYPES   => FALSE,  GENBEAN    => FALSE,   GENTABLES  => FALSE,
             FORCE      => FALSE,
             OPTIONS    => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
             OWNER      => USER);
    end;then, I created the Category table as follows:
    CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
        XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
    CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
      select category_v."CATEGORY_ID",category_v."CNAME",
      XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
      from  auction.category_a p, 
    xmltable ('$a/category' passing p.Object_Value as "a"
    columns  category_id varchar2(15) path '@id',
              cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
    create or replace PROCEDURE I_CATEGORY AS
    v_cname VARCHAR2(30);
    v_description clob ;
    v_category_id VARCHAR2(15);
    cursor mycursor is select category_id, cname, description from category_v;
    BEGIN
    open mycursor;
      loop
      /*retrieving the columns*/
      fetch mycursor into v_category_id, v_cname, v_description ;
      exit when mycursor%notfound;
      insert into category_xwh values
      (XMlElement("category",
          xmlattributes(v_category_id as "category_id"),
          xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
                                                               xmlelement ("Rollsup",
                                                                                  (xmlelement("all_categories",
                                                                                   xmlattributes('allcategories' as "all_category_id")))
        xmlforest (
                  v_cname as "cat_name",
                  v_description as "description")    
    end loop;
      commit;
      close mycursor;
    END I_CATEGORY;When I execute the procedure, I get the following error:
    LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
    Thanks for your help.
    Doulkifli

  • I just tried the 'group tabs' function but when I close a window and open a new one, the last page I viewed opens every single time. I can't remove or ignore the group tabs function and it automatically opens with it. How can I stop this?

    Before I attempted using the 'groups tab' function for the first time, there was no icon (unlike currently). There is now the icon with for the function yet I am unable to remove it or its function.

    Try a clean reinstall and delete the Firefox program folder and desktop shortcut before (re)installing a fresh copy of the current Firefox release.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 23.0: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you lose personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Comparing 0FI_GL_14 data with SAP R/3

    Hello Experts,
    Can anyone tell me how to comapare the data of 0FI_GL_14 datasource with SAP R/3 ????
    Will the data match with FAGLB03 or FBL3N or FS.01 or F.01 ?????
    Regards,
    Romil K. Vaghela

    Hi romil,
    If you want to check the balance for any account at perticular date
    then you have to read all the line item amount before that date for that account.
    So you can check it by using 0Fi_GL_14 datasource dta
    filter with company code, GL account and Posting date LE balance date.
    Regards,
    Ashish

  • Will MIM (Merchandize and inventory management) work with SAP AFS / SAP POS

    We are implementing SAP AFS ERP at the head office and SAP POS at the retail stores.
    We want to implement the MIM module for inventory management at retail store level. Does MIM work in conjunction with SAP AFS. A consultant was suggesting that MIM works only with SAP Retail and no other vertical SAP solution.
    Can someone please clarify?
    Regards
    paddy

    MIM is linked to IS Retail, not to AFS.
    Nevertheless, you can always link and AFS and a Retail system.  SAP provides a very convincing ALE scheme for this.
    Eric

  • Export and import table data with Java

    I need a library for simple exporting and importing table data.
    The data should be exported to a SQL file with insert statements.
    I just want to tell the library the table name, the connection and where to store the file. The usage should be very simple.
    Are there any small libraries for this? Finished calsses and methods which I can just call?

    I need a library for simple exporting and importing
    table data.
    The data should be exported to a SQL file with insert
    statements.Every database has utilities to export/import data from tables. Take a look at your database manual.

  • Import and process larger data with SQL*Loader and Java resource

    Hello,
    I have a project to import data from a text file in a schedule. A lager data, with nearly 20,000 record/1 hours.
    After that, we have to analysis the data, and export the results into a another database.
    I research about SQL*Loader and Java resource to do these task. But I have no experiment about that.
    I'm afraid of the huge data, Oracle could be slowdown or the session in Java Resource application could be timeout.
    Please tell me some advice about the solution.
    Thank you very much.

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • What is SCADA and how to integrate with SAP

    Hi all,
    I am new to SCADA and i would like to know
    1. what is SCADA
    2. Purpose of SCADA
    3. how to integrate SCADA with SAP
    4. In SAP for which module we can use SCADA
    5. Wether SCADA is used for only PM(Plant Maintanence) in SAP
    Thnx in advance,
    Vishnu

    Check if these links help you:
    http://help.sap.com/saphelp_47x200/helpdata/en/12/3bc6f8504811d182c20000e829fbfe/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7efbb690-0201-0010-0b94-9a7f7dbe745c
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5b75b590-0201-0010-b6a0-8e84842a5bbf
    Regards,
    Abhishek.

  • How to find function and SP from data dictionary?

    For example:
    create or replace package SPK_A is
    lv_empno number;
    lv_deptno number;
    function FUN_A(in_empno number) return varchar2;
    function SP_A(in_deptno number) return varchar2;
    end;
    Then, how can i to find FUN_A and SP_A from data dictionary.
    and mark the former is a function, the latter is a stored procedure.
    I have tried to use the following 2 views, but i cannot give me the answer.
    (1)dba_procedures: it can only find the sole function or sole stored procedure, which is not define in a package.
    and it can not distinguish between function and SP.
    For example, it can only find the function or SP as below:
    create or replace function FUN_OUT return number is
    begin
    null;
    end;
    (2)all_arguments: it can list all function or SP which has varibles, but can not distinguish between function and SP.
    Can anyone help me?
    Any ideas appreciated.
    Merry Chirstmas!

    Is this what you mean?
    SQL> connect test/test
    Connected.
    SQL> create or replace package SPK_A is
      2  lv_empno number;
      3  lv_deptno number;
      4  function FUN_A(in_empno number) return varchar2;
      5  function SP_A(in_deptno number) return varchar2;
      6  end;
      7  /
    Package created.
    SQL> create or replace function FUN_OUT return number is
      2  begin
      3  null;
      4  end;
      5  /
    Function created.
    SQL> select object_type, object_name from user_objects;
    OBJECT_TYPE
    OBJECT_NAME
    TABLE
    ABC
    PACKAGE
    SPK_A
    FUNCTION
    FUN_OUT

  • Calling Oracle function and Procedure using OCCI with in C++ code

    Could any body send me the sample code to create and execute Oracle function and Procedure using OCCI concept in C++?.
    Edited by: 788634 on Aug 16, 2010 4:09 AM

    Hi Vishnu,
    Yes, sure, you can create a PL/SQL procedure, function, package, package body, etc. from within an OCCI application. I would say that, generally, this is not the sort of activity a typical client application would perform unless there is some initialization/installation processes that need to happen. In any case, here is a simple demo showing how to create a stand alone procedure (in a real application I would use a package and body) that returns a ref cursor. The ref cursor is just a simple select of two columns in the hr.countries sample table. Of course, there is no error handling, object orientation, etc. in this demo - I wanted to keep the code as short and as simple as possible to illustrate the concept.
    Regards,
    Mark
    #include <occi.h>
    #include <iostream>
    using namespace std;
    using namespace oracle::occi;
    int main(void)
      // occi variables
      Environment *env;
      Connection  *con;
      Statement   *stmt;
      ResultSet   *rs;
      // database connection information
      string user = "hr";
      string passwd = "hr";
      string db = "orademo";
      // sql to create the procedure which returns a ref cursor as out parameter
      // should be run as hr sample user or in a schema that has select privilege
      // on the hr.countries table and a synonym (countries) that points to the
      // hr.countries table
      string sqlCreate =
        "create or replace procedure get_countries(p_rc out sys_refcursor) as "
        "begin"
        " open p_rc for"
        " select country_id, country_name from countries order by country_name; "
        "end;";
      // pl/sql anonymous block to call the procedure
      string sqlCall = "begin get_countries(:1); end;";
      // create a default environment for this demo
      env = Environment::createEnvironment(Environment::DEFAULT);
      cout << endl;
      // open the connection to the database
      con = env->createConnection(user, passwd, db);
      // display database version
      cout << con->getServerVersion() << endl << endl;
      // create statement object for creating procedure
      stmt = con->createStatement(sqlCreate);
      // create the procedure
      stmt->executeUpdate();
      // terminate the statement object
      con->terminateStatement(stmt);
      // now create new statement object to call procedure
      stmt = con->createStatement(sqlCall);
      // need to register the ref cursor output parameter
      stmt->registerOutParam(1, OCCICURSOR);
      // call the procedure through the anonymous block
      stmt->executeUpdate();
      // get the ref cursor as an occi resultset
      rs = stmt->getCursor(1);
      // loop through the result set
      // and write the values to the console
      while (rs->next())
        cout << rs->getString(1) << ": " << rs->getString(2) << endl;
      // close the result set after looping
      stmt->closeResultSet(rs);
      // terminate the statement object
      con->terminateStatement(stmt);
      // terminate the connection to the database
      env->terminateConnection(con);
      // terminate the environment
      Environment::terminateEnvironment(env);
      // use this as a prompt to keep the console window from
      // closing when run interactively from the IDE
      cout << endl << "ENTER to continue...";
      cin.get();
      return 0;
    }

Maybe you are looking for

  • How to change movement type 531 for by-product ???

    Hi, While creating production order (CO01), by-product component with negative quantity is automatically assigned movement type 531.  Can anybody tell how this movement type is picked automatically ? How can it be changed  to some other movement type

  • How to get the version of Java in browser??

    I need to check the verson of Java in browser?? Can anybody help me? I need to check that, and send it to serwer somehow :) Any code would be usefull. Thanks

  • PL/SQL process and popup URL

    Hi, I have a PL/SQL process which is called on submit but a button. This Pl/SQL creates a file on the web-server and I then want to open this file in a new browser window using the URL path to it. Can this be done from pl/sql or do I need to embed so

  • Getting error while trying to generate SNP PPM

    Hi Experts, I am getting error, while trying to generate SNP PPM fron PP/DS PPM. It says Set up matrix for resource in planning version is not define. But I checked that i havea set up matrix as well as setup group. Any help will be appreciated. Than

  • Have to reset firefox every time computer is shut down for fast speed

    Firefox is slow in responding, I have attempted to reset, which works when computer is reset initial time. However when computer is restarted, returns to slow scrolling issue.