Dynamically Select User Very URGENT !!!!!!!!!!!!!
Dear Friends it is too urgent,
I have to build a query where i want to select records from the tables dynamically from different users. i.e Suppose I have many users 'USER1' , 'USER2' , 'USER3'... AND SO ON. All users have same tables. suppose 'Employee' is the table reside in all users. Now suppose if I supply owner name in the query, it must retrieve rows from Employee table from that particular user.
I'll be very thankful for the kind favour
Regards
Srinivas , thanks for the follow up , actually the problem is the referencing of object , whenever u create object in a schema, it is stored with refernce of schema name. LIKE SCHEMA.OBJECT , when u call the object u don't need to define the schema because u are actually working on that schema but if u try to call the object from other schema u need to require the schema name Now i must describe the workeability of object with examples. Now suppose i have a table EMPLOYEE which has the object Address_Type AND IT IS DEFINED IN 2 USERS
'USER1' AND 'USER2'
EMPLOYEE
EMPNO NUMBER(10),
ENAME VARCHAR2(50),
HIREDATE DATE,
ADDRESS ADDRESS_TYPE
To get value of the address u have to select like that way from 2 different users USER1 and USER2
select a.empno,a.ename, a.hiredate,
address_type(a.address.colname...)
from user1.employee
or u can also select like
select a.empno,a.ename, a.hiredate,a.address.colname
from user2.employee a
Now coming to the problem
if u try to create a dummy table in user1 from user2 it will give u error
CREATE TABLE USER1.DUMMY
AS
SELECT * FROM USER2.EMPLOYEE
ERROR at line 1:
ORA-00902: invalid datatype
This error is because object is created with the name of the schema (USER2.ADDRESS) and the schema where u are creating this object also contain the object type with refernce to the object
(USER1.ADDRESS).
The problem occurs when I try to define a variable of %ROWTYPE
it needs a schema name which i can not set it dynamically in the declaration part like for example
CREATE OR REPLACE PROCEDURE EMP_PROC (V_USER IN VARCHAR2)
IS
U_NAME VARCHA2(100);
type curref is REF CURSOR;
vcur curref;
REC [SCHEMA].EMPLOYEE%ROWTYPE [ HERE THE SCHEMA IS PASSING AS AN ARGUMENT WHICH IS NOT ALLOWED IN THE DECLARATION PART ]
------ IF I TRY TO REPLACE SCHEMA WITH THE VARIABLE
------ U_NAME IT IS NOT ACCEPTED
I think I wrote a lot to tell u about the actual problem.
Please dear friends, specially Barbera, i u look closely to my problem I'll be highly thankful. If suppose it is not possible I need other work around.
Regards
Shah I think the problem comes down to the fact that object address_typ in schema1 will have a different global object identifier to address_typ in schema2. They are therefore seen as different datatypes.
If you had a third schema which owned the object, and referenced this is the other two schemas, then you could quite happily insert the contents from schema1 into schema2.
e.g.
Schema3
CREATE OBJECT address_typ AS OBJECT (line_1 VARCHAR2(100), line_2 VARCHAR2(100));
GRANT ALL ON address_typ TO PUBLIC WITH GRANT OPTION;
Schema1
CREATE TABLE emp(empno NUMBER, ename VARCHAR2(100), address schema3.address_typ);
GRANT SELECT ON emp TO PUBLIC;
INSERT INTO emp VALUES (1, 'Smith', schema3.address_typ('Street','Town'));
Schema2
CREATE TABLE emp(empno NUMBER, ename VARCHAR2(100), address schema3.address_typ);
INSERT INTO emp SELECT * FROM schema1.emp;
In this example, the address column in both schema's is of the same datatype (schema3.address_typ).
I hope this sheds some light on your last post.
Similar Messages
-
Getting Exception in the select clause - Very Urgent
Hi,
I have given the below statement but it is showing the exception.
SELECT *
FROM (lv_tab_name)
INTO CORRESPONDING FIELDS OF TABLE <fs_1>.
If I execute the above select statement it is showing the below exception.
Exception CX_SY_NO_HANDLER triggered.
An exception with the type CX_SY_OPEN_SQL_DB occurred.
It is working very well if I mention the few field names.
Please let me know the possible reasons.
Thanks,
SuvinThanks much for your quick response.
I have tried with what you mentioned but it is not working.
Please find my code below.
*Declarations
DATA: ddfields TYPE STANDARD TABLE OF ddfield.
DATA: ls_ddfields TYPE ddfield.
DATA: lt TYPE lvc_t_fcat.
DATA: ls TYPE lvc_s_fcat.
DATA: lv_tab_name TYPE dd02l-tabname.
Data References
DATA: lt_data TYPE REF TO data.
DATA: new_line TYPE REF TO data.
Field Symbols
FIELD-SYMBOLS: <fs_1> TYPE ANY TABLE.
FIELD-SYMBOLS: <fs_data> TYPE REF TO data.
FIELD-SYMBOLS: <fs_2> TYPE ANY,
<l_field> TYPE ANY.
Get the fields of the database table, here i am passing the table name
CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'
EXPORTING
KEYFIELDS = 'X'
NULLABLE = 'X'
tabname = lv_tab_name
TABLES
ddfields = ddfields.
LOOP AT ddfields INTO ls_ddfields.
ls-fieldname = ls_ddfields-fieldname.
APPEND ls TO lt.
ENDLOOP.
*Assigning Field-Symbol to our dynamic internal table
ASSIGN lt_data TO <fs_data>.
Calling the method CREATE_DYNAMIC_TABLE
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt
IMPORTING
ep_table = <fs_data>
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc EQ 0.
ASSIGN <fs_data>->* TO <fs_1>.
Create a work area for the dynamic table.
CREATE DATA new_line LIKE LINE OF <fs_1>.
A field-symbol to access that work area
ASSIGN new_line->* TO <fs_2>.
ENDIF.
Selecting the Data from the respective table.
SELECT *
FROM (lv_tab_name)
INTO CORRESPONDING FIELDS OF TABLE <fs_1>.
Please advise..it is very urgent.
Thanks,
Suvin -
Need help to disable input selection-screen - very urgent
Hi SAP experts,
I have a requirement where in I need to disable ( Grey out ) the input fileds on the selection screen .
My problem is as I am using ABAP query I am not able to use any events ( AT SELECTION-SCREEN OUTPUT ).
My selection screen looks like this
MATERIAL NUMBER ( SELECT-OPTIONS)
MATERIAL TYPE ( PARAMETERS )
Now I want to add one more check box below the above fields on the selection-screen.When I click on the check-box,the MATERIAL NUMBER must be greyed out and MATERIAL TYPE should remain the same.
Please let me know the coding for the same. All answers would be rewarded.
Thanks in Advance,
Suresh.Hi,
Check out these codes.
1.
TABLES : mara, makt.
parameter: p_matnr type mara-matnr,
p_maktx type makt-maktx.
at selection-screen output.
select single maktx
from makt
into p_maktx
where matnr = p_matnr
and spras = 'EN'.
loop at screen.
if screen-name = 'P_MAKTX'.
screen-input = 0.
modify screen.
endif.
endloop.
2.
TABLES : mara, makt.
TYPES:BEGIN OF tp_maktx,
maktx TYPE makt-maktx,
END OF tp_maktx.
DATA:t_maktx TYPE STANDARD TABLE OF tp_maktx,
wa_maktx TYPE tp_maktx.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECT-OPTIONS: s_maktx FOR makt-maktx.
INITIALIZATION.
REFRESH s_maktx[].
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'S_MAKTX-LOW' or screen-name = 'S_MAKTX-HIGH'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
REFRESH s_maktx[].
if s_matnr[] is not initial.
SELECT maktx FROM makt
INTO TABLE t_maktx
WHERE matnr IN s_matnr
AND spras = 'EN'.
endif.
LOOP AT t_maktx INTO wa_maktx.
s_maktx-low = wa_maktx-maktx.
APPEND s_maktx.
CLEAR:wa_maktx.
ENDLOOP.
3.
TABLES : mara, makt.
parameter p_cb1 type c as checkbox.
parameter p_cb2 type c as checkbox.
parameter p_cb3 type c as checkbox.
initialization.
loop at screen.
if screen-name = 'P_CB3'.
screen-invisible = 1.
modify screen.
endif.
endloop.
at selection-screen output.
*loop at screen.
*if screen-name = 'P_CB3'.
*screen-invisible = 1.
*modify screen.
*endif.
*endloop.
loop at screen.
if p_cb1 = 'X'.
if screen-name = 'P_CB2'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB3'.
screen-invisible = 0.
modify screen.
endif.
endif.
if p_cb2 = 'X'.
if screen-name = 'P_CB3'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB1'.
screen-invisible = 0.
modify screen.
endif.
endif.
if p_cb3 = 'X'.
if screen-name = 'P_CB1'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB2'.
screen-invisible = 0.
modify screen.
endif.
endif.
endloop.
Reward if helpful..
Regards. -
Lexical parameter in SELECT INTO (Very Urgent)
I have to write a query which takes some value & put it into a variable. but i have to use lexical parameter in my query.
e.g
select sal into v_sal
from emp
where deptno=20 &p_lexpara;
the form amd report builder do not compile this syntax & give error on &p_lexpara
Pl. help me out
ThanksIn Report Builder you can not use clause INTO.
Correct one is:
select sal
from emp
where deptno=20 &p_lexpara
In Forms you can not use lexical parameter but you can create lexical parameter in CREATE_GROUP_FROM_QUERY. So you can create record group in this way and then use lexical parameter like:
DECLARE
rg_name VARCHAR2(40) := 'Salary';
rg_id RecordGroup;
errcode NUMBER;
BEGIN
** Make sure group doesn't already exist
rg_id := Find_Group( rg_name );
** If it does not exist, create it and add the two
** necessary columns to it.
IF Id_Null(rg_id) THEN
rg_id := Create_Group_From_Query( rg_name,
'select sal from emp where deptno=20 '||p_lexpara;
END IF;
** Populate the record group
errcode := Populate_Group( rg_id );
END;
and then with Get_Group_Number_Cell you can retrive values of SAL e.g something like:
status := Populate_Group( rg_id );
*/ *** Zero status is success*** /
IF status = 0 THEN
match := Get_Group_Number_Cell('Salary.SAL',1);
Message('The Salary is '||to_CHAR(match));
ELSE
Message('Error creating query record group.');
RAISE Form_Trigger_Failure;
END IF; -
Select statement- very urgent pls help
hi
i want to extract following fields into one internal table.
anyone pls help me to do this?
mara-mandt, mara-matnr, mara-meins, mara-laeda, mara-aenam, marc-werks, makt-maktx, sy-datum, sy-uzeit, sy-uname
Thanks
KumarHi Kumar K,
TABLES: MARA, MARC, MAKT.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
PARAMETERS : P_WERKS LIKE MARC-WERKS OBLIGATORY.
DATA : BEGIN OF WA_FINAL,
MANDT LIKE MARA-MANDT,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
LAEDA LIKE MARA-LAEDA,
AENAM LIKE MARA-AENAM,
WERKS LIKE MARC-WERKS,
MAKTX LIKE MAKT-MAKTX,
DATE TYPE SY-DATUM,
TIME TYPE SY-UZEIT,
UNAME TYPE SY-UNAME,
END OF WA_FINAL,
BEGIN OF WA_MARA,
MANDT LIKE MARA-MANDT,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
LAEDA LIKE MARA-LAEDA,
AENAM LIKE MARA-AENAM,
END OF WA_MARA,
BEGIN OF WA_MAKT,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
END OF WA_MAKT,
BEGIN OF WA_MARC,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
END OF WA_MARC.
DATA : IT_MARA LIKE STANDARD TABLE OF WA_MARA WITH HEADER LINE,
IT_FINAL LIKE STANDARD TABLE OF WA_FINAL WITH HEADER LINE,
IT_MAKT LIKE STANDARD TABLE OF WA_MAKT WITH HEADER LINE,
IT_MARC LIKE STANDARD TABLE OF WA_MARC WITH HEADER LINE.
SELECT MANDT
MATNR
MEINS
LAEDA
AENAM
FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR.
IF IT_MARA[] IS NOT INITIAL.
SELECT MATNR
WERKS
FROM MARC
INTO TABLE IT_MARC
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR
AND WERKS = P_WERKS.
ENDIF.
IF IT_MARA[] IS NOT INITIAL.
SELECT MATNR
MAKTX
FROM MAKT
INTO TABLE IT_MAKT
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR.
ENDIF.
LOOP AT IT_MARA.
IT_FINAL-MANDT = IT_MARA-MANDT.
IT_FINAL-MATNR = IT_MARA-MATNR.
IT_FINAL-MEINS = IT_MARA-MEINS.
IT_FINAL-LAEDA = IT_MARA-LAEDA.
IT_FINAL-AENAM = IT_MARA-AENAM.
READ TABLE IT_MARC WITH KEY MATNR = IT_MARA-MATNR.
IF SY-SUBRC = 0.
IT_FINAL-WERKS = IT_MARC-WERKS.
ENDIF.
READ TABLE IT_MAKT WITH KEY MATNR = IT_MARA-MATNR.
IF SY-SUBRC = 0.
IT_FINAL-MAKTX = IT_MAKT-MAKTX.
ENDIF.
IT_FINAL-DATE = SY-DATUM.
IT_FINAL-TIME = SY-UZEIT.
IT_FINAL-UNAME = SY-UNAME.
APPEND IT_FINAL.
CLEAR : IT_FINAL, IT_MARA , IT_MAKT, IT_MARC.
ENDLOOP.
now IT_FINAL table contains the final data which you want...
Hope it will solve your problem
Reward points if useful...
Thanks & Regards
ilesh 24x7 -
Hierarchy, dynamic selection, user-exit, and co.
Hi,
i'm fighting against SAP Organizational Unit Hierarchy.
Is it possible to historicize the Orgunit hierarchy that have changed over time and make a filter before the query execution?
I'd like to have this situation:
-User inserts date, the output of the report uses the hierarchy valid in that date.
How is possible to implement this?You have to make your hierarchy as timedependent and in the report you have to use key date as user entry variable.....based on this user entered date hierarchy will be displayed.
-
Okay, here's my three cents worth,
Are you using Forte "Keep Alive" settings? If yes, you may simply have a
time-out.
While a partition is waiting for a reply from a database, it blocks and
won't respond
to anything, including pings to check if it's still alive. So, if the query
takes longer to
complete than the time-out period of the communication manager, then you
will
loose the connection to the partition.
-----Original Message-----
From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
Sent: Sunday, February 13, 2000 11:39 AM
To: 'Babu Raj'; kamranaminyahoo.com
Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
handle La rge array properly
Hi,
This sounds almost identical to a problem we have experienced.
If it is the same problem it is because you have compiled a back-end
load-balanced partition, but NOT the router that manages it.
With such a configuration, attempts to send greater than a few thousand
rows
will fail - and it doesn't seem to matter what you set -fm to.
You don't see the problem running distributed from your workspace because
everything is interpreted.
So just compile the router and try again.
Hope this helps.
George Aberdour
(George.Aberdourdet.nsw.edu.au)
-----Original Message-----
From: Babu Raj [mailto:ibcsmartboyyahoo.com]
Sent: Saturday, 12 February 2000 7:24
To: kamranaminyahoo.com
Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
Large array properly
Hi All,
Have anyone experienced problem of retrieving
more than 1500 records from the database table, into
the object.
I use dynamic SQL statement, and populating Array
object from the DBDataSet. When it runs from my
workspace distributed, it works fine. But, when I make
deployment, and install on the test bed, I face
Network connection failure from the client machine. It
looks like, server read the data from the Database,
and while packaging it, to send it across to the
client, server seems to run out ouf memory or couldn't
maintain the connection with the client. I tried to
set -fm flag on that partition, and separately setting
FORTE_GC_SPECIAL too, but still no luck.
we have increased, the rollback segment size on
Oracle too, but still no luck.
Appreciate, your suggestions, if you can,
Thank you,
Babu
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comOkay, here's my three cents worth,
Are you using Forte "Keep Alive" settings? If yes, you may simply have a
time-out.
While a partition is waiting for a reply from a database, it blocks and
won't respond
to anything, including pings to check if it's still alive. So, if the query
takes longer to
complete than the time-out period of the communication manager, then you
will
loose the connection to the partition.
-----Original Message-----
From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
Sent: Sunday, February 13, 2000 11:39 AM
To: 'Babu Raj'; kamranaminyahoo.com
Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
handle La rge array properly
Hi,
This sounds almost identical to a problem we have experienced.
If it is the same problem it is because you have compiled a back-end
load-balanced partition, but NOT the router that manages it.
With such a configuration, attempts to send greater than a few thousand
rows
will fail - and it doesn't seem to matter what you set -fm to.
You don't see the problem running distributed from your workspace because
everything is interpreted.
So just compile the router and try again.
Hope this helps.
George Aberdour
(George.Aberdourdet.nsw.edu.au)
-----Original Message-----
From: Babu Raj [mailto:ibcsmartboyyahoo.com]
Sent: Saturday, 12 February 2000 7:24
To: kamranaminyahoo.com
Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
Large array properly
Hi All,
Have anyone experienced problem of retrieving
more than 1500 records from the database table, into
the object.
I use dynamic SQL statement, and populating Array
object from the DBDataSet. When it runs from my
workspace distributed, it works fine. But, when I make
deployment, and install on the test bed, I face
Network connection failure from the client machine. It
looks like, server read the data from the Database,
and while packaging it, to send it across to the
client, server seems to run out ouf memory or couldn't
maintain the connection with the client. I tried to
set -fm flag on that partition, and separately setting
FORTE_GC_SPECIAL too, but still no luck.
we have increased, the rollback segment size on
Oracle too, but still no luck.
Appreciate, your suggestions, if you can,
Thank you,
Babu
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
How to change the text of a user defined field in dynamic selections?
Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
Found an OSS note - 86980 - that tells that this is not possible.
But when we read the documentation on the user field (CJI3 - dynamic selections - double click on user field - F1), it shows the following text:
User-defined field in which you can enter general information with a length of up to 20 characters.
Dependencies
The names (key words) for user-defined fields depend on the field key.
Now the question is where to change the field key..
Thanks,
VenMadhu - you did not get the question I think.
Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
Thanks, -
SQL SELECT Query Help ..Please its very Urgent!!
Hi All,
I am having Oracle Database whice is storing 1000's of records daily.
I need to select some information based on date and time.
I am having two coloumns for Date and time. The first column(testDate) of type Date stores date as MM/DD/YY format and the second column(testTime)of type Numeric stores the time in seconds.
The Example data is :
testDate ------=-- testTime
11/12/2002 --- 35000
11/12/2002 --- 43000
11/12/2002 --- 45000
11/12/2002 --- 75000
11/13/2002 --- 2000
11/13/2002 --- 3500
11/13/2002 --- 4300
11/13/2002 --- 9800
11/13/2002 --- 23000
11/14/2002 --- 5000
11/14/2002 --- 10000
11/14/2002 --- 15000
How can i write a SELECT Query to get the records of specific date and seconds to next day specific date and seconds.I mean i want all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
If any one helps me in this regard iam very thank full to them.Its very urgent for me.
ThanksHi m7nra,
I used the query as
SELECT * FROM table
WHERE testDate + (testTime/(24*60*60)) BETWEEN TO_DATE('MM/DD/YYYY','12.11.2002') AND TO_DATE('MM/DD/YYYY','14.11.2002')
its giving DATE FORMAT NOT RECOGNIZED error.
The Example data is :
testDate ------=-- testTime
11/12/2002 --- 35000
11/12/2002 --- 43000
11/12/2002 --- 45000
11/12/2002 --- 75000
11/13/2002 --- 2000
11/13/2002 --- 3500
11/13/2002 --- 4300
11/13/2002 --- 9800
11/13/2002 --- 23000
11/14/2002 --- 5000
11/14/2002 --- 10000
11/14/2002 --- 15000
infact i need all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
Please help me to find a full query beacuse iam very new to Oracle.
Thanks,
S R Mannava -
Very Urgent!...regarding selection criterion in Info Packages
Hi all,
This is very urgent requirement for the project now. Is there any way to indicate a field in selection criterion of a IP as blank.
Like if I want to select all the records which have a field 0WBS_element as blank from one ODS into another ODS. How do I indicate it in the IP( any solution apart from writing a routine!)
cheers
SudhirHi Sudhir,
Pls. refer to the earlier posted forums :
Rotuine in Infopackage for Data Selection---- Urgent
Thanks,
Raj -
To insert the xml data's generated dynamically it to orac very very urgent
I AM WORKING IN A PROJECT WHICH RECEIVES THE DATA FROM FLAT FILES
AND CONVERT IT TO XML FILE>
I am in need to convert the xml file generated dynamically through out the year map it to correct datafield it the database and insert it in to oracle data base using java and jsp, servlets.
i also need mechanism to be explained detailed and some sample codeings
of converting the data from database to xml because
and i also need to convert the data taken from sql server7.0 put it in xml file and once again read parse and insert in to oracle database.
some sample codeings of the mechanisma and explaninations.
I am in very very urgent-Hello sir,
Thanks for the guidence.
I need to insert data's into database columns where i should fetch data from xml file.
please
urgent. -
RE: (forte-users) dynamic select & maxrowsparameter
I thing this code should help:
** Accepts command string for dynamic query and **
** an empty array of BC to which the results **
** should be appended. Returns the filled BC **
** array. **
l_dynamicStatement : DBStatementHandle;
l_inputDescriptor : DBDataSet;
l_outputDescriptor : DBDataSet;
l_outputData : DBDataSet;
l_intStatementType : integer;
l_intRowType : integer;
l_intNumRows : integer;
l_intRowCount : integer = 0;
l_result : BusinessClass = new;
BEGIN
-- Prepare SQL statement for query given command string
l_dynamicStatement = self.GetDBSession().Prepare(
commandString = p_strSql,
inputDataSet = l_inputDescriptor,
cmdType = l_intStatementType);
-- Open Cursor
l_intRowType = GetDBSession().OpenCursor(
statementHandle = l_dynamicStatement,
inputDataSet = l_inputDescriptor,
resultDataSet = l_outputDescriptor);
-- Fetch first row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
WHILE l_intNumRows > 0 DO -- If prev fetch returned a row
-- Increment count of rows fetched
l_intRowCount = l_intRowCount + 1;
-- Check for excessive number of rows retrieved
-- Then it checks if you want to throw a exception or
-- just exit and return the result set.
IF l_introwCount > p_intMaxRow THEN
IF p_bThrowExcept THEN
-- Shut the cursor down and remove prepared
statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
// Raise exception
-- Have to put code
ELSE
EXIT;
END IF;
END IF;
-- Parse result from DBDataSet to subclass
-- of BusinessClass
l_result = parseResult(l_outputData);
// Add row to array
p_aryBC.AppendRow(l_result.Clone(deep=TRUE));
// Fetch next row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
END WHILE;
-- Shut the cursor down and remove prepared statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
EXCEPTION
when e: GenericException do
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
raise e;
END;
return p_aryBC;
ka
Kamran Amin
Framework, Inc.
303 South Broadway
Tarrytown, NY 10591
(914) 631-2322x121
[email protected]
http://www.frameworkinc.com/
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Thursday, December 09, 1999 11:15 PM
To: Will Chris
Cc: [email protected]
Subject: RE: (forte-users) dynamic select & maxrows parameter
Think there's a mis-understanding. The maxrows I refer to is not SQL but a
forte method parameter as in the following:
dynStatement = self.DefaultDBSession.Prepare(commandString = sqlStatement
,inputDataSet = inputDescriptor
,cmdType = commandType);
rowType = self.DefaultDBSession.Select(statementHandle = dynStatement
,inputDataSet = inputDescriptor
,resultDataSet = outputDescriptor
,maxrows = 100);
the variable sqlStatement holds the "dynamic" select string.
If I don't set maxrows I get a runtime error, as mentioned, it is running
against Oracle.
At 14:47 10/12/99 +1100, you wrote:
We use Oracle and Rdb and we have dynamic and non-dynamic SQL. No
combination of
these demand a max rows clause.
For example the following query works on both databases :
lvLanguageCodesList : Array of LanguageCodes = new();
begin transaction
sql select Language_Code LanguageCode,
Language_Nm LanguageNm,
System_Control_YN SystemControlYN,
Other_Language_YN OtherLanguageYN
into :lvLanguageCodesList
from SRD_LANGUAGE_CODES
order by Language_Nm
on session StudentRegistryDBSession;
end transaction;
if lvLanguageCodesList.items = 0 then
return Nil;
else
return lvLanguageCodesList;
end if;
Indeed if we wanted to use max rows its a bit of a pain in the bum because
Oracle and
Rdb use different syntax to define the row limit. So our dynamic SQL
'builder class'
has to detect the database flavour and configure max rows accordingly(where
we want to use
it).
I can only guess that the error you are getting is not assoicated to therow
limit or is caused because of the database you are using ?
Regards,
Chris Will, Sydney, Australia
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Friday, 10 December 1999 14:33
To: [email protected]
Subject: (forte-users) dynamic select & maxrows parameter
the help for DBSession.Select method says that the maxrows
parameter is not
required. Leaving it out does not give a compile error.
However at runtime
an error is got saying maxrows must be > 0.
I am using a method that accepts a where clause as a
parameter and am not
really interested in what the number of rows will be.
Should I be?
Does anyone have any knowledge they can share on this one.
Thanks.
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to: [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]I thing this code should help:
** Accepts command string for dynamic query and **
** an empty array of BC to which the results **
** should be appended. Returns the filled BC **
** array. **
l_dynamicStatement : DBStatementHandle;
l_inputDescriptor : DBDataSet;
l_outputDescriptor : DBDataSet;
l_outputData : DBDataSet;
l_intStatementType : integer;
l_intRowType : integer;
l_intNumRows : integer;
l_intRowCount : integer = 0;
l_result : BusinessClass = new;
BEGIN
-- Prepare SQL statement for query given command string
l_dynamicStatement = self.GetDBSession().Prepare(
commandString = p_strSql,
inputDataSet = l_inputDescriptor,
cmdType = l_intStatementType);
-- Open Cursor
l_intRowType = GetDBSession().OpenCursor(
statementHandle = l_dynamicStatement,
inputDataSet = l_inputDescriptor,
resultDataSet = l_outputDescriptor);
-- Fetch first row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
WHILE l_intNumRows > 0 DO -- If prev fetch returned a row
-- Increment count of rows fetched
l_intRowCount = l_intRowCount + 1;
-- Check for excessive number of rows retrieved
-- Then it checks if you want to throw a exception or
-- just exit and return the result set.
IF l_introwCount > p_intMaxRow THEN
IF p_bThrowExcept THEN
-- Shut the cursor down and remove prepared
statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
// Raise exception
-- Have to put code
ELSE
EXIT;
END IF;
END IF;
-- Parse result from DBDataSet to subclass
-- of BusinessClass
l_result = parseResult(l_outputData);
// Add row to array
p_aryBC.AppendRow(l_result.Clone(deep=TRUE));
// Fetch next row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
END WHILE;
-- Shut the cursor down and remove prepared statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
EXCEPTION
when e: GenericException do
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
raise e;
END;
return p_aryBC;
ka
Kamran Amin
Framework, Inc.
303 South Broadway
Tarrytown, NY 10591
(914) 631-2322x121
[email protected]
http://www.frameworkinc.com/
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Thursday, December 09, 1999 11:15 PM
To: Will Chris
Cc: [email protected]
Subject: RE: (forte-users) dynamic select & maxrows parameter
Think there's a mis-understanding. The maxrows I refer to is not SQL but a
forte method parameter as in the following:
dynStatement = self.DefaultDBSession.Prepare(commandString = sqlStatement
,inputDataSet = inputDescriptor
,cmdType = commandType);
rowType = self.DefaultDBSession.Select(statementHandle = dynStatement
,inputDataSet = inputDescriptor
,resultDataSet = outputDescriptor
,maxrows = 100);
the variable sqlStatement holds the "dynamic" select string.
If I don't set maxrows I get a runtime error, as mentioned, it is running
against Oracle.
At 14:47 10/12/99 +1100, you wrote:
We use Oracle and Rdb and we have dynamic and non-dynamic SQL. No
combination of
these demand a max rows clause.
For example the following query works on both databases :
lvLanguageCodesList : Array of LanguageCodes = new();
begin transaction
sql select Language_Code LanguageCode,
Language_Nm LanguageNm,
System_Control_YN SystemControlYN,
Other_Language_YN OtherLanguageYN
into :lvLanguageCodesList
from SRD_LANGUAGE_CODES
order by Language_Nm
on session StudentRegistryDBSession;
end transaction;
if lvLanguageCodesList.items = 0 then
return Nil;
else
return lvLanguageCodesList;
end if;
Indeed if we wanted to use max rows its a bit of a pain in the bum because
Oracle and
Rdb use different syntax to define the row limit. So our dynamic SQL
'builder class'
has to detect the database flavour and configure max rows accordingly(where
we want to use
it).
I can only guess that the error you are getting is not assoicated to therow
limit or is caused because of the database you are using ?
Regards,
Chris Will, Sydney, Australia
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Friday, 10 December 1999 14:33
To: [email protected]
Subject: (forte-users) dynamic select & maxrows parameter
the help for DBSession.Select method says that the maxrows
parameter is not
required. Leaving it out does not give a compile error.
However at runtime
an error is got saying maxrows must be > 0.
I am using a method that accepts a where clause as a
parameter and am not
really interested in what the number of rows will be.
Should I be?
Does anyone have any knowledge they can share on this one.
Thanks.
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to: [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected] -
USER-EXIT for DELIVERY--very very urgent
Hi all,
can u plz tell me the user-exit for delivery i.e this exit should be called after the delivery order is created.
plz suggest some specific exit.it is very very urgent.
Regards
pabitraRout ,
u cannt find out user exits after the Creation.
V02V0001 Sales area determination for stock transport order
V02V0002 User exit for storage location determination
V02V0003 User exit for gate + matl staging area determination (headr)
V02V0004 User Exit for Staging Area Determination (Item)
V50PSTAT Delivery: Item Status Calculation
V50Q0001 Delivery Monitor: User Exits for Filling Display Fields
V50R0001 Collective processing for delivery creation
V50R0002 Collective processing for delivery creation
V50R0004 Calculation of Stock for POs for Shipping Due Date List
V50S0001 User Exits for Delivery Processing
V53C0001 Rough workload calculation in time per item
V53C0002 W&S: RWE enhancement - shipping material type/time slot
V53W0001 User exits for creating picking waves
VMDE0001 Shipping Interface: Error Handling - Inbound IDoc
VMDE0002 Shipping Interface: Message PICKSD (Picking, Outbound)
VMDE0003 Shipping Interface: Message SDPICK (Picking, Inbound)
VMDE0004 Shipping Interface: Message SDPACK (Packing, Inbound)
* FORM-Routinen für Userexits
include mv50afzz.
include mv50afz1.
include mv50afz2.
include mv50afz3. "Userexit neu zu Release 3.0A
include mv50afzk. "Userexit 4.6A (KOMKG/KOMPG)
include mv50afzl. "Userexit 4.6A Liefergruppen
"n_693000
include mv50afzp. "Userexit for pricing screen input
Regards
Prabhu -
Delete data dynamically with JSP and servlet (Very Urgent)
Hi,
I am new with servlets and JSP. On my jsp page I am populating customer names in a drop box from database and I have 3 buttons ADD, DELETE and EDIT.
Now when I press DELETE buttong I am calling delete function which is writen in Javascript on my jsp file only,now I want to pass these selcted values ehich I have stored in an array to be pass to servlet,so I can write Delete query for it and delete.
Could anyone help with sample code>
Here what I am trying to say:
<HTML>
<HEAD>
<script language="JavaScript" type="text/javascript">
<!--
function remove()
var u = confirm("Are you sure you want to Delete Selected names?")
if (u==true)
var selectedArray = new Array();
var selObj = document.getElementById('CUSTOMER_NAME');
var i;
var count = 0;
for (i=0; i<selObj.options.length; i++) {
if (selObj.options.selected) {
selectedArray[count] = selObj.options[i].value;
count++;
alert("names to be deleted are:"+selectedArray);
// selectedArray has the selected items stored
alert("Items Deleted!")
else
alert("No data were deleted!!You pressed Cancel!")
//-->
</script>
</HEAD>
<BODY>
//calling servlet on action tag of form
<FORM METHOD= 'POST' ACTION='Remove_Customer'>
<form ><INPUT TYPE='submit' NAME='DELETE' VALUE='DELETE' onclick="remove()"></TD></form>
<form><INPUT TYPE='submit' NAME='MODIFY' VALUE='MODIFY' onclick="modification()" ></TD></form>
</BODY>
</HTML>
PLEASE HELPME,it's very urgent.
Since the selected Array is in javascrip language , I don't know how can I pass that to servlet.
request.getParameter is not working,since it's an array
Many thanks in Advance.Hey,
I am having problem deleting multiple values.
If I just select one value,it deletes it
But for multiple values the code is not working right.
If there 2 values selcted then the last value gets deleted,if there are more than 2 values selected none values delete.
Could plese check the code,and let meknow what mistake am I doing?
Please help
String delName="";
int pos = tStr.indexOf(",");
System.out.println(pos);
if (pos != -1)
delName = tStr.substring(0, tStr.indexOf(","));
tStr = tStr.substring(tStr.indexOf(",") + 1 );
System.out.println("DElName:"+delName);
System.out.println("tStr::"+tStr);
delName = tStr;
delete_Customer(delName);
Thanks
ASH -
Hi All,
I need to send the message to partner by using AS2 adapter.
And i need to keep the Message Subject by taking dynamically from the payload message.
ie. Iam sending the Purchase Order to Partner and i need to pass OrderNO which is coming in one field of my strcture to the message subject.
How i can select dynamically the Orderno and pass into message subject of AS2 Receiver adapter??
In the Seeburger AS2adpter manual, they provide the answer by using module parameters like
http://seeburger.com/xi/common/dtsubject DYNSUBJECT
But i don't know how to put particular field into it.
Any idea abt this?
Regards
Deepthi.Hi Deepthi,
I think this would help you in configuring Dynamically selection of Message Subject.
Supported dynamic attributes are:
dtSubject if the subject parameter is set in the XI message and the AS2 receiver channel is
configured to use all non-empty or subject attribute, it will be treated as the message subject
by the AS2 adapter;
dtAS2FileName the name of the payload. This is an attribute of the Content-Disposition
header. With this AS2 is compatible with AS2 Filename Preservation draft.
dtAS2ContentType for Example application/xml, depending on the payload type
To enable the usage of Dynamic Attributes, there is a special dedicated section in receiver channel.
Dynamic attributes are used if the Use dynamic attributes setting is checked in the receiver channel.
If the the setting Use non-empty attributes is not selected, all known attributes are used for
configuration if the attribute is present.
Mention Check boxes for these
Use dynamic Attributes
Subject
Dynamically set attributes override static channel attributes. Example: the subject attrib
in receiver channels overrides the channel attribute.
Here is an example how to set them. Channel tab Module->Module Configuration:
Module Key: 1
Parameter Name: http://seeburger.com/xi/common/dtsubject
Parameter Value: DYNSUBJECT
Message Subject: This subject will be compared with the subject in the received message. This is used to find the correct channel for the inbound message.
Wildcards are allowed.
Regards,
Varun Reddy.K
Maybe you are looking for
-
Different passwords for different share points on 1 server?
On a lion server I have two share points. A 'general' is accessible for all users, a 'confidential' is for a select group of users. The permissions are set and the select group have their server access password in their key chain. The server password
-
Tv channels stream live on Apple tv
Hello there ... Apple has changed the way they listen to music, Apple has changed the way we read books, Apple has changed the way we learn and many other things that our life has become easier ...but I expect like many others a new way to watch tv y
-
Has anybody been having problems opening Adobe PDF's?
I cannot open a saved PDF document. I get an error message,"There was an error opening this document. the root object is missing or invalid". I do not have this problem on my ipad or G5 with OS10.4 .
-
How to change to a new phone. I currently have an iphone 5. Just got a new iphone 6 as a gift. I want to switch over to my new phone on my own instead of going back to the store
-
Hi guys, I've only recently got a macbook pro and I don't know much about it so apologies if this is a stupid question! I looked at terminal today and the information on it has completely changed. Upon startup it says this: caitlins-phone:~ rachel***