API to update oracle base table in oracle apps
Hi,
What is the API used to update a base table in oracle contracts?
Please suggest.
If you are on 11i, please check irep.oracle.com
It lists all APIs available.
IREP - Oracle Integration Repository: The Tool To Find Which API Is Supported and How To Use It ... (Doc ID 554986.1)
For R12, see
Oracle Integration Repository Documentation Resources Release 12 (Doc ID 396116.1)
Note: 462586.1 - Where are the Oracle® Release 12 (R12) API Reference Guide?
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=462586.1
Note: 458225.1 - Release 12 Integration Repository
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458225.1
Hope this helps,
Sandeep Gandhi
Similar Messages
-
Updating a Base Table through a View having UNPIVOT function.
Hi,
I have a requirement of updating a Base Table through a View.
This View has the query using a UNPIVOT function for displaying the columns of the Base tables in rows.
I need to update/insert into/delete the Base Table by accessing the View (The user doesn't have an access to the Base Table, hence the DML's on the View).
Following is the table I've created:-
CREATE TABLE PERSON_DETAILS
PID VARCHAR2(10 BYTE),
FIRSTNAME VARCHAR2(1000 BYTE),
LASTNAME VARCHAR2(1000 BYTE),
PHONENUMBER VARCHAR2(1000 BYTE),
ADDRESS1 VARCHAR2(1000 BYTE),
ADDRESS2 VARCHAR2(1000 BYTE),
COUNTRY_CODE VARCHAR2(1000 BYTE),
LANGUAGE_CODE VARCHAR2(1000 BYTE),
EMAIL VARCHAR2(1000 BYTE)
)The sample values are inserted in this table through the below script:-
insert into person_details values ('1','XYZ','ABC','1234567890','India','Asia','IN','EN','[email protected]');
insert into person_details values ('2','XYZ2','ABC2','1234567890','India','Asia','IN','EN','[email protected]');The code for the view is as below:-
CREATE OR REPLACE FORCE VIEW PERSON_DETAILS_VIEW
PID,
CD_NAME,
CD_VALUE
AS
SELECT "PID", "CD_NAME", "CD_VALUE"
FROM person_details UNPIVOT INCLUDE NULLS (cd_value
FOR cd_name
IN (firstname AS 'First Name',
lastname AS 'Last Name',
phonenumber AS 'Phonenumber',
address1 AS 'address1',
address2 AS 'address2',
country_code AS 'Country Code',
language_code AS 'Language Code',
email AS 'Email') );Below are the values from the view:-
PID CD_NAME CD_VALUE
1 First Name XYZ
1 Last Name ABC
1 Phonenumber 1234567890
1 address1 India
1 address2 Asia
1 Country Code IN
1 Language Code EN
1 Email [email protected]
2 First Name XYZ2
2 Last Name ABC2
2 Phonenumber 1234567890
2 address1 India
2 address2 Asia
2 Country Code IN
2 Language Code EN
2 Email [email protected] user would fire some statement like below:-
update person_details_view
set cd_value = 'US' where CD_NAME = 'IN'The above statement should update the base table PERSON_DETAILS.
I understand I can write an INSTEAD OF trigger but I do not know what logic to write in the trigger so that the requirement gets fulfilled.
My Oracle Version
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionAny help would be highly appreciated.
Thank You,
Ankit Khare.
Edited by: Ankit_Khare84 on Jun 28, 2012 2:47 PMit is definitively possible with an instead of trigger.
for Example:
create or replace
TRIGGER ioft_person
INSTEAD OF UPDATE
ON person_details_view
FOR EACH ROW
declare
firstname1 person_details.firstname%type;
BEGIN
SELECT firstname_new into firstname1
FROM (SELECT pid, cd_name, cd_value
FROM
select * from person_details_view where (pid, cd_name) not in (select :new.pid, :new.cd_name from dual)
union all
select :new.pid, :new.cd_name, :new.cd_value from dual
PIVOT ( max(cd_value) AS new FOR (cd_name) IN
('First Name' AS firstname,
'Last Name' as lastname,
'Phonenumber' as phonenumber,
'address1' as address1,
'address2' AS address2,
'Country Code' as country_code,
'Language Code' as language_code,
'Email' as email
) where pid = :old.pid;
UPDATE person_details
SET firstname = firstname1
WHERE pid = :old.pid;
END ioft_role_perm;and than run
update person_details_view
set cd_value = 'X|X' where cd_name = 'First Name' and pid=1The logic is: you must convert back the view through pivoting -
Need a PLSQL API for update the oe_order_headers_all table
Hi all,
I need a PLSQL API for update the oe_order_headers_all table.
Anyone know please help me.
Regards,
M.Soundrapandian.Use the Process Order API to update this table.
Note: 746787.1 - Process Order API In Order Management
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=746787.1
Oracle Order Management Open Interfaces, API, & Electronic Messaging Guide
http://download-uk.oracle.com/docs/cd/B25516_14/current/acrobat/115omapi.zip
Oracle Integration Repository
http://irep.oracle.com -
How to UPDATE a big table in Oracle via Bulk Load
Hi all,
in a datastore target as Oracle 11g, I have a big table having 300milions of record; the structure is One integer key + 10 columns attributes .
In IQ Source i have the same table with the same size ; the structure is One integer key + 1 column attributes .
What i need to do is to UPDATE that single field in Oracle from the values stored in IQ .
Any idea on how to organize efficiently the dataflow and the target writing mode ? bulk load ? api ?
thank you
MaurizioHi,
You cannot do bulk load when you need to UPDATE a field. Because all a bulk load does is add records to your table.
Since you have to UPDATE a field, i would suggest to go for SCD with
source > TC > MO > KG >target
Arun -
API to update resource Planning list in Oracle Projects
I have found the following API to update the RPL in Oracle Projects.
PA_PLAN_RES_LIST_PUB
My question is this API updates the RPL only at the Definition level, is there any way that once we update using this API , the changes to be reflected to RPL assigned to the Project Templates.
We cannot check the check box for Centrally Controlled at the RPL setup due to some business reasons.
Pleasae let me know if anyone has any idea about this issue.
Thansk
SunilYou can have customization/trigger on the planning resource list table, whenever it is updated, it checks for the templates which it is being used and it updates it accordingly.
You may have to careful that the trigger is not mutating though !
Thanks,
Sathish
www.projectsaccounting.com -
Base Tables of Oracle Time And Labor
What are the base tables or important tables of Oracle Time and Labor?
Hi,
Refer thread as this might help you:
https://forums.oracle.com/thread/384562?start=0&tstart=0
Please also refer the following docs/notes:
Oracle 11i and R12 Time And Labor (OTL) Timecard Configuration (Doc ID 304340.1)
APIs in Oracle Time & Labor (Doc ID 216773.1)
http://docs.oracle.com/cd/B34956_01/current/acrobat/120hxtig.pdf
Thanks &
Best Regards, -
Updating a Base Table Block Record
We have a form where there is a multi array base Table block. this is used for generating employee number for various depts. the columns are like this with some sample data
Dept Start No end No Start Date End Date
sales 1001 1100 01-Jun-2009 31-12-2050
Accts 2001 2100 01-Jun-2009 31-12-2050
HR 3001 3100 01-Jun-2009 31-12-2050
and the data is populated from its table. These Data were created at the backend while implementation and is not modified for some long time. Now the client wants to modifiy the data . i.e they want to add new set of Start nos and End nos for the existing Dept So they will add at the bottom of the Block
like this
sales 1101 1200 01-Apr-2011 31-12-2050
when they add this the end date of the existing record should get modified with sysdate as they add the new records. at any time they can add new set of numbers of any number of depts.
can u please guide me how to do this ?If I understand correctly, you need to take the following data:
Dept Start No end No Start Date End Date
sales 1001 1100 01-Jun-2009 31-12-2050
Accts 2001 2100 01-Jun-2009 31-12-2050
HR 3001 3100 01-Jun-2009 31-12-2050and change it so it is like this:
Dept Start No end No Start Date End Date
sales 1101 1200 01-Apr-2011 31-12-2050
when they add this the end date of the existing record should get modified with sysdate as they add the new records.First, I will assume you are using Oracle Forms (since your question was in the Forms forum) but you didn't specify a version. In Forms, you could easily put this logic in the Block Pre-Inser t Trigger. You'll have to set the SYSDATE through DML rather then requery the block after changes are saved. This is easier than trying to find the existing record in the block and setting the SYSDATE.
at any time they can add new set of numbers of any number of depts.Is this data used for anything more than just reference? If so, what is the key value and how does making changes like this affect the existing data and relationships?
Just from the small description you gave, the process sounds very closed - meaning it is not easily changed. If this is true, than you probably need more than just "Use a Pre-Ins Trigger" answer. You also need to know how to update all of the related records that just changed because of the new department number and for this answer we'll need more information. ;)
Craig... -
OWB Mapping involving Oracle External Table to Oracle Target Table.
Hi All,
I created a mapping which involves External Table as source & oracle table as target.
Following were steps followed.
1> Created Directory & External Table on oracle server
2> Attached Text file with ',' delimiter to the External Table.
3> Imported the External Table in source module.
4> Created mapping which involves External Table as Source & Oracle Table as Target.
5> Validated & Generated Mapping in OWB.
6> Deployed the mapping in Deployment Manager.
7> Executed the mapping in Deployment Manager.
Execution Results: Completed with errors.
No error message is displayed, I am wondering where can I get more information about the error message?
Thanks in Advance.
Regards,
VidyanandHi,
Look in the logfile <your runtime owner>.log.* under the directory <owb home>/owb/log
thanks -
Hi experts help me,
I have one requirment
there have two machine(plant) fert1,fert2 each one have some materilas.
from one of the plant will be goining to stop(fert1).
than we need featch the issued material from fert1 in reverse order to store it than post the meterial into fert2 based on the production number.
Please help me,
THANKS advance
Moderator message: "spec dumping", please work yourself first on your requirement.
Edited by: Thomas Zloch on Oct 29, 2010 1:54 PMHi,
I'm not sure what you're asking in either question. It would help if you gave a specific example of what you want to do.
SowmyRaj wrote:
Hi Experts , I need help in two qurstions
1. How to update a view without modifying the base table ?You can't.
Views don't contain any data; they just query base tables.
You can change the definition of a view (CREATE OR REPLACE VIEW ...) so that it appears that the base table(s) have changed; that won't change the base tables.
2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?The package utl_file has routines for working with files. -
Update Global Temp Table in Oracle 11g
Hi Experts,
Scenario: I have stored procedure A which calls procedure B. Procedure B uses Global temp Tables(With On Commit Preserve Rows) to work with the data.
I am trying to update one of the GTT in Proc B but unable to do it .. via SQL or via PL/SQL Cursor/Collection. There is no syntax nor logical error and the PL/SQL proc completes execution successfully but the rows are not getting updated. My Db version is Oralce 11g 11203.
Update statement is something like this.
Update <GTT>
SET amount1 = amount1 *-1, amount2 = amount2 *-1
where field1 = <value>
and field2 in ( Select filed2 from <table1> );
Any idea why would this update not work? Has anyone faced this issue in Oracle 11g??
Appreciate your suggestions & thanks in Advance for your inputs.
Cheers,
MSUpdate statement is something like this.
Update <GTT>
SET amount1 = amount1 *-1, amount2 = amount2 *-1
where field1 = <value>
and field2 in ( Select filed2 from <table1> );
Any idea why would this update not work?
You already told us that it DOES work - no errors or exceptions.
It is trivial to determine if that update will do anything - just turn it into a SELECT and see if any rows are ntselected:
v_cnt INTEGER;
SELECT COUNT(*) INTO v_cnt FROM myGTT
WHERE field1 = <value>
AND field2 in (Select field2 from <tablee1>);
Then take a look at the 'count' that you get. -
API to Maintain User Defined Tables in Oracle Apps
Hi,
Is ther any API to INSERT/UPDATE the Values into the User Defined Tables. I found one API (+AD_DD+) which is all about registring Table/Rows/Columns to it but NOT about VALUES.
Please help me out.
Thanks !Yes, check below -
Regarding the UDT(User Defined Tables) -
Hi all,
Iam updating database tables using below statement .
INSERT data_base_table FROM workarea.
This is working but but looking for better method other than this. Ple let me know if u have any.
Regards,
ShivaMass update of all records form an internal table
INSERT data_base_table FROM TABLE internal_table
or
MODIFY data_base_table FROM TABLE internal_table. "If an existing match exists, it will update it, if not, creates a new record.
Regards,
ravi -
Making mass change to Oracle Apps base table
I have requirement where I have to do a mass updates/inserts to an Oracle Apps table (BOM_Inventory_Components). I have been told by my senior programmers that Oracle does not like direct updates or inserts to the Base tables in Oracle Apps.
Anyone knows of a standard practice of updating/inserting records into Base tables in Oracle Apps?I have seen and done lot of projects where we do direct table update but we do have Metalink support and we do inform them and involve them into regours conference call and than we are proceding direct table update.
the trick is oracle always as package where you can fine related update procedure so by passing neccesary parameters you can update the table.
Regards
Prashant Pathak -
IExpense API's and Base Tables Need
Hi All,
What are iExpense API's available to insert the data from other database source to Oracle Standard Tables using Oracle provided API's ?we have Private API's for expense report creation
AP_WEB_OA_MAINFLOW_PKG
AP_EXPENSE_REPORT_HEADERS_PKG
AP_WEB_DB_EXPRPT_PKG
AP_WEB_DB_EXPLINE_PKG -
HOW TO APPEND TABLE ON ORACLE DATABASE?
DEAR ALL,
CAN ANY ONE SUGGEST ME WITH SOME SAMPLE CODE AS TO HOW TO UPDATE AND APPEND TABLE ON ORACLE DATABASE USING SQL.
EXEC SQL.
APPEND TABLE FROM INT-TABLE.
END EXEC.
WILL THIS WORK.Check the sample code:
DATA Y TYPE I VALUE 300.
DATA Z TYPE I.
EXEC SQL.
INSERT INTO AVERI_CLNT (CLIENT, ARG1, ARG2, ARG3)
VALUES ('000', 9, 2, 47)
ENDEXEC.
DATA: F1(3), F2(3), F3(3).
F3 = ' 1 '.
EXEC SQL PERFORMING WRITE_AVERI_CLNT.
SELECT CLIENT, ARG1 INTO :F1, :F2 FROM AVERI_CLNT
WHERE ARG2 = :F3
ENDEXEC.
FORM WRITE_AVERI_CLNT.
WRITE: / F1, F2.
ENDFORM.
Check the below link:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
Regards,
Prakash.
Maybe you are looking for
-
How can a JTextField in a Dialog gain focus while mainframe is clicked
Hi I have been trying to develop a 3d application. I have some shapes on a Canvas3D laid on a JFrame. I open a new shape dialog after pressing the appropriate button. Once the dialog is open I need to select two shapes on canvas for reference hence t
-
I have two Macbook Pros, and I have one Dell flat-screen monitor. Right now, I hook up one Macbook Pro using the VGA adapter to the monitor. When I want to use my other Macbook Pro with the monitor, I switch the cables out. I know it's a small hassle
-
my ipad has disabled itself after asking for a passcode after updating ios7 now tried to restore it but didnt work
-
Can I change the center point for a motion scale
I would like to motion scale an image with the center for the scaling at the bottom of the image, not the center of the image. I tried changing the anchor point numbers, but that moves the photo as well.
-
AE 2014.2 crash when switching preview panel with Matrox
I newly bought a pc with Matrox M9138 card, and using it for professional use. All works fine, except for Adobe After Effects CC 2014.2: it simply crashes when switching between the Preview-panel and Render-Cue panel. When I look in AE preferences un