ORA-22806 : not an object or reference in 10gRel2
Hi,
We have recently successfully upgraded our oracle 8i database to 10.2.0.1
database is up and running fine, but
one of the user created procedure is giving error as below :
ORA-22806 : not an object or reference
See the below code :
=============
v_cnt:=0;
Check_Str := 'SELECT COUNT(*) FROM P_EMP_HOLIDAY_DATE
WHERE company_id=:p_Comp_id
AND branch_id = :rec_branch.branch_id
AND employee_id =:rec_emp.employee_id
AND :v_nxt_date IN holiday_date';
EXECUTE IMMEDIATE Check_Str INTO v_cnt USING p_Comp_id,rec_emp.branch_id, rec_emp.employee_id,v_nxt_date;
Put_Any_Line('v_cnt : ' || v_cnt);
when we run the procedure it gives the error at line 186 .i.e the line with EXECUTE IMMEDIATE statement in above
so where is the problem ?
this procedure was running fine without any problem in our oracle 8.1.7.0 version now showing error in 10.2.0.1
is there any syntax problem that is not being suported in the upgraded version i.e. 10.2.0.1
how to get it solved ?
As this is very urgent to solve so any immediate support would be appreciated.
with regards
What is Put_Any_Line ? Why are you using dynamic sql here ?
As this is very urgent to solve so any immediate support would be appreciated.Ok, then please, do not hesitate to use the Oracle support, and see how it can be immediate support.
Nicolas.
Similar Messages
-
PL/SQL: ORA-22806: not an object or REF when Using Record in Package
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
I have declared a record type in my package
create or replace
PACKAGE MYPKG AS
TYPE MYREC IS RECORD (VAL1 varchar2(20), val2 date);
PROCEDURE display_error (pSQLERRM number);
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date);
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC;
END MYPKG;
--In My Package Body
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC is
F_param MYREC;
BEGIN
select myvarchar2, mydate into MYREC from MYTable
where myrefno1 = refno1
and myrefno2 = refno2
Exception
when others then
display_error(SQLERRM);
RETURN F_param;
END F_EPI ;
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date) IS
insert into atable(myvarchar, mydate)
select F_EPI(refno1,refno2).val1,F_EPI(refno1,refno2).val2 from tab2;
END P_LOAD_DATA;
I get errors
Error(187,7): PL/SQL: SQL Statement ignored
Error(225,7): PLS-00382: expression is of wrong type
Error(225,7): PL/SQL: ORA-22806: not an object or REF
When I compile the package.
When I try to call the function from SQL I get an Invalid datatype error.Hi,
Before posting any query/plsql blocks, please ensure that you have written it clean and complete with less syntax errors. ( at least general syntax errors, you can avoid). Then somebody can have an interest to check your logical error.
About your posting, refer below solution step-by-step. It may help you, about what you are looking for? By the way, you must be knowing, what you are going to to do with. I haven't concentrated about your requirement; as it was not missing in your posting.
drop table test;
create table test(myvarchar varchar2(20), mydate date);
create or replace
package mypkg as
type myrec is record (val1 varchar2(20), val2 date);
--procedure display_error (psqlerrm in number); -- if you are passing sqlerrm, then parameter needs to be string type
procedure display_error (psqlerrm in varchar2);
procedure p_load_data (pstartdate in date, penddate in date);
function f_epi(refno1 in number, refno2 in number) return myrec;
end mypkg;
Package created.
--in my package body
create or replace
package body mypkg as -- added
procedure display_error (psqlerrm in varchar2) -- if you are declared a proc/func in spec, it needs to define in pkg body
is
begin
null; -- you should know, what to do here
dbms_output.put_line('Err -'||sqlerrm);
end display_error;
function f_epi(refno1 in number,refno2 in number)
return myrec
is
f_param myrec;
begin
-- select myvarchar2, mydate into MYREC from mytable
-- where myrefno1 = refno1
-- and myrefno2 = refno2;
select ename, hiredate into f_param from emp -- added demo logic by using emp
where empno = refno1
and mgr = refno2;
return f_param; -- added
exception
when others then
raise; -- if you are using OTHERS then, just raise it
display_error(sqlerrm);
--return f_param; -- what is this?
end f_epi;
procedure p_load_data (pstartdate in date, penddate in date) -- you must be knowing the use of 2 params ???
is
v_rec myrec; -- added
begin -- Added
--insert into atable(myvarchar, mydate)
-- select f_epi(refno1,refno2).val1,f_epi(refno1,refno2).val1 from tab2;
-- demo logic added with static params to call f_epi
v_rec:= f_epi(7499,7698);
insert into test values v_rec;
--null;
end p_load_data;
end mypkg;
Package body created.
SQL> exec mypkg.p_load_data(null,null);
PL/SQL procedure successfully completed.
SQL> select * from test;
MYVARCHAR MYDATE
ALLEN 20-FEB-81
Thanks! -
ORA-22806: not an object or REF
Hi!
My query encountered error:ORA-22806: not an object or REF.
select LOGINNAME from (
select ID_.LOGINNAME
from TEST_IDENTIFICATIONDEVICE ID_
join TEST_CONTRACTPARTNER CP
on (CP.ID=ID_.ID_PERSON)
join TEST_CONTRACT gc on (gc.ID_PARTNER=CP.ID)
inner join car_reflists cr on (EXTRACTVALUE(gc.XMLEXTENSION,'/data/shop-identification')
= cr.listitemid)
where loginname like '%pos%'
But inlined SELECT works Ok. Please help me to solve this problem. Thank you in advance.Is any of the object in "inlined SELECT" a view? Is the view doing another EXTRACT?
-
ORA-22806: not an object or REF on the reserved word FROM, how to debug?
I am honestly confused on this one...
When I run the following in sqlplus:
SQL> SELECT a.fname, a.lname
FROM h_user_m a
WHERE a.id IN
(SELECT UNIQUE m.user_id
FROM h_user_role m
WHERE m.role_id =
(SELECT UNIQUE id
FROM h_role_n
WHERE LOWER (name) = 'wc-ismp-admin')
OR m.role_id =
(SELECT UNIQUE id
FROM h_role_n
WHERE LOWER (name) = 'wc-ismp-user'))
AND a.id NOT IN (SELECT user_id
FROM ip_user);
ERROR at line 2:
ORA-22806: not an object or REF
I run the same query in Toad for Oracle v9.7.2.5 and it returns the same error, but highlights the reserved word FROM. I googled the error, but I'm not for sure why the reserved word FROM would be causing the error?Thank you for the quick response.
I tried your query and I still receive the same 'ORA-22806: not an object or REF' error & in Toad, it does highlight the reserved word FROM.
Oddly enough, I went back and ran the first sub-query from both of our SQL statements and no errors returned.
Only when I added the sub-query back to the main query I receive the error as mentioned.
So, the following worked:
select m.user_id
from h_user_role m
where m.role_id in
(select id
from h_role_n
where lower (name) = 'wc-ismp-admin'
or lower (name) = 'wc-ismp-user'
minus
select user_id
from ip_user)
but added back to:
select a.fname, a.lname
from h_user_m a
where a.id in(...)
The error returns - the same steps apply to my statement as well...
Looking at the 10g Release 2 (10.2) documents, I don't see any restrictions to the IN reserved word, in terms of number of sub-queries, etc... -
ORA-22806 not an object or REF, Query for XMLType
Hi,
i am using this query :
select centre||compte, sum(cout) from (
SELECT o.INDICE_CENTRE as centre, substr(o.champs.extract('//compte/text()').getStringVal(),1,8)
as compte,to_number(substr(o.champs.extract('//cout/text()').getStringVal(),1,17)) as cout
FROM canevas o)
group by centre||compte;
i have got this error ORA-22806 not an object or REF.
any sugestion please?Problem resolved.
-
Extrating XML whilst using group by: ORA-22806
Hi,
Can anyone tell me why this works:
select media_id, count(*) from (
select m.media_id, m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
group by media_id;
and this works:
select title_caption
from (
select m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
but this doesnt?
select title_caption, count(*) from (
select m.media_id, m.mediadata.extract('//med:caption/text()|//med:title/text()').getStringVal() AS title_caption
from media m
where m.media_id = 3208
group by title_caption;
select title_caption, count(*) from (
ERROR at line 1:
ORA-22806: not an object or REF
mediadata is a column of type xmltype and media_id is a number.
Thanks in advance.I haven't fixed this problem but I've found a workaround, creating a view that performs the extract. The view then contains a varchar2 which can be grouped by.
-
ORA-34492: Analytic workspace object cubename _STORED does not exist.
I am having issues accessing cube data from a user other than where the AW was built.
Following is what I have done in User-1:
1. Create two AW's in User-1 : AW-1 and AW-2.
2. Create all objects in these two AW's
3. AW-2 is dynamically attached on attaching AW-1 by using PERMIT startup programs. Please refer Attaching multiple AW's
4. Refreshed both AW's to load data
5. ALLCOMPILE - no errors.
6. Created some SQL views on User-1 which basically query the underlying cube views. I also have some queries using the olap_table option.
7. All my querries work fine in User-1. I can access data from AW-1 and AW-2.
However, we give access to the above SQL views through an abstract user: User-abs. In 10g, all we did was grant select privs to all the User-1.AW$ tables and also on all the sql views. This would let User-abs get data from the cubes in User-1.
I am not able to get User-abs to do the same in 11g. We encounter an error mentioning that the workspace object <cubename>_STORED does not exist. The cubename it is referring to exists in AW-2.
I granted select privs on all AW$ tables, dimension views, cube views and the abstracted sql views but the error persists.
I tried searching this forum but could not find any helpful leads. Any help will be greatly appreciated.
Thanks!
Database - 11.2.0.1
AWM - 11.2.0.2.0AI can think of two possible problems. First, you may not be properly qualifying the owner name when you refer to the object. This can be important when refering to objects owned by other schemas. For example instead of 'my_cube_stored' you would say 'user-1.aw-2!my_cube_stored'. You should also be careful about the order in which you attach the AWs. Do you want AW-2 attached first or last? Use the LAST keyword on AW ATTACH to control this.
Another possibility is that you have added additional logic to PERMIT_READ over and above the 'aw attach' comand. I was able to recreate the error with the following code in a new AW called TEST_AW in the GLOBAL schema.
DEFINE PERMIT_READ PROGRAM BOOLEAN
PROGRAM
aw attach global.global
show global.global!units_cube_stored
return true
ENDAttaching TEST_AW in RO mode as any user gives me the following error.
ORA-34492: Analytic workspace object GLOBAL.GLOBAL!UNITS_CUBE_STORED does not
exist.
ORA-06512: at "SYS.DBMS_AW", line 93
ORA-06512: at "SYS.DBMS_AW", line 122
ORA-06512: at line 1Here is the documentation for PERMIT_READ
>
PERMIT_READ
A PERMIT_READ program is a program that you can create and that Oracle OLAP checks for by name when an AW ATTACH read-only command executes. Depending on the value returned by the program, Oracle OLAP executes the code within the program after attaching the analytic workspace. Depending on the statements in the permit_read program the user is granted or denied access to specific objects or sets of object values. Within permit_read program, you can specify PERMIT commands that grant or restrict access to individual workspace objects. All of the objects referred to in a given permit_read must exist in the same analytic workspace.
>
Note, especially, the restriction in the last sentence. This means that a PERMIT_READ program in AW1, for example, cannot refer to objects in AW2. So this is why my PERMIT_READ doesn't work. The AUTOGO does not have these restrictions, but as we know from the forum post you cited, AUTOGO is broken in 11.2.0.1. You can move forward to 11.2.0.2 where AUTOGO is fixed, but there is workaround, which is to add a PERMIT_READ program to the second AW to do the work. For example, if I add this PERMIT_READ to GLOBAL and remove the 'show' command from the PERMIT_READ in TEST_AW, then everything works as expected.
DEFINE PERMIT_READ PROGRAM BOOLEAN
PROGRAM
if aw(attached 'test_aw')
then do
show global.global!units_cube_stored
doend
return true
END -
Hi,
We are experiencing the following error when trying to retrieve data from the OLAP layer in our front-end:
ORA-34492: Analytic workspace object __XML_GET_FULLTOAW_NAME does not exist.
to be more specific, the following happens:
We are using the Oracle OLAP Java api's to query the analytical workspace. We create a Source object that contains the joins we want. This source is prepared and committed via the TransactionProvider class. Via the DataProvider we then create an SQLCursorManager and generate the SQL and execute it via JDBC.
We were able to execute it without problems on an XP development platform. When switching to another platform that we use, it gives the following error messages:
(platform with the error is Linux x86-64; more version info further down)
Caused by: java.sql.SQLException: ORA-34492: Analytic workspace object __XML_GET_FULLTOAW_NAME does not exist.
ORA-06512: at "SYS.OLAPIMPL_T", line 23
ORA-06512: at "SYS.OLAPIMPL_T", line 17
ORA-06512: at line 4
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:113)
at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:352)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:894)
at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:384)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:984)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1124)
Platform/version info that produces the error:
Linux x86-64
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
OLAP A patch for 10.2.0.3 is applied.
Platform where this works without problems:
Windows XP
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Any info on resolving this issue is greatly appreciated!
Thanks,
EdHi Keith,
Yesterday I actually fully rebuilt/redeployed the AW. (I only patched our 10.2.0.3 installation with the OLAP A patch very recently.) Even the AW's tablespace was recreated, just to make sure everything was gone. Redeployment of the OLAP objects from OWB control center went without any problems.
Let me answer your questions one by one below.
1) How did you build the AW?
We use OWB. The only thing I used AWM for is to actually create the AW. Once created, I use OWB to design and deploy. The front-end developers use AWM sometimes for viewing data in the OLAP objects. (I use OWB or AWM for that.)
2) Can you connect to the AW via AWM, if so can you use the Data Viewer option to view:
a) each dimension and check you can drill up and down.
b) each cube
I have been playing around a bit with the dim's and cubes in the AWM by right-clicking and selecting view data ... (that's the data viewer option?) and encountered no problems.
3) You are using the OLAP API directly, what sort of application are you building - Java Client, JSP, Applet and are you using BI Beans?
We are building a JSP type application, but so far only servlet code is being executed as the failure occurs on issuing the query. We are not using BI BEans.
Thanks for your feedback!
grts,
Ed -
Passing objects by reference in PL/SQL
Hi,
I have come across an unexpected problem using object types in PL/SQL that is causing me some grief. I'm from a Java background and am relatively new to Oracle Objects but what I'm trying to do is fairly trivial, I think. The code below illustrates the problem.
--- cut here ---
CREATE OR REPLACE TYPE test_obj_t AS OBJECT
num INTEGER,
CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT
CREATE OR REPLACE TYPE BODY test_obj_t IS
CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT IS
BEGIN
num := 0;
RETURN;
END;
END;
CREATE OR REPLACE PACKAGE test_obj_ref AS
PROCEDURE init(o IN test_obj_t);
PROCEDURE inc;
FUNCTION get_num RETURN INTEGER;
END;
CREATE OR REPLACE PACKAGE BODY test_obj_ref IS
obj test_obj_t;
PROCEDURE init(o IN test_obj_t) IS
BEGIN
obj := o;
END;
PROCEDURE inc IS
BEGIN
obj.num := obj.num + 1;
END;
FUNCTION get_num RETURN INTEGER IS
BEGIN
RETURN obj.num;
END;
END;
--- cut here ---
The object type test_obj_t holds a integer and the test_obj_ref package holds a 'reference' to an instance of the object.
To test the above code I run this PL/SQL block:
declare
obj test_obj_t;
begin
obj := test_obj_t;
test_obj_ref.init(obj);
dbms_output.put_line('obj.num='||obj.num);
dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
test_obj_ref.inc;
dbms_output.put_line('obj.num='||obj.num);
dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
test_obj_ref.inc;
dbms_output.put_line('obj.num='||obj.num);
dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
end;
giving the output:
obj.num=0
test_obj_ref.get_num=0
obj.num=0
test_obj_ref.get_num=1
obj.num=0
test_obj_ref.get_num=2
It appears that the object held by the test_obj_ref package is being incremented as expected, but I would have expected the object declared in the PL/SQL block to be pointing to the same object and so should report the same incremented values.
I suspect that the object is copied in the call to test_obj_ref.init() so I end up with two object instances, one that is held by the test_obj_ref package and one in the anonymous block. Although, I thought that all IN parameters in PL/SQL are passed by reference and not copied!
Am I right?
Is passing objects by reference possible in PL/SQL, if so how?
I'm using Oracle 10.2.0.3.
Cheers,
Andy.the object being passed to the test_obj_ref.init+ procedure is passed by reference; however, when you assign it to your package variable obj it is being copied to a new instance. you can pass object instances as parameters to procedures using the +IN OUT [NOCOPY]+ *calling mode, in which case modifications to the attributes of the passed object will be reflected in the calling scope's instance variable.
oracle's only other notion of an object reference is the +"REF <object-type>"+ datatype, which holds a reference to an object instance stored in an object table or constructed by an object view.
hope this helps...
gerard -
Xdb_installation_trigger does not support object creation of type SNAPSHOT
hi everyone, i'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit on solaris sparc 5.10
we like to send an email through SSL, and after searching here and there I found out that oracle DB 11g able to go throught the SSL.
since upgrade our DB to 11g would not be an option, so i tried to export XDB of 11g and import it into XDB 10gR2 schema, it was a mess...
then i just reinstall XDB using catnoqm.sql & catqm.sql
and now one of our programmer cant run some script like above
CREATE MATERIALIZED VIEW FIFSYS_MKT_SCHEME_MV_COY
TABLESPACE MARKETING_TABLES
PCTUSED 40
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
+)+
NOCACHE
LOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
REFRESH FORCE ON DEMAND
WITH PRIMARY KEY
AS
+/* Formatted on 9/23/2010 1:07:42 PM (QP5 v5.114.809.3010) */+
SELECT coy_id,
appl_branch_id,
appl_object_code,
product_type,
ppdcf_paid_date,
SUM (scheme_adm) scheme_adm,
SUM (appl_unit) appl_unit,
SYSDATE mkt_sysdate
FROM (SELECT NVL (a.coy_id, '01') coy_id,
a.branch_id appl_branch_id,
DECODE (a.buss_unit, 'NMC', '2101', 'UMC', '2102', '2352')
appl_object_code,
a.platform product_type,
TRUNC (c.contract_active_date) ppdcf_paid_date,
NVL (s.ms_amt, 0) scheme_adm,
NVL (o.total_item, 0) appl_unit
FROM ordmgmt.om_trn_appl_ms_lvl_object s,
ordmgmt.om_trn_appl_hdr a,
acctmgmt.ar_trn_sum_contracts c,
+( SELECT appl_no, COUNT ( * ) total_item+
FROM ordmgmt.om_trn_appl_object
GROUP BY appl_no) o
WHERE s.appl_no = a.appl_no
AND a.appl_no = o.appl_no
AND s.ms_code IN ('MS03', 'MS14')
AND c.appl_no = a.appl_no
AND c.contract_no = a.contract_no
+/*AND c.office_code = a.branch_id*/+
AND NVL (a.coy_id, '01') = NVL (c.coy_id, '01'))
GROUP BY coy_id,
appl_branch_id,
appl_object_code,
product_type,
ppdcf_paid_date;
COMMENT ON MATERIALIZED VIEW FIFSYS_MKT_SCHEME_MV_COY IS 'snapshot table for snapshot MARKETING.FIFSYS_MKT_SCHEME_MV_COY';
and this error shown:
ORA-00604 error occurred at recursive SQL level 1
ORA-20000 Trigger xdb_installation_trigger does not support object creation of type SNAPSHOT
ORA-06512 at line 32
maybe some of you know how to solve this problem??
and, this in the script of the xdb_installation_trigger
DROP TRIGGER SYS.XDB_INSTALLATION_TRIGGER;
CREATE OR REPLACE TRIGGER SYS.xdb_installation_trigger
BEFORE
CREATE ON DATABASE
DECLARE
sql_text varchar2(200);
val number;
BEGIN
if (dictionary_obj_owner != 'XDB') then
if (dictionary_obj_type = 'FUNCTION' or
dictionary_obj_type = 'INDEX' or
dictionary_obj_type = 'PACKAGE' or
dictionary_obj_type = 'PACKAGE BODY' or
dictionary_obj_type = 'PROCEDURE' or
dictionary_obj_type = 'SYNONYM' or
dictionary_obj_type = 'TABLE' or
dictionary_obj_type = 'TABLESPACE' or
dictionary_obj_type = 'TYPE' or
dictionary_obj_type = 'VIEW' or
dictionary_obj_type = 'USER'
+)then+
if (dictionary_obj_type != 'PACKAGE BODY'
+) then+
sql_text := 'select count(*) from ALL_OBJECTS where owner = :1 and object_name = :2 and object_type = :3';
execute immediate sql_text into val using dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type;
if (val = 0) then
sql_text := 'select count(*) from dropped_xdb_instll_tab where owner = :1 and object_name = :2 and object_type = :3';
execute immediate sql_text into val using dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type;
if (val = 0) then
insert into xdb_installation_tab values
+(dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type);+
end if;
end if;
end if;
else
raise_application_error(-20000, 'Trigger xdb_installation_trigger does not support object creation of type '||dictionary_obj_type);
end if;
end if;
end;
+/+
/********************************************************************************/i'm so careless, after checking a fresh installation of the same version DB, i dont found xdb_installation_trigger.
so just by simply remove that trigger & everything works just fine. :) -
Set cursor alv grid (not using objects)
I got a question on ALV GRID (not using objects), please let me know if you have pointers. Thanks.
Output has 2 screens both has different contents. The output is generated using internal table1 and 2 and using FM 'REUSE_ALV_GRID_DISPLAY_LVC' (both screen use same FM).
First screen has multiple pages of output (say 10 pages). User scrolled page 5 and line 10 of first screen and then double clicked it takes to screen #2. After completion of screen #2, the back arrow should get back to page 5 and line 10 of screen #1. Currently the back arrow gets to screen#1 page 1 and line 1. How to remember the cursor position in alv grid and instruct the cursor to go there?
Appreciate the input.
Note: I tried "set cursor line n" with "Scroll" command but no luck. http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htmThanks for the inputs.
FYI, I got it implemented using method CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
The method is called by 'REUSE_ALV_GRID_DISPLAY_LVC' form 'PF_STATUS_SET' when the ALV grid output is presented each time.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_bypassing_buffer = 'X'
i_callback_program = gc_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = lwa_layout
it_fieldcat_lvc = git_fc_lvc
i_default = ' '
TABLES
t_outtab = git_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM alv_event_pf_status_set USING rt_extab
TYPE slis_t_extab.
DATA lo_ref1 TYPE REF TO cl_gui_alv_grid.
*Get the reference to class "lo_ref1" for the ALV report
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lo_ref1.
*set the focus of cursor in ALV
CALL METHOD lo_ref1->set_current_cell_via_id
EXPORTING
is_row_no = gv_row. "row number where you want to focus the cursor
ENDFORM. -
I want to show a status bar that needs to be persistent on a page. for this I used the following in my master page
function ShowStatusBarMessage(title, message)
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, 'yellow'); /* Set a status-color */
HTML, call the JS method:
<a onclick="ShowStatusBarMessage('Title'!','Awesome message!')">
Display Status Bar message!
</a>
ref:
http://www.zimmergren.net/archive/2010/03/17/sp-2010-dynamically-displaying-messages-to-your-users-with-the-notification-and-status-bar-areas-in-sharepoint-2010.aspx
But what I want is
to call the function on load. So I used pushed ny function to _spBodyOnLoadWrapper using _spBodyOnLoadFunctionNames.push("YourFunctionName");,
it throws an error 'SP.UI.Status' is null or not an object
Next I created and
deployed a webcontrol and did a registerclientscript, that too gives me 'SP.UI.Status' is null or not an object
// Define the name and type of the client scripts on the page.
String csname1 = "AlertScript";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
StringBuilder cstext1 = new StringBuilder();
cstext1.Append("<script type=text/javascript> alert('Hello World!');");
cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
cstext1.Append("script>");
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
What am I missing ?
How can I get to show a status bar on load of any page, just as you get a health analyzer message when you get into the Central Admin?
Thanks, Mano
Mano Mangaldas | Blog : http://howtosharepoint.blogspot.comOk, for some reason, it is not working for me. Below are the code that didnt work for me
<script type="text/javascript">
function ShowStatusBarMessage(title, message)
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, 'red');
ShowStatusBarMessage('Title!','Awesome message!');
</script>
This too didnt work
<script type="text/javascript">
function ShowStatusBarMessage()
var statusId = SP.UI.Status.addStatus('Some title', 'Some message', true);
SP.UI.Status.setStatusPriColor(statusId, 'red');
_spBodyOnLoadFunctionNames.push("ShowStatusBarMessage");
</script>
I did try to register client script block programatically, that too didnt work
String csname1 = "AlertScript";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
StringBuilder cstext1 = new StringBuilder();
cstext1.Append("<script type=text/javascript>");
cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
cstext1.Append("script>");
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
Any help appreciated.
But the below code works..
<script type="text/javascript">
function ShowStatusBarMessage(title, message)
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, 'yellow'); /* Set a status-color */
</script>
<a onclick="ShowStatusBarMessage('Title!','Awesome message!')" href="#">
Display Status Bar message!
</a>
Thanks
mano
Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com -
Error message, "undefined is not an object" when exporting book to Digital Editions
I have created a book file complete with a TOC and but cannot export to Digital Editions. I keep getting the error message, "undefined is not an object." I've attempted to create new book files in several different ways, but continue to get the same error. Any help would be greatly appreciated.
TriciaHI!
I'm getting the same message error with reference to the check on TOC just before exporting in digital editions. Yes I tried in many ways but I'm working on a MAC and I cannot change the computer because of fonts. Is there anyway to clean the cash memory of InDesign? Thanks!!! -
Does Java pass objects by Reference
The following is my code:
public static boolean isValid(String tester, Integer intHours, Integer intMinutes)
int dotPosition = tester.indexOf('.');
String hours = tester.substring(0, dotPosition);
String minutes = tester.substring(dotPosition +1, tester.length());
try {
intHours = Integer.valueOf(hours);
intMinutes = Integer.valueOf(minutes);
} catch (NumberFormatException nfe) {
return false;
return true;
What Iam trying to do is pass the Integer Objects by reference so that they retain their values outside of the scope of the function. My teacher told me that objects are passed by reference in Java but (even though the values are being changed within the function they are not retaining their values outside the scope of the function. Was my teacher wrong?aden_jones wrote:
So to get behaviour similar to passing by reference I would need to create my own object and give it a method e.g. MyObject.changeValue(new_value) but I can't do that with Integer objects because I can't change their actual value I can only change the Integer Object that is being pointed at??You cannot achieve behavior that duplicates PBR with Java.
However, if by "similar to passing by reference" you mean that the method makes a change that the caller can see, then, yes, you need to pass a reference to a mutable object, and change that object's state inside the method.
void foo(Bar bar) {
bar.setBaz(123);
Bar bar = new Bar();
bar.setBaz(999);
foo(bar);
// after foo() completes, the caller now sees that the Bar object's internal state has changed
// from 999 to 123Note the difference between changing the value of a caller's variable (which can be done with PBR, and cannot be done in Java) and changing the state of the single object pointed to by both the caller's variable and the method's copy of that variable (which can be accomplished in Java, as it does not rely on PBR). -
ODI-1228: ORA-22950: cannot ORDER objects without MAP or ORDER method
Simple interface between two schemas in the same oracle database (10g)
I am trying to copy one table and do one simple lookup (in a table located in 3rd schema on the same database)
Integration task fails on
ODI-1228: Task messagexml_document (Integration) fails on the target ORACLE connection S2_P1.
Caused By: java.sql.SQLException: ORA-22950: cannot ORDER objects without MAP or ORDER method
Can anybody tell me, what I am doing wrong? Code that generate this error is just a simple INSERT with SELECT and sub SELECT with JOIN?
I just can't find anything about this error.
I'm stuck :-(I discovered that one of my fields is an XMLType field and is a part of comparison ODI do when it tries to do incremental update. The error message here is just a message from db that it can't compare XMLType fields to each other.
Is there any way to learn ODI to not to compare by XMLType field?
Maybe you are looking for
-
This problem has been apparent for some time in Firefox and has not been fixed in version 22. The scrolling using PgDn key works smoothly in Internet Explorer.
-
Wireless Security - DOES NOT WORK?
My problem: AEBS works fine UNLESS I use any Wireless Security. If I set security to WEP, WPA/WPA2 Personal, or WPA2 Personal then the following occurs: -- the AEBS DOES NOT appear as a base station in AirPort Utility -- the Wireless Network DOES app
-
Im useing a nokia e63 when i try useing pc to web on my pc it says no network availible even when my phone is connected to web HELP PLEASE.
-
How do I cure uneven playback?
When I'm sharing my movie from Final Cut Pro X (10.1.4) to pretty much any format, I'm getting very uneven playback of scenes. I may not have set it up right at the start - but now I'm several hundred cuts into this so I can't redo it. I haven't rend
-
Where does flash install to?
I'm trying to get this script to work, but other than /Library/Internet Plug-ins, where does flash install? This the line of code I'm trying to use: /usr/sbin/installer -pkg /Volumes/Updates\ Player/Install\ Adobe\ Flash\ Player.app/Contents/Resource