Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

11/15/2016 SOA, Oracle Apps and OAF World: Update Purchase Order Header Details API Script: Oracle EBS R12

SOA, Oracle Apps and OAF World


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

Contrib 3 Sunday, 25 May 2014 Total Pageviews


utors
Bi Update Purchase Order Header Details API Script: Oracle EBS R12
53705
b
e There are certain scenarios in which PO headers details are required to be updated. Oracle has provided a Labels
k
standard API to update  PO header details.
a APPS (23)
n BPEL (2)
a PO Header fields which cab be updated are :‐
n EBS R12 (8)
d EBS Setups (17)
a Vendor Site Details
Pa OAF (3)
Ship to Location
d Purchasing (14)
Bill to Location
hy
Payment Term Shell Script (2)
R
Delivery Term SOA (39)
u
hi Buyer Details SQL Scripts (25)
Si
n Below mentioned is the sample script to update PO Header Details through Oracle standard API.
g Blog Archive
h CREATE OR REPLACE ▼  14 (46)
Followers PROCEDURE po_update_headers(
►  Oct (1)
Followers (21) Next     p_po_number        IN VARCHAR2,
    p_vendor_site_id   IN NUMBER, ►  Aug (1)
    p_ship_to_location IN VARCHAR2, ►  Jul (6)
    p_bill_to_location IN VARCHAR2,
►  Jun (4)
    p_payment_id       IN NUMBER,
    p_delivery_term    IN VARCHAR2, ▼  May (18)
    p_buyer_id         IN NUMBER, Pick Activity to Receive
    p_status out VARCHAR2) Multiple Response
AS From As...
Asynchronous BPEL
‐‐‐‐‐‐Cursor To Get All the Details of PO ‐‐‐‐‐‐‐‐‐‐‐‐‐‐ Process Returning
  CURSOR po_hdr_cur  Multiple Respo...
  IS Requisition Import API
  SELECT  ph.ROWID, ph.* : Oracle EBS R12
  FROM apps.po_headers ph
Query to Check
  WHERE ph.segment1 = p_po_number;  Concurrent Manager
   Status
  v_hdr_rec po_hdr_cur%rowtype;
Follow Update Purchase Order
BEGIN  Line Details : Oracle
     EBS R...
    apps.mo_global.set_policy_context('S',204);
Cancel PO Line API
    apps.fnd_global.apps_initialize ( user_id => 1318, resp_id => 50578, resp_appl_id => 201 );   
Script: Oracle EBS
     R12
    FOR hdr_rec IN po_hdr_cur
Return to Vendor of
    loop    
Purchase Order
      apps.po_headers_pkg_s3.update_row  Receipts Script...
                   (  x_rowid        => hdr_rec.ROWID,
Invoke a Web Service
                      x_po_header_id => hdr_rec.po_header_id,                             
From A Java Class
                      x_agent_id     => nvl(p_buyer_id, hdr_rec.agent_id), Using Jdev ...
                      x_type_lookup_code  => hdr_rec.type_lookup_code,
Create A Web Service
                      x_last_update_date  => hdr_rec.last_update_date,
From A Java Method
                      x_last_updated_by   => hdr_rec.last_updated_by, In Jdevelo...
                      x_segment1          => hdr_rec.segment1,
                      x_summary_flag      => hdr_rec.summary_flag,
Invoke A Java Method
From A Pl/Sql
                      x_enabled_flag      => hdr_rec.enabled_flag,
Function
                      x_segment2  => hdr_rec.segment2,
                      x_segment3  => hdr_rec.segment3,
PO Re‐approval API
Script: Oracle EBS
                      x_segment4  => hdr_rec.segment4,
R12
                      x_segment5  => hdr_rec.segment5,
                      x_last_update_login   => hdr_rec.last_update_login,
Blanket Purchase Order
Import Program
                      x_vendor_id           => hdr_rec.vendor_id,
Script: Orac...
                      x_vendor_site_id      => nvl(p_vendor_site_id, hdr_rec.vendor_site_id),         
                      x_vendor_contact_id   => hdr_rec.vendor_contact_id, Update Purchase Order
Header Details API
                      x_ship_to_location_id =>  nvl(p_ship_to_location, hdr_rec.ship_to_location_id),   
Script: O...
                      x_bill_to_location_id => nvl(p_bill_to_location, hdr_rec.bill_to_location_id),  

http://bibeksoa.blogspot.com.eg/2014/05/update­purchase­order­header­details.html 1/3
11/15/2016 SOA, Oracle Apps and OAF World: Update Purchase Order Header Details API Script: Oracle EBS R12
                      x_terms_id                  => nvl(p_payment_id, hdr_rec.terms_id),              Requisition Cancel API
                      x_ship_via_lookup_code      => hdr_rec.ship_via_lookup_code, Script : Oracle EBS
                      x_fob_lookup_code           => nvl(p_delivery_term, hdr_rec.fob_lookup_code),     R12
                      x_freight_terms_lookup_code   => hdr_rec.freight_terms_lookup_code, Modifying Oracle
                      x_status_lookup_code           => hdr_rec.status_lookup_code, Business Rule From
                      x_currency_code                => hdr_rec.currency_code, Weblogic SOA C...
                      x_rate_type                    => hdr_rec.rate_type, Create Decision Table
                      x_rate_date                   => hdr_rec.rate_date, In Oracle Business
                      x_rate => hdr_rec.rate, Rule
                      x_from_header_id         => hdr_rec.from_header_id, Schematron Validation
                      x_from_type_lookup_code  => hdr_rec.from_type_lookup_code, in Oracle Mediator
                      x_start_date             => hdr_rec.start_date,
Dynamic Outbound
                      x_end_date               => hdr_rec.end_date,
Directory Name and
                      x_revision_num           => hdr_rec.revision_num, 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,
►  Feb (3)
                      x_reply_date          => hdr_rec.reply_date,
                      x_reply_method_lookup_code    => hdr_rec.reply_method_lookup_code,
►  13 (40)
                      x_rfq_close_date              => hdr_rec.rfq_close_date,
                      x_quote_type_lookup_code      => hdr_rec.quote_type_lookup_code, ►  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/update­purchase­order­header­details.html 2/3
11/15/2016 SOA, Oracle Apps and OAF World: Update Purchase Order Header Details API Script: Oracle EBS R12

Sridevi K 11/03/2016 9:59 pm

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile ‐ https://in.linkedin.com/in/sridevi‐koduru‐9b876a8b
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

Enter your comment...

Comment as:  Unknown (Google) Sign out

 
Publish Preview   Notify me

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

Travel template. Powered by Blogger.

http://bibeksoa.blogspot.com.eg/2014/05/update­purchase­order­header­details.html 3/3

You might also like