To fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL

Hi Experts,
My basis team wants me to write a OPEN sql statement in DB2 . T
The Open SQL statement for reading data from database tables is:
SELECT      <result>
  INTO      <target>
  FROM      <source>
  [WHERE    <condition>]
  [GROUP BY <fields>]
  [HAVING   <cond>]
  [ORDER BY <fields>].
I want to fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL in report RSORADJV  in PI .
As per PI basis comment : To use u201CRSORADJVu201D you need write the code in open SQL. If the code had been written in open SQL in the first place you wouldnu2019t be having to translate this from MS SQL.
Can you pls help in writing open sql with above syntax .
Initially when I wrote as
QL statement : select * from SAPDBSR3.XI_AF_MSG, I got the error messege as
Error : insufficient priviliage to access specified  table.
Again basis suggested to write this code in OPen SQL statement .
Please suggest., I dont know open SQL for the same.
Regards,
Arnab.

Hi,
Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
Kr,
Manu.

Similar Messages

  • Custom databases (oracle tables versus abap 'z' tables)

    We are relatively new to SAP PI.  Many of our developers come from a EAI background rather than an abap background.  How to do you recommend creating customized tables - directly create an oracle database and schema and administer outside of the sap landscape - retrieving data from java or by creating the oracle tables from within the abap stack?
    Are there any performance considerations in one approach over another?
    Given the fact that SAP long-term plans on moving away from the abap stack - is that a consideration?

    Hi,
    Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
    For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
    Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
    Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
    If the key of Table2 is vendor no & vendor type, then do a read table for the key.
    The logic in pseudo-code:
    Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
         extract the vendor types in to itab Table1New.
         Select the vendor & types from Table2 by using the for all entries option (better performance).
         loop at Table1New
              check in Table2:
                   if the unique key is vendor no: check all fields for the vendor type from Table1New
                   if the unique key combo is vendor no & type: check by using a read table.
              If not found => add entry to Table2
         endloop.
    endselect Table1 (when using package size)
    I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
    Good luck!
    Best regards,
    Zhou

  • Indices and constraints on XML Tables/Columns (with Schema)

    Hi,
    I've read a lot of documents by know, but the more I read the more I got confused. So I hope you can help me.
    Frist my Oracle Server Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
    I've manages to create a table with a column with the type SYS.XMLTYPE and the storage modle "Object Relational" with an XML Schema.
    I can insert data and I can execute XQuery statements.
    I can also create an XMLTYPE table with my Schema, althoug the tool SQL Developer keeps telling me, that the one column wich is generated within the table is of the type CLOB instead of object realtional (which is what I defined).
    The query for that is:
    CREATE TABLE ENTRY_XML OF XMLTYPE
    XMLTYPE STORE AS OBJECT RELATIONAL
    XMLSCHEMA "BBMRI_Entry.xsd" ELEMENT "Entry";
    That's where I am, now my questions:
    1. What's the difference? I'm aware of the obviouse difference, that with the first way I can add relational columns as well, but apart from that? If I only want to store the xml data, is the second approach always better (especially in regard to my next question)?
    2. My schema contains elements with attributes (which contain IDs), which have to be unique. So I tried to add a UNIQUE constraint, but failed. I found this (http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/constraints/Specify_Constraints.html), but it just doesn't work.
    Query: "ALTER TABLE ENTRY_XML CONSTRAINT ENTRY_XML_SUBID_UNQIUE UNIQUE (xmldata."SubId");"
    Error: "ORA-01735: invalid ALTER TABLE option"
    3. I didn't try yet, but I need to specifiy foreign keys within the XML as well (which is explained in the link at question 2). I guess the solution to question 2 will make this possible as well.
    4. Since I can create a UNIQUE constaint for attributes (well, I can't yet, but I hope that this will change soon) I woundered if it would be possible to realize something like auto_increment. Although I see the problem with validating the xml input if the Ids are empty. Any suggestions on that problem? Do I have to query for the highest (free) id before I can insert the new documents?
    Well, that's enough for today, I hope someone can help me!
    Greetings, Florian

    I've read through all the literature (again) and found out, that I did most of the stuff right in the first place. I just missinterpreted the generated tables for the types and wondered why they only contained one column. Well, at least one mistery solved.
    But know to make it easier just one question, which might solve all problems I have:
    How can I create UNIQUE constraints and FOREIGN KEYS when I have a table or column of the type XmlType with a schema using the object relational storage method?
    I found a solution http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb05sto.htm#i1042421 (Example 5-12), but it just does not work for me.
    I removed the FOREIGN KEY and tried it again and the UNIQUE Key works.
    So basically the question is how to retrieve the "AId" Attribute. "XMLDATA"."AId", "XMLDATA"."Attribute"."AId" and "XMLDATA"."Subject"."Attribute"."AId" all do not work.
    I've added my schema declarations at the bottom (which I've already successfully registred and used without foreign keys and constraints, so they work).
    After I've registered the two schema files 3 types and 11 tables where created. One type for the attribute, one for the study type and one probably to link the attributes to the study types. The tables are one for the attribute, 4 for the content*-elements, 2 for the study type (I don't really know why two) and 4 with strange names starting with "SYS_NT" and then some random numbers and letters (looks alot like some base64 encoded string).
    The Query I try to use to create the table is: (The table "Attribute" already exists and contains a field "ID", which is it's PK.)
    CREATE TABLE STUDYTYPE_XML
    OF XMLType (UNIQUE ("XMLDATA"."STId"),
    FOREIGN KEY ("XMLDATA"."AId") REFERENCES ATTRIBUTE(ID))
    XMLTYPE STORE AS OBJECT RELATIONAL
    ELEMENT "StudyType.xsd#StudyType";
    The error I get is:
    Error starting at line 1 in command:
    CREATE TABLE STUDYTYPE_XML
    OF XMLType (UNIQUE ("XMLDATA"."STId"),
    FOREIGN KEY ("XMLDATA"."AId") REFERENCES ATTRIBUTE(ID))
    ELEMENT "StudyType.xsd#StudyType"
    Error at Command Line:3 Column:37
    Error report:
    SQL Error: ORA-22809: nonexistent attribute
    22809. 00000 - "nonexistent attribute"
    Cause: An attempt was made to access a non-existent attribute of an
    object type.
    Action: Check the attribute reference to see if it is valid. Then retry
    the operation.
    Attribute-Schema (Attribute.xsd):
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:attribute name="AId">
              <xs:simpleType>
                   <xs:restriction base="xs:integer">
                        <xs:minInclusive value="0" />
                   </xs:restriction>
              </xs:simpleType>
         </xs:attribute>
         <xs:attribute name="Name" type="xs:string" />
         <xs:element name="ContentString" type="xs:string" />
         <xs:element name="ContentInteger" type="xs:integer" />
         <xs:element name="ContentDouble" type="xs:decimal" />
         <xs:element name="ContentDate" type="xs:date" />
         <xs:element name="Attribute">
              <xs:complexType>
                   <xs:choice minOccurs="0" maxOccurs="1">
                        <xs:element ref="ContentString" />
                        <xs:element ref="ContentInteger" />
                        <xs:element ref="ContentDouble" />
                        <xs:element ref="ContentDate" />
                   </xs:choice>
                   <xs:attribute ref="AId" use="required" />
                   <xs:attribute ref="Name" use="optional" />
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Study Type Schema (StudyType.xsd):
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:include schemaLocation="Attribute.xsd" />
         <xs:attribute name="STId">
              <xs:simpleType>
                   <xs:restriction base="xs:integer">
                        <xs:minInclusive value="0" />
                   </xs:restriction>
              </xs:simpleType>
         </xs:attribute>
         <xs:element name="StudyType">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Attribute" minOccurs="1" maxOccurs="unbounded" />
                        <xs:element ref="StudyType" minOccurs="0" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute ref="STId" use="required"/>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Edited by: alwaysspam on Sep 8, 2010 5:35 PM

  • How to get different field in two are more different table using open sql

    Dear all,
              This SenthilMani am very new into sap abap am having doubt in reports how get the different fields from different tables like mara,marc,mard using open sql and native sql program give me some tips to get the data .
    with regards,
    senthil

    HI ,
      1) If u want to select data from more the two table then u can use FOR ALL ENTRIES.
             EX ..Open sql
                       select matnr from mara into table t_mara.
                      select matnr werks from marc into table t_marc for all entries in t_mara where matnr = t_mara-matnr.
      2) U can join more than one table.
               ex:
                   select mara~matnr
                              marc~werks
                    from mara join marc into table t_maramarc
                     on maramatnr = marcmatnr
    3) Using  native sql  ...only u can use JOIN statement

  • Xml to ABAP internal table mapping and schema validation

    Hi Experts,
    I'm trying to get data from an xml file into internal tables in ABAP. My requirement is to validate xml against an xsd schema, how can i do it?
    My other question is, if there are any possible ways to map the fields of a table so that once the xml file is read, the fields automatically get populated depending on the different elements and attributes in the xml file.
    -joe

    Hi,
    check out :
    http://help.sap.com/saphelp_nw70/helpdata/en/fd/9d734b389211d596a200a0c94260a5/frameset.htm
    Terry

  • Accessing tables from different schema in CDS and AMDP

    Hi All,
    We are working on a HANA system which has several schema replicated from SAP R/3/Non SAP systems. We have BW 7.4 SP9 deployed on the same system and accessing the HANA views using latest BW virtual objects such as Open ODS , Composite providers etc.
    We are also using the BW system for few ABAP based data processing developments. We are currently accessing HANA views in ABAP programs by creating dictionary views based on external HANA views.
    We would like to however use recent possibilities of CDS and AMDP for better life cycle management of ABAP based solutions. The open SAP course on this subject was of very good help. Thanks a lot "open SAP team" for that. I would however have few open questions,
    As I understand AMDP gives us full flexibility of writing sql procedures within ABAP development environment, but can we access tables from different schema into AMDP code. If yes, then sample code would help.
    If the answer of first question is yes, then how do we manage transports between development and production systems where the schema names would be different. Currently in open HANA developments, such transport is manged using Schema mapping.
    Can I also use different schema tables in CDS views.
    We are updating few tables in ABAP dictionary after applying processing logic in ABAP program as detailed in step 1. With the new approach using AMDP, can we directly update database schema tables which will give us an optimization advantage.
    New ABAP HANA program interfaces are quite promising and we would like to use them to optimize many data intensive applications.
    Thanks & Regards,
    Anil

    Hi Anil,
    I can only answer 1. and 2. (and would be interested into 3. as well):
    1.
    Yes you can access tables from a different schema and also HANA views. In this case no 'using' is needed.
    Examples:
        RESULT = SELECT
        FROM
              "SAP_ECC"."T441V" AS t,
              "_SYS_BIC"."tmp.package/AFPO" AS a.
        WHERE ...
    2. In this case, if you need schema mapping: You could use HANA (projection) views which just forward to a different schema, also see example.
    Best regards,
    Christoph

  • Query OR Stored Proc to get data from Tables from All Schemas in the d/base

    Hello Experts, (I appologize if i am not using the right way to ask questions)
    I have a database, and it has around 400 schemas in it. I have designed a query which will fetch the data from three different table's from Schema1.
    But it will be a tedious process of entering the 400 schemas names and pulling the information.
    I would like to know as to what would be the best possible way to;
    1) Look for all the schemas in the database
    2) Look for those specific tables in the schema, which has the data in the tables.
    3) If the tables are not present, than Ignore that schema and proceed further.
    4) Load the data into a table
    Any help, would appreciate it.
    Thanks!
    The query that i am using is as follows;
    -- Query to select all the Schemas from the database
    select username from all_users
    order by username;
    -- Sample Query to see if Tables exsist in the schema
    SELECT DISTINCT OWNER, OBJECT_NAME
    FROM ALL_OBJECTS
    WHERE OBJECT_TYPE = 'TABLE'
    AND OBJECT_NAME IN ('ENROLLMENT', 'PRDCT', 'L_P_L')
    AND OWNER in ('Schema_1', 'Schema_2', Schema_3', Schema_4',Schema_5', Schema_6')
    ORDER BY OWNER;
    --Query to get the data from the tables in a Schema
    select 'Schema_1@DATABASE_NAME' AS SCHEMA,
    (SELECT MAX(LOAD_DT) FROM Schema_1.LOAD_STATUS) AS MAX_LOAD,
    L_PROD_LINE.PROD_LINE,
    COUNT(DISTINCT ENROLLMENT.MEM_NBR) AS MEMBERSHIP
    FROM
    Schema_1.ENROLLMENT,
    Schema_1.PRDCT,
    Schema_1.L_P_L
    WHERE
    ENROLLMENT.PRODUCT_ID = PRDCT.PRODUCT_ID AND
    PRODUCT.PROD_LINE_ID = L_P_L.ID
    GROUP BY
    L_P_L.PROD_LINE;

    Hi,
    999355 wrote:
    Hello Experts, (I appologize if i am not using the right way to ask questions)See the froum FAQ {message:id=9360002}
    I have a database, and it has around 400 schemas in it. I have designed a query which will fetch the data from three different table's from Schema1.
    But it will be a tedious process of entering the 400 schemas names and pulling the information.
    I would like to know as to what would be the best possible way to;
    1) Look for all the schemas in the database
    2) Look for those specific tables in the schema, which has the data in the tables.
    3) If the tables are not present, than Ignore that schema and proceed further.
    4) Load the data into a table
    Any help, would appreciate it.
    Thanks!
    The query that i am using is as follows;
    -- Query to select all the Schemas from the database
    select username from all_users
    order by username;
    -- Sample Query to see if Tables exsist in the schema
    SELECT DISTINCT OWNER, OBJECT_NAME
    FROM ALL_OBJECTS
    WHERE OBJECT_TYPE = 'TABLE'
    AND OBJECT_NAME IN ('ENROLLMENT', 'PRDCT', 'L_P_L')
    AND OWNER in ('Schema_1', 'Schema_2', Schema_3', Schema_4',Schema_5', Schema_6')
    ORDER BY OWNER; Do you want to give a list of possible schemas (like the 6 above), or do you want to consider all schemas, however many and whatever they are called?
    You can get the right information for ALL_OBJECTS, but, since you known all the objects of interest are tables, ALL_TABLES will be faster and simpler.
    --Query to get the data from the tables in a Schema
    select 'Schema_1@DATABASE_NAME' AS SCHEMA,
    (SELECT MAX(LOAD_DT) FROM Schema_1.LOAD_STATUS) AS MAX_LOAD,
    L_PROD_LINE.PROD_LINE,
    COUNT(DISTINCT ENROLLMENT.MEM_NBR) AS MEMBERSHIP
    FROM
    Schema_1.ENROLLMENT,
    Schema_1.PRDCT,
    Schema_1.L_P_L
    WHERE
    ENROLLMENT.PRODUCT_ID = PRDCT.PRODUCT_ID AND
    PRODUCT.PROD_LINE_ID = L_P_L.ID
    GROUP BY
    L_P_L.PROD_LINE;I take it that the tables in question are ENROLLMENT, PRDCT and L_P_L; they won't have different names in different schemas.
    You can start this way:
    BEGIN
        FOR  c  IN  (
                          SELECT    owner
                  FROM      all_tables
                  WHERE     table_name  IN ( 'ENROLLMENT'
                                            , 'PRDCT'
                                  , 'L_P_L'
                  GROUP BY  owner
                  HAVING    COUNT (*) = 3
        LOOP
            ...  -- Now get the results for tables in the c.owner schema
        END LOOP;
    END;
    /This will find the schemas that have all 3 of those tables.
    Inside the loop, write another dynamic query. All that will change is the value of c.owner
    Sorry, I'm running out of time now. I hope this helps.

  • Xml data to abap internal table

    I'm presently working on a interface where data in abap internal table is converted into xml format and placed in the frontend and vice versa.
    I'm through with the first part and in secodn part also I'm able to transfer the data from frontend to Document Object Model(DOM) by parsing but finally am not able to put it into an internal table.
    Please help (Urgent).
    Thanks and regards,
    S.K.Tripathy

    Hi sitakant,
    1. itab --- > xml
       xml ---> itab.
    2. This program will do both.
       (just copy paste in new program)
    3.
    REPORT abc.
    DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
           f(255) TYPE c,
           END OF upl.
    DATA: xmlupl TYPE string .
    FIRST PHASE
    FIRST PHASE
    FIRST PHASE
    Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    Convert to TABLE
    CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
      EXPORTING
        i_string         = xml_out
        i_tabline_length = 100
      TABLES
        et_table         = itab.
    Download
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filetype = 'BIN'
        filename = 'd:\xx.xml'
      TABLES
        data_tab = itab.
    SECOND PHASE
    SECOND PHASE
    SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = 'D:\XX.XML'
        filetype = 'BIN'
      TABLES
        data_tab = upl.
    LOOP AT upl.
      CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE  XML xmlupl
    RESULT tab = t001[]
    BREAK-POINT.
    regards,
    amit m.

  • Problem while fetching more records in SAP ABAP report program

    Hello Frinds,
    I have SAP ABAP report program which fetches data from usr02 table
    Now, program is working fine with less number of records, bot in production there are more than 200000 records and either report gets timed out or there is run time error like buffer area not available.
    Below is the fetch statement
    SELECT bname FROM usr02 INTO TABLE lt_user
    So, do I need to take records in small chunks, I do not think it is needed as I have worked on number of othere databases where there are number of records in single fetch statement and database itself take care of this.
    Please provide me some approach to resolve this problem.

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • How to grant privileges on all the tables in a schema

    Hi All,
    Can you tell me how to grant privileges on all the tables of a schema A
    to schema B.
    For Example:
    There are 200 tables in schema A, I wanted to grant select privilege on all the tables of a scheme A to schema B.
    Thanks in advance.

    note that USER is the user that will have the select priviledge
    the procedure includes views as well
    CREATE OR REPLACE PROCEDURE GRANT_ACCESS_ON_USER IS
    CURSOR c1 is select table_name from user_tables;
    CURSOR c2 is select view_name from user_views;
    tablename user_tables.TABLE_NAME%TYPE;
    viewname user_views.VIEW_NAME%TYPE;
    BEGIN
    tmpVar := 0;
    OPEN c1;
    loop
         fetch c1 into tablename;
         EXIT WHEN c1%NOTFOUND;
         EXECUTE IMMEDIATE 'GRANT SELECT on '||tablename ||' to USER';
    end loop ;
    close c1;
    OPEN c2;
    loop
         fetch c2 into viewname;
         EXIT WHEN c2%NOTFOUND;
         EXECUTE IMMEDIATE 'GRANT SELECT on '||viewname ||' to USER';
    end loop ;
    close c2;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END;
    /

  • Register Table in ABAP Dictionary

    One of our SAP RWD standard table got deleted during the upgrade. I have a backup of that table & created it using Create Table SQL commands directly at the database level.
    I did exp & imp of various tables too however in SE11 the tables created directly in database no matter Z tables or SAP Standard tables does not show up.
    My question is that how to register that table in ABAP dictionary?

    Table is a part of PSAPCRMUSR & does exists in schema SAPCRM.
    Let me give another example:
    One of SAP Table STERM_LINK got corrrupted and we did'nt knew about it for almost a month. OSS replied back saying that its a 3rd party table and we are not using any modules that would have updated/read that table. Also that table did'nt had any data.
    OSS suggested that either we exp/imp that table from QA to PRD or they can send us a script which is a normal create table....... script and we can drop can corrupted table.
    Now in this example if we drop that table and recreate it using script at database level, it will be unknown in dictionary.
    How to solve this kind of issue?

  • PL/SQL stored proc won't compile when accessing a table in another schema

    I am attempting to compile a stored procedured that does something like this:
    create or replace PROCEDURE CreateNewBackupTbls
    AS
    tblExists NUMBER;
    v_CatalogName VARCHAR(50);
    Cursor ctlg_cursor
    IS
    Select vchCatalogName
    FROM OtherSchema.tblCatalogs;
    BEGIN
    -- Create AdminMstr backup table if it doesn't already exist
    select count(*) into tblExists
    from dual
    where exists ( select NULL from TABS where Table_Name = 'AdminMstr' );
    IF tblExists = 0
    THEN
    spc_createNewAuditBackupTbl('AdminMstr');
    DBMS_OUTPUT.PUT_LINE('Created AdminMstr audit backup table');
    END IF;
    OPEN ctlg_cursor;
    LOOP
    FETCH ctlg_cursor INTO v_CatalogName;
    EXIT WHEN ctlg_cursor%NOTFOUND;
    -- Create Catalog backup table if it doesn't already exist
    select count(*) into tblExists
    from dual
    where exists ( select NULL from TABS where Table_Name = v_CatalogName );
    IF tblExists = 0
    THEN
    spc_createNewAuditBackupTbl(v_CatalogName);
    DBMS_OUTPUT.PUT_LINE('Created ' || v_CatalogName || ' audit backup table');
    END IF;
    END LOOP;
    CLOSE ctlg_cursor;
    END;
    The schema/user this stored procedure belongs to has access to the OtherSchema.tblCatalogs table. I can see it in Sql Developer and I can also type
    Select vchCatalogName
    FROM OtherSchema.tblCatalogs;
    from an SQL plus prompt and it works. So why won't the stored procedure compile?
    Thanks,
    Chris

    WOW! That seems like a very bad design.
    Is it just the compiler that has the problem or is the PL/SQL code inside the stored procedure also affected? For example, if I'm doing an
    EXECUTE IMMEDIATE 'insert ... INTO OtherSchema.tblTest';
    Is this going to be a problem?
    The problem with granting the access explicitly is the Archive Schema, which has the stored procedure that is failing, might not exist at the time when the other schemas are created. Therefore, there is no user to grant permissions to. I solved this by granting permissions to the role and when the archive user is created it is assigned that role.
    This seems like the proper way to solve this problem.

  • Access table using ABAP program in other database

    Dear SAP Expert,
    We have requirement that related to SAP interface.
    Our SAP system run on Oracle database 11g (Unix).
    Illustration: SAP system = A non SAP system = B
    We need to access a table using ABAP program (from SAP system A) in other database (system B) that are not necessarily SAP database. The non-SAP system using SQL Server 2008 (Windows).
    What is the best practice for this interface
    Do we need database link? If yes, please help to inform me the details step to configure it.
    Thanks and Regards

    Hi Friend,
    You try using an intermediate system..passing your input required to fetch the data..and PI should call the respective query to retrive record..once the full flow is completed you should get the return through some table in the calling program.
    else.
    ask the other system guy to write a function with select query and ask him to expose as RFC and that RFC we have to call it as RFC in our program to get the required values and only thing we need here is a proper connector in place.
    Regards
    S.Janagar

  • Synchronize database table in same schema

    Hi Guys,
    wish to all. here is the problem we have the three tables. like A, B and C. we need synchronize the table A and B in same schema. table B fetch the record from C. (ie need to create database link B and C) table A used for application. any one throw some balls related for this issue.
    Thanks in Advance
    Ruby

    Let me see if I'm getting well
    You have table B which is feed by remote DB table C
    Then you need to insert all those table A records NOT included in B
    and
    then Insert all records on table B NOT included in A
    ...that is what I understand as 'sync'
    If above is correct then you should use the SQL MINUS statement, with the above suggestion of bulk insert (insert into... select * from ...).
    Luck

  • Create and access a table OUTSIDE SAPR3 schema

    Hi Gurus,
    Can you please help me how do I create a table outside SAPR3 schema in the same database, I have a user schema TEST in the sap database (Using SAPR3 4.6C). If any tcode does that? Or I need to use oracle sqlplus.
    HOW an ABAP progroam can access and manipulate the data available in this TEST schema?
    Reference to some SAP NOTE will be highly helpfull.
    Regards,
    Soumen.

    >
    Soumen Chattopadhyay wrote:
    > Dear Fiedel and Eric,
    Fiedel, Who?
    >
    > Thank you both for your suggestion,
    > me and my team are are checking up according to your idea....
    >
    > Actually, I do need to integrate one plant machinery equipment which has the backend database in MS SQL server and our SAP is using the backend Oracle and running on Linux.
    Very good, now we are getting more information.
    The data is NOT on the oracle database but outside.
    In this case DBCON (from DB+CONnection) can help
    >
    > As per the need of  business data need to be exchanged between these two.
    >
    > If you have may I request you to share some more information e.g. snotes on DBCO?
    >
    Very easy, follow my mantra (Top right box-Search functionality is very useful, also sap notes search)
    Lets chew this a little:
    117261     Multiconnect and DB procedure enhancements for 4.0B
    323151     Several DB connections with Native SQL
    738371     Creating DBCON multiconnect entries for SQL Server
    178949     MSSQL: Database MultiConnect with EXEC SQL
    >
    > But , why DBCON is not the right choice, Fiedel can U thow some more light?
    Lets see, in your first request you wanted to access to a different schema in the same database.
    you have the licence issues and DBCON is "overkill" (even when it can work) You would be connecting to yourself with a different usser.
    Probably it is easier to create synonyms at DB level and provide proper authorizations.
    In your second request the DBCON makes much more sense.
    You want to access to a different (external) DB. That is the reason DBCON exist.
    Now we have a little "issue". I'm not Windows/SQL expert, but, in order to connect to an external DB you need the SAP library "dbslib" (I think dbsmsslib is the correct name for the SQL server)
    Unfortunately, SQLServer is a Windows only program and this library is only available for Windows.
    To use it (use DBCON) you will have to install an AS on a windows machine and configure the DBCON on this server and execute the program to exchange data from this AS alone (if you execute it from another one it will fail because it does not find the dbslib)
    As mentioned, not much experience with non "real" Operating Systems, so perhaps someone else has more information.

Maybe you are looking for

  • Why are my gifs saving so slow?

    I'm using Photoshop CS6 I use the timeline to make my frames and adjust the delay number at the bottom of each thumbnail, ive tried (No Delay, 0.01, 0.1, 02) but once I save they slow down. When I press play from the timeline it plays fast and smooth

  • Technical system for idoc

    i am doing a file2idoc scenario.i want to crete a technical system as web-as-abap.but we are having ecc6.0.here  we are having both abap & xi .here those are having  different host name.here in this scenario i am using idoc as receiver system.so will

  • The window size of Photoshop (or any other) application?

    Hi! Is there a way to retrieve the size of the Photoshop (or any other Host) window? (On Mac it seems to be the whole screen?) I didn't find it in documentation Thank you!

  • APEX Web Service parsing error

    Hello APEX is creating an incorrect item for parameters on my web service below. Instead of creating two items of names "name" PARM_TYPE xsd:string and "stringValue" PARM_TYPE xsd:string it is creating a single input item called namestringValue     P

  • BPC 7.0 (MS) Front-End install quesiton (languages)

    Hi everyone, We are delivering our BPC reports and input schedules in english but some of our non-english speaking locations are asking if they can install the BPC front-end on their computers in another language. Today the financial planning system