Setting module name in OCI program
Hi,
I have been struggling with setting the module name from my OCI program. Below is the code in which
I create the environment, connect, attempt to set the module attribute, wait for key input, and clean up
and exit after getting the key input.
That I can tell, I have called OCISetAttr as the documentation says I should and none of my return values
indicate a problem. Yet when I v$session, I get what I presume is the default value of the module
and not the value I set in the code("moduletest").
The programs physical filename is oci101.exe. It also connects to the Oracle instance as a user named
oci101. I check v$session with this query:
select username, module from v$session where username is not null;
And the output is this:
USERNAME MODULE
OCI101 oci101.exe
SYSTEM SQL*Plus
I should see a MODULE column value of "moduletest" for the OCI101 user.
Not sure what I'm missing. Any ideas?? Here is the code:
// Begin code:
OCIEnv* envhp;
ub2 charset_id = 0;
ub2 ncharset_id = 0;
ub4 mode = OCI_DEFAULT;
const sword env_rc = OCIEnvNlsCreate(
&envhp, mode,
(void*)0, // user-defined context for custom memory allocation
(void* (*)(void*, size_t))0, // user-defined malloc
(void* (*)(void*, void *, size_t))0, // user-defined realloc
(void(*)(void*, void*))0, // // user-defined free
(size_t)0, // extra user memory
(void **)0,
charset_id, ncharset_id
OCIError* errhp;
const sword err_rc = OCIHandleAlloc(
(dvoid *) envhp, (dvoid **) &errhp,
OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0
checkerr(err_rc, errhp);
OCISvcCtx* svchp = 0;
const sword l2rc = OCILogon2(
envhp, errhp, &svchp,
(const OraText*)zusername, (ub4)strlen(zusername),
(const OraText*)zpassword, (ub4)strlen(zpassword),
(const OraText*)zdatabase, (ub4)strlen(zdatabase),
mode
checkerr(l2rc, errhp);
// Set the module attrbute
// Extract the session handle into sessionhp.
OCISession *sessionhp = 0;
ub4 sh_size = 0;
sword oci_attr_get_status = OCIAttrGet ( svchp,
OCI_HTYPE_SVCCTX,
&sessionhp,
&sh_size,
OCI_ATTR_SESSION,
errhp );
checkerr(oci_attr_get_status, errhp);
// Set the module
sword oas_rc = OCIAttrSet(sessionhp, OCI_HTYPE_SESSION,(void *)"moduletest",
strlen("moduletest"), OCI_ATTR_MODULE, errhp);
checkerr(oas_rc, errhp);
getchar();
// Cleanup:
if (svchp) { // 0 when already disconnected
OCISvcCtx*const tmp_svchp = svchp;
svchp = 0; // reset svchp on error or not
const sword lorc = OCILogoff(tmp_svchp, errhp);
checkerr(lorc, errhp);
const sword rc = OCIHandleFree(envhp, OCI_HTYPE_ENV);
// End Code.
Thanks for any help . . .
Karl
Hi Karl,
I'm certainly not an OCI expert, but after setting the module attribute the value is updated upon the next statement execution in my experience. There may be other ways in which this can happen, but I have not seen those cases.
Here is a short example:
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <oci.h>
int main(int argc, char *argv[]) {
OCIEnv *envhp = NULL; /* OCI Environment handle */
OCIError *errhp = NULL; /* OCI Error handle */
OCISvcCtx *svchp = NULL; /* OCI Service Context handle */
OCISession *usrhp = NULL; /* OCI User Session handle */
OCIStmt *stmtp = NULL; /* OCI Statement handle */
/* the statement to execute */
/* this is purely for example */
oratext *sqlstmt = "begin null; end;";
/* connection information */
oratext *username = "scott";
oratext *password = "tiger";
oratext *database = "orademo";
/* used to hold the results of each OCI call */
sword result = 0;
/* Initialize and create a default environment */
result = OCIEnvCreate(&envhp,
OCI_DEFAULT,
(dvoid *) 0,
0,
0,
0,
(size_t) 0,
(dvoid **) 0);
/* allocate an error handle */
result = OCIHandleAlloc((dvoid *) envhp,
(dvoid **) &errhp,
OCI_HTYPE_ERROR,
0,
(dvoid **) 0);
/* create connection */
result = OCILogon2(envhp,
errhp,
&svchp,
username,
(ub4) strlen(username),
password,
(ub4) strlen(password),
database,
(ub4) strlen(database),
OCI_DEFAULT);
/* get the user session handle */
result = OCIAttrGet(svchp,
OCI_HTYPE_SVCCTX,
(void *) &usrhp,
NULL,
OCI_ATTR_SESSION,
errhp);
/* set the module attribute */
result = OCIAttrSet(usrhp,
OCI_HTYPE_SESSION,
(void *) "My Module",
(ub4) strlen("My Module"),
OCI_ATTR_MODULE,
errhp);
/* allocate the statement handle */
result = OCIHandleAlloc((dvoid *) envhp,
(dvoid **) &stmtp,
OCI_HTYPE_STMT,
0,
(dvoid **) 0);
/* prepare the statement for execution */
result = OCIStmtPrepare(stmtp,
errhp,
sqlstmt,
(ub4) strlen((char *) sqlstmt),
OCI_NTV_SYNTAX,
OCI_DEFAULT);
/* execute the statement - after execution the */
/* MODULE value should be updated in v$session */
result = OCIStmtExecute(svchp,
stmtp,
errhp,
(ub4) 1,
(ub4) 0,
(CONST OCISnapshot *) NULL,
(OCISnapshot *) NULL,
OCI_DEFAULT);
/* print a simple prompt */
/* view session in SQL*Plus */
printf("program paused, ENTER to continue...");
getchar();
/* disconnect from the server */
result = OCILogoff(svchp,
errhp);
/* deallocate the environment handle */
/* OCI will deallocate child handles */
result = OCIHandleFree((void *) envhp,
OCI_HTYPE_ENV);
return OCI_SUCCESS;
}When the program is paused I see this in SQL*Plus in my test:
SQL> select sid, username, program, module from v$session where username = 'SCOTT';
SID USERNAME PROGRAM MODULE
136 SCOTT OCIModuleTest.exe My ModulePerhaps that is a bit of help.
Regards,
Mark
Edited by: Mark Williams on Dec 22, 2008 11:06 AM
Tidied up the sample a bit.
Similar Messages
-
Need to set module name same as username in V$sqlarea
Hi Gurus,
I tried to set module name same as schema name in v$sqlarea, generally it was sql*plus. For that i created one after database logon trigger, but it didn't work for all users, it is only working for SYS schema only.
CREATE OR REPLACE TRIGGER LOGIN_USERS_TRIG_NEW
AFTER LOGON ON DATABASE
declare
v_dbuser varchar2(32) ;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
dbms_application_info.set_module(v_dbuser);
end;
result will verify from
select module , parsing_schema_name from v$sqlarea;
so if i am logging with scott user then in v$sqlarea table module name should be scott only. so whatever queries was executed from scott all queries module name should scott only.
Like that for all users. Please suggest is there any other option.
If i execute the same plsql code in scott session , it is working, but when i set with logon trigger it didn't set.
see if i execute:
SQL> exec DBMS_APPLICATION_INFO.set_module(USER, 'Initialized');
PL/SQL procedure successfully completed.
SQL> SELECT sys_context('USERENV', 'MODULE') FROM DUAL;
SYS_CONTEXT('USERENV','MODULE')
SCOTT
but the same with trigger it didn't set. Any idea.
Thanks in advance,hi i take a trace of the session. in that trace statement is showing.
-bash-3.00$ cat orcl_ora_4407.trc
Trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4407.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: localhost.localdomain
Release: 2.6.9-42.0.0.0.1.ELsmp
Version: #1 SMP Sun Oct 15 14:02:40 PDT 2006
Machine: i686
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 20
Unix process pid: 4407, image: [email protected] (TNS V1-V3)
*** 2011-10-04 23:07:35.726
*** SESSION ID:(43.19) 2011-10-04 23:07:35.726
*** CLIENT ID:() 2011-10-04 23:07:35.726
*** SERVICE NAME:(SYS$USERS) 2011-10-04 23:07:35.726
*** MODULE NAME:(SYS) 2011-10-04 23:07:35.726
*** ACTION NAME:() 2011-10-04 23:07:35.726
CLOSE #1:c=0,e=93,dep=1,type=1,tim=1317749855723627
=====================
PARSING IN CURSOR #2 len=47 dep=1 uid=0 oct=3 lid=0 tim=1317749855729023 hv=2145557917 ad='47aca488' sqlid='049t4sdzy57cx'
select dummy from dual where USER = 'SCOTT'
END OF STMT
PARSE #2:c=1000,e=969,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855729018
EXEC #2:c=1000,e=1434,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855732048
FETCH #2:c=0,e=15,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855732153
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='FILTER (cr=0 pr=0 pw=0 time=0 us)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=116 op='TABLE ACCESS FULL DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=2 card=1)'
CLOSE #2:c=0,e=11,dep=1,type=1,tim=1317749855734625
=====================
PARSING IN CURSOR #1 len=47 dep=1 uid=84 oct=3 lid=84 tim=1317749855737092 hv=2145557917 ad='47aca488' sqlid='049t4sdzy57cx'
select dummy from dual where USER = 'SCOTT'
END OF STMT
PARSE #1:c=1999,e=1933,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855737087
EXEC #1:c=0,e=51,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855737654
FETCH #1:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855738075
STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='FILTER (cr=0 pr=0 pw=0 time=0 us)'
STAT #1 id=2 cnt=0 pid=1 pos=1 obj=116 op='TABLE ACCESS FULL DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=2 card=1)'
CLOSE #1:c=0,e=7,dep=1,type=1,tim=1317749855738544
XCTEND rlbk=0, rd_only=1, tim=1317749855744024
XCTEND rlbk=0, rd_only=1, tim=1317749855745025
*** 2011-10-04 23:07:40.799
=====================
PARSING IN CURSOR #2 len=406 dep=0 uid=0 oct=47 lid=0 tim=1317749860799353 hv=4178600252 ad='478e46c0' sqlid='8z5gn0mwj0s9w'
declare
v_dbuser varchar2(32) ;
var_sid NUMBER;
var_serial NUMBER;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
SELECT SID, serial#
INTO var_sid, var_serial
FROM v$session
WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = audsid;
sys.dbms_application_info.set_module(v_dbuser, null);
SYS.DBMS_SYSTEM.set_sql_trace_in_session (var_sid, var_serial, TRUE);
end;
END OF STMT
PARSE #2:c=76988,e=109996,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749860799344
=====================
PARSING IN CURSOR #1 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749860821371 hv=552310686 ad='4793b5d0' sqlid='2yzdahhhfr5wy'
SELECT SYS_CONTEXT('USERENV','SESSION_USER') FROM DUAL
END OF STMT
PARSE #1:c=19997,e=19894,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,plh=1388734953,tim=1317749860821362
EXEC #1:c=0,e=39,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749860822306
FETCH #1:c=0,e=58,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=1388734953,tim=1317749860822419
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #1:c=1000,e=687,dep=1,type=3,tim=1317749860823263
=====================
PARSING IN CURSOR #1 len=86 dep=1 uid=0 oct=3 lid=0 tim=1317749860845379 hv=3278699504 ad='4793b444' sqlid='dv6dxh31qtyzh'
SELECT SID, SERIAL# FROM V$SESSION WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = AUDSID
END OF STMT
PARSE #1:c=21996,e=22022,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,plh=644658511,tim=1317749860845371
EXEC #1:c=0,e=76,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749860846365
FETCH #1:c=1000,e=1085,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=644658511,tim=1317749860847543
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=117 card=1)'
STAT #1 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=104 card=1)'
STAT #1 id=3 cnt=1 pid=2 pos=1 obj=0 op='FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=0 us cost=0 size=78 card=1)'
STAT #1 id=4 cnt=1 pid=2 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLWT (ind:1) (cr=0 pr=0 pw=0 time=0 us cost=0 size=26 card=1)'
STAT #1 id=5 cnt=1 pid=1 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLED (ind:2) (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)'
CLOSE #1:c=0,e=8,dep=1,type=3,tim=1317749860848409
EXEC #2:c=46992,e=47145,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749860848519
*** 2011-10-04 23:07:48.446
CLOSE #2:c=0,e=44,dep=0,type=0,tim=1317749868446462
=====================
PARSING IN CURSOR #1 len=36 dep=0 uid=0 oct=47 lid=0 tim=1317749868452507 hv=4128301241 ad='43cc3bbc' sqlid='5t10uu7v11s5t'
BEGIN DBMS_OUTPUT.ENABLE(NULL); END;
END OF STMT
PARSE #1:c=5999,e=5409,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749868452500
EXEC #1:c=1000,e=1082,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749868454166
CLOSE #1:c=0,e=27,dep=0,type=0,tim=1317749868456571
=====================
PARSING IN CURSOR #2 len=48 dep=1 uid=0 oct=3 lid=0 tim=1317749868460092 hv=2334772408 ad='4c94ceb4' sqlid='cjk1ffy5kmm5s'
select obj# from oid$ where user#=:1 and oid$=:2
END OF STMT
PARSE #2:c=1000,e=1645,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1964104430,tim=1317749868460085
EXEC #2:c=1000,e=531,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1964104430,tim=1317749868461643
FETCH #2:c=1999,e=1461,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=1964104430,tim=1317749868463587
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=500 op='TABLE ACCESS BY INDEX ROWID OID$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=24 card=1)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=501 op='INDEX UNIQUE SCAN I_OID1 (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #2:c=0,e=7,dep=1,type=3,tim=1317749868464199
=====================
PARSING IN CURSOR #1 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749868465603 hv=2201826955 ad='4c97e470' sqlid='0m78skf1mudnb'
select audit$,properties from type_misc$ where obj#=:1
END OF STMT
PARSE #1:c=1000,e=422,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3506511888,tim=1317749868465597
EXEC #1:c=0,e=39,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3506511888,tim=1317749868466196
FETCH #1:c=0,e=726,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=3506511888,tim=1317749868467149
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=502 op='TABLE ACCESS CLUSTER TYPE_MISC$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=46 card=1)'
STAT #1 id=2 cnt=1 pid=1 pos=1 obj=3 op='INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #1:c=0,e=144,dep=1,type=1,tim=1317749868467616
=====================
PARSING IN CURSOR #2 len=185 dep=1 uid=0 oct=3 lid=0 tim=1317749868469076 hv=1850944673 ad='4c9d8f00' sqlid='3ktacv9r56b51'
select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#, nvl(property,0),subname,type#,d_attrs from dependency$ d, obj$ o where d_obj#=:1 and p_obj#=obj#(+) order by order#
END OF STMT
PARSE #2:c=1000,e=478,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868468625
EXEC #2:c=999,e=923,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868470434
FETCH #2:c=3000,e=2985,p=0,cr=7,cu=0,mis=0,r=1,dep=1,og=4,plh=4184428695,tim=1317749868473470
FETCH #2:c=0,e=571,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868474130
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=7 pr=0 pw=0 time=0 us cost=11 size=327 card=3)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=7 pr=0 pw=0 time=0 us cost=10 size=327 card=3)'
STAT #2 id=3 cnt=1 pid=2 pos=1 obj=104 op='TABLE ACCESS BY INDEX ROWID DEPENDENCY$ (cr=4 pr=0 pw=0 time=0 us cost=4 size=81 card=3)'
STAT #2 id=4 cnt=1 pid=3 pos=1 obj=106 op='INDEX RANGE SCAN I_DEPENDENCY1 (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=3)'
STAT #2 id=5 cnt=1 pid=2 pos=2 obj=18 op='TABLE ACCESS BY INDEX ROWID OBJ$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=82 card=1)'
STAT #2 id=6 cnt=1 pid=5 pos=1 obj=36 op='INDEX RANGE SCAN I_OBJ1 (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #2:c=0,e=10,dep=1,type=1,tim=1317749868474627
=====================
PARSING IN CURSOR #2 len=56 dep=1 uid=0 oct=3 lid=0 tim=1317749868475584 hv=3993603298 ad='4c9d8298' sqlid='8swypbbr0m372'
select order#,columns,types from access$ where d_obj#=:1
END OF STMT
PARSE #2:c=1000,e=926,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868475577
EXEC #2:c=0,e=50,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868476239
FETCH #2:c=0,e=132,p=0,cr=2,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868476597
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=105 op='TABLE ACCESS BY INDEX ROWID ACCESS$ (cr=2 pr=0 pw=0 time=0 us cost=3 size=161 card=7)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=108 op='INDEX RANGE SCAN I_ACCESS1 (cr=2 pr=0 pw=0 time=0 us cost=2 size=0 card=7)'
CLOSE #2:c=0,e=12,dep=1,type=1,tim=1317749868477440
=====================
PARSING IN CURSOR #2 len=47 dep=1 uid=0 oct=3 lid=0 tim=1317749868481084 hv=1023521005 ad='4ca12498' sqlid='cb21bacyh3c7d'
select metadata from kopm$ where name='DB_FDO'
END OF STMT
PARSE #2:c=1000,e=830,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3452538079,tim=1317749868481079
EXEC #2:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3452538079,tim=1317749868481617
FETCH #2:c=1000,e=385,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,plh=3452538079,tim=1317749868482481
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=552 op='TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=0 us cost=1 size=108 card=1)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=553 op='INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=0 us cost=0 size=0 card=1)'
CLOSE #2:c=0,e=11,dep=1,type=1,tim=1317749868482607
=====================
PARSING IN CURSOR #5 len=406 dep=0 uid=0 oct=47 lid=0 tim=1317749868920033 hv=4178600252 ad='478e46c0' sqlid='8z5gn0mwj0s9w'
declare
v_dbuser varchar2(32) ;
var_sid NUMBER;
var_serial NUMBER;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
SELECT SID, serial#
INTO var_sid, var_serial
FROM v$session
WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = audsid;
sys.dbms_application_info.set_module(v_dbuser, null);
SYS.DBMS_SYSTEM.set_sql_trace_in_session (var_sid, var_serial, TRUE);
end;
END OF STMT
PARSE #5:c=3000,e=2993,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=0,tim=1317749868920026
=====================
PARSING IN CURSOR #6 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749868921319 hv=552310686 ad='4793b5d0' sqlid='2yzdahhhfr5wy'
SELECT SYS_CONTEXT('USERENV','SESSION_USER') FROM DUAL
END OF STMT
PARSE #6:c=1000,e=234,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749868921314
EXEC #6:c=0,e=33,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749868921426
FETCH #6:c=0,e=37,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=1388734953,tim=1317749868921496
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #6:c=0,e=8,dep=1,type=3,tim=1317749868922312
=====================
PARSING IN CURSOR #6 len=86 dep=1 uid=0 oct=3 lid=0 tim=1317749868922414 hv=3278699504 ad='4793b444' sqlid='dv6dxh31qtyzh'
SELECT SID, SERIAL# FROM V$SESSION WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = AUDSID
END OF STMT
PARSE #6:c=0,e=38,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749868922408
EXEC #6:c=0,e=523,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749868923008
FETCH #6:c=1000,e=1034,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=644658511,tim=1317749868924071
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=117 card=1)'
STAT #6 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=104 card=1)'
STAT #6 id=3 cnt=1 pid=2 pos=1 obj=0 op='FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=0 us cost=0 size=78 card=1)'
STAT #6 id=4 cnt=1 pid=2 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLWT (ind:1) (cr=0 pr=0 pw=0 time=0 us cost=0 size=26 card=1)'
STAT #6 id=5 cnt=1 pid=1 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLED (ind:2) (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)'
CLOSE #6:c=0,e=7,dep=1,type=3,tim=1317749868925014
EXEC #5:c=5000,e=4799,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749868925309
=====================
PARSING IN CURSOR #6 len=52 dep=0 uid=0 oct=47 lid=0 tim=1317749868931018 hv=1029988163 ad='47885f94' sqlid='9babjv8yq8ru3'
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
END OF STMT
PARSE #6:c=2000,e=1998,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749868931012
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868933509 hv=2328831744 ad='4c975250' sqlid='ga9j9xk5cy9s0'
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece from idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=0,e=199,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868933503
EXEC #7:c=0,e=121,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868934465
FETCH #7:c=1000,e=975,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=1697022209,tim=1317749868935481
FETCH #7:c=0,e=28,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=1697022209,tim=1317749868936446
FETCH #7:c=0,e=37,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868937047
STAT #7 id=1 cnt=2 pid=0 pos=1 obj=227 op='TABLE ACCESS BY INDEX ROWID IDL_SB4$ (cr=6 pr=0 pw=0 time=0 us cost=3 size=18 card=1)'
STAT #7 id=2 cnt=2 pid=1 pos=1 obj=238 op='INDEX RANGE SCAN I_IDL_SB41 (cr=4 pr=0 pw=0 time=9 us cost=2 size=0 card=1)'
CLOSE #7:c=0,e=14,dep=1,type=1,tim=1317749868937451
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868938386 hv=4260389146 ad='4c9747c4' sqlid='cvn54b7yz0s8u'
select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece from idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=1000,e=902,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868938380
EXEC #7:c=0,e=537,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868939041
FETCH #7:c=1000,e=365,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=3246118364,tim=1317749868939444
FETCH #7:c=0,e=19,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868939513
STAT #7 id=1 cnt=1 pid=0 pos=1 obj=224 op='TABLE ACCESS BY INDEX ROWID IDL_UB1$ (cr=4 pr=0 pw=0 time=0 us cost=3 size=44 card=2)'
STAT #7 id=2 cnt=1 pid=1 pos=1 obj=235 op='INDEX RANGE SCAN I_IDL_UB11 (cr=3 pr=0 pw=0 time=0 us cost=2 size=0 card=2)'
CLOSE #7:c=0,e=10,dep=1,type=1,tim=1317749868940075
=====================
PARSING IN CURSOR #7 len=135 dep=1 uid=0 oct=3 lid=0 tim=1317749868940494 hv=1115215392 ad='4c973d38' sqlid='c6awqs517jpj0'
select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece from idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=999,e=390,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868940488
EXEC #7:c=1000,e=269,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868941383
FETCH #7:c=0,e=592,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=1319326155,tim=1317749868942015
FETCH #7:c=0,e=20,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868942341
STAT #7 id=1 cnt=1 pid=0 pos=1 obj=225 op='TABLE ACCESS BY INDEX ROWID IDL_CHAR$ (cr=4 pr=0 pw=0 time=0 us cost=3 size=20 card=1)'
STAT #7 id=2 cnt=1 pid=1 pos=1 obj=236 op='INDEX RANGE SCAN I_IDL_CHAR1 (cr=3 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #7:c=0,e=10,dep=1,type=1,tim=1317749868942446
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868943358 hv=1684122946 ad='4c9732ac' sqlid='39m4sx9k63ba2'
select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece from idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=1000,e=883,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2317816222,tim=1317749868943351
EXEC #7:c=0,e=549,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2317816222,tim=1317749868944005
FETCH #7:c=2000,e=1322,p=1,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=2317816222,tim=1317749868945367
FETCH #7:c=0,e=28,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=2317816222,tim=1317749868945473
STAT #7 id=1 cnt=2 pid=0 pos=1 obj=226 op='TABLE ACCESS BY INDEX ROWID IDL_UB2$ (cr=5 pr=1 pw=0 time=0 us cost=3 size=40 card=2)'
STAT #7 id=2 cnt=2 pid=1 pos=1 obj=237 op='INDEX RANGE SCAN I_IDL_UB21 (cr=3 pr=0 pw=0 time=9 us cost=2 size=0 card=2)'
CLOSE #7:c=0,e=540,dep=1,type=1,tim=1317749868946060
EXEC #6:c=22996,e=23633,p=1,cr=49,cu=0,mis=1,r=1,dep=0,og=1,plh=0,tim=1317749868955046 -
Need to set module name = username in V$sqlarea
Hi All,
I tried to set module name same as schema name in v$sqlarea, generally it was sql*plus. For that i created one after database logon trigger, but it didn't work for all users, it is only working for SYS schema only.
CREATE OR REPLACE TRIGGER LOGIN_USERS_TRIG_NEW
AFTER LOGON ON DATABASE
declare
v_dbuser varchar2(32) ;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
dbms_application_info.set_module(v_dbuser);
end;
result will verify from
select module , parsing_schema_name from v$sqlarea;
so if i am logging with scott user then in v$sqlarea table module name should be scott only. so whatever queries was executed from scott all queries module name should scott only.
Like that for all users. Please suggest is there any other option.
Thanks in advance,user583843 wrote:
Hi All,
I tried to set module name same as schema name in v$sqlarea, generally it was sql*plus. For that i created one after database logon trigger, but it didn't work for all users, it is only working for SYS schema only.
CREATE OR REPLACE TRIGGER LOGIN_USERS_TRIG_NEW
AFTER LOGON ON DATABASE
declare
v_dbuser varchar2(32) ;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
dbms_application_info.set_module(v_dbuser);
end;
result will verify from
select module , parsing_schema_name from v$sqlarea;
so if i am logging with scott user then in v$sqlarea table module name should be scott only. so whatever queries was executed from scott all queries module name should scott only.
Like that for all users. Please suggest is there any other option.
Thanks in advance,in which schema's context, is trigger fired & run?
with Oracle everything is denied; except that which is explicitly GRANTed.
is SCOTT allowed to EXECUTE TRIGGER?
is SCOTT allowed to access SYS_CONTEXT?
etc. -
Description
Faulting Application Path: C:\Program Files\Safari\Safari.exe
Problem signature
Problem Event Name: APPCRASH
Application Name: Safari.exe
Application Version: 5.34.57.2
Application Timestamp: 4f982b5e
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.18015
Fault Module Timestamp: 50b83b16
Exception Code: 80000003
Exception Offset: 0003491e
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Extra information about the problem
Bucket ID: 3349202712im having this problem to ive uninstalled and installed but this still comes up!!
Problem signature:
Problem Event Name: BEX
Application Name: iTunes.exe
Application Version: 10.7.0.21
Application Timestamp: 504d85d9
Fault Module Name: StackHash_0a9e
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 00000000
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 5129
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 -
How to find the names of Function Module used in the program
Hi all,
can you people help me with this issue.I want to the names of all the Function Module used in the program along with their parameters into an internal table.It will be helpful for your suggestions.
Kind Regards,
Edited by: Prasenjit Sengupta on Nov 20, 2008 7:39 AMTake structure of internal table as
TYPES : BEGIN OF TY_FM,
FUNCNAME TYPE RS38L_FNAM, "Name of Function Module
PARAMETER TYPE RS38L_PAR_, "Parameter name
PARAMTYPE TYPE RS38L_KIND, " Parameter type
R3STATE TYPE R3STATE, "ABAP: Program Status (Active, Saved, Transported...)
STRUCTURE TYPE RS38L_TYP, "Associated Type of an Interface Parameter
DEFAULTVAL TYPE RS38L_DEFO,"Default value for import parameter
REFERENCE TYPE RS38L_REFE, "Call by reference
OPTIONAL TYPE RS38L_OPTI, "Optional parameters
TYPE TYPE RS38L_TYPE, "Reference Structure is an ABAP/4 Type
END OF TY_FM.
DATA : IT_FM TYPE TABLE OF TY_FM WITH HEADER LINE. -
I build an application exe and then its installer along with run time environment.
The installers instals the application correctly but when I try to execute the application, I get an error that application has crashed and Windows must close it down or search for solutions online with this additional information for the crash.
Problem signature:
Problem Event Name: APPCRASH
Application Name: AGMS.exe
Application Version: 1.3.0.0
Application Timestamp: 4c24e8f5
Fault Module Name: lvrt.dll
Fault Module Version: 10.0.0.4033
Fault Module Timestamp: 4c9273f4
Exception Code: c0000005
Exception Offset: 00005310
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
I am using labview 2010 sp1 32 bit on a 64-bit machine, with the following specs
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.130318-1533)
Language: English (Regional Setting: English)
System Manufacturer: Dell Inc.
System Model: Dell System XPS L502X
BIOS: Default System BIOS
Processor: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (8 CPUs), ~2.0GHz
Memory: 8192MB RAM
Available OS Memory: 8106MB RAM
Page File: 3457MB used, 12753MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 32bit Unicode
The exe /application runs fine on my PC but when I try to run it on another PC it crashes. The other PC has similar specs as given below
Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144)
Language: English (Regional Setting: English)
System Manufacturer: LENOVO
System Model: HuronRiver Platform
BIOS: Default System BIOS
Processor: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (4 CPUs), ~2.2GHz
Memory: 4096MB RAM
Available OS Memory: 4010MB RAM
Page File: 1359MB used, 6658MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 32bit Unicode
I tried another machine, 64 bit of course, as I want to deploy my application on a 64bit PC, but still got the same problem.
This other machine was from HP, iCore 3 (4 CPUs) 2.2GHz, 4GB RAM and running Windows Professional 64 bit.
Now as I see it, it could be a Run-time environment mis-match error.
For this I tried installing a 64 bit LVRTE from NI, but still no sucess.
I checked DEP, for all 3 PCs and it was set to the following
Turn on DEP for essential Windows programs and services only (first option).
I am confused. I can not find a solution for this and it is really frustrating.But I am assuming that when I make the installer, the 32-bit Run Time Engine is appened with the installer, as show below
Since from the picture you can see its including the support installers from '\Program Files (x86)\'
The application runs queries to fetch data from database in SQL server 2008, and for that I am using a Microsoft SQL Native Client 2008 R2 64 bit ( this is the only version that installs on either PC, even the one on which I developed my LV Application).
I am not using any driver, only toolkits for reports - and for that I un-checked the "Remove unused polymorphic VI instances" when making the executable, otherwise LV throws up an exception that share variable are not being included.
Yes I did reboot every time after I ran the installation.
Still getting the same error. -
FGA, module name and SET_MODULE
RDBMS: Release 10.1.0.5.0
I would like to audit a table column using an audit condition on the module name.
The code to do that is:
begin
DBMS_FGA.DROP_POLICY(object_schema=>'XXXX', object_name=>'TAB', policy_name=>'FGA_SELECT_TAB' );
dbms_fga.add_policy (
object_schema=>'XXXX',
object_name=>'TAB',
policy_name=>'FGA_SELECT_TAB',
statement_types => 'select',
ENABLE => TRUE,
audit_condition=> 'sys_context(''USERENV'', ''MODULE'') NOT IN (''xxxxWebApp [ROOT]'',''app_name'')',
audit_column=> 'VIP'
end;
/h3. PROBLEM
I can write this simple sql program:
connect XXXX@mydb
exec DBMS_APPLICATION_INFO.SET_MODULE('app_name', '');
select * from tab;And the SELECT is not audited.
h3. QUESTION
Is there a way to resolve the described problem?
Edited by: AleC on 16-May-2011 02:35That is correct. You've specified the audit condition will be true when the module IS NOT IN 'app_name'. You've set it to 'app_name' hence no audit.
-
Can I communicate with two different FP 1000 modules through one labview program at the same time
I am wondering could you communicate with two seperate FP 1000 modules with one labview program, using a tab control, with page 1 of the tab communicating with one FP 1000 through com port 1 and page 2 of the tab control communicating with another FP 1000 module through com port 4, using different iak files for both. Can I do it through using those wireless modems supplied by National Instruments. Sorry I dont have a name for them.
Noely,
Within a single IAK file, you can have multiple FieldPoint modules on separate COM ports. There is no need to use separate IAKs for the program you are describing. Actually, older versions of NI-FieldPoint do not support having multiple IAKs in use simultaneously (I am not sure whether it is currently supported).
As for the Radio Modems, they are called SRM-6000s and can be used simultaneouslyon different serial ports. Although, using the SRM-6000 in a single master multi slave arrangement, you could use a single serial port to talk to both FP-1000s (3 SRMs total). You will need to configure the FP-1000s to have separate addresses (DIP Switch setting).
Regards,
Aaron -
Value of OCI_ATTR_CHARSET_ID for OCI programming
While learning OCI programming I need to know all values of OCI_ATTR_CHARSET_ID. Only in examples I know that 873 is for UTF8, 31 is for ISO-8859-1 and so on. Who can tell me where I can find the values of all encodings?
Thank you in advance.1) Use Locale Builder.
Go to File->Open...->By Object Name...
The list of character sets contains IDs in parentheses.
2) Use SQL:
For a given character set name, issue:
SELECT NLS_CHARSET_ID('<name>') FROM dual;
-- Sergiusz -
Imp: Module pool Or Dialog programming
Hi ,
I have got a requirement to work on module pool programming.....Please help me with some documents which explains me about it from scratch clearly .
Awaiting for ur reply...........basics of module pool
<u><i><b>OVERVIEW</b></i></u>
There are programs in every domain that require certain amount of user interaction .Such requirements in ABAP are fulfilled with the help of a user dialog and dialog programming which encapsulates the entire logic pertaining to the required user dialog.
One needs to take care that user interactions with the system are comfortable and user friendly along with being logically coherent.
<u><i><b>What is a user dialog?</b></i></u>
Any kind of user interaction with the system can be called as a user dialog:
1) Entering data on the screen.
2) Clicking a button.
3) Navigation between screens.
<u><i><b>Need of dialog programming</b></i></u>
In a typical dialog, the system displays a screen on which the user can enter or request information. As a reaction on the user input or request, the program executes the appropriate actions: it branches to the next screen, displays an output, or changes the database.
Example
A travel agent wants to book a flight. The agent enters the corresponding data on the screen. The system either confirms the desired request, that is, the agent can book the flight and the customer travels on the desired day on the reserved seat to the chosen destination, or the system displays the information that the flight is already booked up.
To fulfill such requirements, a dialog program must offer:
A user-friendly user interface
Format and consistency checks for the data entered by the user
Easy correction of input errors
Access to data by storing it in the database.
ABAP/4 offers a variety of tools and language elements to meet the requirements stated above in the dialog programs.
<u><i><b>
Why dialog programming is also known as module pool?</b></i></u>
Dialog Programming consists of screens and corresponding ABAP program. Screens call dialog modules in the associated ABAP program from their flow logic. Type M programs serve principally as containers for these dialog modules, and hence dialog programming is also known as module pools. A module pool program is a program type which is not executable directly. You can not just run by hitting F8 like a report program. You must tie a transaction code to a screen in order to start the program.
<i><b>VARIOUS COMPONENTS OF A DIALOG PROGRAM</b></i>
Unlike report, interface or any conversion development which generally entails the creation of one autonomous program which can be executed independently of other objects, dialog program development entails development of multiple objects none of which can be executed on its own. Instead all objects are linked hierarchically to the main program and are executed in a sequence dictated by the Dialog Main Program.
<u><i><b>
Components of a dialog program</b></i></u>
1) Transaction
2) Screen
3) GUI status
4) ABAP program
All these components are explained in detail below.
1) TRANSACTION :
The transaction starts a screen sequence. You create transaction codes in the Repository Browser in the ABAP Workbench or using Transaction SE93. A transaction code is linked to an ABAP program and an initial screen. As well as using a transaction code, you can start a screen sequence from any ABAP program using the CALL SCREEN statement.
2) SCREEN
As a user of an R/3 system, one is always confronted with screens. From the moment one logs on, one can see a screen and one must perform actions on this screen. All those screens are components of ABAP programs. Generally, we define the screens of an ABAP program with the Screen Painter tool of the ABAP.
In the R/3 system, screens are program objects that consist of two parts. First, they have a layout that defines the front end appearance of the window that is presented to the user. Second, they have a flow logic that is executed on the backend by the application server. The screen flow logic is a program layer between the front end and the actual ABAP application program at the backend. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. Unlike ABAP programs, the screen flow logic contains no explicit data declarations. You define the screen fields by placing elements on the screen mask instead. When you define screen fields by referring to data types in the ABAP Dictionary, the runtime environment automatically creates dialogs for field help, input help, and error handling that depends on the semantics of the data type in the dictionary.
The screen flow logic is similar to an ABAP program in that it contains processing blocks. These processing blocks are event blocks that are triggered by the ABAP runtime environment. The most important event blocks are:
PROCESS BEFORE OUTPUT
The respective event (PBO) is triggered after the PROCESS AFTER INPUT (PAI) processing of the previous screen and before the current screen is displayed.
PROCESS AFTER INPUT
The respective event (PAI) is triggered when the user chooses a function on the current screen.
PROCESS ON HELP REQUEST
This event is triggered when function key F1 is pressed.
PROCESS ON VALUE REQUEST
This event is triggered when function key F4 is pressed.
The main task of these processing blocks is to call ABAP dialog modules using the MODULE statement. During the PBO event, you can call any dialog module in the ABAP program that is marked with the addition OUTPUT. In the PAI event, you can call any dialog module program that is marked with the addition INPUT. The screens of an ABAP program can share the dialog modules of that program. You use the dialog modules called during PBO to prepare the screen and the dialog modules called during PAI to react to the user input.
Each screen of an ABAP program has a unique screen number. The screens of an ABAP program can be combined to form screen sequences. Screen sequences are either built statically by setting the following screen in the Screen Painter or dynamically by overriding the static setting in the ABAP program. The last screen of a screen sequence is always the one where the following screen is set to zero.
ATTRIBUTES OF SCREEN
Like all objects in the R/3 Repository, screens have attributes that both describe them and determine how they behave at runtime. Important screen attributes for ABAP programming:
Program
The name of the ABAP program (type 1, M, or F) to which the screen belongs.
Screen number
A four-digit number, unique within the ABAP program that identifies the screen within the program. If your program contains selection screens, remember that selection screens and Screen Painter screens use the same namespace. For example, if you have a program with a standard selection screen, you may not contain any further screens with the number 1000. Lists, on the other hand, have their own namespace.
Screen type
A normal screen occupies a whole GUI window. Modal dialog boxes only cover a part of a GUI window. Their interface elements are also arranged differently. Selection screens are generated automatically from the definition in the ABAP program. You may not define them using the Screen Painter. A subscreen is a screen that you can display in a subscreen area on a different screen in the same ABAP program.
Next screen
Statically-defined screen number, specifying the next screen in the sequence. If you enter zero or leave the field blank, you define the current screen as the last in the chain. If the next screen is the same as the current screen, the screen will keep on calling itself. You can override the statically-defined next screen in the ABAP program.
Cursor position
Static definition of the screen element on which the cursor is positioned when the screen is displayed. By default, the cursor appears on the first input field. You can overwrite the static cursor position dynamically in your ABAP program by using SET CURSOR FIELD <f>
Screen group
Four-character ID, placed in the system field SY-DYNGR while the screen is being processed. This allows you to assign several screens to a common screen group. You can use this, for example, to modify all of the screens in the group in a uniform way. Screen groups are stored in table TFAWT.
Hold data
If the user calls the screen more than once during a terminal session, he or she can retain changed data as default values by choosing System -> User profile -> Hold data.
VARIOUS SCREEN ELEMENTS
A screen can contain a wide variety of elements, either for displaying field contents, or for allowing the user to interact with the program (for example, filling out input fields or choosing pushbutton functions). We use the Screen Painter to arrange elements on the screen.
We can use the following elements:
Text fields
Display elements, which cannot be changed either by the user or by the ABAP program.
Input/output fields and templates
Used to display data from the ABAP program or for entering data on the screen. Linked to screen fields.
Dropdown list boxes
Special input/output fields that allow users to choose one entry from a fixed list of possible entries.
Checkbox elements
Special input/output fields that the user can either select (value X) or deselect (value SPACE). Checkbox elements can be linked with function codes.
Radio button elements
Special input/output fields that are combined into groups. Within a radio button group, only a single button can be selected at any one time. When the user selects one button, all of the others are automatically deselected. Radio button elements can be linked with function codes.
Pushbuttons
Elements on the screen that trigger the PAI event of the screen flow logic when chosen by the user. There is a function code attached to each pushbutton, which is passed to the ABAP program when it is chosen.
Frame
Pure display elements that group together elements on the screen, such as radio button groups.
Subscreens
Area on the screen in which you can place another screen.
Table controls
Tabular input/output fields.
Tab strip controls
Areas on the screen in which you can switch between various pages.
Custom Controls
Areas on the screen in which you can display controls. Controls are software components of the presentation server.
Status icons
Display elements, indicating the status of the application program.
OK field
Every screen has a twenty-character OK_CODE field (also known as the function code field) that is not displayed directly on the screen. User actions that trigger the PAI event also place the corresponding function code into this field, from where it is passed to the ABAP program. You can also use the command field in the standard toolbar to enter the OK field. To be able to use the OK field, you need to assign a name to it.
All screen elements have a set of attributes, some of which are set automatically, others of which have to be specified in the Screen Painter. They determine things such as the layout of the screen elements on the screen. You can set the attributes of screen elements in the Screen Painter - either for a single element, or using the element list, which lists all of the elements belonging to the current screen. Some of the attributes that you set statically in the Screen Painter can be overwritten dynamically in the ABAP program.
Regards
navjot
reward points if helpfull -
Hi,
we have one Visual C++ application and this application also using few external dlls. while exiting from application, getting following error. This
is happened in Windows 7.
Please help us to resolve this issue.
Log Name:
Application
Source:
Application Error
Date:
28/07/2010 11:44:16 AM
Event ID:
1000
Task Category: (100)
Level:
Error
Keywords:
Classic
User:
N/A
Computer:
CRIWKS12.crillylaw.local
Description:
Faulting application name: WinTest.exe, version: 2.7.1.0, time stamp: 0x4b78d5b8
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdaae
Exception code: 0x0eedfade
Fault offset: 0x00009617
Faulting process id: 0x10b8
Faulting application start time: 0x01cb2df647dfd847
Faulting application path: C:\Program Files\xxx\xxx\xxx\ WinTest.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: a17377fd-99e9-11df-8941-90fba60d7539
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2010-07-28T01:44:16.000000000Z" />
<EventRecordID>3773</EventRecordID>
<Channel>Application</Channel>
<Computer>CRIWKS12.crillylaw.local</Computer>
<Security />
</System>
<EventData>
<Data> WinTest.exe</Data>
<Data>2.7.1.0</Data>
<Data>4b78d5b8</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.1.7600.16385</Data>
<Data>4a5bdaae</Data>
<Data>0eedfade</Data>
<Data>00009617</Data>
<Data>10b8</Data>
<Data>01cb2df647dfd847</Data>
<Data>C:\Program Files\xxx\xxx\xxx\ WinTest.exe</Data>
<Data>C:\Windows\system32\KERNELBASE.dll</Data>
<Data>a17377fd-99e9-11df-8941-90fba60d7539</Data>
</EventData>
</Event>
PS. I apologise for not being able to provide the application's name.Hi Jesse ,
I am pasting the entire module where the code fails:
/// <summary>
/// Pool the job execution status
/// </summary>
private void PoolJobExecutionStatus()
int waitIndex = 0;
while (true)
try
lock (this.lockingObject)
this.ReOpenRegistryConnection();
currentJob = SR.Job.Load(this.currentJobId, this.poolingConnection);
JobStatusEventArgs jobStatusArg = (currentJob.Status == SR.JobStatus.Aborted) ?
new JobStatusEventArgs(currentJob.Name, currentJob.Status, currentJob.ErrorMessage) :
new JobStatusEventArgs(currentJob.Name, currentJob.Status);
this.dispatcher.BeginInvoke(new EventHandler<JobStatusEventArgs>(RaiseUpdateStatus), DispatcherPriority.Normal, new object[] { this, jobStatusArg });
if (currentJob.Status == JobStatus.Aborted || currentJob.Status == JobStatus.Completed)
this.PoolJobThread.Abort();
break;
catch (ThreadAbortException)
catch (ConnectionFailure ex)
TridentErrorHandler.HandleUIException(ex);
// If reconnection fails more than the max reconnection value then exit.
if (this.connectionAttempts >= this.maxConnectionAttempts)
break;
this.connectionAttempts++;
catch (BackendStorageException ex)
TridentErrorHandler.HandleUIException(ex);
// If reconnection fails 5 times then exit.
if (this.connectionAttempts >= this.maxConnectionAttempts)
break;
this.connectionAttempts++;
catch (Exception ex)
TridentErrorHandler.HandleUIException(ex);
break;
try
Thread.Sleep(500);
// If job is in waiting state, every 3 min show the user retry message.
// (waitIndex == 360) Specifes 3 min.
if (currentJob.Status == JobStatus.Waiting && waitIndex == 360)
waitIndex = 0;
JobStatusEventArgs jobStatusArg = new JobStatusEventArgs(this.currentJob.Name, this.currentJob.Status, TridentResourceManager.GetString("JobTerminatedByUserMessage"));
this.dispatcher.BeginInvoke(new EventHandler<JobStatusEventArgs>(RaiseUpdateStatus), DispatcherPriority.Normal, new object[] { this, jobStatusArg });
catch (Exception ex)
TridentErrorHandler.HandleUIException(ex);
waitIndex++;
public void StartDataProductService(Guid jobId, Connection poolConnection)
this.currentJobId = jobId;
this.poolingConnection = poolConnection;
this.ClearTempData();
this.HaltService();
this.PoolJobThread = new Thread(this.PoolJobExecutionStatus);
this.PoolJobThread.Start();
Hope this helps
Regards,
Rahul -
I developed a C# (Visual Studio) application in .NET Framework 4.0 in conjunction with SAP Crystal Reports Support Pack 9 msi
The target platform on which reports creating problem is Windows 7 32-bit
When I generate a report it is generating perfectly but when I try to generate the report again, the application crashes and the following error is logged in the Event Viewer:
Faulting application name: TrackingApp.exe, version: 1.0.0.0, time stamp: 0x537a1687
Faulting module name: cslibu-3-0.dll, version: 13.0.9.1312, time stamp: 0x53393fe8
Exception code: 0xc0000005
Fault offset: 0x00039a28
Faulting process id: 0xf00
Faulting application start time: 0x01cf7376d8df092d
Faulting application path: C:\Program Files\Tracking System\Tracking System\TrackingApp.exe
Faulting module path: C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cslibu-3-0.dll
Report Id: 24b4faea-df6a-11e3-8422-d067e51beb2a
What should be the possible error. My report generation code is written in try catch block but it did not generate any exception but
crashes my application
Thanks in anticipation
Regards
Adeel ArshadHi Adeel,
Need more info.
- What do you mean by generate the report? view, print, export?
- Does this happen with single, a few or all reports?
- If the issue is with some reports, what is different ion these reports as compare to other reports?
- If all reports, could you reproduce the issue with a blank report? and with a report which has a single DB field?
- Bhushan
Senior Engineer
SAP Active Global Support
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Getting started and moving ahead with Crystal Reports .NET applications. -
Hi All,
I'm using diadem from .net Program. While on the run I'm getting the following error.
Error While executing "" Command
Error type ACCESS VIOLATION
Error Address: 0006898E
Module name:gfsdesk.DLL
Anyone have any idea why this is happening?
regards,
SwaroopHi Swaroop,
It would be helpful to better understand what your code really does. The information that you called DIAdem from your enviroenment is not yet sufficient to understand what the problem might be.
Andreas -
Adobe Premiere CS6 APPCRASH Fault Module Name:dvamarshal.dll
Hi, I have successfully downloaded and used a few CS6 programs in my new Creative Cloud membership, i.e. Photoshop, Flash, Bridge.
However, I've downloaded and installed and updated, twice, Adobe Premiere CS6. I did uninstall it in between installs.
The program won't open. The error message I keep getting is:
Problem signature:
Problem Event Name: APPCRASH
Application Name: ADOBE PREMIERE PRO.EXE
Application Version: 6.0.3.0
Application Timestamp: 505748bf
Fault Module Name: dvamarshal.dll
Fault Module Version: 6.0.3.1
Fault Module Timestamp: 505737ee
Exception Code: c0000005
Exception Offset: 0000000000030ff1
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: bc8d
Additional Information 2: bc8dea4e9dd9b75bfdb3ece306df51b9
Additional Information 3: a1f5
Additional Information 4: a1f5d345bd6ec37be171cb28c9fbe7f4
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
My computer is an HP Envy 15 Notebook PC running Windows 7 Home Premium.
Processor: Intel Core i7-3610QM 2.30GHz
8GB RAM
64 bit OS
Any suggestions on how to correct this? I don't want to go to a full computer reformat if there is a simpler solution since I just did one recently. Is there anything I can update or download as a patch, perhaps to fix this?
Thanks for any advice! I appreciate your time and looking into this.11. Jeff Bellune,
Mar 22, 2013 5:34 AM in reply to debaniehael
Report
See if the solution here helps:
Adobe Community: PPro CS6 Hanging on Startup - Crashes or stops working.
Hi Jeff,
I actually did this yesterday, since I came across the same post. It didn't help. But thanks for suggesting it.
I've taken Premiere Pro CS6 off my computer and will try to reload it today. I am also having issues with the computer itself. If I go away from it and come back in say 10 minutes, everything is frozen. I need to contact HP about this and who knows, maybe Premiere will actually open if I get this other freezing problem taken care of.
I read to fix the HP freeze problem, to shut off the CoolSense feature, and I did, but it's still locking up. I have turned off any sleep, hibernate or other feature like that so it shouldn't be going into any kind of power saver mode. I adjusted my power settings.
I'm still under warranty, so will contact HP. Then I'll get back on the Premiere issue. When it rains it pours, eh? :>) -
Photoshop Elements has stopped working, Faulting module name: ntdll.dll
I use windows 7, pse 9, I went to the application and log and this is the error message I get:
Faulting application name: PhotoshopElementsEditor.exe, version: 9.0.0.0, time stamp: 0x4ca3884b
Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b60
Exception code: 0xc0000005
Fault offset: 0x0001f8c4
Faulting process id: 0xca8
Faulting application start time: 0x01cd513a0df54fd0
Faulting application path: C:\Program Files\Adobe\Photoshop Elements 9\PhotoshopElementsEditor.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 7fee6f40-bd2d-11e1-9d1b-e0cb4eddc8b4
The organizer works fine but editor has never worked for me and I just installed it a few days ago
Message title was edited by: Brett NThanks for the log info. We've seen instances of that "ntdll.dll" as the faulting module before, see if this Adobe document helps, even though it's for Acrobat:
http://helpx.adobe.com/acrobat/kb/acrobat-8-crashes-error-cites.html
Ken
Maybe you are looking for
-
Searching for best practice recommendations regarding connecting Exchange calendars to SP 2010
A user has requested assistancing setting up a web part on SP 2010 to display their "on call" calendar from Exchange. When she attempted it, she got the error that says, in part, "[...] This could be due to the fact that the server certificate is not
-
Best way to post a Return Item and Enter a Different Replacement Item
Hi MM Gurus, During data migration, I uploaded an item (let's call it Material A) in inventory. The old purchase order for this item was not included in the migration. After the go-live phase, purchasing discovers that they have to RETURN Material A
-
CS5 Animation Presets MIA?
In CS5 I don't see the animation presets in the Effects Control Panel. Have they moved elsewhere? Its convenient to see the presets I've created for several effects here rather than searching the Effects and Presets Panel for them.
-
My IPad 2 won't stop saying not charging when plugged in any outlet
My IPad 2 keeps saying not charging when plugged in any outlet
-
WRT610N usb disk upgrade *#
I have a version 2 WRT610N dual band wireless/GB router. It has worked great. I use it as one of two backup drives for all of my home computers. The other drive is an IOMEGA 2TB network drive. BTW, it was just this week that I figured out how to