Sie sind auf Seite 1von 3

11/15/2016

SOA,OracleAppsandOAFWorld:UpdatePurchaseOrderHeaderDetailsAPIScript:OracleEBSR12

SOA, Oracle Apps and OAF World


SQL, PL/SQL, OAF, SOA, Oracle APPS/EBS

Contrib
utors
Bi
b
e
k
a
n
a
n
d
a
Pa
d
hy
R
u
hi
Si
n
g
h

Followers
Followers(21)Next

Sunday, 25 May 2014

Update Purchase Order Header Details API Script: Oracle EBS R12
There are certain scenarios in which PO headers details are required to be updated. Oracle has provided a
standard API to update PO header details.
PO Header fields which cab be updated are :
Vendor Site Details
Ship to Location

53705
Labels
APPS (23)
BPEL (2)
EBS R12 (8)
EBS Setups (17)
OAF (3)

Bill to Location

Purchasing (14)

Payment Term

Shell Script (2)

Delivery Term

SOA (39)

Buyer Details

SQL Scripts (25)

Below mentioned is the sample script to update PO Header Details through Oracle standard API.
CREATE OR REPLACE
PROCEDURE po_update_headers(
p_po_number IN VARCHAR2,

Blog Archive
14 (46)
Oct (1)

p_vendor_site_id IN NUMBER,

Aug (1)

p_ship_to_location IN VARCHAR2,

Jul (6)

p_bill_to_location IN VARCHAR2,
p_payment_id IN NUMBER,
p_delivery_term IN VARCHAR2,
p_buyer_id IN NUMBER,
p_status out VARCHAR2)
AS
Cursor To Get All the Details of PO
CURSOR po_hdr_cur
IS
SELECT ph.ROWID, ph.*
FROM apps.po_headers ph
WHERE ph.segment1 = p_po_number;

Follow

Total Pageviews

v_hdr_rec po_hdr_cur%rowtype;
BEGIN

apps.mo_global.set_policy_context('S',204);
apps.fnd_global.apps_initialize ( user_id => 1318, resp_id => 50578, resp_appl_id => 201 );

FOR hdr_rec IN po_hdr_cur
loop
apps.po_headers_pkg_s3.update_row
( x_rowid => hdr_rec.ROWID,
x_po_header_id => hdr_rec.po_header_id,
x_agent_id => nvl(p_buyer_id, hdr_rec.agent_id),
x_type_lookup_code => hdr_rec.type_lookup_code,
x_last_update_date => hdr_rec.last_update_date,
x_last_updated_by => hdr_rec.last_updated_by,
x_segment1 => hdr_rec.segment1,
x_summary_flag => hdr_rec.summary_flag,
x_enabled_flag => hdr_rec.enabled_flag,
x_segment2 => hdr_rec.segment2,
x_segment3 => hdr_rec.segment3,
x_segment4 => hdr_rec.segment4,
x_segment5 => hdr_rec.segment5,
x_last_update_login => hdr_rec.last_update_login,
x_vendor_id => hdr_rec.vendor_id,
x_vendor_site_id => nvl(p_vendor_site_id, hdr_rec.vendor_site_id),
x_vendor_contact_id => hdr_rec.vendor_contact_id,
x_ship_to_location_id => nvl(p_ship_to_location, hdr_rec.ship_to_location_id),
x_bill_to_location_id => nvl(p_bill_to_location, hdr_rec.bill_to_location_id),

http://bibeksoa.blogspot.com.eg/2014/05/updatepurchaseorderheaderdetails.html

Jun (4)
May (18)
Pick Activity to Receive
Multiple Response
From As...
Asynchronous BPEL
Process Returning
Multiple Respo...
Requisition Import API
: Oracle EBS R12
Query to Check
Concurrent Manager
Status
Update Purchase Order
Line Details : Oracle
EBS R...
Cancel PO Line API
Script: Oracle EBS
R12
Return to Vendor of
Purchase Order
Receipts Script...
Invoke a Web Service
From A Java Class
Using Jdev ...
Create A Web Service
From A Java Method
In Jdevelo...
Invoke A Java Method
From A Pl/Sql
Function
PO Reapproval API
Script: Oracle EBS
R12
Blanket Purchase Order
Import Program
Script: Orac...
Update Purchase Order
Header Details API
Script: O...

1/3

11/15/2016

SOA,OracleAppsandOAFWorld:UpdatePurchaseOrderHeaderDetailsAPIScript:OracleEBSR12
x_terms_id => nvl(p_payment_id, hdr_rec.terms_id),
x_ship_via_lookup_code => hdr_rec.ship_via_lookup_code,
x_fob_lookup_code => nvl(p_delivery_term, hdr_rec.fob_lookup_code),
x_freight_terms_lookup_code => hdr_rec.freight_terms_lookup_code,
x_status_lookup_code => hdr_rec.status_lookup_code,
x_currency_code => hdr_rec.currency_code,
x_rate_type => hdr_rec.rate_type,
x_rate_date => hdr_rec.rate_date,
x_rate => hdr_rec.rate,
x_from_header_id => hdr_rec.from_header_id,
x_from_type_lookup_code => hdr_rec.from_type_lookup_code,
x_start_date => hdr_rec.start_date,
x_end_date => hdr_rec.end_date,
x_revision_num => hdr_rec.revision_num,

Requisition Cancel API


Script : Oracle EBS
R12
Modifying Oracle
Business Rule From
Weblogic SOA C...
Create Decision Table
In Oracle Business
Rule
Schematron Validation
in Oracle Mediator
Dynamic Outbound
Directory Name and
Filename in Fi...

x_revised_date => hdr_rec.revised_date,


x_note_to_vendor => hdr_rec.note_to_vendor,

Apr (2)

x_printed_date => hdr_rec.printed_date,

Mar (11)

x_comments => hdr_rec.comments,


x_reply_date => hdr_rec.reply_date,
x_reply_method_lookup_code => hdr_rec.reply_method_lookup_code,
x_rfq_close_date => hdr_rec.rfq_close_date,
x_quote_type_lookup_code => hdr_rec.quote_type_lookup_code,

Feb (3)
13 (40)
12 (1)

x_quotation_class_code => hdr_rec.quotation_class_code,


x_quote_warning_delay => hdr_rec.quote_warning_delay,
x_quote_vendor_quote_number => hdr_rec.quote_vendor_quote_number,
x_closed_date => hdr_rec.closed_date,
x_approval_required_flag => hdr_rec.approval_required_flag,
x_attribute_category => hdr_rec.attribute_category,
x_attribute1 => hdr_rec.attribute1,
x_attribute2 => hdr_rec.attribute2,
x_attribute3 => hdr_rec.attribute3,
x_attribute4 => hdr_rec.attribute4,
x_attribute5 => hdr_rec.attribute5,
x_attribute6 => hdr_rec.attribute6,
x_attribute7 => hdr_rec.attribute7,
x_attribute8 => hdr_rec.attribute8,
x_attribute9 => hdr_rec.attribute9,
x_attribute10 => hdr_rec.attribute10,
x_attribute11 => hdr_rec.attribute11,
x_attribute12 => hdr_rec.attribute12,
x_attribute13 => hdr_rec.attribute13,
x_attribute14 => hdr_rec.attribute14,
x_attribute15 => hdr_rec.attribute15) ;
COMMIT;
p_status := 'SUCCESS';
END loop;
p_status := 'SUCCESS';

exception
WHEN others THEN
p_status := 'ERROR '||sqlcode||' '||sqlerrm;
END ;

Let us know our valuable feedback.


Posted by Ruhi Singh at Sunday, May 25, 2014
+1 Recommend this on Google

Labels: APPS, EBS R12, Purchasing, SQL Scripts


3 comments:
rv 8/05/2014 7:18 pm
This comment has been removed by the author.
Reply

Rajesh Naidu 1/29/2015 11:26 pm


HI,
i am trying to update amount agreed at header level for Blanket Purchase Agreement which is
already approved. Is there any APi to update blanket Po. PO_CHANGE_API1_S is not working
.please help me on this ASAP.
Thanks
Rajesh
Reply

http://bibeksoa.blogspot.com.eg/2014/05/updatepurchaseorderheaderdetails.html

2/3

11/15/2016

SOA,OracleAppsandOAFWorld:UpdatePurchaseOrderHeaderDetailsAPIScript:OracleEBSR12
Sridevi K 11/03/2016 9:59 pm
Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile https://in.linkedin.com/in/sridevikoduru9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL,
PL/SQL, D2K at training@oracleappstechnical.com | +91 9581017828.
Reply

Enteryourcomment...

Commentas:

Publish

Unknown(Google)

Signout

Notifyme

Preview

Newer Post

Home

Older Post

Subscribe to: Post Comments (Atom)

Travel template. Powered by Blogger.

http://bibeksoa.blogspot.com.eg/2014/05/updatepurchaseorderheaderdetails.html

3/3

Das könnte Ihnen auch gefallen