HR schema sample code
Hi, I really searched for the sample code for HR schema, I could not find it, does anybody have the code with him?
I really need it :)
thank you.
Hi,
for Oracle10g ... it should be written to the [ORACLE_HOME]\demo\schema\human_resources\hr_code.sql
Anyway....
Rem
Rem $Header: hr_code.sql 29-aug-2002.11:44:01 hyeh Exp $
Rem
Rem hr_code.sql
Rem
Rem Copyright (c) 2001, 2002, Oracle Corporation. All rights reserved.
Rem
Rem NAME
Rem hr_code.sql - Create procedural objects for HR schema
Rem
Rem DESCRIPTION
Rem Create a statement level trigger on EMPLOYEES
Rem to allow DML during business hours.
Rem Create a row level trigger on the EMPLOYEES table,
Rem after UPDATES on the department_id or job_id columns.
Rem Create a stored procedure to insert a row into the
Rem JOB_HISTORY table. Have the above row level trigger
Rem row level trigger call this stored procedure.
Rem
Rem NOTES
Rem
Rem CREATED by Nancy Greenberg - 06/01/00
Rem
Rem MODIFIED (MM/DD/YY)
Rem hyeh 08/29/02 - hyeh_mv_comschema_to_rdbms
Rem ahunold 05/11/01 - disable
Rem ahunold 03/03/01 - HR simplification, REGIONS table
Rem ahunold 02/20/01 - Created
Rem
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100
SET ECHO OFF
REM **************************************************************************
REM procedure and statement trigger to allow dmls during business hours:
CREATE OR REPLACE PROCEDURE secure_dml
IS
BEGIN
IF TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00'
OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN
RAISE_APPLICATION_ERROR (-20205,
'You may only make changes during normal office hours');
END IF;
END secure_dml;
CREATE OR REPLACE TRIGGER secure_employees
BEFORE INSERT OR UPDATE OR DELETE ON employees
BEGIN
secure_dml;
END secure_employees;
ALTER TRIGGER secure_employees DISABLE;
REM **************************************************************************
REM procedure to add a row to the JOB_HISTORY table and row trigger
REM to call the procedure when data is updated in the job_id or
REM department_id columns in the EMPLOYEES table:
CREATE OR REPLACE PROCEDURE add_job_history
( p_emp_id job_history.employee_id%type
, p_start_date job_history.start_date%type
, p_end_date job_history.end_date%type
, p_job_id job_history.job_id%type
, p_department_id job_history.department_id%type
IS
BEGIN
INSERT INTO job_history (employee_id, start_date, end_date,
job_id, department_id)
VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);
END add_job_history;
CREATE OR REPLACE TRIGGER update_job_history
AFTER UPDATE OF job_id, department_id ON employees
FOR EACH ROW
BEGIN
add_job_history(:old.employee_id, :old.hire_date, sysdate,
:old.job_id, :old.department_id);
END;
COMMIT;My greetings,
Sim
Similar Messages
-
Request for sample code, Validating XML Schema
Does anyone have some sample code to validate
an XML Schema with the Oracle parser?
Also, the classgen code seems to have more XML Schema classes in it. There is an xschema.jar full of XML Schema related code. Would it be possible to use this code?
I've tried DOMSample.java with the v2 parser. It seems to happily echo Schema based XML files that are obviously wrong. (I use Tibco's XML Authority to verify the XML file and XML Schema).I do not have sample code but it is not a difficult API to call. I have worked on it before, so if you have a specific question on it, happy to help out if I can.
-
How to create a database for sample code from Tutorial/Book?
I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
I'm feeling overwhelmed with these links describing how to create a database:
[http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
[http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
[http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
(1) What is the command to list the existing databases?
(2) What is the command to delete an existing database?
(3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
(4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
(5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
(6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
Thanks
Siegfried
Edited by: user8816970 on Sep 26, 2012 12:01 PM
Edited by: user8816970 on Sep 26, 2012 12:18 PMuser8816970 wrote:
Paul,
Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
username=sysdba
password=
I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
OK, sqlplus let me in with out a password, why does not this work?
So I try checking the box for "OS Authentication" and I get the same error!
Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
Everyone:
Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
OK, so I run sqlplus and issue these commands
create user siegfried identified by abc ;
grant connect to siegfried ;
connect siegfried/abc;
Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
Thanks!
Siegfried
>Paul,
Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
username=sysdba
password=
I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
OK, sqlplus let me in with out a password, why does not this work?
So I try checking the box for "OS Authentication" and I get the same error!
Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
Everyone:
Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
OK, so I run sqlplus and issue these commands
create user siegfried identified by abc ;
grant connect to siegfried ;
connect siegfried/abc;
above does NOT use SQL*Net to connect to the instance
>
Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
>
Thanks!
Siegfrieda database in SQL Server is same as schema/user in Oracle -
HI all,
I want to learn how java mapping can be done in XI.
I have created a javaMapping class implements StreamTransformation .
I am not getting what code should be written in execute method. I have included all the jar files required.
Please can anyone give me a sample code that should be written in execute method for a simple Message mapping.
I presume we use jaxp Api for that,but I am not getting the exact way to proceed further.
Thanks
YomeshThanks Anad And Shridhar,
I am able to do java mapping now.Actually I was not understanding how the input schema will be read and converted into output schema. Now I got that the DefaultHandler class's methods like startDocument EndDocument ,startElement and EndElement takes care of this. We have to just implement these methods and they are called automatically when corresponding tags are read.
Thank You verymuch for your help,
Yomesh -
How come we have so many errors in Jdeveloper sample code for creating db schema.
You will really have to provide more information (what errors, what are you trying to do), because no one will be able to do anything with this kind of limited information.
-
Problems with using sample code for WebService client
Hi <br /><br />Ive downloaded the sample code from the Adobe <br />website but when i run the client i get an error which i dont understand:<br /><br />client side:<br />ERROR: java.lang.NullPointerException<br />AxisFault<br /> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException<br /> faultSubcode: <br /> faultString: java.lang.NullPointerException<br /> faultActor: <br /> faultNode: <br /> faultDetail: <br /> {http://xml.apache.org/axis/}hostname:GRFNZTS1SRV<br /><br />java.lang.NullPointerException<br /> at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)<br /> at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)<br /> at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:10 87)<br /> at weblogic.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1411)<br /> at weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:16 13)<br /> at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumen tScanner.java:1174)<br /> at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:399 )<br /> at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1138)<br /> at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)<br /> at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:133)<br /> at javax.xml.parsers.SAXParser.parse(Unknown Source)<br /> at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)<br /> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)<br /> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)<br /> at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) <br /> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)<br /> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)<br /> at org.apache.axis.client.Call.invoke(Call.java:2767)<br /> at org.apache.axis.client.Call.invoke(Call.java:2443)<br /> at org.apache.axis.client.Call.invoke(Call.java:2366)<br /> at org.apache.axis.client.Call.invoke(Call.java:1812)<br /> at com.adobe.livecycle.samples.pdfgenerator.axis.PdfGenSoapBindingStub.getConfigurationXML(P dfGenSoapBindingStub.java:373)<br /> at com.adobe.livecycle.samples.pdfgenerator.webserviceclient.WebServiceClient.generatePDF(We bServiceClient.java:174)<br /> at com.adobe.livecycle.samples.pdfgenerator.webserviceclient.WebServiceClient.main(WebServic eClient.java:95)<br /><br />and on the server side:<br /><Error> <com.adobe.idp.um.businesslogic.authentication.AuthenticationManagerBean> <000000> <UserM:GENERIC_ERROR: [Thread: ExecuteThread: '58' for queue: 'default', hc: 735284715 ]No Auth Providers found > <br /><Sep 17, 2007 8:27:43 PM IDT> <Warning> <com.adobe.idp.common.errors.exception.IDPLoggedException> <000000> <UserM:GENERIC_WARNING: [Thread: ExecuteThread: '58' for queue: 'default', hc: 735284715 ]| [AuthenticationManagerBean] errorCode:12801 errorCodeHEX:0x3201 message:No Auth Providers found in Config>
i get this exception
C:\Program Files\JMF2.1.1e\bin\video>javac FrameAccess.java
C:\Program Files\JMF2.1.1e\bin\video>java FrameAccess C:\Program Files\JMF2.1.1e
\bin\video\gtrevor.avi
Failed to create a processor from the given url: javax.media.NoProcessorExceptio
n: Cannot find a Processor for: C:\Program
how to solve it -
Class mapping sample code error
Hi !
There is an error in a Developers guide mapping sample code: p.156-157.
(Examples 7.11,7.12 and 7.13).
For example, in 7.12 we have:
<class name="Tabloid" persistence-capable-superclass="Magazine">
<extension vendor-name="kodo" key="jdbc-class-map" value="flat"/>
.... indicator extensions ...
.... field metadata ...
</class>
instead of jdbc-use-class-map in the key attrribute of the extention tag.
Please, fix it.
Best regards,
Alex.Actually the sample is correct. It shows the mapping information if you
are using metadata extensions in place of .mapping files. To map a class
via metadata extensions, you use the "jdbc-class-map" extension key.
This is distinct from the "jdbc-use-class-map" key, which you can use to
tell the mapping tool what kind of mapping it should create. So in sum:
jdbc-class-map: Used at runtime by the MetaDataMappingFactory to map a
class to its schema.
jdbc-use-class-map: Used at dev time by the MappingTool to indicate that
the user wants a specific type of mapping to be installed. -
CHLinguistic Sample code doesn't add languages
I have a problem with CHLinguistic speller example in Adobe InDesign CS3 version 5.0. Based on this sample code, I want to create a speller for Lithuanian language, a different one than provided by Proximity, but it seems I can't change the vendor. Different vendor doesn't show up in Edit->Preferences->Dictionary for spelling. When I compile and load CHLinguistic plug-in as it is, I do not see Aramaic, English Zambia, Bemba Zambia, Bemba Botswana, and I cannot change the vendor for Bulgarian or Hungarian language dictionary. What might be a problem?
JurateThank you, I have just run out all this patches, it's a so hard work, and it took me three days to run them.
Now I'll turn to test the effect of the patches to the ODM schema, if there is still any question, I'll turn to you for help, thanks in advance! -
ServerSession in FBS (otn sample code)
I download FBS OTN sample code which version
use Toplink for manage persistence..
I have notice about some class that hold
ServerSession as it member variable
such as
////////////// FBS
package oracle.otnsamples.ibfbs.trademanagement.helper;
public class StockRateHelper {
// Toplink Server session
private ServerSession server = null;
public StockRateHelper()
throws TradeManagementEventException{
try {
// Initialize ServerSession from session.xml
server = (ServerSession) SessionManager.getManager().getSession(new XMLLoader(),
"FBSServerSession",
Thread.currentThread().getContextClassLoader());
}catch(DatabaseException dbEx) {
throw new TradeManagementEventException(" Error initializing Server Session :"+dbEx);
public void loadRates(Collection stockRates)
throws DatabaseException {
// Initialize client session
ClientSession client = server.acquireClientSession();
// Enable batch-writing [ Write Optimization ]
client.getLogin().useBatchWriting();
// Sequence pre-allocation has been enabled in project.xml with size of 50
// Get a transaction
UnitOfWork uow = client.acquireUnitOfWork();
// Register the objects with transaction
uow.registerAllObjects(stockRates);
// Commit
uow.commit();
I can deploy and run this sample (after spend a moment
for fix database schema) on OC4J10g developer preview
I have some Question
- why ServerSession not need to login before it provide ClientSession
- I don't see code for disconnect (logout) from DB , does it cause resource leak ?
thank youHi,
why ServerSession not need to login before it provide ClientSession.When we use SessionManager to retrieve sessions, in the call to getSession(), if the session is not already in the session manager's in-memory cache of sessions, the session manager creates the session and logs in. Hence we don't have to login explicitly( when using SessionMananger).
To open Session with No Login
SessionManager manager = SessionManager.getManager();
Session session = manager.getSession( new XMLLoader(), // XML Loader (sessions.xml file)
"mysession", // session name
YourApplicationClass.getClassLoader(), // classloader
false, // log in session
false); // refresh session
I don't see code for disconnect (logout) from DB , does it cause resource leak ?When using a three-tier architecture ( Sever-Client Session ), the client session is used to perform all operations. The client forwards all the request to the server session, which either operates on the cache or the database ( if the data is not present in the cache) . Hence the sever session is the entity that takes care of managing database resources and it has the intelligence built-in to manage the connections and resources. We don't have to worry about that. Finally when the
application goes down, we must take care of closing the server session.
We hav't explicitly closed the sever session in this application. If you require to close the server session and not
depend on the timeout mechanism, you can explicitly close the connection when the application is destroyed.
LoadDataServletCtxLsnr.java
public void contextDestroyed(ServletContextEvent sce) {
// Close server session
I have notice about some class that hold ServerSession as it member variableAll the classes point to the same instance of SeverSession and they don't have seperate instances. There can be only one seversession for an application. The ServerSession instance is got from the Sigleton class SessionManager which manages the ServerSession.
HTH.
Regards
Elango. -
KIMYONG : API ( FND_SUBMIT, FND_REQUEST) Sample Code 소개
Purpose
Extension 개발자들이 간혹 요청하는 Standard API (FND_SUBMIT, FND_REQUEST)의 sample code입니다.
Configuring the Script
FND_SUBMIT test procedure and sample code
Creates a procedure called fnd_submit_test that can be registered and run as a concurrent program.
This procedure will use the FND_SUBMIT API to submit a request set. (Function Security Reports - This request set should be seeded, if it is not available the values in the script may need to be changed.) The procedure will then place itself in a Paused status until the request set completes.
Running the Script
1. Install this procedure in the APPS schema.
2. Register the procedure as a concurrent program
Caution
This script is provided for educational purposes only and not supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.
Proofread this script before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns), this script may not be in an executable state when you first receive it. Check over the script to ensure that errors of this type are corrected.
Script
REM +==========================================================================
REM | Concurrent Processing Sample Code
REM |
REM | FILE:
REM | fnd_submit_test.pls
REM |
REM | REVISION:
REM | $Id$
REM |
REM | DESCRIPTION:
REM | FND_SUBMIT test procedure and sample code
REM | Creates a procedure called fnd_submit_test that can be registered
REM | and run as a concurrent program.
REM | This procedure will use the FND_SUBMIT API to submit a request set.
REM | (Function Security Reports - This request set should be seeded, if
REM | it is not available the values in the script may need to be changed.)
REM | The procedure will then place itself in a Paused status until the
REM | request set completes.
REM |
REM | INSTRUCTIONS:
REM |
REM | 1. Install this procedure in the APPS schema.
REM |
REM | 2. Register the procedure as a concurrent program
REM |
REM |
REM +==========================================================================
whenever sqlerror exit failure rollback;
create or replace procedure fnd_submit_test (errbuf out varchar2,
retcode out varchar2) as
success boolean;
req_id number;
req_data varchar2(10);
srs_failed exception;
submitprog_failed exception;
submitset_failed exception;
begin
-- Use FND_FILE to output messages at each stage
fnd_file.put_line(fnd_file.log, 'Starting test...');
-- Read fnd_conc_global.request_data, if available then we have been
-- reawakened after the request set has completed.
-- If so, exit.
req_data := fnd_conc_global.request_data;
if (req_data is not null) then
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
-- Step 1 - call set_request_set
fnd_file.put_line(fnd_file.log, 'Calling set_request_set...');
success := fnd_submit.set_request_set('FND', 'FNDRSSUB43');
if ( not success ) then
raise srs_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program first time...');
-- Step 2 - call submit program for each program in the set
success := fnd_submit.submit_program('FND','FNDMNFUN', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program second time...');
success := fnd_submit.submit_program('FND','FNDMNMNU', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Calling submit program third time...');
success := fnd_submit.submit_program('FND','FNDMNNAV', 'STAGE10', 'System Administrator', chr(0));
if ( not success ) then
raise submitprog_failed;
end if;
-- Step 3 - call submit_set
fnd_file.put_line(fnd_file.log, 'Calling submit_set...');
req_id := fnd_submit.submit_set(null,true);
if (req_id = 0 ) then
raise submitset_failed;
end if;
fnd_file.put_line(fnd_file.log, 'Finished.');
-- Set conc_status to PAUSED, set request_data to 1 and exit
fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => '1') ;
errbuf := 'Request set submitted. id = ' || req_id;
retcode := 0;
exception
when srs_failed then
errbuf := 'Call to set_request_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitprog_failed then
errbuf := 'Call to submit_program failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when submitset_failed then
errbuf := 'Call to submit_set failed: ' || fnd_message.get;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
when others then
errbuf := 'Request set submission failed - unknown error: ' || sqlerrm;
retcode := 2;
fnd_file.put_line(fnd_file.log, errbuf);
end;
rem ===================================================================
commit;
exit;
Reference
자세한 사항은 Note 221542.1 를 참고하세요.Not sure about that particular option, but in general you pass in pairs - an example from code I didn't write but maintain (so if this is the worst possible way, I apologize)
proj_req_id6 := FND_REQUEST.SUBMIT_REQUEST('SQLGL', 'XXXX_GLGENLED_PDF',
'XXXX General Ledger',
'',dummy_default,
'P_SET_OF_BOOKS_ID='||v_rep_cmp.set_of_books_id,'P_CHART_OF_ACCOUNTS_ID=101',
'P_KIND=L','P_CURRENCY_CODE='||v_rep_cmp.currency_code,
'P_ACTUAL_FLAG=A','P_BUD_ENC_TYPE_ID=100',
'P_START_PERIOD='||'&1','P_END_PERIOD='||'&1',
'P_MIN_FLEX='||v_min_flex||'.'||v_emp_cost_center.COST_CENTER||'.00000.000.000.000.00',
'P_MAX_FLEX='||v_max_flex||'.'||v_emp_cost_center.COST_CENTER||'.99999.999.999.ZZZ.99',
'P_PAGE_SIZE=180',chr(0),'',
'','','','','','','','','','');You see where I have option pairs - for example
'P_ACTUAL_FLAG=A'Tells my program that the value for parameter P_ACTUAL_FLAG is A
This example is from a SQL*Plus script, hence the &1 for the value substitutions.
Hope that helps -
Any sample code on XML parsing
Hi,
I am writing an application that has to read and to generate XML (using schemas). Unfortuantely, I cannot find any sample code on how to do it using the Oracle supplied libraries (packages oracle.xml.* . Can anyone point me to some sample code, documentation or alternative?
Thanks a lot!Hello Bert,
I didnt get your question very clearly.
1) Do you want to generate XML using Java classes based on XSD?
or
2) You want to parse XML that has a XSD specified with it?
For both these thing, we have sample codes. For the first option, there are Class Generators that does this for you. There are some samples provided with the XDK download. Look into the folder <xdk_home>xdk\demo\java\classgen.
For option 2, there are many samples on OTN itself. To name one.... AQSample downloaded from http://otn.oracle.com/sample_code/tech/dataint/content.html.
There is a sample with the JDK download also. The folder is <xdk_home>\xdk\demo\java\schema
Hope this helps. -
Guidance or sample code needed or complex associations
I am a new developer to jdo/kodo. I understand most of the stuff I have read. What I can't seem to find are examples or a discussion of how to do the mapping, etc when your classes are associated with other classes. I'm taking the classic Order and Customer setup. You have a Order which has an association to a Customer and vice versa. Actually my model is a bit more complex than that, but knowing how to do two classes should point me in the right direction.
How to i create the schema mapping and metadata files in this case? I see how do it for a single class and given package and the whole project. However, what happens when I have some classes in one package and some in an other and they are related to each other? What's the order of operations?I am new to the Windows programming environment (I'm running Windows 7).
I am looking for sample code that will do the following:
1.
12.
If you expect a useful answer here, you'll have to narrow your thread(s) to one specific
issue. Posting a (virtually) complete application specification is far too broad and
comprehensive for any one thread in these forums.
Pick *one* aspect of this project and describe what problems you're having writing the code.
Post a new thread for each specific problem.
As posted, you appear to be hoping to find code already completely written for this project.
Most sample code illustrates *one* task, not a dozen. If you aren't able or willing to do
the lion's share of the coding yourself, you may have to consider contracting a developer.
- Wayne -
How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F
hello there !!!!
i m in Great Trouble please help me out..
i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim Count As Int32
If FormUID.Equals("Allowance") Then
If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
If pVal.Row = 0 Then
'BubbleEvent = False
End If
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
Count = o_Matrix.RowCount()
SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
Validate(pVal, EventEnum, FormUID, BubbleEvent)
End If
End If
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim Row, ii As Integer
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
o_Matrix.FlushToDataSource()
Try
For Row = 2 To o_Matrix.RowCount
StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
For ii = Row To DBtable.Rows.Count - 1
If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
BubbleEvent = False
Exit Sub
End If
Next
If CDbl(StrName) < 0 Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
End If
Next Row
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End SubHello there
sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
here is my Sample Code...n i have to update in the validate portion...
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim oCellValue As SAPbouiCOM.EditText
If FormUID.Equals("Allowance") Then
If (pVal.ItemUID = "MatAllow") Then
If pVal.Row = 0 Then Exit Sub
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
oForm = SBO_Application1.Forms.Item(FormUID)
If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
If pVal.Row = 0 Then Exit Sub
oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
oCellValue.Active = True
BubbleEvent = False
Exit Sub
End If
End If
End If
End If
End If
Validate(pVal, EventEnum, FormUID, BubbleEvent)
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim str, str1 As String
Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
Dim o_Matrix As SAPbouiCOM.Matrix
Dim Sum As Integer
Dim oRecordset As SAPbobsCOM.Recordset
Dim Container As Integer
Dim Count As Int32
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
For Count = 0 To DBtable.Rows.Count - 1
CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
Dim Sql As String
Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
oRecordset.DoQuery(Sql)
End If
Next Count
SBO_Application1.MessageBox("Record was Updated")
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub -
Error while running a sample code
Hello,
I 'm getting the following error while i'm trying to run a
sample code which I have imported into Flex 3.
===================================================================
Severity and Description Path Resource Location Creation Time
Id
unable to open 'C:\Documents and Settings\sn55179\My
Documents\Flex Builder
3\FlexForDummies_Chapter3_Code\libs'FlexForDummies_Chapter3_Code
Unknown 1237909480511 215
===================================================================
Can anyone help me in resolving this issue.
Many thanks in advance.It's very frustrating that FB stops working when the libs
folder is missing. If you are checking in project files to a source
control app like Perforce, empty folders don't get added, so if you
don't add an initial dummy file, the next time you do a clean sync,
the libs folder may not be there, and even though there is nothing
there, FB complains. :-( -
Hi all,
This is what I want to achieve. I have an attribute for an IO, but the values for that has to be decided at the transfer structure level. I want to write a routine in the transfer rules to populate the field.
I have another field that gets populated from R/3. I need to write a routine which would take this value and see if it falls in the range and have to decide the value and populate.
I have gl_account coming in, and in the routine I need to take that value of the gl_account and see if it falls in the range of 1 5000 or 6700 - 8130 if so assign a + sign and if not assign a sign to the new field.
Any sample code would be appreciated and rewarded.
Thanks,
SriGlobal code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
$$ begin of routine - insert your code only below this line -
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
Data: temp1 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
Data: temp1_line LIKE LINE OF temp1.
temp1_line-sign = 'I'.
temp1_line-option = 'BT'.
temp1_line-low = '001'.
temp1_line-high = '5000'.
APPEND temp1_line TO temp1
Data: temp2 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
Data: temp2_line LIKE LINE OF temp2.
temp2_line-sign = 'I'.
temp2_line-option = 'BT'.
temp2_line-low = '5001'.
temp2_line-high = '8000'.
APPEND temp2_line TO temp2
Data: temp(1) char.
if TRAN_STRUCTURE-0glaccnt IN temp1.
temp3 = '+'.
elseif TRAN_STRUCTURE-0glaccnt IN temp2.
temp 3= '-'.
endif
RESULT = temp3 .
returncode <> 0 means skip this record
RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
ABORT = 0.
$$ end of routine - insert your code only before this line -
Maybe you are looking for
-
Problem with socket connection in midp 2.0
hello everyone. I'm new one in j2me and I am learning socket connection in j2me. I'm using basic socket,datagram example wich is come with sun java wireless toolkit 2.5. for it i wrote small socket server program on c# and tested it example on my pc
-
Hi, I converted a shape file to oracle format and loaded the data . But when i validated it it gives me 13011 error which means out of bounds. I not sure what srid (i chose 8307) and the bounds for it ??? data which looks as follows:(open_sapce.dat f
-
Want to download the segment structure into xsd or wsdl
Hi Guys, I want to dwonload the segement structure (E1KNA1M) into XSD or WSDL. Then i can import into XI as datatype, How can i download the segment structure into XSD? Thanks Srinivas
-
How to Sync webgallery to iPhoto???????
So as I upgraded to leopard i reinstalled iPhoto. Now how can I get .mac web gallery to sync to my clean installation of iPhoto? Is there a way to get the pics uploaded back to my computer? thanks
-
Webauth asking again for credntials
Hello Experts, I am having an issue with webauth page. I am using ISE as radius server and using sponsor account for guest account creation. My Issue is: once I login with webauth i got internet connection but after few idle time (5-10min), I need to