User Tables ( Object Type )
Hi
Can u tell me wat is the uses of user tables ( Object type ) Master Data , Master Data Rows, Document, Document Rows and no object. plsss.
Thanks in advance
Giridharan V
Check this link
[https://websmp209.sap-ag.de/~sapidb/011000358700005796502005E]
you should have an SUSerId
Requires Flash Players and Mulitmedia enabled to play the video.
Similar Messages
-
Can a PL/SQL table Object Type be used in a VO?
Hi,
Is it possible to use a PL/SQL table object type to provide data to a View Object? In short, I would like to be able to do something like this:
1. Create record object:
CREATE OR REPLACE TYPE xx_rec_type AS OBJECT
(xxid NUMBER,
xxdesc varchar2(10),
xxcost number...);
2. Create table object:
CREATE OR REPLACE TYPE xx_tbl_type AS TABLE OF xx_rec_type;
3. Declare and populate the object in PL/SQL package:
xx_tbl xx_tbl_type;
xx_tbl(i).xxid := 1;
xx_tbl(i).xxdesc := 'XXX';
xx_tbl(i).xxcost := 10.00;
4. Create a View Object as:
SELECT * FROM xx_tbl
Is it even possible to access xx_tbl from View Object? If anyone has done something like this, please do share.
TIA
AlkaA PL/SQL procedure can exist in Oracle DB, in TimesTen, or in both. You control that by where you create the procedure. Procedures that exist in Oracle can really only be called in Oracle and can only access data in Oracle. Procedures that exist in TimesTen can only be called in TimesTen and can only access data in TimesTen. There is a limited capability, using the TimesTen PassThrough capability to call PL/SQL procedures located in Oracle, from Timesten, and for Timesten PL/SQL procedures to access data in Oracle. Using PassThrough does have some overhead.
Chris -
Oracle table object type - Error
Hi,
I have created an oracle object as like
[CREATE OR REPLACE TYPE t_test_obj IS OBJECT (
testid INTEGER,
testdesc VARCHAR2(64)
Then created the type table from above
[ create or replace type t_table as table of t_test_obj;]
i want to create the table containing the above type like below
create table t_tab_test (test1 t_table); but i received the error as like
ERROR at line 1:
ORA-22913: must specify table name for nested table column or attribute
Requirement: As one my function returns this table type object and i want to insert those values in a table hence i want this. Any other pointers are also helpful.
Please help.
Regards,
KapilThanks for reply.
As i described in Requirement, my function return the table type, hence if i try to insert i get error as below. t_table is the return type from function. I need conversion from table type to object type.
SQL> insert into testing values(1,t_table(1,'a'));
insert into testing values(1,t_table(1,'a'))
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected IRP_DBO.T_TEST_OBJ got IRP_DBO.T_TABLE -
Fill datagridview with Nested Table Object Type ???
Hello everybody, please you help me resolve my problem?
I follow this example: *(A Sample Application using Object-Relational features)* http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10799/adobjxmp.htm
And this tutorial: *(Using Oracle User-Defined Types with .NET and Visual Studio)* http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm
Now I have 3 Object Table: Stock, Customer and Purchase Order. With the tutorial it's OK to show the data of Stock and Customer Table [there is no nested table in], but I can't do this with table Purchase Order, the tutorial don't show how to work with Nested Table type [Missing or something ?]
When I try to display the data of table Purchase Order, I get the error:
typeName='LINEITEMLIST_NTABTYP'' is not specified or is invalid*
Follow the tutorial, I generate custom class for this UDT and get another error:
this.STOCK_REF = ((object)(Oracle.DataAccess.Types.OracleUdt.GetValue(con, pUdt, "STOCK_REF")));*
Argument Exception Unhandle: Object attribute is not mapped to a custom type member.*
Can You show me how to do this ? Show the data of the Nested Table in Visual Studio, do I have something wrong ??? Thanks and Best Regards.I think you need to go through the tutorial more carefully. I think you are missing steps.
You are using a REF. Are you creating an object table for the objects to be stored in? Are you dereferencing the REF? This is covered by the Oracle by Example tutorial.
http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm#t11
When you receive the nested table, it will be inside a .NET class. You can create this class by using the Create Custom Class menu item on the nested table type in server explorer.
This class will contain a ToString method and a ToXML method.
The question is, where are you attempting to display the data from this nested table? In a grid?
Does it make sense to display a nested table inside one cell of a grid? No. You would need to construct a special UI that will show the
nested table. Maybe the user clicks on the cell on the grid, which opens a new grid that displays the data. Or maybe there is a second grid on the form that always shows the nested table for the row that the first grid currently has selected.
I realize I am not providing you the code... but it sounds like you need to design a more sohisticated UI than what the tutorial is using -- one that can handle displaying one additional table per row. -
TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
제품 : SQL*PLUS
작성날짜 : 2004-05-20
==================================================
TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
==================================================
PURPOSE
Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
하면 ORA-02303 error가 난다. 이 error의 원인을 알아보도록 한다.
Explanation
Object의 attribute나 method를 수정하기 위해서는 object type을 drop하고 재생성
해야 한다. Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
하면 ORA-02303 error가 난다. Object type은 type (nested table 또는 VARRAY)
또는 object table로써 구체적으로 표현된다. 만약 data의 보존이 필요하다면
temporary table에 manual하게 옮겨놓아야 한다.
SQL Reference guide에 의하면 DROP TYPE FORCE 옵션은 recommend하지 않는다.
왜냐하면 이 옵션을 쓰게 되면 복구가 불가능하고 dependency가 있던 table들은
access하지 못하는 결과를 초래한다.
Example
아래의 query 1, 2, 3은 dependency을 확인하는 query문이다.
1. Find nested tables
select owner, parent_table_name, parent_table_column
from dba_nested_tables
where (table_type_owner, table_type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = '<typeOwner>'
and elem_type_name = '<typeName>');
2. Find VARRAYs
select owner, parent_table_name, parent_table_column
from dba_varrays
where (type_owner, type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = '<typeOwner>'
and elem_type_name = '<typeName');
3. Find object tables
select owner, table_name
from dba_object_tables
where table_type_owner = '<typeOwner>'
and table_type = '<typeName>'
and nested = 'NO';
Example ) Logon as Scott
/* Create an user defined object type */
SQL> create type object_type as object (
col1 number,
col2 varchar2(20))
Type created.
/* Create nested table type */
SQL> create type object_ntable as table of object_type
Type created.
/* Create varray type*/
SQL> create type object_varray as varray(5) of object_type
Type created.
/* Create parent table with nested table and varray */
SQL> create table master (
col1 number primary key,
col2_list object_ntable,
col3_list object_varray)
nested table col2_list store as master_col2
Table created.
/* Create object table */
SQL> create table object_table of object_type (col1 primary key)
object id primary key;
Table created.
ORA-2303 results if attempt to drop type with dependencies
SQL> drop type object_type;
drop type object_type
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
위의 queery 1,2,3을 이용하여 object type dependency을 확인한다.
-- Find nested tables utilizing object type
SQL> select owner, parent_table_name, parent_table_column
from dba_nested_tables
where (table_type_owner, table_type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = 'SCOTT'
and elem_type_name = 'OBJECT_TYPE');
OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
SCOTT MASTER COL2_LIST
-- Find VARRAYs utilizing object type
SQL> select owner, parent_table_name, parent_table_column
from dba_varrays
where (type_owner, type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = 'SCOTT'
and elem_type_name = 'OBJECT_TYPE');
OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
SCOTT MASTER COL3_LIST
-- Find object tables
SQL> select owner, table_name
from dba_object_tables
where table_type_owner = 'SCOTT'
and table_type = 'OBJECT_TYPE'
and nested = 'NO';
OWNER TABLE_NAME
SCOTT OBJECT_TABLE
참고)
bulletin : 11576 처럼 utility을 이용하는 방법이 있다.
우리는 여기서 주의하여야 할 것은 script $ORACLE_HOME/rdbms/admin/utldtree.sql
을 내가 보고자 하는 user에서 돌려야 한다는 것이다.
$sqlplus scott/tiger
SQL> @$ORACLE_HOME/rdbms/admin/utldtree.sql
SQL> exec deptree_fill('TYPE','SCOTT','OBJECT_TYPE');
PL/SQL procedure successfully completed.
SQL> select * from ideptree;
DEPENDENCIES
TYPE SCOTT.OBJECT_TYPE
TYPE SCOTT.OBJECT_NTABLE
TABLE SCOTT.MASTER
TYPE SCOTT.OBJECT_VARRAY
TABLE SCOTT.MASTER
TABLE SCOTT.MASTER_COL2
TABLE SCOTT.OBJECT_TABLE
Reference Documents
Korean bulletin : 11576
<Note:69661.1>Hi Carsten,
Thanks for the sharp hint. It works.
However, when I create a table using the schema, it gives me this error:
varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
ERROR at line 14:
ORA-02337: not an object type column
Here is the script:
CREATE TABLE CUSTOMMANIFEST (
ID NUMBER PRIMARY KEY,
DOC sys.XMLTYPE
xmltype column doc
XMLSCHEMA "http://www.abc.com/cm.xsd"
element "CustomManifest"
varray DOC."LISTOFMANIFESTPORTINFO"."MANIFESTPORTINFO"
store as table MANIFESTPORTINFO_TABLE
(primary key (NESTED_TABLE_ID, ARRAY_INDEX))
organization index overflow
varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
store as table ASSIGNEDNUMBER_TABLE
(primary key (NESTED_TABLE_ID, ARRAY_INDEX))
organization index overflow
LISTOFASSIGNEDNUMBER itself is complexType and not sure where is the error....
You may note there are more than two hierachy/levels...
Thanks. -
Import object type table problem
After import database i didn't find (User define object type)
or tables based on object
PS. i create another user on the same server and import DMP to it
Thanks
Khalil SakrHi,
I do not know what you exaclty mean but are you just want to create a internal table or an table type?
DATA: ta_mara type standard table of mara.
TYPE: tt_mara type standard table mara.
Again, I have difficulties to understand what you need.
Best regards,
Guido Koopmann -
Trying to pass Oracle array/object type to Java
I have a Java class with two inner classes that are loaded into Oracle:
public class PDFJ
public static class TextObject
public String font_name;
public int font_size;
public String font_style;
public String text_string;
public static class ColumnObject
public int left_pos;
public int right_pos;
public int top_pos;
public int bottom_pos;
public int leading;
public TextObject[] column_texts;
}I have object types in Oracle as such that bind to the Java classes:
CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
EXTERNAL NAME 'PDFJ$TextObject'
LANGUAGE JAVA
USING SQLData(
"FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
"FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
"FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
"TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
TABLE OF "PROGRAMMER"."PDFJ_TEXT";
CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
EXTERNAL NAME 'PDFJ$ColumnObject'
LANGUAGE JAVA
USING SQLData(
"LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
"RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
"TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
"BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
"LEADING" NUMBER EXTERNAL NAME 'leading',
"COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
/I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.Ok. I will try asking on the JDBC forum. So, don't
flame me for cross-posting. :PWe won't, if over there you just post basically a
link to this one.
sigh Guess what, he did it the flame-deserving way. It's crossposted at:
http://forum.java.sun.com/thread.jspa?threadID=602805
<flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame> -
Can anyone please tell me:
The legal syntax for inserting data into a user defined Object Type. Is it possible, in the declaration, to set each individual field of the Type to NULL?
And then, do a SELECT...INTO to move data into those fields? E.G.
Declare
ab ab_rec (user defined Type w/10 fields)
Select w, x, y
Into ab.field1, ab.field2, ab.field3
From table_name
Where ...
And then lastly, how can I verify if the data was entered into the fields?
Thank you.
nullThis worked for me:
create type rivers as object (
river_name varchar2(20),
river_geom MDSYS.SDO_GEOMETRY)
create table rivers_tab of rivers;
create type cities1 as object (
city_name varchar2(30),
population number,
city_geom mdsys.sdo_geometry)
create table cities_tab of cities1;
delete from user_sdo_geom_metadata where table_name='CITIES_TAB'
and column_name= 'CITY_GEOM';
insert into user_sdo_geom_metadata values(
'CITIES_TAB', 'CITY_GEOM',
sdo_dim_array (
sdo_dim_element ('x', -10000, 10000, .5),
sdo_dim_element ('y', -10000, 10000, .5)),
null);
delete from user_sdo_geom_metadata where table_name='RIVERS_TAB'
and column_name= 'RIVER_GEOM';
insert into user_sdo_geom_metadata values(
'RIVERS_TAB', 'RIVER_GEOM',
sdo_dim_array (
sdo_dim_element ('x', -10000, 10000, .5),
sdo_dim_element ('y', -10000, 10000, .5)),
null);
drop index cities_tab_sidx;
create index cities_tab_sidx on cities_tab(city_geom)
indextype is mdsys.spatial_index;
drop index rivers_tab_sidx;
create index rivers_tab_sidx on rivers_tab(river_geom)
indextype is mdsys.spatial_index;
to delete from user_sdo_geom_metadata you are using string literals (correct) to decide what to delete. But you should be using upper case letters, i.e.:
where name_table='TABLE_X' and column_name='SHAPE_X' -
Passing Object types using JDBC
I need to pass Oracle user-defined object types in and out of
PL/SQL stored procedures. Is this possible???
Thanks
nullHi Tina,
I just had another thought. JDBC for 8.0 doesn't support
user-defined SQL types. This feature isn't implemented until 8i.
Sorry about the false lead!
So you'd have to wrapper your object in another PL/SQL method
which 'explodes' the user-defined type, as:
procedure can_call_from_jdbc (ename varchar2, empno number, ...)
is...
begin
call my_procedure(employee_t(ename, empno, ...));
end;
Pierre
Oracle Product Development Team wrote:
: Hi Tina,
: Yikes! I'm glad you asked; it made me realize that some info
: that's supposed to be posted on our external site is missing.
I
: think it'll take about a week to push this to our external
site.
: I'll try to find you a version and email it to you directly.
: Thanks!
: Pierre
: Tina Creighton (guest) wrote:
: : I'm currently using version 8.04 with Objects option, I'm
: trying
: : to locate the oracle.jpub class. Is there a way to download
: the
: : new jdbc that works with objects. Thanks. Tina
: : Oracle Product Development Team wrote:
: : : Absolutely!
: : : the easiest thing is first to use JPub to generate a Java
: : object
: : : which is an analogue to the SQL object you have. For
: example,
: : : if your SQL object is called 'EMPLOYEE_T', you can invoke
: JPub
: : : with:
: : : $ jpub -sql=employee_t -url=jdbc:oracle:oci8:@
: : -user=scott/tiger
: : : or even
: : : $ java oracle.jpub.Main -sql=employee_t
: -url=jdbc:oracle:oci8:@
: : : -user=scott/tiger
: : : This'll give you a Java class used to represent Java
: instances
: : of
: : : the SQL 'employee_t', featuring friendly setters and getter
: for
: : : the fields.
: : : If you have PL/SQL programs which take arguments of type
: : : employee_t, such as:
: : : PROCEDURE P1 (N NUMBER, E EMPLOYEE_T) IS...
: : : PROCEDURE P2 (N NUMBER, E OUT EMPLOYEE_T) IS...
: : : PROCEDURE P3 (N NUMBER, E IN OUT EMPLOYEE_T) IS...
: : : You can call them in a SQLJ program as:
: : : main () {
: : : employee_t e; // the class generated by JPub
: : : #sql {call P1(1, :e);}
: : : #sql {call P2(2, :out e);}
: : : #sql {call P3(3, :in out e);}
: : : to call your three PL/SQL procedures. After the call to P2
: and
: : : P3, your
: : : variable 'e' will be populated with the contents of the new
: : : employee_t value
: : : that was output from the PL/SQL method.
: : : (SQLJ is just a shorthand way of calling JDBC. SQLJ
programs
: : are
: : : translated
: : : into SQLJ programs by calling the "SQLJ Translator":
: : : $ sqlj myfile.sqlj
: : : Pierre
: : : Tina creighton (guest) wrote:
: : : : I need to pass Oracle user-defined object types in and
out
: of
: : : : PL/SQL stored procedures. Is this possible???
: : : : Thanks
: : : Oracle Technology Network
: : : http://technet.oracle.com
: Oracle Technology Network
: http://technet.oracle.com
Oracle Technology Network
http://technet.oracle.com
null -
Is it Possible to create custom Object type in configuration Tab
Hi ,
We have object type for table in Development Tab in SOLAR02 , is it possible to create a custom object type to represent the table object type in Configuration Tab.
Please let me know the steps , if it is possible.
Best Regards,
SaravanaHi
You answer for you problem exists and its a common problem but you need to go for this development as mentioned below
/people/andreas.diebold/blog/2007/02/13/extend-sap-solution-manager-to-manage-new-object-types
We did long time back
Hope ur problm and doubt is resolved now
Regards
Prakhar -
What is the Object Type for User Define table ?
Dear All Experts,
I create one of the User Define Table with no. of UDF's
I already register User Define Table with Unique ID.
As per my knowledge, Unique ID is our Object type for that User Define Table.
I want to add Transaction Notification Code for created Used Define Table.
This Transaction Notification prevents user to must enter name in that form.
IF (@object_type = 'Z_Roto' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U'))
BEGIN
If not Exists (Select T0.DocEntry from [@Z_ROTO] T0 Where ( T0.Name is null OR T0.Name = ' ' ) AND T0.Code = @list_of_cols_val_tab_del )
begin
SET @error = 1
SET @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
End
End
Please help me for this problem.
Thanks & Regards,
Nishit MakadiaHi All,
Thanks for your replay.
Below code is working for User Define Table's Transaction Notification
IF (@transaction_type = 'A' OR @transaction_type = 'U') AND @object_type = 'Z_Roto'
BEGIN
If Exists (Select T0.Code from [@Z_ROTO] T0 Where ( T0.Name is null OR T0.Name = ' ' ) AND T0.Code = @list_of_cols_val_tab_del)
begin
select @error = 10
select @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
End
End
Necessary to Remember 4 Things. That are mentioned below.
1) Register User Define Table (UDT) with using "Object Registration Wizard". For Example : @object_type = 'Z_Roto'
2) When you define selection criteria then it must be compulsory for use Code Field. For Example : Select T0.Code from [@Z_Roto]
3) When you define selection criteria then it must be compulsory for use Code for @list_of_cols_val_tab_del.
4) Use error code as 10 Number
Thanks & Regards,
Nishit Makadia -
Using nested tables with User Defıned Types.....
Hi All,
I defined TEST_1 User Defined Type where VALUE_PART field is a VARCHAR2 type.
CREATE TYPE TEST_1 AS OBJECT (
x NUMBER,
y NUMBER,
VALUE_PART VARCHAR2(50)
This TEST_1 object type will be used as nested tables in the EMPLOYEE table where each attribute might require different bytes of VARCHAR2’s in the VALUE_PART field.
CREATE TYPE NAME AS TABLE OF TEST_1;
CREATE TYPE ADDRESS AS TABLE OF TEST_1;
CREATE TYPE DEPARTMENT AS TABLE OF TEST_1;
CREATE TABLE EMPLOYEE (
SSN NUMBER,
NAME TEST_1,
ADDRESS TEST_1,
DEPARTMENT TEST_1,
SALARY NUMBER
NESTED TABLE NAME STORE AS NAME_TABLE;
NESTED TABLE ADDRESS STORE AS ADDRESS_TABLE;
NESTED TABLE DEPARTMENT STORE AS DEPARTMENT_TABLE;
Is it possible to specify VALUE_PART(50) in the TABLE OF statement?
Is there any way to do that throught methods or some other ways that I may not be aware of?
For Example:
/*This should allocate 10 bytes of VARCHAR2. */
CREATE TYPE NAME AS TABLE OF TEST_1(10);
/* and 30 bytes of VARCHAR2. */
CREATE TYPE ADDRESS AS TABLE OF TEST_1(30);
/*and 10 bytes of VARCHAR2. */
CREATE TYPE DEPARTMENT AS TABLE OF TEST_1(10);
Any help is appreciated.
Thanks a lot.Hi,
We can not specify VALUE_PART(50) in the TABLE OF statement.
Regards,
Sailaja -
/SAPQUERY/HR_LSO_TRNG1 Object type 'US' User
Hi ,
In InfoSet /SAPQUERY/HR_LSO_TRNG1 , I cannot change the "selection" in order to include the relation-ship to Object type 'US' User . Not in the list of "infotypes of related objects" under "change info-type selection" in transaction SQ02 .
How can I add that ? Thank youHi The SAP Query comprises five components:
Queries
InfoSet Query
InfoSets
User Groups
Translation/Query
Classic reporting- the creation of lists, statistics and ranked lists- are covered by the InfoSet Query and Queries components. Other componentsu2019 range of functions cover the maintenance of InfoSets, the administration of user groups and also the translation of texts created in the SAP Query. All data required by a user for a report can be read from various tables.
To define a report, you first have to enter individual texts, such as titles, and select the fields and options, which determine the report layout. In the WYSIWYG (What You See Is What You Get) mode, you can edit the lists using Drag & Drop and various toolbars.
Overview:
The following sections describes the individual SAP Query components and provides general information about query areas, transport and authorizations
Menu Path Used For Transaction Code
à SAP Query à Queries Maintaining Queries SQ01
à SAP Query à InfoSets Maintaining InfoSets SQ02
à SAP Query à User Groups Maintaining User Groups SQ03
à Translation à Query Language Comparision SQ07
Query Components
The Queries component is used by end users to maintain queries.
You can carry out the following tasks:
Execute Queries and Generate Lists
Define Queries
Change Queries
Infosets Components
InfoSets are special views of data sources.
An InfoSet describes which fields of a data source can be reported on in queries.
InfoSets are assigned to user groups.
End-users are able to work only with those InfoSets that are relevant to their particular area, as designated by the role or user group that they are assigned to.
Eg: Vendor master data can be important in purchasing as well as in accountancy. The relevant InfoSet is assigned to both roles/user groups. This means that queries based on this InfoSet can be copied and executed by both groups.
User Groups Components
1. The User Groups component is used to maintain user groups. The system administrator uses it to set up the work environment for end-users.
2. Every user assigned to the user group is able to execute the query.
3. Users are not allowed to modify queries from other user groups, although they may, under certain circumstances, copy and execute
Translation/Query Component
A great deal of text is generated when defining queries, InfoSets, and user groups.
The SAP Query displays these texts in the language that you chose when you logged on to the SAP system.
You can compare the text languages using the component Translation/Query.
A related text in one or more additional languages is made available for each of the texts created when defining the query.
Query Areas
A query area contains a set of query objects (queries, InfoSets, and user groups) that are discrete and consistent.
There are the following query areas:
Standard area
Global area
Standard Area
1.Client specific
2.Query objects are not attached to the Workbench Organizer
Advantage :-End users can develop queries (ad-hoc reports) in their own client that are not meant for use in the rest of the system.
Global Area
1.Cross client
2.Query objects are attached to workbench organizer
Advantage:-The global query area is well suited for centrally developing queries meant for use and distribution throughout the system.
Authorizations
End-users, system administrators, and translators must all be assigned the appropriate authorizations allowing them to work with the SAP Query.
In order to give individual users targeted, specific rights, the following options are available:
Roles/user groups
Authorizations
Steps to create a Query
Step Description TCODE
1 Create a infoset or functional area SQ02
2 Assignment of user group to infoset SQ03
3 Creation of query based on infoset SQ01
Tools for Queries
The following are the tools to manage, create and change queries.
Infoset Query
Queries
Quick viewer
SAP Query
Step-by-step procedure in configuring SAP Query
SAP R/3 Query tools (SAP Query) are based on the following four main components:
u2022 Query Areas
u2022 Query Groups
u2022 InfoSets
u2022 Administrative Decisions (Company-specific)
Configuration of the Query tools is done in the following manner:
u2022 Create Query Groups
u2022 Assign Users to Query Groups
u2022 Create InfoSets
u2022 Assign each InfoSet to a Query Group.
Create Query Groups
u2022 Go to Transaction SQ03.
u2022 Ensure that you are in the correct SAP Query area by navigating to Environment à Query Areas
u2022 Select the u201CStandard Area (Client-specific).
u2022 Now in the main screen, enter the name of the Query Group in the User Group field and click on CREATE
u2022 Enter the description of the User Group in the next popup that appears.
u2022 User Group ZSAPTECH_GRP is created.
Assign Users to Query Groups
u2022 Click on the u201CAssign Users and InfoSetsu201D button
u2022 Enter the SAP User-Ids of all the users you wish to include in the test group.
Click on SAVE to save your entries.
Create InfoSets
u2022 Go to transaction SQ02
u2022 Ensure that you are in the correct SAP Query area by navigating to Environment à Query Areas
u2022 Enter the name of the InfoSet you wish to create and click on CREATE.
u2022 Enter the title and the logical database on the popup screen that appears.
We have used the LDB F1S (Flight bookings related) for our demo purpose.
u2022 Change InfoSet screen appears.
u2022 Expand the tree on the left hand side to view the fields in each table. As seen on the screen, the left side of the screen shows the tables and the fields. The right side displays the field groups.
u2022 Now we need to assign fields to the field groups. These field groups will display in the SAP Query tool during reporting. Please note that only the fields that are included here will be available for field selection in the SAP Query Tool that uses this infoSet as a data source.
u2022 Select the field group on the right side and then drag and drop the fields from the left side to this field group. u2022 When all the required fields are added, click on SAVE.
u2022 Now generate the InfoSet by clicking on GENERATE.
Attach each InfoSet to a Query Group
u2022 Go to transaction SQ02
u2022 Enter the InfoSet name created above and click on u201CUser Group Assignmentu201D button.
u2022 Select the query group u201CZSAPTECH_GRPu201D from the above list and click on SAVE. -
Updating user table (type document) via api
hi!
i need to update an user table that is of type document.
that table is also used as the client table in an udo.
i have tried the following code, but that of course doesn't work as the table is not a plain table but is of document type:
Dim objUserTable As SAPbobsCOM.UserTable
Set objUserTable = objCom.UserTables.Item("MP_TABLE_LINE")
If objUserTable.GetByKey(objMatrix.Columns.Item("U_MP_BEnt").Cells.Item(lngRow).Specific.Value) Then
objUserTable.UserFields.Fields.Item("U_Qty").Value = _
objUserTable.UserFields.Fields.Item("U_Qty").Value - dblDiff
If Not objUserTable.Update() <> 0 Then
Call objApp.SetStatusBarMessage(objCom.GetLastErrorDescription())
Call objApp.MessageBox(objCom.GetLastErrorDescription())
Else
objMatrix.Columns.Item("U_MP_BQty").Cells.Item(lngRow).Specific.String = _
objMatrix.Columns.Item("11").Cells.Item(lngRow).Specific.String
End If
End If
Set objUserTable = Nothing
then i tried to use a dbdatasource which i would expect to work:
Dim objDataSource As DBDataSource
Set objDataSource = objForm.DataSources.DBDataSources.Item("@MP_TABLE_LINE")
Dim objConditions As New SAPbouiCOM.Conditions
Dim objCond As SAPbouiCOM.Condition
<just setting up conditions here>
Call objDataSource.Query(objConditions)
Call objDataSource.SetValue("U_Qty", 0, objDataSource.GetValue("U_Qty", 0) - dblDiff)
but this only results in an error code "-7006", message:
"Item - The item is not a user defined item"
how can the update be done?
regards,
thomasHi Thomas,
U are using UserTabel Obejct , just try to Use UserTabelMD object
i am sending to how to create the User Table,
Hope it will help to
oUTb = mobjCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
If Not oUTb.GetByKey("SPH_FORMS") Then
oUTb.TableName = "SPH_FORMS"
oUTb.TableDescription = "Activity Forms"
oUTb.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData
If oUTb.Add <> 0 Then
mobjCompany.GetLastError(lRet, sErrMsg)
Else
oUTb = Nothing
end if
be carefull before using MD object , bcoz at a time only one MD object should be in memory else it will give to Error
Thanks
Ankush Vachher -
Create object type from multiple tables for select statement
Hi there,
I have 3 tables as given below and I wish to create an object type to group selected columns as 'attribute' from multiple tables.
I need to create 2 input parameters to pass in - 'attribute' and 'attribute value' in PL/SQL and these 2 parameters will be
passing in with 'column name' and 'column value'. e.g. 'configuration' - the column name, 'eval' - the column value.
Then, the PL/SQL will execute the select statement with the column and column value provided to output the record.
Pls advise and thank you.
table ccitemnumber
name null type
ccitemnumber not null varchar2(20)
configuration varchar2(20)
item_type varchar2(30)
table productmodel
productmodelnumber not null varchar2(6)
description varchar2(60)
accesstimems number
numberofheads varchar2(2)
generation varchar2(10)
numberofdiscs varchar2(2)
factoryapplication varchar2(150)
table topmodel
stmodelnumber not null varchar2(30)
productfamily varchar2(60
formfactor varchar2(10)
modelheight varchar2(10)
formattedcapacity number
formattedcapacity_uom varchar2(20)
object type in database
configuration varchar2(20)
item_type varchar2(30)
numberofheads varchar2(2)
generation varchar2(10)
numberofdiscs varchar2(2)
factoryapplication varchar2(150)
modelheight varchar2(10)
formattedcapacity number
formattedcapacuser12043838 wrote:
Reason to do this as these fields are required to be grouped together as they are created in different tables. They are treated as 'attribute' (consists of many columns) of the part number. So, the PL/SQL is requested to design in a way able for user to pass in the column name and column value or part number, then the select statement should be able to query for the records. Another reason is a new column can be added easily without keep modifying those effected programs. Reuseable too.This basically equates to ... hard to code, hard to maintain, and poor performance.
Are you really sure you want to do this? This isn't going to be easy-street as you seem to think it is, but it's a one way street to a poorly performing system with security vulnerabilities (google SQL Injection).
I would highly recommend you reconsider your design decision here.
Maybe you are looking for
-
IMac as Display for MacBook Pro
I would have my iMac as extrernal display for MyBook Pro. If I will find coresponding adapter will I be able to do so? iMac MA589LL with mini-DVI port (tech specs shows it is output but didn't say if it can be input mode) MacBook Pro MB990LL with Min
-
Getting username, urgent
Hello, How can I get the username who logged into portal and pass the username in a sql statement which I am using in report portlet? Any help is highly appreciable. Thanks in advance. Newbie
-
My 1988 iMac crashed when I attempted to connect a printer. It opens with the Happy Mac, shows the OS9 screen with "Disk First Aid cannot repair". Cursor is frozen, does not recognize keyboard or disks so therefor I cannot zap Pram or utilize other n
-
I have CS5 design premium. i want to create an app using InDesign with videos embedded. I think i need to upgrade to CS6 but what else do i need? Is there a live app i can download created using this method?
-
Why I can not update my ipad to ios?
I can not update my ipad to ios, Ihave enough GB and stillnot letme update to ios