Doubt in Cursor
Hi,
I want to populate a table with table name and total number of rows for all tables in the database.
code is:
1 declare
2 cursor c1 is select table_name from user_tables;
3 l_count number;
4 begin
5 for mvr in c1
6 loop
7 select count(*) into l_count where table=mvr.table_name;
8 insert into x values(mvr.table_name,l_count);
9 end loop;
10 end;
The pbm is on line 7...mvr.table_name should be declared...
Pls guide me..
Adios..
Another solution with pipelined function (since 9i database)
CREATE TYPE TYP_TB_COUNT AS OBJECT ( table_name VARCHAR2(30), total NUMBER(10) )
CREATE TYPE TYP_TAB_TB_COUNT AS TABLE OF TYP_TB_COUNT
CREATE OR REPLACE FUNCTION Table_Raw_Count (cur_lig in SYS_REFCURSOR)
RETURN TYP_TAB_TB_COUNT PIPELINED
IS
Col TYP_TB_COUNT := TYP_TB_COUNT (NULL,NULL) ;
Rec USER_TABLES%ROWTYPE ;
Tot NUMBER(10) ;
Begin
Loop
Fetch cur_lig into Rec ;
Exit When cur_lig%NOTFOUND ;
Col.table_name := Rec.table_name ;
execute immediate 'SELECT COUNT(*) FROM ' || Rec.table_name INTO Tot ;
Col.total := Tot ;
-- Returns the value--
PIPE ROW( Col ) ;
End loop ;
Return ;
End ;
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> Select table_name, total from table(Table_Raw_Count(CURSOR(Select * from USER_TABLES)))
2 /
TABLE_NAME TOTAL
STOCK 0
TEST_CLOB 1
BINAIRES 2
IMAGES 0
TEST_ROWNUM 4
TEST 1
TEST_TREE 7
TEMPERATURES 24
PHOTOS_EXT 1
PHOTOS 7
MESSAGES 7
TABLE_NAME TOTAL
MARS 5
JANVIER 5
FEVRIER 5
EMP 14
DEPT 4
ARTICLES 3
BIN_DOCS 2
TRACE 0
19 rows selected.
SQL> Francois
Similar Messages
-
Doubt regarding CURSORS in PRO*C
Hi all,
I have a problem with cursors in proc
1. Can i declare a cursor and with in it another cursor in proc
like
EXEC SQL DECLARE emp_cursor CURSOR FOR
SELECT ........;
EXEC SQL OPEN emp_cursor;
for(;;)
EXEC SQL FETCH emp_cursor INTO :emp_structure;
EXEC SQL DECLARE dept_cursor FOR
SELECT ...............;
EXEC SQL OPEN dept_cursor;
for(;;)
EXEC SQL FETCH dept_cursor INTO :dept_structure;
EXEC SQL CLOSE dept_cursor;
EXEC SQL CLOSE emp_cursor;
2. im getting the following error after getting an result
ORA-01405: fetched column value is NULL
though i dont have any null columns.
please help me in this regard,
Trinath Somanchi,
Hyderabad.
Message was edited by:
Trinath SomanchiHi all,
I have a problem with cursors in proc
1. Can i declare a cursor and with in it another cursor in proc
like
EXEC SQL DECLARE emp_cursor CURSOR FOR
SELECT ........;
EXEC SQL OPEN emp_cursor;
for(;;)
EXEC SQL FETCH emp_cursor INTO :emp_structure;
EXEC SQL DECLARE dept_cursor FOR
SELECT ...............;
EXEC SQL OPEN dept_cursor;
for(;;)
EXEC SQL FETCH dept_cursor INTO :dept_structure;
EXEC SQL CLOSE dept_cursor;
EXEC SQL CLOSE emp_cursor;
2. im getting the following error after getting an result
ORA-01405: fetched column value is NULL
though i dont have any null columns.
please help me in this regard,
Trinath Somanchi,
Hyderabad.
Message was edited by:
Trinath Somanchi -
Hi All,
While looking for cursor explanation in forums, I have encountered this sentence regularly. Can any one read and help me understanding this.........""If the addition WITH HOLD is specified, the database cursor is not closed in an explicitly triggered database commit or database rollback, for example Native SQL. The addition WITH HOLD cannot be specified if the cursor is to be opened for a secondary database connection"".
Again I dont get a real practical explanation on cursors. Its all the same bookish language everywhere. Please Help.
Thanks.Hi,
When you execute a select on any table, a cursor will be opened and data is fetched against this and closed at the end.
I have given similar explanation in below link.
BDC commit work issue.
Activate trace in ST05, Execute any select statement through any program, go back to St05, deactivate trace and display trace.
Here you can see the execution plan that has happened at the back end.
OPEN CURSOR
FETCH
CLOSE CURSOR.
Once system encounters COMMIT, all the cursors opened will be closed. So if you try to use fetch after the commit, it leads to dump. Just write a sample code as below and execute step by step. You can understand.
TABLES: mara.
SELECT * from MARA.
WRITE: /1 mara-matnr.
COMMIT WORK.
ENDSELECT.
Secondary database can be accessed via NATIVE SQL statements.
EXEC.
Native SQL statements.
ENDEXEC.
In this case you can't use with hold.
Thanks,
Vinod. -
Hello All,
I have a doubt regarding Cursor bulk collect. Both the versions are working fine.
1st Version:
DECLARE
CURSOR c1 IS (SELECT t2 FROM test10);
TYPE typ_tbl IS TABLE OF c1%rowtype;
v typ_tbl;
BEGIN
OPEN c1;
FETCH c1 BULK COLLECT INTO v;
CLOSE c1;
FOR i IN v.first..v.last
LOOP
DBMS_OUTPUT.PUT_LINE(v(i).t2);
END LOOP;
END;
2nd version:
DECLARE
CURSOR c1 IS (SELECT t2 FROM test10);
TYPE typ_tbl IS TABLE OF c1%rowtype;
v typ_tbl;
BEGIN
OPEN c1;
LOOP --Loop added
FETCH c1 BULK COLLECT INTO v;
EXIT WHEN c1%NOTFOUND;
END LOOP;
CLOSE c1;
FOR i IN v.first..v.last
LOOP
DBMS_OUTPUT.PUT_LINE(v(i).t2);
END LOOP;
END; Is it necessary to have a loop and exit when cursor notfound statementwhen used with Bulk Collect?
Edited by: SamFisher on Feb 14, 2012 1:26 PMEchoing Tubby, if you do a BULK COLLECT without a LIMIT (unless you are certain that the result set is going to be trivially small), you're doing something wrong. If you code your own loop using explicit cursors, you should always do something like
OPEN cursor_name;
LOOP
FETCH cursor_name
BULK COLLECT INTO collection_name
LIMIT some_limit;
EXIT WHEN collection_name.count = 0;
<<do something with the collection>>
END LOOP;
CLOSE cursor_name;Unless your <<do something>> happens to be doing a FORALL using the collection you just populated, an implicit cursor is going to involve a lot less code (and a lot fewer places where you can potentially create a bug) and isn't going to be noticably slower. The most efficient LIMIT for your bulk collect is generally somewhere between 100 and 1000 so the implicit cursor's limit of 100 is generally pretty close to optimal. You might get marginally more performance by explicitly tuning the LIMIT for your particular process. But once you've eliminated 99% of the time spend on context shifts by letting the implicit cursor fetch in groups of 100, it's relatively unlikely that you're going to see any noticable performance improvements from eliminating the last 1% of context shift time. Since Oracle is going to spend more time managing the collection the larger it gets (particularly depending on how you use the collection), performance starts going down at some point once the LIMIT is too large.
Justin -
hi all
i am trying to automate an application using windows services
i have written a small code in .net which compares
the max timestamp with the source and brings the data from the remote switch
in short appending the data
now the application works fine
but as it is a critical application
and i new to the programming world i don want to take any risk
can any one just point out some points of failure
now the possible problem according to me might be
the link going down at the time of transfer
for that i used the timestamp so that at the next execution records are fetched after the last timestamp and no records are missed
also i have some doubts over cursor if i am using cursors
and records are getting inserted into the database from the records selected by the cursors does the records get inserted sequentially ie as per the timestamp
or i have to use order byhey
thanks for the reply even i felt so
i don have much idea about how to do the automation
using oracle
can you just guide me with some links or material
so that i can understand how it can be done
or even the topics name would be fine because i have no clue where to start from
also one more logical question i might sound silly but need to ask
suppose i have billions of record with timestamp as one field
now the records that i select for processing are selected by comparing the timestamp so i guess if all the records are compared with every record in the source than it will slow the process
is there any way wherein if the processing is for suppose for
march than the records are not compared with the previous months data
will partitioning help
if yes can i know where can i learn more about partitioning -
Dear All,
I got a doubt b/n select and cursor.
I read in one oracle book that select into clause will actually tries to get the data twice, Whereas the cursor will query only ones.
Is this the case in Oracle 10g or both the select and cursor will fetch the data only ones.
Ex
select sal into v_sal from emp where empno = 7788 --> Ones it hit the data, oracle will again scan the entire set of records in the emp table for another match.
Whereas
Cursor c_sal is select sal from emp where empno = 7788; --> This will do the fetch operation only ones.
Is this the case still True in Oracle 10g or 11i.
Appreciate your help.
Thankyou very much
Madhu Kthe query is processed as follows (this is from ora doc)
Parse:
– Search for identical statement
– Check syntax, object names, and privileges
– Lock objects used during parse
– Create and store execution plan
Execute: Identify rows selected
Fetch: Return rows to user process
for cursor also same things are performed, but cursor is private sql area in which you can processes one row at a time, you can use cursor in your pl/sql program and access one row a time,
so if you say,
cursor c1 is select * from emp;
c1 is private sql area where you can processes single row of emp , make comparisons, calculations etc,
once you close the cursor this area is released and can be used by another cursor,
the basic query processing rules remains the same, -
Quick doubt.. from cursor vairable how to get into page vairable
Hello
i am creating an apex page where i have 2 regions. From the Top region stores all fields entered into the bottom region
Text fields like first name and last name and address fields are in region 2(bottom).After region 2, i have a add person button.
Once i click add person, that person will get into top i.e region 1.
Now, Region 1 got person1 first name ,last name
person2, first name,last name
etc..
I am not able to display like p1_first_name,p1_laast_name as the list is not stable..it is growing and not showing the person who already got saved..I can retrieve them from DB using a cursor..But from cursor vairable how to get into page vairable..
appreciate ur help..
kpYour explanation is not good enough. You have to make a better description of your problem or create an example at apex.oracle.com.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
Hi friends i have doubt on set cursor.
i am using dialog programming. here in the first text field i am auto generating the number, so user should only suppose to enter the values for other repective fields only.but in execution the cursor is positioning at the first field. it should start from the second and so on.
i tried using SET CURSOR FIELD F2. but tbe result is same. please provide me guidence on this.Hi,
In the PBO of the dialog module,write the following code :
SET CURSOR FIELD `FIELD2`.
Remember the FIELD2 is the name assigned to the textbox of the screen.
Best regards,
Prashant
PS : Please reward all helpful answers -
hi,
in this below procedure i want to use bulk collect and for all.
i want to create pl/sql table for every column or any other way is there?
plese help.
PROCEDURE sp_update_cust_statement(P_ou_code POS_TRAN_HEADER.ou_code%type ,P_uploadid POS_TRAN_HEADER.uploadid%type) IS
v_point_bal CUST_ACC_STMT.POINTS_BAL%TYPE;
v_cust_id CUST_ACC_STMT.CUST_ACC_ID%TYPE;
BEGIN
SELECT nvl(MAX(NVL(CUST_ACC_ID,1)),0)+ 1 INTO v_cust_id FROM CUST_ACC_STMT;
FOR cur_rec_C_HEAD IN (SELECT *
FROM POS_TRAN_HEADER
WHERE ou_code = P_ou_code and
uploadid = P_uploadid
ORDER BY ACC_NUM,INV_NUM)
LOOP
-- EXIT WHEN SQL%NOTFOUND;
--get the already available basic points for account number
v_point_bal :=pkg_point_calculation_new.fnc_get_balancepts(cur_rec_C_HEAD .acc_num);
INSERT INTO CUST_ACC_STMT(CUST_ACC_ID ,
TRAN_OU ,
ACC_NUM ,
CARD_NUM ,
CUST_TIER ,
TRAN_DATE ,
SHOP_CODE ,
INV_NUM ,
INV_NET_AMT ,
INV_GROSS_AMT ,
TRAN_TYPE ,
TRAN_REMARKS ,
POINTS ,
POINTS_AVAIL,
POINTS_USED ,
POINTS_BAL ,
REMARKS1 ,
REMARKS2 ,
REMARKS3 ,
ACTIVE_FLG ,
LAST_MOD_USER ,
LAST_MOD_DATETIME )
VALUES ( v_cust_id ,
cur_rec_C_HEAD .OU_CODE,
cur_rec_C_HEAD .acc_num,
cur_rec_C_HEAD .CARD_num,
'1',
cur_rec_C_HEAD .INV_DATE,
cur_rec_C_HEAD .SHOP_CODE,
cur_rec_C_HEAD .INV_NUM,
cur_rec_C_HEAD .INV_NET_AMT,
cur_rec_C_HEAD .INV_GROSS_AMT,
'B',
'Basic points',
cur_rec_C_HEAD .BASIC_PTS,
cur_rec_C_HEAD .BASIC_PTS,
0,
v_point_bal + cur_rec_C_HEAD .BASIC_PTS,
NULL,
NULL,
NULL,
'Y',
'BATCH',
SYSDATE);
END LOOP;
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
NULL;
END sp_update_cust_statement;Your formatted code looks like this.
PROCEDURE sp_update_cust_statement
P_ou_code POS_TRAN_HEADER.ou_code%type ,
P_uploadid POS_TRAN_HEADER.uploadid%type
IS
v_point_bal CUST_ACC_STMT.POINTS_BAL%TYPE;
v_cust_id CUST_ACC_STMT.CUST_ACC_ID%TYPE;
BEGIN
SELECT nvl(MAX(NVL(CUST_ACC_ID,1)),0)+ 1
INTO v_cust_id
FROM CUST_ACC_STMT;
FOR cur_rec_C_HEAD IN (SELECT *
FROM POS_TRAN_HEADER
WHERE ou_code = P_ou_code
AND uploadid = P_uploadid
ORDER BY ACC_NUM,INV_NUM)
LOOP
--get the already available basic points for account number
v_point_bal :=pkg_point_calculation_new.fnc_get_balancepts(cur_rec_C_HEAD .acc_num);
INSERT INTO CUST_ACC_STMT
CUST_ACC_ID ,
TRAN_OU ,
ACC_NUM ,
CARD_NUM ,
CUST_TIER ,
TRAN_DATE ,
SHOP_CODE ,
INV_NUM ,
INV_NET_AMT ,
INV_GROSS_AMT ,
TRAN_TYPE ,
TRAN_REMARKS ,
POINTS ,
POINTS_AVAIL,
POINTS_USED ,
POINTS_BAL ,
REMARKS1 ,
REMARKS2 ,
REMARKS3 ,
ACTIVE_FLG ,
LAST_MOD_USER ,
LAST_MOD_DATETIME
VALUES
v_cust_id ,
cur_rec_C_HEAD .OU_CODE,
cur_rec_C_HEAD .acc_num,
cur_rec_C_HEAD .CARD_num,
'1',
cur_rec_C_HEAD .INV_DATE,
cur_rec_C_HEAD .SHOP_CODE,
cur_rec_C_HEAD .INV_NUM,
cur_rec_C_HEAD .INV_NET_AMT,
cur_rec_C_HEAD .INV_GROSS_AMT,
'B',
'Basic points',
cur_rec_C_HEAD .BASIC_PTS,
cur_rec_C_HEAD .BASIC_PTS,
0,
v_point_bal + cur_rec_C_HEAD .BASIC_PTS,
NULL,
NULL,
NULL,
'Y',
'BATCH',
SYSDATE
END LOOP;
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END sp_update_cust_statement;Point 1:
Removed the WHEN OTHERS THEN NULL part of your code. I have removed it here. Its too Dangerous.
Point 2:
v_point_bal :=pkg_point_calculation_new.fnc_get_balancepts(cur_rec_C_HEAD .acc_num);Here you are passing acc_num to the function 1 by 1. If you use bulk collect how are you trying to modify your code?
Point 3:
If you want to use FORALL then you need to have separate collection types for each field that you want to associate in the operation. You cant just have a single table type of records. You will get the following error
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND
table of recordsThanks,
Karthick.
Edited by: Karthick_Arp on Jan 26, 2009 9:31 PM -
New Install - startx results in blank screen with mouse cursor
I installed Arch on my desktop last week with no issues, so I wanted to install it on an old THinkpad R31. Everything with the installation went smooth, but when I try to 'startx' all I get is a blank screen with a mouse cursor that I can move around. I've installed xorg-xinit, xorg-twm, xorg-xclock, and xterm.
I'm not getting any significant errors in the logs, or even the terminal I issue 'startx' in.
I'm not sure what the problem could be...
Here is my output from 'startx'
X.Org X Server 1.13.0
Release Date: 2012-09-05
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.6.0-1-ARCH i686
Current Operating System: Linux x_00294-ibc 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:33:50 CEST 2012 i686
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=ec6a9a60-8d8c-4de0-960b-9e2a044d0ca5 ro quiet
Build Date: 05 October 2012 02:01:30PM
Current version of pixman: 0.26.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Oct 13 09:26:12 2012
(==) Using config directory: "/etc/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
xinit: connection to X server lost
waiting for X server to shut down XIO: fatal IO error 0 (Success) on X server ":0"
after 554 requests (554 known processed) with 0 events remaining.
xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0"
xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0"
xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0"
Server terminated successfully (0). Closing log file.
xinit: unexpected signal 2
And my Xorg.0.log
[ 4955.478]
X.Org X Server 1.13.0
Release Date: 2012-09-05
[ 4955.479] X Protocol Version 11, Revision 0
[ 4955.479] Build Operating System: Linux 3.6.0-1-ARCH i686
[ 4955.479] Current Operating System: Linux x_00294-ibc 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:33:50 CEST 2012 i686
[ 4955.479] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=ec6a9a60-8d8c-4de0-960b-9e2a044d0ca5 ro quiet
[ 4955.479] Build Date: 05 October 2012 02:01:30PM
[ 4955.479]
[ 4955.479] Current version of pixman: 0.26.2
[ 4955.479] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 4955.479] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 4955.480] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Oct 13 09:26:12 2012
[ 4955.480] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 4955.480] (==) No Layout section. Using the first Screen section.
[ 4955.480] (==) No screen section available. Using defaults.
[ 4955.480] (**) |-->Screen "Default Screen Section" (0)
[ 4955.480] (**) | |-->Monitor "<default monitor>"
[ 4955.481] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 4955.481] (==) Automatically adding devices
[ 4955.481] (==) Automatically enabling devices
[ 4955.481] (==) Automatically adding GPU devices
[ 4955.481] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[ 4955.481] Entry deleted from font path.
[ 4955.481] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[ 4955.481] Entry deleted from font path.
[ 4955.481] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[ 4955.481] Entry deleted from font path.
[ 4955.481] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[ 4955.481] Entry deleted from font path.
[ 4955.481] (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[ 4955.481] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[ 4955.481] Entry deleted from font path.
[ 4955.481] (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[ 4955.481] (==) FontPath set to:
/usr/share/fonts/misc/
[ 4955.481] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 4955.481] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 4955.481] (II) Loader magic: 0x825a620
[ 4955.482] (II) Module ABI versions:
[ 4955.482] X.Org ANSI C Emulation: 0.4
[ 4955.482] X.Org Video Driver: 13.0
[ 4955.482] X.Org XInput driver : 18.0
[ 4955.482] X.Org Server Extension : 7.0
[ 4955.484] (II) config/udev: Adding drm device (/dev/dri/card0)
[ 4955.486] (--) PCI:*(0:0:2:0) 8086:3577:1014:0505 rev 4, Mem @ 0x98000000/134217728, 0x90100000/524288
[ 4955.486] (--) PCI: (0:0:2:1) 8086:3577:1014:0505 rev 0, Mem @ 0x88000000/134217728, 0x80200000/524288
[ 4955.486] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 4955.486] Initializing built-in extension Generic Event Extension
[ 4955.486] Initializing built-in extension SHAPE
[ 4955.486] Initializing built-in extension MIT-SHM
[ 4955.486] Initializing built-in extension XInputExtension
[ 4955.486] Initializing built-in extension XTEST
[ 4955.486] Initializing built-in extension BIG-REQUESTS
[ 4955.486] Initializing built-in extension SYNC
[ 4955.487] Initializing built-in extension XKEYBOARD
[ 4955.487] Initializing built-in extension XC-MISC
[ 4955.487] Initializing built-in extension SECURITY
[ 4955.487] Initializing built-in extension XINERAMA
[ 4955.487] Initializing built-in extension XFIXES
[ 4955.487] Initializing built-in extension RENDER
[ 4955.487] Initializing built-in extension RANDR
[ 4955.487] Initializing built-in extension COMPOSITE
[ 4955.487] Initializing built-in extension DAMAGE
[ 4955.487] Initializing built-in extension MIT-SCREEN-SAVER
[ 4955.487] Initializing built-in extension DOUBLE-BUFFER
[ 4955.487] Initializing built-in extension RECORD
[ 4955.487] Initializing built-in extension DPMS
[ 4955.487] Initializing built-in extension X-Resource
[ 4955.487] Initializing built-in extension XVideo
[ 4955.487] Initializing built-in extension XVideo-MotionCompensation
[ 4955.487] Initializing built-in extension XFree86-VidModeExtension
[ 4955.487] Initializing built-in extension XFree86-DGA
[ 4955.487] Initializing built-in extension XFree86-DRI
[ 4955.487] Initializing built-in extension DRI2
[ 4955.487] (II) LoadModule: "glx"
[ 4955.488] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 4955.489] (II) Module glx: vendor="X.Org Foundation"
[ 4955.489] compiled for 1.13.0, module version = 1.0.0
[ 4955.489] ABI class: X.Org Server Extension, version 7.0
[ 4955.489] (==) AIGLX enabled
[ 4955.489] Loading extension GLX
[ 4955.489] (==) Matched intel as autoconfigured driver 0
[ 4955.489] (==) Matched intel as autoconfigured driver 1
[ 4955.489] (==) Matched vesa as autoconfigured driver 2
[ 4955.489] (==) Matched modesetting as autoconfigured driver 3
[ 4955.489] (==) Matched fbdev as autoconfigured driver 4
[ 4955.489] (==) Assigned the driver to the xf86ConfigLayout
[ 4955.489] (II) LoadModule: "intel"
[ 4955.490] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 4955.491] (II) Module intel: vendor="X.Org Foundation"
[ 4955.491] compiled for 1.13.0, module version = 2.20.9
[ 4955.491] Module class: X.Org Video Driver
[ 4955.491] ABI class: X.Org Video Driver, version 13.0
[ 4955.491] (II) LoadModule: "vesa"
[ 4955.491] (WW) Warning, couldn't open module vesa
[ 4955.491] (II) UnloadModule: "vesa"
[ 4955.492] (II) Unloading vesa
[ 4955.492] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 4955.492] (II) LoadModule: "modesetting"
[ 4955.492] (WW) Warning, couldn't open module modesetting
[ 4955.492] (II) UnloadModule: "modesetting"
[ 4955.492] (II) Unloading modesetting
[ 4955.492] (EE) Failed to load module "modesetting" (module does not exist, 0)
[ 4955.493] (II) LoadModule: "fbdev"
[ 4955.493] (WW) Warning, couldn't open module fbdev
[ 4955.493] (II) UnloadModule: "fbdev"
[ 4955.493] (II) Unloading fbdev
[ 4955.493] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 4955.493] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
Sandybridge Desktop (GT1), Sandybridge Desktop (GT2),
Sandybridge Desktop (GT2+), Sandybridge Mobile (GT1),
Sandybridge Mobile (GT2), Sandybridge Mobile (GT2+),
Sandybridge Server, Ivybridge Mobile (GT1), Ivybridge Mobile (GT2),
Ivybridge Desktop (GT1), Ivybridge Desktop (GT2), Ivybridge Server,
Ivybridge Server (GT2), Haswell Desktop (GT1), Haswell Desktop (GT2),
Haswell Desktop (GT2+), Haswell Mobile (GT1), Haswell Mobile (GT2),
Haswell Mobile (GT2+), Haswell Server (GT1), Haswell Server (GT2),
Haswell Server (GT2+), Haswell SDV Desktop (GT1),
Haswell SDV Desktop (GT2), Haswell SDV Desktop (GT2+),
Haswell SDV Mobile (GT1), Haswell SDV Mobile (GT2),
Haswell SDV Mobile (GT2+), Haswell SDV Server (GT1),
Haswell SDV Server (GT2), Haswell SDV Server (GT2+),
Haswell ULT Desktop (GT1), Haswell ULT Desktop (GT2),
Haswell ULT Desktop (GT2+), Haswell ULT Mobile (GT1),
Haswell ULT Mobile (GT2), Haswell ULT Mobile (GT2+),
Haswell ULT Server (GT1), Haswell ULT Server (GT2),
Haswell ULT Server (GT2+), Haswell CRW Desktop (GT1),
Haswell CRW Desktop (GT2), Haswell CRW Desktop (GT2+),
Haswell CRW Mobile (GT1), Haswell CRW Mobile (GT2),
Haswell CRW Mobile (GT2+), Haswell CRW Server (GT1),
Haswell CRW Server (GT2), Haswell CRW Server (GT2+),
ValleyView PO board
[ 4955.496] (--) using VT number 7
[ 4955.508] (II) intel(0): using device path '/dev/dri/card0'
[ 4955.509] (II) intel(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 4955.509] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[ 4955.509] (==) intel(0): RGB weight 888
[ 4955.509] (==) intel(0): Default visual is TrueColor
[ 4955.509] (--) intel(0): Integrated Graphics Chipset: Intel(R) i830M
[ 4955.509] (**) intel(0): Relaxed fencing disabled
[ 4955.509] (**) intel(0): Wait on SwapBuffers? enabled
[ 4955.509] (**) intel(0): Triple buffering? enabled
[ 4955.509] (**) intel(0): Framebuffer tiled
[ 4955.510] (**) intel(0): Pixmaps tiled
[ 4955.510] (**) intel(0): 3D buffers tiled
[ 4955.510] (**) intel(0): SwapBuffers wait enabled
[ 4955.510] (==) intel(0): video overlay key set to 0x101fe
[ 4955.593] (II) intel(0): Output VGA1 has no monitor section
[ 4955.593] (II) intel(0): Output LVDS1 has no monitor section
[ 4955.594] (--) intel(0): found backlight control interface /sys/class/backlight/thinkpad_screen
[ 4955.676] (II) intel(0): EDID for output VGA1
[ 4955.677] (II) intel(0): Printing probed modes for output VGA1
[ 4955.677] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 4955.677] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 4955.677] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz e)
[ 4955.677] (II) intel(0): Modeline "848x480"x60.0 33.75 848 864 976 1088 480 486 494 517 +hsync +vsync (31.0 kHz e)
[ 4955.677] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 489 492 525 -hsync -vsync (31.5 kHz e)
[ 4955.677] (II) intel(0): EDID for output LVDS1
[ 4955.677] (II) intel(0): Not using default mode "320x240" (doublescan mode not supported)
[ 4955.677] (II) intel(0): Not using default mode "400x300" (doublescan mode not supported)
[ 4955.677] (II) intel(0): Not using default mode "400x300" (doublescan mode not supported)
[ 4955.677] (II) intel(0): Not using default mode "512x384" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "640x480" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "640x512" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "800x600" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "896x672" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "928x696" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "960x720" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Not using default mode "700x525" (doublescan mode not supported)
[ 4955.678] (II) intel(0): Printing probed modes for output LVDS1
[ 4955.678] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 +hsync +vsync (48.4 kHz P)
[ 4955.678] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz d)
[ 4955.678] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz d)
[ 4955.678] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz d)
[ 4955.678] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz d)
[ 4955.678] (II) intel(0): Output VGA1 connected
[ 4955.678] (II) intel(0): Output LVDS1 connected
[ 4955.678] (II) intel(0): Using exact sizes for initial modes
[ 4955.678] (II) intel(0): Output VGA1 using initial mode 1024x768
[ 4955.678] (II) intel(0): Output LVDS1 using initial mode 1024x768
[ 4955.678] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[ 4955.678] (II) intel(0): Kernel page flipping support detected, enabling
[ 4955.678] (==) intel(0): DPI set to (96, 96)
[ 4955.678] (II) Loading sub module "fb"
[ 4955.678] (II) LoadModule: "fb"
[ 4955.679] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 4955.679] (II) Module fb: vendor="X.Org Foundation"
[ 4955.679] compiled for 1.13.0, module version = 1.0.0
[ 4955.679] ABI class: X.Org ANSI C Emulation, version 0.4
[ 4955.679] (II) Loading sub module "dri2"
[ 4955.679] (II) LoadModule: "dri2"
[ 4955.680] (II) Module "dri2" already built-in
[ 4955.680] (==) Depth 24 pixmap format is 32 bpp
[ 4955.680] (II) intel(0): [DRI2] Setup complete
[ 4955.680] (II) intel(0): [DRI2] DRI driver: i915
[ 4955.680] (II) intel(0): Allocated new frame buffer 1024x768 stride 4096, tiled
[ 4955.680] (II) UXA(0): Driver registered support for the following operations:
[ 4955.680] (II) solid
[ 4955.680] (II) copy
[ 4955.680] (II) composite (RENDER acceleration)
[ 4955.680] (II) put_image
[ 4955.680] (II) get_image
[ 4955.680] (==) intel(0): Backing store disabled
[ 4955.680] (==) intel(0): Silken mouse enabled
[ 4955.681] (II) intel(0): Initializing HW Cursor
[ 4955.681] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 4955.684] (==) intel(0): DPMS enabled
[ 4955.684] (==) intel(0): Intel XvMC decoder disabled
[ 4955.684] (II) intel(0): Set up overlay video
[ 4955.684] (II) intel(0): direct rendering: DRI2 Enabled
[ 4955.684] (==) intel(0): hotplug detection: "enabled"
[ 4955.983] (--) RandR disabled
[ 4956.021] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[ 4956.021] (II) AIGLX: enabled GLX_INTEL_swap_event
[ 4956.021] (II) AIGLX: enabled GLX_ARB_create_context
[ 4956.021] (II) AIGLX: enabled GLX_ARB_create_context_profile
[ 4956.021] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[ 4956.021] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[ 4956.021] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[ 4956.021] (II) AIGLX: Loaded and initialized i915
[ 4956.022] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 4956.023] (II) intel(0): Setting screen physical size to 270 x 203
[ 4956.124] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[ 4956.124] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[ 4956.124] (II) LoadModule: "evdev"
[ 4956.124] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 4956.125] (II) Module evdev: vendor="X.Org Foundation"
[ 4956.125] compiled for 1.13.0, module version = 2.7.3
[ 4956.125] Module class: X.Org XInput Driver
[ 4956.125] ABI class: X.Org XInput driver, version 18.0
[ 4956.125] (II) Using input driver 'evdev' for 'Power Button'
[ 4956.125] (**) Power Button: always reports core events
[ 4956.125] (**) evdev: Power Button: Device: "/dev/input/event4"
[ 4956.126] (--) evdev: Power Button: Vendor 0 Product 0x1
[ 4956.126] (--) evdev: Power Button: Found keys
[ 4956.126] (II) evdev: Power Button: Configuring as keyboard
[ 4956.126] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input4/event4"
[ 4956.126] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[ 4956.126] (**) Option "xkb_rules" "evdev"
[ 4956.126] (**) Option "xkb_model" "evdev"
[ 4956.126] (**) Option "xkb_layout" "us"
[ 4956.197] (II) config/udev: Adding input device Video Bus (/dev/input/event2)
[ 4956.198] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[ 4956.198] (II) Using input driver 'evdev' for 'Video Bus'
[ 4956.198] (**) Video Bus: always reports core events
[ 4956.198] (**) evdev: Video Bus: Device: "/dev/input/event2"
[ 4956.198] (--) evdev: Video Bus: Vendor 0 Product 0x6
[ 4956.198] (--) evdev: Video Bus: Found keys
[ 4956.198] (II) evdev: Video Bus: Configuring as keyboard
[ 4956.198] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/LNXVIDEO:00/input/input2/event2"
[ 4956.198] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
[ 4956.198] (**) Option "xkb_rules" "evdev"
[ 4956.198] (**) Option "xkb_model" "evdev"
[ 4956.198] (**) Option "xkb_layout" "us"
[ 4956.200] (II) config/udev: Adding input device Lid Switch (/dev/input/event3)
[ 4956.200] (II) No input driver specified, ignoring this device.
[ 4956.200] (II) This device may have been added with another device file.
[ 4956.201] (II) config/udev: Adding input device Sleep Button (/dev/input/event1)
[ 4956.201] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[ 4956.201] (II) Using input driver 'evdev' for 'Sleep Button'
[ 4956.202] (**) Sleep Button: always reports core events
[ 4956.202] (**) evdev: Sleep Button: Device: "/dev/input/event1"
[ 4956.202] (--) evdev: Sleep Button: Vendor 0 Product 0x3
[ 4956.202] (--) evdev: Sleep Button: Found keys
[ 4956.202] (II) evdev: Sleep Button: Configuring as keyboard
[ 4956.202] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input1/event1"
[ 4956.202] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 8)
[ 4956.202] (**) Option "xkb_rules" "evdev"
[ 4956.202] (**) Option "xkb_model" "evdev"
[ 4956.202] (**) Option "xkb_layout" "us"
[ 4956.204] (II) config/udev: Adding drm device (/dev/dri/card0)
[ 4956.205] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[ 4956.205] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[ 4956.205] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
[ 4956.205] (**) AT Translated Set 2 keyboard: always reports core events
[ 4956.205] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event0"
[ 4956.205] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1
[ 4956.205] (--) evdev: AT Translated Set 2 keyboard: Found keys
[ 4956.205] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard
[ 4956.205] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
[ 4956.205] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 9)
[ 4956.205] (**) Option "xkb_rules" "evdev"
[ 4956.206] (**) Option "xkb_model" "evdev"
[ 4956.206] (**) Option "xkb_layout" "us"
[ 4956.208] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/event6)
[ 4956.208] (**) TPPS/2 IBM TrackPoint: Applying InputClass "evdev pointer catchall"
[ 4956.208] (II) Using input driver 'evdev' for 'TPPS/2 IBM TrackPoint'
[ 4956.208] (**) TPPS/2 IBM TrackPoint: always reports core events
[ 4956.208] (**) evdev: TPPS/2 IBM TrackPoint: Device: "/dev/input/event6"
[ 4956.208] (--) evdev: TPPS/2 IBM TrackPoint: Vendor 0x2 Product 0xa
[ 4956.208] (--) evdev: TPPS/2 IBM TrackPoint: Found 3 mouse buttons
[ 4956.208] (--) evdev: TPPS/2 IBM TrackPoint: Found relative axes
[ 4956.208] (--) evdev: TPPS/2 IBM TrackPoint: Found x and y relative axes
[ 4956.208] (II) evdev: TPPS/2 IBM TrackPoint: Configuring as mouse
[ 4956.208] (**) evdev: TPPS/2 IBM TrackPoint: YAxisMapping: buttons 4 and 5
[ 4956.208] (**) evdev: TPPS/2 IBM TrackPoint: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 4956.208] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input6/event6"
[ 4956.208] (II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE, id 10)
[ 4956.209] (II) evdev: TPPS/2 IBM TrackPoint: initialized for relative axes.
[ 4956.209] (**) TPPS/2 IBM TrackPoint: (accel) keeping acceleration scheme 1
[ 4956.209] (**) TPPS/2 IBM TrackPoint: (accel) acceleration profile 0
[ 4956.209] (**) TPPS/2 IBM TrackPoint: (accel) acceleration factor: 2.000
[ 4956.209] (**) TPPS/2 IBM TrackPoint: (accel) acceleration threshold: 4
[ 4956.210] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/mouse0)
[ 4956.210] (II) No input driver specified, ignoring this device.
[ 4956.210] (II) This device may have been added with another device file.
[ 4956.211] (II) config/udev: Adding input device PC Speaker (/dev/input/event5)
[ 4956.211] (II) No input driver specified, ignoring this device.
[ 4956.211] (II) This device may have been added with another device file.
[ 4956.213] (II) config/udev: Adding input device ThinkPad Extra Buttons (/dev/input/event7)
[ 4956.213] (**) ThinkPad Extra Buttons: Applying InputClass "evdev keyboard catchall"
[ 4956.213] (II) Using input driver 'evdev' for 'ThinkPad Extra Buttons'
[ 4956.213] (**) ThinkPad Extra Buttons: always reports core events
[ 4956.213] (**) evdev: ThinkPad Extra Buttons: Device: "/dev/input/event7"
[ 4956.214] (--) evdev: ThinkPad Extra Buttons: Vendor 0x1014 Product 0x5054
[ 4956.214] (--) evdev: ThinkPad Extra Buttons: Found keys
[ 4956.214] (II) evdev: ThinkPad Extra Buttons: Configuring as keyboard
[ 4956.214] (**) Option "config_info" "udev:/sys/devices/platform/thinkpad_acpi/input/input7/event7"
[ 4956.214] (II) XINPUT: Adding extended input device "ThinkPad Extra Buttons" (type: KEYBOARD, id 11)
[ 4956.214] (**) Option "xkb_rules" "evdev"
[ 4956.214] (**) Option "xkb_model" "evdev"
[ 4956.214] (**) Option "xkb_layout" "us"
[ 4960.630] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 4964.186] (II) evdev: ThinkPad Extra Buttons: Close
[ 4964.189] (II) UnloadModule: "evdev"
[ 4964.189] (II) evdev: TPPS/2 IBM TrackPoint: Close
[ 4964.189] (II) UnloadModule: "evdev"
[ 4964.189] (II) evdev: AT Translated Set 2 keyboard: Close
[ 4964.189] (II) UnloadModule: "evdev"
[ 4964.189] (II) evdev: Sleep Button: Close
[ 4964.189] (II) UnloadModule: "evdev"
[ 4964.189] (II) evdev: Video Bus: Close
[ 4964.190] (II) UnloadModule: "evdev"
[ 4964.190] (II) evdev: Power Button: Close
[ 4964.190] (II) UnloadModule: "evdev"
[ 4964.192] Server terminated successfully (0). Closing log file.karol wrote:
Leonid.I wrote:@0x001A4:
To run twm, you need to install xorg-twm from [extra] (I am not sure if it installs by default). Do you have xterm installed?
According to his first post he has both xorg-twm and xterm installed.
I do indeed.
I went ahead and installed LXDE anyways, just to see what would happen. Exact same thing, it looks like everything is about to load but only the mouse cursor shows up. My Xorg.0.log is the same, so I won't post it again.
I do get an error in the console about the openbox menu.xml file missing but I doubt that's related.
X.Org X Server 1.13.0
Release Date: 2012-09-05
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.6.0-1-ARCH i686
Current Operating System: Linux x_00294-ibc 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:33:50 CEST 2012 i686
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=ec6a9a60-8d8c-4de0-960b-9e2a044d0ca5 ro quiet
Build Date: 05 October 2012 02:01:30PM
Current version of pixman: 0.26.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Oct 15 18:12:28 2012
(==) Using config directory: "/etc/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
Openbox-Message: Unable to find a valid menu file "/usr/share/lxde/openbox/menu.xml"
xinit: connection to X server lost
waiting for X server to shut down pcmanfm: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 2326 requests (2323 known processed) with 0 events remaining.
Server terminated successfully (0). Closing log file.
xinit: unexpected signal 2
.xinitrc for my user
exec ck-launch-session startlxde
Very wierd. -
I have some doubts/questions .
What is the difference between open and closed cursor?
Are library cache locks same as parse locks?
What is the difference between latch and mutex?
I would be grateful if experts could answer these questions.
RegardsAlmost correct. The terminology is however nor correct.
Simplistically:
The SQL engine receives a SQL. It attempts a soft parse first. This means looking for an existing cursor in the Shared Pool with the same SQL. This existing cursor can be in use by other sessions. It does not matter - if that cursor is in used (opend by other sessions), or not. It may not be in use at all and simply sitting there in the cache. If such a cursor is found, it is used for that session's SQL - and that session gets a cursor handle (reference/pointer) to that existing cursor.
If the SQL engine does not find an existing cursor to use, it needs to create a brand new cursor in the Shared Pool. This is a hard parse. Again, the session receives a cursor handle for that new cursor created.
And that is it.
You now need to decide how to use that cursor handle. The cursor itself is a program. You have a handle to execute that cursor program. Via its bind interface you can input data to this cursor program. Then execute it and receive (fetch) output of that cursor program.
So the ideal is to re-use the cursor handle again and again.
Basic example: the following is not optimal as the same cursor is opened and closed, opened and closed, for each read from the file. A lot of soft parsing results.
while not-eof( filehandle ) // read data from a file
read file data into var1, var2
open cursor for 'insert into testtab values( :1, :2)' // create a cursor
bind cursor :1 = var, :2 = var2 // bind values to cursor (for insert)
exec cursor // do SQL insert
close cursor
end whileThis is a lot better. A single cursor is used and executed again and again:
open cursor for 'insert into testtab values( :1, :2)' // create a cursor
while not-eof( filehandle ) // read data from a file
read file data into var1, var2
bind cursor :1 = var, :2 = var2 // bind values to cursor (for insert)
exec cursor // do SQL insert
end while
close cursor In this case a single soft/hard parse - and the client uses that cursor handle to execute that cursor (insert data) program again and again. -
Windows 7 and blinking cursor issue...
(Just an FYI...I originally posted this in the MBP forum because I didn't realize there was a bootcamp forum)
I recently had my computer repaired through AppleCare. They replaced the logic board, top cover, a connector and battery. When I first got the computer back, I turned it on, booted to the Mac partition, everything was good. I then booted to Windows with the Bootcamp partition and everything was good. Even the stuff I had open before the damage were still up. I shut it down, boxed everything up and didn't touch it until I got home.
When I got home, I booted up Windows 7 and now all I get is it boots to a black screen with the cursor. I ran the repair utility, tried safe mode and it says no errors are found, however, it still won't load. I haven't figured out why it booted up the first time I got the computer back but now it won't do anything. I never got a chance to back everything up because my computer was damaged from liquid damage, but I can still see all the files on my Bootcamp partition through finder from the Mac side.
I don't know exactly why it's doing this or what to search to find an answer to the problem. When I first got my MBP, I installed Windows 7 through and upgrade disc from my job, so I don't know what my next steps should be.
Other steps:
Tried WinClone to copy the drive and it gave me an error message on the log.
Tried to run system repair several times and it came back with no errors. Same for memory diagnostic tool. Everytime I run the repairs, it finds no errors but still boots up to the black screen with cursor. Ugh, this is so frustrating.
Right now I have most of my files backed up on my external drive, but I still want to find a way to clone the drive and then it looks like my only choice is to do a clean install. How do I do that? Someone else set up the partition for me when I got my computer, so I don't know how to remove the version of Windows 7 to do a clean install or if I have to start messing with the partition. I only have an upgrade disk.
Any more thoughts? I thought about calling AppleCare but I doubt they'd help since it's Windows 7, but it was not doing this before the repair. I guess I'm lucky I still have access to the files.Leeopard huh?
You need Snow Leopard w. 10.6.x to get 3.0.
If it works and no issues fine though probably the first time I have read someone did.
BC 2.2 was more about XP and some support for Vista. -
CREATE PACKAGE EMP_PKG AS
CURSOR EMP_CUR IS
SELECT EMPNO,DEPTNO,SAL,HIREDATE
FROM EMP
WHERE DEPTNO=30;
PROCEDURE P_EMP;
PROCEDURE P_GET_SAL(V_EMPNO NUMBER);
PROCEDURE P_GET_LOC(V_EMPNO NUMBER);
Now inside my Package Body
INSIDE THE MAINPROCEDURE P_EMP
I WILL BE CALLING THE BELOW TWO PROCEDURES
PROCEDURE P_EMP
BEGIN
FOR I IN EMP_CUR LOOP
P_GET_SAL(I.EMPNO);-- DO I NEED TO LOOP AGAIN IN P_GET_SAL PROC?
P_GET_LOC(I.DEPTNO);
END LOOP;
END;
NOW WHAT IAM DOING IS
in my P_GET_SAL Procedure is
PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
V_SAL EMP.SAL%TYPE;
BEGIN
FOR I IN EMP_CUR LOOP
SELECT SAL INTO V_SAL FROM EMP
WHERE EMPNO=I.EMPNO --DOUBT HERE
END;
I WANT TO KNOW WHETHER I NEED TO LOOP AGAIN
HERE OR INSTEAD OF THAT
PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
V_SAL EMP.SAL%TYPE;
BEGIN
SELECT SAL INTO V_SAL FROM EMP
WHERE EMPNO =V_EMPNO;
END;
SINCE iam calling V_EMPNO WITH CURSOR FROM MY
MAINPROCEDURE ..
WILL THE PROCEDURE USES THE CURSOR VALUES
AND LOOP ITSELF FOR EVERY EMPLOYEE TO
GET THE SALALRY ?
PLEASE LET ME KNOW SINCE MY PACKAGE IS MORE THAN 3000
LINES I cant proceed unless its confirmed i can
do so ..Hi all,
Thanks for Looking into my Problem
I Got answer by MySelf ..i dont need to loop again my sub procedures
if i try to do that iam getting the error
ERROR at line 1:
ORA-06511: PL/SQL: cursor already open
Thank you all once again .. -
We are having a problem where we get the ORA-01000 error after a while
on our servers. We are using wl7.0 sp1 and Oracle 9.2.0.1 with the thin
driver. We are connecting to the db with the weblogic.jdbc.pool.Driver
class.
I've looked in this group and on support but can't find the specific
answer to our problem.
The number of cursors open gradually increases while our application is
running, until we hit the max (700 per session.)
The FAQ on askbea.com says to just increase the number of cursors, but
we already did this and the number keeps growing and growing as the
application runs.
We are closing all resultsets and statements in finally blocks. I have
tested to see which SQL statements are contained within the open cursors
and traced those statements back to code where I was able to verify
beyond doubt that they were being closed correctly.
I have also tried, on our staging server, to use the very latest driver
from oracle for our db version to no avail.
Does anyone know what is going on here? does the weblogic pool keep
these things open itself because of caching? If it does, is there some
number that determines how many open restultsets / statements will be
kept open. Is there a setting I can change, or a fix for this issue?
Thanks for the help,
-evanJoseph Weinstein wrote:
>
furriskey wrote:
Hi,
I tried adding that to the classpath, and it doesn't seem to fix the
problem. However there do seem to be fewer open cursors this time around.
Previously after running one specific request, I got the following
number of cursors for.. user_name, sid ,count(*) num_curs:
STAGE_261 209 7
STAGE_261 184 6
STAGE_261 58 1
STAGE_261 153 1
With that patch, I get the following:
STAGE_261 22 6
STAGE_261 12 1
STAGE_261 60 1
I don't know how much merit these numbers should be given though. The
SQL calls involved seem to be the same as before.Ok, so again, what are the SQLs associated with the open cursors now?
This is looking more and more like and Oracle issue... We may have to duplicate
it with a non-weblogic standalone program. And you're sure the server has the
latest appropriate thin driver in it's classpath ahead of the weblogic.jar? When
the server boots, it prints out it's effective classpath. Make sure it lists the
driver first.
JoeI didn't realise that the oracle driver was embedded in weblogic.jar, I
thought wl read the list of jars in $WL_SERVER_HOME/lib and added them
to the classpath. So I replaced the classes12.zip in that directory with
the latest one. I have tried adding it to the beginning of the
classpath, and verified that to be the case, but still get the issue.
This is the classpath that is starts with:
/export/home/beahome/weblogic700/../user_projects/Staging/70sp1testcon_w_rs.jar:/export/home/beahome/weblogic700/../user_projects/Staging/classes12.zip:/export/home/beahome/jdk131_03/lib/tools.jar:/export/home/beahome/weblogic700/server:/export/home/beahome/weblogic700/server/lib/weblogic_sp.jar:/export/home/beahome/weblogic700/server/lib/weblogic.jar:/export/home/beahome/jdk131_03/lib/tools.jar:/export/home/beahome/weblogic700/server:/export/home/beahome/weblogic700/server/lib/weblogic_sp.jar:/export/home/beahome/weblogic700/server/lib/weblogic.jar:/export/home/beahome/weblogic700/../user_projects/Staging/tslib/startup.jar
Below are the SQL calls that have open cursors. They are a mixture of
calls from our code, and other calls not from our code (the ones against
the dual table.)
SELECT count(u.user_id) , count(a.user_account_id)
SELECT count(u.user_id) , count(a.user_account_id)
SELECT count(u.user_id) , count(a.user_account_id)
SELECT count(u.user_id) , count(a.user_account_id)
SELECT NVL(tu.time_zone_name, ts.time_zone_name) from users u, user_
SELECT NVL(tu.time_zone_name, ts.time_zone_name) from users u, user_
INSERT into sessions (http_session, user_account_id, session_start_dt
SELECT 2 from dual where exists (select 1 from sessions
UPDATE sessions set session_end_dt = GLOBALS.get_time_by_account (use
SELECT 2 from dual where exists (select 1 from sessions
INSERT into sessions (http_session, user_account_id, session_start_dt
SELECT NEXT_DAY('31-MAR-' || TO_CHAR (SYSDATE, 'YYYY'),'SUNDAY' ) + 1
SELECT NEXT_DAY('31-OCT-' || TO_CHAR (SYSDATE, 'YYYY'),'SUNDAY') -7 +
SELECT nvl(:b1,sysdate) from dual SELECT nvl(:b1,sysdate) from
SELECT NEXT_DAY('31-MAR-' || TO_CHAR (SYSDATE, 'YYYY'),'SUNDAY' ) + 1
SELECT NEXT_DAY('31-OCT-' || TO_CHAR (SYSDATE, 'YYYY'),'SUNDAY') -7 +
SELECT nvl(:b1,sysdate) from dual SELECT nvl(:b1,sysdate) from
-evan.
>
>
>>
Thanks,
-evan
Joseph Weinstein wrote:
Hi.
Assuming you are running vanilla 70sp1, with no patches, please try this
jar, ahead of all official weblogic stuff in the server's classpath, and let me know
if it solves the problem.
Joe
furriskey wrote:
Thanks Mitesh,
I looked at that bug in metalink, and although that issue certainly
similar to ours it is not in fact the same. We do not see any SQL
strings like:
SELECT count (*) FROM SYS.DBA_PENDING_TRANSACTIONS
in our open cursors list.
The SQL calls in our code that have open cursors are partly from our own
code (and some generic keepalive ones it looks like: "SELECT
nvl(:b1,sysdate) from dual ".) As I said, I checked specific code blocks
in our code and found that while the code explicitly closes the
resultsets/statements/connections in finally blocks, there are still
open cursors with these calls on the system.
I also checked our prepared statement cache size, and it is set to 0.
This is how the admin console reports it anyway, there is no entry in
config.xml for it and the docs on the wl site say the default is 5. I am
assuming that the latter is a typo on their site.
Thanks again,
-evan.
Mitesh Patel wrote:
Hi furriskey!
I found out from oracle metalink that this is oracle thin/oci driver bug.
The bug id is: 3151681 and i believe oracle is looking at it.
Thanks,
Mitesh
furriskey wrote:
We are having a problem where we get the ORA-01000 error after a while
on our servers. We are using wl7.0 sp1 and Oracle 9.2.0.1 with the thin
driver. We are connecting to the db with the weblogic.jdbc.pool.Driver
class.
I've looked in this group and on support but can't find the specific
answer to our problem.
The number of cursors open gradually increases while our application is
running, until we hit the max (700 per session.)
The FAQ on askbea.com says to just increase the number of cursors, but
we already did this and the number keeps growing and growing as the
application runs.
We are closing all resultsets and statements in finally blocks. I have
tested to see which SQL statements are contained within the open cursors
and traced those statements back to code where I was able to verify
beyond doubt that they were being closed correctly.
I have also tried, on our staging server, to use the very latest driver
from oracle for our db version to no avail.
Does anyone know what is going on here? does the weblogic pool keep
these things open itself because of caching? If it does, is there some
number that determines how many open restultsets / statements will be
kept open. Is there a setting I can change, or a fix for this issue?
Thanks for the help,
-evan -
Doubt in calltransaction in ALV
Hi, i have doubt in calltransction in alv..In my report am using ALV grid display to display purchase order number , material docu number ..If i click on purchasing docu number it has to call transaction ME23N for the purchase order number that i have clicked and if i click material document number it has to call trainsaction MIGO for the corresponding material document number..Here i have done some coding plz correct me if iam wrong..
*& Report YCALLTRANSACTIONALV *
REPORT YCALLTRANSACTIONALV .
TYPE-POOLS: icon.
TYPE-POOLS: slis.
TABLES: vbak,vbap,vbep, makt,lips.
DATA: BEGIN OF gt_vbak OCCURS 0,
vbeln LIKE vbak-vbeln,
audat LIKE vbak-audat,
vdatu LIKE vbak-vdatu,
kunnr LIKE vbak-kunnr,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
kwmeng LIKE vbap-kwmeng,
END OF gt_vbak.
DATA: BEGIN OF gt_vbep OCCURS 0,
vbeln LIKE vbep-vbeln,
wadat LIKE vbep-wadat,
END OF gt_vbep.
DATA: BEGIN OF gt_lips OCCURS 0,
vbeln LIKE lips-vbeln,
posnr LIKE lips-posnr,
lfimg LIKE lips-lfimg,
vgbel LIKE lips-vgbel,
vgpos LIKE lips-vgpos,
END OF gt_lips.
DATA: BEGIN OF gt_makt OCCURS 0,
matnr LIKE makt-matnr,
maktx LIKE makt-maktx,
END OF gt_makt.
DATA: gv_tab TYPE slis_tabname VALUE 'GT_REPORT'.
DATA: BEGIN OF gt_report OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbep-posnr,
matnr LIKE vbap-matnr,
maktx LIKE makt-maktx,
kwmeng LIKE vbap-kwmeng,
vdatu LIKE vbak-vdatu,
lfimg LIKE lips-lfimg,
wadat LIKE vbep-wadat,
vgbel LIKE lips-vgbel,
icon TYPE icon-id,
tabcolor TYPE lvc_t_scol,
END OF gt_report.
DATA: gt_fieldcat TYPE slis_t_fieldcat_ alv,
gs_fieldcat TYPE slis_fieldcat_ alv,
gs_layout TYPE slis_layout_ alv,
gt_events TYPE slis_t_event,
gs_events TYPE slis_alv_event,
repid LIKE sy-repid.
DATA: gt_lines TYPE TABLE OF tline WITH HEADER LINE,
gv_name LIKE thead-tdname,
gv_fld(40),gv_ fval(50).
DATA: BEGIN OF gt_outlines OCCURS 0,
text TYPE tdline,
END OF gt_outlines.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-006.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_cust RADIOBUTTON GROUP rad1 USER-COMMAND ch DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) text-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_date RADIOBUTTON GROUP rad1 .
SELECTION-SCREEN COMMENT 5(10) text-002 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-005.
SELECT-OPTIONS: s_sale FOR vbak-vbeln MODIF ID cus,
s_cust FOR vbak-kunnr MODIF ID cus.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-005.
SELECT-OPTIONS: s_sale1 FOR vbak-vbeln MODIF ID dat,
s_dat FOR vbak-audat MODIF ID dat.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-007.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_clas RADIOBUTTON GROUP rad2 ."USER-COMMAND ch DEFAULT'X'.
SELECTION-SCREEN COMMENT 5(20) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_alv RADIOBUTTON GROUP rad2 ."USER-COMMAND ch DEFAULT'X'.
SELECTION-SCREEN COMMENT 5(20) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b4.
AT SELECTION-SCREEN.
CHECK sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
IF p_cust = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DAT'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'CUS'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
IF p_cust = 'X' .
CLEAR gt_vbak.
REFRESH gt_vbak.
SELECT avbeln aaudat avdatu akunnr bposnr bmatnr b~kwmeng
INTO TABLE gt_vbak
FROM vbak AS a INNER JOIN vbap AS b
ON avbeln = bvbeln
WHERE a~vbeln IN s_sale
AND a~kunnr IN s_cust.
ELSEIF p_date = 'X'.
CLEAR gt_vbak.
REFRESH gt_vbak.
SELECT avbeln aaudat avdatu akunnr bposnr bmatnr b~kwmeng
INTO TABLE gt_vbak
FROM vbak AS a INNER JOIN vbap AS b
ON avbeln = bvbeln
WHERE a~vbeln IN s_sale1
AND a~audat IN s_dat.
ENDIF.
PERFORM sel_data.
IF p_alv = 'X'.
PERFORM disp_data1.
ELSE.
PERFORM disp_data.
ENDIF.
AT LINE-SELECTION.
GET CURSOR FIELD gv_fld .
CASE gv_fld.
WHEN 'ICON_DISPLAY_ TEXT'.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
PERFORM write_text.
PERFORM disp_text.
WHEN 'GT_REPORT-VBELN' .
SET PARAMETER ID 'AUN' FIELD gt_report-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDCASE.
*& Form sel_data
FORM sel_data .
CLEAR gt_vbep.
REFRESH gt_vbep.
IF NOT gt_vbak[] IS INITIAL.
SELECT vbeln wadat FROM vbep INTO TABLE gt_vbep
FOR ALL ENTRIES IN gt_vbak
WHERE vbeln = gt_vbak-vbeln.
CLEAR gt_lips.
REFRESH gt_lips.
SELECT vbeln posnr lfimg vgbel vgpos FROM lips INTO TABLE gt_lips
FOR ALL ENTRIES IN gt_vbak
WHERE vgbel = gt_vbak-vbeln
AND vgpos = gt_vbak-posnr.
CLEAR gt_makt.
REFRESH gt_makt.
SELECT matnr maktx FROM makt INTO TABLE gt_makt
FOR ALL ENTRIES IN gt_vbak
WHERE matnr = gt_vbak-matnr.
ENDIF.
REFRESH gt_report.
CLEAR gt_report.
LOOP AT gt_vbak.
gt_report-vbeln = gt_vbak-vbeln.
gt_report-vdatu = gt_vbak-vdatu.
gt_report-posnr = gt_vbak-posnr.
gt_report-matnr = gt_vbak-matnr.
gt_report-kwmeng = gt_vbak-kwmeng.
CLEAR gt_vbep.
READ TABLE gt_vbep WITH KEY vbeln = gt_vbak-vbeln.
gt_report-wadat = gt_vbep-wadat.
CLEAR gt_lips.
READ TABLE gt_lips WITH KEY vgbel = gt_vbak-vbeln
vgpos = gt_vbak-posnr.
gt_report-lfimg = gt_lips-lfimg.
gt_report-vgbel = gt_lips-vbeln.
CLEAR gt_makt.
READ TABLE gt_makt WITH KEY matnr = gt_vbak-matnr.
gt_report-maktx = gt_makt-maktx.
CLEAR gt_report-icon.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
IF gt_lines[] IS NOT INITIAL.
gt_report-icon = '@0P@'.
ENDIF.
APPEND gt_report.
ENDLOOP.
ENDFORM. " sel_data
*& Form disp_data
FORM disp_data .
WRITE:/(8) 'orderno.',
(8) 'lineno.',
(11) 'mat.',
(27) 'matdes.',
(10) 'ord.qty',
(12) 'req.del.',
(10) 'del.qty',
(10) 'gidate',
(10) 'delno.'.
ULINE.
LOOP AT gt_report.
WRITE:/(8) gt_report-vbeln COLOR 6 HOTSPOT,
(8) gt_report-posnr ,
(8) gt_report-matnr,
(25) gt_report-maktx,
(11) gt_report-kwmeng,
(15) gt_report-vdatu,
(7) gt_report-lfimg,
(10) gt_report-wadat,
(10) gt_report-vgbel.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
IF gt_lines[] IS NOT INITIAL.
WRITE:120 icon_display_ text AS ICON HOTSPOT.
HIDE: gt_report-vbeln, gt_report- posnr.
ENDIF.
ENDLOOP.
ENDFORM. " disp_data
*& Form disp_data1
FORM disp_data1 .
DATA :
ls_tabcolor TYPE lvc_s_scol.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VBELN'.
gs_fieldcat- hotspot = 'X'.
gs_fieldcat- seltext_l = 'ORDERNO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'POSNR'.
gs_fieldcat- seltext_l = 'LINENO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'MATNR'.
gs_fieldcat- seltext_l = 'MATNO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'MAKTX'.
gs_fieldcat- seltext_l = 'MATDESCR'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'KWMENG'.
gs_fieldcat- seltext_l = 'ORDERQTY'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VDATU'.
gs_fieldcat- seltext_l = 'REQ.DEL.DAT' .
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'LFIMG'.
gs_fieldcat- seltext_l = 'QTY.DEL'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'WADAT'.
gs_fieldcat- seltext_l = 'ISS.DATE'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VGBEL'.
gs_fieldcat- seltext_l = 'DOUC.NO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'ICON'.
gs_fieldcat- seltext_l = 'TEXT'.
gs_fieldcat- icon = 'X'.
gs_fieldcat- hotspot = 'X'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_layout-coltab_ fieldname = 'TABCOLOR'.
gs_events-name = 'USER_COMMAND' .
gs_events-form = 'VAL'.
APPEND gs_events TO gt_events.
LOOP AT gt_report.
ls_tabcolor- fname = 'VBELN'.
ls_tabcolor- color-col = 4.
ls_tabcolor- color-int = 1.
ls_tabcolor- color-inv = 0.
INSERT ls_tabcolor INTO TABLE gt_report-tabcolor.
MODIFY gt_report.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_ DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat
it_events = gt_events
TABLES
t_outtab = gt_report.
ENDFORM. " disp_data1
*& Form READ_TEXT .
FORM read_text .
CLEAR gt_lines.
REFRESH gt_lines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = '0002'
language = sy-langu
name = gv_name
object = 'VBBP'
TABLES
lines = gt_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_ to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " READ_TEXT
*& Form WRITE_TEXT.
FORM write_text.
REFRESH gt_outlines.
CLEAR gt_outlines.
CLEAR gt_lines.
LOOP AT gt_lines .
MOVE gt_lines-tdline TO gt_outlines- text .
APPEND gt_outlines.
ENDLOOP.
CLEAR gt_outlines.
ENDFORM. "WRITE_TEXT
*& Form VAL .
FORM val USING
user_command LIKE sy-ucomm
sel TYPE slis_selfield.
IF sel-fieldname = 'VBELN'.
SET PARAMETER ID 'AUN' FIELD gt_report-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
IF sel-fieldname = 'ICON'.
CLEAR gt_report.
READ TABLE gt_report INDEX sel-tabindex.
perform concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
PERFORM write_text.
PERFORM disp_text1.
ENDIF.
ENDFORM. "val
*& Form disp_text
FORM disp_text .
CALL FUNCTION 'POPUP_WITH_ TABLE_DISPLAY_ OK'
EXPORTING
endpos_col = 50
endpos_row = 30
startpos_col = 20
startpos_row = 20
titletext = 'TEXT'
TABLES
valuetab = gt_outlines.
ENDFORM. " disp_text
*& Form disp_text1
FORM disp_text1 .
DATA: lt_fieldcat TYPE slis_t_fieldcat_ alv,
ls_fieldcat TYPE slis_fieldcat_ alv.
ls_fieldcat- fieldname = 'TEXT'.
ls_fieldcat- outputlen = 40.
ls_fieldcat- tabname = gt_outlines.
APPEND ls_fieldcat TO lt_fieldcat.
CALL FUNCTION 'REUSE_ALV_POPUP_ TO_SELECT'
EXPORTING
i_title = 'TEXT'
i_tabname = 'TLINE'
it_fieldcat = lt_fieldcat
i_callback_program = sy-repid
TABLES
t_outtab = gt_outlines.
ENDFORM. " disp_text1
*& Form concate_text
FORM concate_text .
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
ENDFORM. " concate_text
ThanksHello skk
Here is a sample report performing the required task using OO-means. I think you will agree that the OO-based approach is much simpler and easier to understand than the FM-based approach.
The screen '0100' has the following flow logic without any dynpro elements:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
*& Report ZUS_SDN_ALVGRID_EVENTS
REPORT zus_sdn_alvgrid_events.
DATA:
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000' OBLIGATORY.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_col_id TYPE lvc_s_col.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CASE e_column_id-fieldname.
WHEN 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'ERNAM'.
* SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
* NOTE: no parameter id available, yet simply show the priciple
CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
WHEN OTHERS.
* do nothing
ENDCASE.
* Set active cell to field BUKRS otherwise the focus is still on
* field KUNNR which will always raise event HOTSPOT_CLICK
ls_col_id-fieldname = 'BUKRS'.
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
is_row_id = e_row_id
is_column_id = ls_col_id.
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'KUNNR' OR
fieldname = 'ERNAM' ).
ls_fcat-hotspot = abap_true.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe
Maybe you are looking for
-
How to get the plsql table data into output cursor
Hi, Could anybody please help me. Below is an example of the scenario.. CREATE OR REPLACE PACKAGE chck IS PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR); TYPE get_rec is record (ename varchar2(20), eno number(12)); TYPE t_r
-
Print too small to read from printer with Page shrink on 30%
When printing some emails on Xerox 7225 the print is too small to read even with page shrink on 30%. latest email is from an AOL account and header lines do wrap. This problem is new.
-
The service "Apple Mobile Device" may not have unregistered....
For a long time I have not been able to get the pic off my Iphone. It syncs up to Itunes but the camera wizard no longer turns on. In mt computer it is not there. In my hardware device manager under imaging devices the Iphone has a yellow exclamation
-
hi, I must create a picture (a connected graph exactly) with points and arrows stored somehow on db tables, then display it on a form (Best of all would be the possibility to create and modify the graph in place). I haven't any idea how to handle thi
-
Hi experts i need your guidence. i have Oracle EBS database 9i(9.2.0.5.0) and application is 11i ... my part is to upgrade database from 9i to 10g(10.2.0.4) and O/S is Red Hat Enterprise Linux AS release 3 (Taroon) can any one please guide me how it