Wednesday, 20 April 2011

PO Interfaces


PO Interfaces

PO_HEADERS_INTERFACE
is the interface table that imports header information from e– Commerce Gateway for blanket purchase orders and catalog quotations.
INTERFACE_HEADER_ID
BATCH_ID
INTERFACE_SOURCE_CODE

PO_LINES_INTERFACE
is the interface table that imports lines information from e– commerce Gateway for blanket purchase orders and catalog quotations.
INTERFACE_LINE_ID
INTERFACE_HEADER_ID
ACTION NULL Action to be completed: New or Add
GROUP_CODE (Null) Indicates the grouping of the requisition lines

PO_DISTRIBUTIONS_INTERFACE
is the interface table that imports distribution information from e– Commerce Gateway for blanket purchase orders and catalog quotations.
INTERFACE_HEADER_ID
INTERFACE_LINE_ID
INTERFACE_DISTRIBUTION_ID
ORG_ID

PO_REQUISITIONS_INTERFACE_ALLcontains requisition information from other applications. Import feature uses this information to create new requisition headers, lines and distributions.
TRANSACTION_ID (PK) Transaction unique identifier
PROCESS_FLAG NULL Transaction processing state

PO_REQ_DIST_INTERFACE_ALL
Is the interface table that creates multiple distributions using Requisition Import.
ACCRUAL_ACCOUNT_ID Unique identifier for the General Ledger accrual account
ALLOCATION_TYPE Specifies the method of allocation across distributions. Can be PERCENT.
ALLOCATION_VALUE Allocation split value
BATCH_ID Import batch identifier
BUDGET_ACCOUNT_ID Unique identifier for the General Ledger budget account
CHARGE_ACCOUNT_ID Unique identifier for the General Ledger charge account

RCV_HEADERS_INTERFACEis the interface table that stores receiving header information.
HEADER_INTERFACE_ID Interface EDI header unique identifier
GROUP_ID NULL Interface group for set processing
EDI_CONTROL_NUM EDI transaction control number if data
is sent via EDI
PROCESSING_STATUS_CODE Processing status of the interface
header row
RECEIPT_SOURCE_CODE Source type of the shipment
ASN_TYPE NULL The document type: values are
ASN, ASBN, or RECEIVE
TRANSACTION_TYPE The transaction purpose code: values are
NEW, REPLACE, ADD,or CANCEL

RCV_LOTS_INTERFACE
Holds temporary lot number transaction records for a parent record in the RCV_TRANSACTIONS_INTERFACE table.

RCV_TRANSACTIONS_INTERFACE
stores information about receiving transactions that are waiting to be processed by the receiving transaction processor or were rejected due to an error when the transaction processor attempted to process the transaction.
TRANSACTION_TYPE
TRANSACTION_DATE
PROCESSING_STATUS_CODE

Interface Table
--PO_REQUISITION_INTERFACE_ALL
Program Name to Launch the PO Import program -Requisition Import program
In the first phase, the program validates your data and derives or defaults additional information. The program generates an error message for every validation that fails and creates a row
PO_REQUISITIONS_INTERFACE_ALL
It contains requisition information from other applications. Each row includes all the information necessary to create approved or unapproved requisitions in Oracle Purchasing.
The Oracle Purchasing Requisition Import feature uses this information to create new requisition headers, lines and distributions.

PO_REQUISITIONS_INTERFACE_ALL
table are identical to the corresponding columns in the
PO_REQUISITIONS_HEADERS_ALL,
PO_REQUISITION_LINES_ALL and PO_REQ_DISTRIBUTIONS_ALL
tables.

Po_requisition_interface_all
INTERFACE_SOURCE_CODE --VDP
,SOURCE_TYPE_CODE --INVENTORY
,DESTINATION_TYPE_CODE --EXPENSE
,AUTHORIZATION_STATUS --Status Always Approved we will get ..
,REQ_NUMBER_SEGMENT1 --Request id
,PREPARER_ID -- ASSOCIATE ID comes from VDP
,LINE_TYPE_ID
,LINE_TYPE --vArchar Requisition line type name
,QUANTITY --Quantity
,UNIT_PRICE
,CHARGE_ACCOUNT_ID -- to be hard coded based on the line type
,DESTINATION_ORGANIZATION_ID --v-org_id
,DELIVER_TO_LOCATION_ID -- location id
,DELIVER_TO_REQUESTOR_ID -- ASSOCIATE ID Same as Prepare_id
,ITEM_ID -- item code
,ITEM_DESCRIPTION --Based on the item code description is taken
,CATEGORY_ID
,UOM_CODE
,CURRENCY_CODE --if this is supplied then next two should be filled
,RATE
,RATE_DATE
,RATE_TYPE
If you use Oracle Master Scheduling/MRP or a non– Oracle MRP system with Oracle Purchasing, you may find that you need to reschedule requisitions as your planning requirements change.

Reschedule Interface Table Since you have already loaded your requisitions into Oracle Purchasing, you simply need to identify for Oracle Purchasing the requisition lines you want to reschedule. After you identify each line to reschedule, you can update the quantity and the need– by date for the corresponding requisition line.
PO_RESCHEDULE_INTERFACE table for each change you want to make to a requisition. Each row includes the requisition line identifier, the new quantity, and the new need– by date for the requisition line. You run the Requisition Reschedule program to implement the changes. Import Requisitions from the External System to Oracle Purchasing Write a Import Program to load the external data Dump data into the some interface table .Validate the data through some PL/SQL
(Applying Business Logic---
Run Import Program
Requisition is imported and created as many
number of requisition as successful records .Others -if error then run exceptional report to see the reason of failure.

Accounts Payable (AP) FAQ'S


Accounts Payable (AP)


1) What are the different types of Interfaces?
Ans Refer Laxman Vendor import notes in scanned documents
a) Vendor conversion / Import
A vendor is any company or person that we buy goods or services from.
Interface table --- we need to create our own custom interface table.
Base tables
PO_VENDORS (Segment1-Vendor number is unique)
PO_VENDOR_CONTACTS
PO_VENDOR_SITES_ALL
b) Legacy Invoice
Interface Tables
AP_INVOICE _INTERFACE is the header info
AP_INVOICES_LINES_INTERFACE is the lines table.

RUN PAYABLES INVOICE IMPORT CONCURRENT PROGRAM
Base Tables
AP_INVOICE_ALL is also the header information is stored.
AP_INVOICES_DISTRIBUTIONS_ALL is the lines information table.
AP_PAYMENTS_SCHEDULES_ALL (AMOUNT_REMAINING stores balance amount to be paid)
AP_INVOICE_PAYMENTS_ALL (INVOICE_ID)
AP_CHECKS_ALL (CHECK_ID)

AP_INTERFACE_REJECTIONS (REJECT_LOOKUP_CODE stores the error occurred during the invoice import ex: account required, invalid supplier site )

2) What is the process of Vendor Conversion?
This is always custom work. There is no predefined program to import the vendors/supplier from legacy system to oracle. We need write the SQL*Loader file to custom interface table and write pl/sql programs to hit the base tables directly into the po_vendors table,po_vendor_sites_table and po_vendors_contacts.

3) In which table and column Vendor Number stores?
In PO_VENDORS table SEGMENT1 stores the vendor number. User doesn’t know about the (vendor id) ids only the developer knows them.

4) After conversions how do you get the Next Vendor column?
We need to resync the PO_UNIQUE_IDENTIFIER_CONTROL (field called CURRENT_MAX_UNIQUE_IDENTIFIER) with the sequence called PO_VENDORS_S. This resync was run after inserting into vendors and updating the info in the sites table. The current max unique identifier should be equal to the nextval in the po_vendors_s sequence.

5) What are the setups required for vendor conversions?
Before loading from the legacy system to base table we need to define
Supplier type, Payment type, Payment terms, Payment group.

6) Which module is the owner for vendor (supplier) tables?
Ans--- Purchasing module is the owner of the supplier table.

7) What is the process of creating an Invoices and transferring it to GL?
1. create batch
2. create invoice
3. create distribution
4. validate the invoice
5. actions -à approve
6. if individual create accounting click ok
7. If batch go to batch create accounting.
8. Create accounting hits Payable Accounting(Transfer) ??Program which will create accounting.
9. Run Transfer to GL Concurrent Program
10. Journal Import
11. Post journals
12. Hits balances.

8) How do u Transfer from AP to GL?
Ans---“Payables transfer to GL program” is used to transfer from AP to GL.

10) How many types of Transactions are there in AP?
1. Standard Invoice : The amount is g
2. Debit memo (increases balances owed to supplier)
1. Raised by organization
2. Raised by Supplier.
3. Credit memo
4. Prepayment
5. Mixed Invoices both debit & credit
6. Expense Report employees
7. Quick Match
8. P.O.Default

11) Tell me about PO cycle( Procure To Pay )?
1. Requisition
2. Manager
3. Approval
4. Request For Quote (RFQ)
5. Quotation
6. Quote Analysis (Track/check record)
7. Issue Purchase Order (PO)
8. Goods Receipt Note(GRN)
9. Invoice
10. Transfer To GL (Payables transfer to GL program)
11. Journal Import
12. GL Balances

12) How many types of purchase order types/agreements are there?
a) Standard Purchase Order
b) Planned PO : A planned purchase order is a long-term agreement committing to buy it
items or services from a single source. You must specify tentative delivery schedules and all details for goods or services that you want to buy, including charge account, quantities and estimated cost.
EX: Buying goods for Christmas from a specific dealer.
c) Contract PO : You create contract purchase agreement with your supplier to agree on specific terms and conditions without indicating the goods and services that you will be purchasing i.e. for $ amount you must supply this much quantity. You can later issue standard PO referencing your contracts and you can encumber these purchase orders if you use encumbrance accounting.
d) Blanket PO : You create blanket purchase agreements when you know the detail of goods or services you plan to buy from a specific supplier in a period , but you do not yet know the detail of your delivery schedules. You can use blanket purchase agreements to specify negotiated prices for your items before actually purchasing them.
A Blanket Purchase Agreement is a sort of contract between the you and ur supplier about the price at which you will purchase the items from the supplier in future. Here you enter the price of the item not the quantity of the items. When you create the release you enter the quantity of the items. The price is not updatable in the release. The quantity * price makes the Released Amount. Now suppose your contract with your supplier is such that you can only purchase the items worth a fixed amount against the contract.

13) What is 2-way, 3-way, 4-way matching?
2-way matching: 2-way matching verifies that Purchase order and invoice quantities must match within your tolerances as follows:
Quantity billed <= Quantity Ordered
Invoice price <= Purchase order price
(<= sign is used because of tolerances)
Often used for services where no receiver is generated.
3-way matching: 3-way matching verifies that the receipt and invoice information match with the quantity tolerances defined:
Quantity billed <= Quantity received
4-way matching: 4-way matching verifies that acceptance documents and invoice information match within the quantity tolerances defined:
Quantity billed <= Quantity accepted.
(Acceptance is done at the time of Inspecting goods).
Whether a PO shipment has 2-way, 3-way or 4-way matching can be setup in the Shipment Details zone of the Enter PO form (character)
Receipt required Inspection required Matching
Yes Yes 4-way
Yes No 3-way
No No 2-way

Tuesday, 19 April 2011

GL INTERFACE CODE


             GL INTERFACE CODE                                                        
                                                                     
                                                                     
                                             
CREATE OR REPLACE PROCEDURE  GE_Pro(Errbuf  OUT VARCHAR2,
                                                       Retcode OUT VARCHAR2) IS
  -- cursor declaration
  CURSOR gl_cur IS
    SELECT  
        status    ,
        set_of_books_id   ,
        accounting_date   ,
        currency   ,
        date_created   ,
        created_by    ,
        actual_flag    ,
        category       ,
        source     ,
        curr_conversion     ,
          segment1     ,
          segment2        ,
          segment3        ,
          segment4        ,
          segment5        ,
          entered_dr      ,
          entered_cr      ,
          accounted_dr    ,
          accounted_cr    ,
          group_id        
          FROM VENKAT_GL_INBOUND_INTERFACE;
l_currencycode VARCHAR2(25);
l_set_of_books_id NUMBER(3);
l_flag         VARCHAR2(2);
l_error_msg    VARCHAR2(100);
l_err_flag     VARCHAR2(10);
l_category     VARCHAR2(100);
L_USERID       NUMBER(10);
BEGIN
 DELETE FROM  gl_interface;
 COMMIT;
FOR rec_cur IN gl_cur LOOP
     l_flag:='A';
     l_err_flag:='A';
--This  PL/SQL Block will do the currency validation
 --end of the currency validation
--Category Column Validation
BEGIN
 SELECT USER_JE_CATEGORY_NAME
 INTO   l_CATEGORY
 FROM   GL_JE_CATEGORIES
 WHERE  USER_JE_CATEGORY_NAME = REC_CUR.Category;
 EXCEPTION
     WHEN OTHERS THEN
            l_category:=NULL;
            l_flag:='E';
            l_error_msg:='Category does not exist ';
 END;
Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE'||L_FLAG);
 --End Category Column Validation
 --User ID column validation
BEGIN
SELECT USER_ID
INTO   L_USERID
FROM   FND_USER
WHERE  USER_ID = REC_CUR.created_by;
EXCEPTION
WHEN OTHERS THEN
            L_userid:=NULL;
            l_flag:='E';
            l_error_msg:='User ID does not exist ';
 END;
 Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE'||L_FLAG);
 --End of Created_by OR UserID column Validation
 --Set of  books Validation
 BEGIN
     SELECT set_of_books_id
     INTO   l_set_of_books_id
     FROM   GL_SETS_OF_BOOKS
     WHERE set_of_books_id=rec_cur.set_of_books_id;
     EXCEPTION
     WHEN OTHERS THEN
            l_set_of_books_id:=NULL;
            l_flag:='E';
            l_error_msg:='set of Books ID does not exist ';
 END;
 Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE'||L_FLAG);
-- End Set of  books Validation
 --Status Column validation
/* BEGIN
 IF rec_cur.status = 'NEW' THEN
 l_flag:= 'A';
 ELSE
 l_flag:= 'E';
 Fnd_File.put_line (Fnd_File.LOG,'Status column has got invalid data');
 END IF;
 END;*/
 BEGIN
     SELECT currency_code
     INTO   l_currencycode
     FROM   fnd_currencies
     WHERE currency_code=rec_cur.currency
     AND currency_code='USD';
     EXCEPTION
      WHEN OTHERS THEN
            l_currencycode:=NULL;
            l_flag:='E';
            l_error_msg:='currency code does not exists';
 END;
Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE'||L_FLAG);
Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE'||L_FLAG);
--End of Actual Flag Column validation
IF   l_flag!='E' THEN
Fnd_File.put_line (Fnd_File.LOG,'Inserting data into the Interface TABLE');
INSERT INTO gl_interface(status,
      set_of_books_id,
      accounting_date,
      currency_code,
      date_created,
      created_by,
      actual_flag,
      user_je_category_name,
      user_je_source_name,
      user_currency_conversion_type,
      segment1,
      segment2,
      segment3,
      segment4,
      segment5,
      entered_dr,
      entered_cr,
      accounted_dr,
      accounted_cr,
      group_id)
      VALUES
      (rec_cur.status    ,
       rec_cur.set_of_books_id   ,
       rec_cur.accounting_date   ,
       rec_cur.currency    ,
       rec_cur.date_created   ,
       rec_cur.created_by    ,
       rec_cur.actual_flag    ,
       rec_cur.category       ,
       rec_cur.source     ,
       rec_cur.curr_conversion                ,
       rec_cur.segment1  ,
       rec_cur.segment2  ,
       rec_cur.segment3  ,
       rec_cur.segment4  ,
       rec_cur.segment5  ,
       rec_cur.entered_dr   ,
       rec_cur.entered_cr   ,
       rec_cur.accounted_dr  ,
       rec_cur.accounted_cr  ,
       rec_cur.group_id);
 END IF;
 l_flag:=NULL;
 l_error_msg:=NULL;
  END LOOP;
COMMIT;
END  GE_Pro;
/

OUTBOUND INTERFACE(INVENTORY)


                         OUTBOUND INTERFACE(INVENTORY)                                            
                                                                     
                                             
CREATE OR REPLACE procedure RAMANA_INV_Out1(Errbuf OUT varchar2,
                                       Retcode ouT varchar2,
            f_id    in number,
            t_id    in varchar2) as
cursor c1 is select
       msi.segment1 item,
    msi.inventory_item_id Itemid,
    msi.description  itemdesc,
    msi.primary_uom_code Uom,
    ood.organization_name name,
    ood.organization_id   id,
    mc . segment1||','||mc.segment2 Category
    from
    mtl_system_items_b           msi,
    org_organization_definitions ood,
    mtl_item_categories          mic,
    mtl_categories               mc
    where
    msi.organization_id       = ood.organization_id
    and msi.inventory_item_id = mic.inventory_item_id
    and msi.organization_id   = mic.organization_id
    and mic.category_id       = mc.category_id
    and msi.purchasing_item_flag = 'Y'
    and msi.organization_id between f_id and t_id;
x_id     utl_file.file_type;
l_count  number(5) default 0;
begin
          x_id:=utl_file.fopen('d:\oracle\proddb\8.1.7\plsql\temp','invoutdata.dat','W');
           --select * from v$parameter where name like '%utl_file%'
for x1 in c1 loop
l_count:=l_count+1;
utl_file.put_line(x_id,x1.item    ||'-'||
        x1.itemid  ||'-'||
        x1.itemdesc||'-'||
        x1.uom   ||'-'||
        x1.name   ||'-'||
        x1.id   ||'-'||
        x1.category   );
end loop;
utl_file.fclose(x_id);
Fnd_file.Put_line(Fnd_file.output,'No of Records transfered to the data file :'||l_count);
Fnd_File.Put_line(fnd_File.Output,' ');
Fnd_File.Put_line(fnd_File.Output,'Submitted User name  '||Fnd_Profile.Value('USERNAME'));
Fnd_File.Put_line(fnd_File.Output,' ');
Fnd_File.Put_line(fnd_File.Output,'Submitted Responsibility name '||Fnd_profile.value('RESP_NAME'));
Fnd_File.Put_line(fnd_File.Output,' ');
Fnd_File.Put_line(fnd_File.Output,'Submission Date :'|| SYSDATE);
Exception
WHEN utl_file.invalid_operation THEN
  fnd_file.put_line(fnd_File.log,'invalid operation');
  utl_file.fclose_all;
WHEN utl_file.invalid_path THEN
  fnd_file.put_line(fnd_File.log,'invalid path');
  utl_file.fclose_all;
WHEN utl_file.invalid_mode THEN
  fnd_file.put_line(fnd_File.log,'invalid mode');
  utl_file.fclose_all;
WHEN utl_file.invalid_filehandle THEN
  fnd_file.put_line(fnd_File.log,'invalid filehandle');

  utl_file.fclose_all;
WHEN utl_file.read_error THEN
  fnd_file.put_line(fnd_File.log,'read error');
  utl_file.fclose_all;
WHEN utl_file.internal_error THEN
  fnd_file.put_line(fnd_File.log,'internal error');
  utl_file.fclose_all;
WHEN OTHERS THEN
  fnd_file.put_line(fnd_File.log,'other error');
  utl_file.fclose_all;
End RAMANA_INV_Out1;


  

How to Set R12 Supplier Page in Read Only Mode?


How to Set R12 Supplier Page in Read Only Mode?



Open System Administrator resp. Navigate to Security->Responsibility->Define
o Query responsibility name(Ex: Payables, HG Operations) you want to use that will have the Supplier page as Read Only.
o Under Menu Exclusions select Type as 'Function' and Name as 'Supplier Full Access : Buyer View'
o Save changes.

Navigation Path: System Administrator->Security->Responsibility->Define 

o Now Now open Suppliers page and check changes open Suppliers page and check changes.
Navigation Path: Payables Resp(Payables, HG Operations)->Suppliers->EntrySupplier page looks like this in read only mode

Prepayment Invoices(AP)


 Prepayment Invoices

A prepayment is a type of invoice you enter to make an advance payment to a supplier or employee. You can enter two types of prepayments: Temporary and Permanent.

Temporary prepayments can be applied to invoices or expense reports you receive. For example, you use a Temporary prepayment to pay a hotel a catering deposit. When the hotel's invoice arrives, apply the prepayment to the invoice to reduce the invoice amount you pay.

Permanent prepayments cannot be applied to invoices. For example, you use a Permanent prepayment to pay a lease deposit for which you do not expect to be invoiced.


Include Prepayment in Invoice:
You can enter supplier invoices where the invoice amount includes prepayments. If you receive a supplier invoice, and the invoice amount has been reduced because of prepayments that the supplier has received, you need to indicate that the invoice amount includes one or more prepayments.

Example:
Prepay Invoice:    200$
Standard Invoice: 500$

Case 1: If you apply Prepay on Standard invoice with 'Apply' check box checked in Apply/Unapply window
Result on Standard Invoice after apply Prepay
Header
   Invoice Amount: 500$
   Paid Amount :    200$
Distributions
   Item                 500$
   Prepay             -200$
In this case distribution total is 500 not 300 and amount paid is 200, remaining amount to pay is 300.

Case 2: If you apply Prepay on Standard invoice with both check boxes selected in Apply/Unapply window
Result on Standard Invoice  after apply Prepay
Header
   Invoice Amount:  300$
   Paid Amount :        0$
Distributions
   Item                  500$
   Prepay              -200$    'Prepayment on Invoice'-Checked
In this case distribution total is 300 because prepay is part of Std invoice. Amount to pay is 300.
Note: Because the Distribution Total includes prepayments, you need to ensure that you have applied prepayments before you submit the invoice for Invoice Validation.


Points To Note:
  1. Settlement date: The date after which the prepayment can be applied to an invoice.
  2. On a prepayment, you can enter any number of distributions, either manually, or automatically by purchase order matching, distribution sets, or allocating. 
  3. You can take discounts on prepayments.
  4. You can create Foreign Currency Prepayments.
  5. You cannot partially pay a prepayment. you must fully pay it.
  6. You can apply prepay on the invoice type is Standard, Mixed, or Expense Report.
  7. You can apply only Item distributions from the prepayment.
  8. You must fully pay a prepayment before you can apply the prepayment to an invoice.
  9. If you want to apply Permanent type prepay then you can change the Prepayment Type to Temporary.
  10. Supplier, invoice currency and payment currency must be same on prepay and to invoice.
  11. If the prepayment has a value in the Prepayment PO Number field, then the invoice must be matched to the same purchase order.
  12. GL Date on Apply/Unapply window, which is the accounting date for the new Prepayment distributions that Payables creates when you apply a prepayment. This date must be after the latest accounting date on any distribution for either prepayment or invoice and must be in an open period.

SUPPLIER AND SITE CREATION API


SUPPLIER CREATION API
DECLARE

l_vendor_rec  ap_vendor_pub_pkg.r_vendor_rec_type;
l_return_status  VARCHAR2(10);
l_msg_count  NUMBER;
l_msg_data  VARCHAR2(1000);
l_vendor_id NUMBER;
l_party_id  NUMBER;

BEGIN

--Required
l_vendor_rec.segment1 := '123'; --ID
l_vendor_rec.vendor_name := 'ABCD'; --Supplier Name
--Optional
l_vendor_rec.match_option:='R' ;

pos_vendor_pub_pkg.create_vendor
(
p_vendor_rec => l_vendor_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_id => l_vendor_id,
x_party_id => l_party_id
);

COMMIT;

dbms_output.put_line('return_status: '||l_return_status);
dbms_output.put_line('msg_data: '||l_msg_data);
dbms_output.put_line('vendor_id: '||l_vendor_id);
dbms_output.put_line('party_id: '||l_party_id);

END;      


##########################################################################
DECLARE

l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_return_status  VARCHAR2(10);
l_msg_count  NUMBER;
l_msg_data  VARCHAR2(1000);
l_vendor_site_id  NUMBER;
l_party_site_id  NUMBER;
l_location_id  NUMBER;

BEGIN

--Required
l_vendor_site_rec.vendor_id :='37172';
l_vendor_site_rec.vendor_site_code := 'xyz';
l_vendor_site_rec.address_line1 := 'A-602';
l_vendor_site_rec.country := 'IN';
l_vendor_site_rec.org_id := '80';

--Optional

l_vendor_site_rec.purchasing_site_flag:='Y';
l_vendor_site_rec.pay_site_flag :='Y';
l_vendor_site_rec.rfq_only_site_flag :='N';
l_vendor_site_rec.phone := '67615006';

pos_vendor_pub_pkg.create_vendor_site
(
p_vendor_site_rec => l_vendor_site_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_site_id => l_vendor_site_id,
x_party_site_id => l_party_site_id,
x_location_id => l_location_id
);

COMMIT;

dbms_output.put_line('return_status: '||l_return_status);
dbms_output.put_line('msg_data: '||l_msg_data);
dbms_output.put_line('vendor_site_id: '||l_vendor_site_id);
dbms_output.put_line('party_site_id: '||l_party_site_id);
dbms_output.put_line('location_id: '||l_location_id);

END;