0% found this document useful (0 votes)
245 views

Oracle Apps Blog - Tricks & Scripts ..

This document provides instructions for receiving a purchase order (PO) using the Receiving Open Interface (ROI) in Oracle Apps. It describes inserting records into the rcv_transactions_interface and rcv_shipment_headers tables with a status of "PENDING" to create a shipment header and receive the PO. Sample PL/SQL code is provided to lookup the PO header ID and other attributes and perform the receiving transaction. Key interface tables, error tables, and base tables involved in the receiving process through the ROI are also listed.

Uploaded by

ashibek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
245 views

Oracle Apps Blog - Tricks & Scripts ..

This document provides instructions for receiving a purchase order (PO) using the Receiving Open Interface (ROI) in Oracle Apps. It describes inserting records into the rcv_transactions_interface and rcv_shipment_headers tables with a status of "PENDING" to create a shipment header and receive the PO. Sample PL/SQL code is provided to lookup the PO header ID and other attributes and perform the receiving transaction. Key interface tables, error tables, and base tables involved in the receiving process through the ROI are also listed.

Uploaded by

ashibek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

12/04/2017 OracleAppsBlogTricks&Scripts...

:ReceivingPOUsingReceivingOpenInterface(ROI)

0 More NextBlog CreateBlog SignIn

oracleappsblogtricks&scripts...

OracleEbusinessSuite(Distributions,
Manufacturing&Financials)

Tuesday,August25,2009 UsefulLinks
AskTom
EBusinessSuite
ReceivingPOUsingReceivingOpenInterface(ROI) KnowOracleApps
TheReceivingTransactionProcessorprocessespendingor OracleAppsDocumentation
unprocessedreceivingtransactions.WecanreceivethePurchase OracleAppsOnlineHelp
OrdereitherusingtheExpectedReceiptformorbyputtingtherecord OracleIntegrationRepository
intotheReceivingOpenInterface(ROI).Andthenifwewillsubmit OracleMetalink
thereceivingtransactionsprocessorsothePOwillbereceived. OracleWhitePapers
OTNDiscussionForum
Recordsneedstobeinsertedintorcv_transactions_interfacewith SolutionBeacon
processing_status_codeandtransaction_status_codeas'PENDING'
andtransaction_typeof'RECEIVE'.andalsoinsertedinto
rcv_shipment_headerswhichcreatestheshipmentheader. SearchThisBlog

Search
InterfaceTables:

rcv_headers_interface
rcv_transactions_interface Labels
mtl_transaction_lots_interface AccountsPayable(1)
AOL(3)
ErrorTable: Inventory(7)
Manufacturing(1)
po_interface_errors OraclePricing(1)
OracleShippingExecution(4)
BaseTables:
OrderManagement(3)
rcv_shipment_headers Purchasing(9)
rcv_shipment_lines
rcv_transactions
mtl_lot_numbers BlogArchive
mtl_material_transactions 2010(2)
rcv_lot_transactions 2009(28)
November(3)
R12SampleProceduretoReceivePObyinsertingrecordsinto
ROI October(7)
September(1)
DECLARE August(17)
ReceivingPOUsingReceivingOpen
Interface(ROI)
x_user_idNUMBER
ASmallCorrection
x_resp_idNUMBER
ToCheckfortheavailableonhand
x_appl_idNUMBER ForAnItemina...
x_po_header_idNUMBER
Useofinv_lot_api_pubAPIfor
x_vendor_idNUMBER Inserting&AutoGe...

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html ConsignedPOsnotgetting 1/10


12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

x_segment1VARCHAR2(20) ConsignedPOsnotgetting
convertedwiththeconsi...
x_org_idNUMBER
x_line_numNUMBER PurchasingSystemConfiguration
l_chr_lot_numberVARCHAR2(50) UseOfPricingAPI
l_chr_return_statusVARCHAR2(2000) (QP_PRICE_LIST_PUB.Process_Pr
ic...
l_num_msg_countNUMBER
Addingresponsibilityusing
l_chr_msg_dataVARCHAR2(50) fnd_user_pkg
v_countNUMBER
ScripttoGetConcurrentRequest
Details

BEGIN APIToCancelorFinallyClose
Requisition
ManufacturingStrategies
DBMS_OUTPUT.put_line('RCVSampleInsertScriptStarts') ManufacturingConcepts
DBMS_OUTPUT.put_line('**************************************') ReprocessingPeriodClosePending
Transactions

APIforClosing/FinallyClosingPO
SELECTpo_header_id,vendor_id,segment1,org_id Usingpo_action...
INTOx_po_header_id,x_vendor_id,x_segment1,x_org_id CancellingPOUsingAPI
FROMpo_headers_all PO_Document_Control_PUB.co...
WHEREsegment1='380087'EnterThePoNumberwhichneedsto Useof
bereceived PO_REQAPPROVAL_INIT1.START
ANDorg_id=308Entertheorg_id _WF_PROCESSAPIt...
ANDapproved_flag='Y' UseOf
Oe_Order_Pub.Process_OrderTo
ANDnvl(cancel_flag,'N')='N' CreateSaleO...
SELECTDISTINCT
u.user_id,
to_char(a.responsibility_id)responsibility_id,
b.application_id
Contributors
JyotiMohanty
INTO
x_user_id,x_resp_id,x_appl_id RaghavVelicheti
from RamTalluri
apps.fnd_user_resp_groups_directa,
apps.fnd_responsibility_vlb,
apps.fnd_useru,
apps.fnd_applicationfa Followers
where Followers(38)Next
a.user_id=u.user_id Dilip Pasan Chekoff
*faiz*Rajeswara
Gavin
anda.responsibility_id=b.responsibility_id PandeyLakmal ReddyLipscomb
anda.responsibility_application_id=b.application_id
andsysdatebetweena.start_dateandnvl(a.end_date,sysdate+1)
Sorok7Devendra
UmmiSalwa
anhtho Parinay
andfa.application_id(+)=b.application_id
andupper(u.user_name)='A42485'EntertheUser_name Rockyshree San Raghav
andb.responsibility_name='Inventory'EnterTheResponsibility Jose
Name YAMINIKA
UmeshNaresh
CHITRAJU
Tayal

DBMS_OUTPUT.put_line('InsertingtheRecordinto Follow
Rcv_headers_interface')
DBMS_OUTPUT.put_line('*********************************************')


INSERTINTOrcv_headers_interface
(header_interface_id,GROUP_ID,processing_status_code,
receipt_source_code,transaction_type,last_update_date,
http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 2/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

last_updated_by,last_update_login,creation_date,created_by,
vendor_id,expected_receipt_date,validation_flag)
SELECTrcv_headers_interface_s.NEXTVAL,
rcv_interface_groups_s.NEXTVAL,
'PENDING','VENDOR','NEW',SYSDATE,x_user_id,0,SYSDATE,
x_user_id,
x_vendor_id,SYSDATE,'Y'
FROMDUAL

DECLARE


CURSORpo_line
IS
SELECT
pl.org_Id,pl.po_header_id,pl.item_id,pl.po_line_id,pl.line_num,
pll.quantity,
pl.unit_meas_lookup_code,mp.organization_code,
pll.line_location_id,pll.closed_code,pll.quantity_received,
pll.cancel_flag,pll.shipment_num,
pda.destination_type_code,
pda.deliver_to_person_id,
pda.deliver_to_location_id,
pda.destination_subinventory,
pda.destination_organization_id
FROMpo_lines_allpl,po_line_locations_allpll,mtl_parametersmp,
apps.po_distributions_allpda
WHEREpl.po_header_id=x_po_header_id
ANDpl.po_line_id=pll.po_line_id
ANDpll.line_location_id=pda.line_location_id
ANDpll.ship_to_organization_id=mp.organization_id

BEGIN


FORrec_detINpo_lineLOOP


IFrec_det.closed_codeIN('APPROVED','OPEN')
ANDrec_det.quantity_received<>

THEN


DBMS_OUTPUT.put_line('InsertingtheRecordinto
Rcv_Transactions_Interface')
DBMS_OUTPUT.put_line('*********************************************')

INSERTINTOrcv_transactions_interface
(interface_transaction_id,GROUP_ID,
last_update_date,last_updated_by,creation_date,
created_by,last_update_login,transaction_type,
transaction_date,processing_status_code,
processing_mode_code,transaction_status_code,
po_header_id,po_line_id,item_id,quantity,unit_of_measure,
po_line_location_id,auto_transact_code,

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 3/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

receipt_source_code,to_organization_code,
source_document_code,document_num,
destination_type_code,deliver_to_person_id,
deliver_to_location_id,subinventory,
header_interface_id,validation_flag)
SELECTrcv_transactions_interface_s.NEXTVAL,
rcv_interface_groups_s.CURRVAL,SYSDATE,x_user_id,
SYSDATE,x_user_id,0,'RECEIVE',SYSDATE,'PENDING',
'BATCH','PENDING',rec_det.po_header_id,rec_det.po_line_id,
rec_det.item_id,rec_det.quantity,
rec_det.unit_meas_lookup_code,
rec_det.line_location_id,'DELIVER','VENDOR',
rec_det.organization_code,'PO',x_segment1,
rec_det.destination_type_code,rec_det.deliver_to_person_id,
rec_det.deliver_to_location_id,rec_det.destination_subinventory,
rcv_headers_interface_s.CURRVAL,'Y'
FROMDUAL

DBMS_OUTPUT.put_line('POline:'rec_det.line_num'Shipment:'
rec_det.shipment_num'hasbeeninsertedintoROI.')

selectcount(*)
intov_count
frommtl_system_items
whereinventory_item_id=rec_det.item_id
andlot_control_code=22full_control,1nocontrol
andorganization_id=rec_det.destination_organization_id

IFv_count>0then


DBMS_OUTPUT.put_line('TheOrderedItemisLotControlled')
DBMS_OUTPUT.put_line('GeneratetheLotNumberfortheLot
ControlledItem')

BEGIN

initializationrequiredforR12
mo_global.set_policy_context('S',rec_det.org_id)
mo_global.init('INV')
InitializationforOrganization_id
inv_globals.set_org_id(rec_det.destination_organization_id)
initializeenvironment
fnd_global.apps_initialize(user_id=>x_user_id,
resp_id=>x_resp_id,
resp_appl_id=>x_appl_id)

DBMS_OUTPUT.put_line('Callinginv_lot_api_pub.auto_gen_lotAPI
toCreateLotNumbers')
DBMS_OUTPUT.put_line('*********************************************')

l_chr_lot_number:=
inv_lot_api_pub.auto_gen_lot
(p_org_id=>rec_det.destination_organization_id,
p_inventory_item_id=>rec_det.item_id,
p_parent_lot_number=>NULL,

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 4/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

p_subinventory_code=>NULL,
p_locator_id=>NULL,
p_api_version=>1.0,
p_init_msg_list=>'F',
p_commit=>'T',
p_validation_level=>100,
x_return_status=>l_chr_return_status,
x_msg_count=>l_num_msg_count,
x_msg_data=>l_chr_msg_data)


IFl_chr_return_status='S'THEN
COMMIT
ELSE
ROLLBACK
ENDIF

DBMS_OUTPUT.put_line('LotNumberCreatedfortheitemis=>'
l_chr_lot_number)

END

DBMS_OUTPUT.put_line('InsertingtheRecordinto
mtl_transaction_lots_interface')
DBMS_OUTPUT.put_line('*********************************************')

INSERTINTOmtl_transaction_lots_interface
(transaction_interface_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
lot_number,
transaction_quantity,
primary_quantity,
serial_transaction_temp_id,
product_code,
product_transaction_id)
(select
mtl_material_transactions_s.nextval,transaction_interface_id
sysdate,last_update_date
x_user_id,last_updated_by
sysdate,creation_date
x_user_id,created_by
1,last_update_login
l_chr_lot_number,lot_number
rec_det.quantity,transaction_quantity
rec_det.quantity,primary_quantity
NULL,serial_transaction_temp_id
'RCV',product_code
rcv_transactions_interface_s.currvalproduct_transaction_id
fromdual)

ELSE

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 5/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

DBMS_OUTPUT.put_line('TheOrderedItemisNotLotControlled')
DBMS_OUTPUT.put_line('********************************************')

ENDIF

ELSE
DBMS_OUTPUT.put_line('POline'rec_det.line_num''
rec_det.shipment_num'iseitherclosed,cancelled,received.')
DBMS_OUTPUT.put_line('*********************************************')

ENDIF

ENDLOOP

DBMS_OUTPUT.put_line('RCVSampleInsertScriptEnds')
DBMS_OUTPUT.put_line('*****************************************')

END

COMMIT

END

CrossChecktheRecordsintheInterfaceTable


select*fromapps.rcv_headers_interface
wherecreated_by=2083
andgroup_id=***

select*
fromapps.rcv_transactions_interface
wherecreated_by=2083
andgroup_id=***

select*fromapps.mtl_transaction_lots_interface
wherecreated_by=2083
andlot_number=***
andproduct_transaction_idin
(selectinterface_transaction_idfromapps.rcv_transactions_interface
wherecreated_by=2083andgroup_id=***)

CheckfortheError

select*frompo_interface_errors
wherebatch_id=***
Reprocessingtherecordsfromtheinterfaceifthesame
erroredoutthere.

UPDATErcv_headers_interface
SETprocessing_request_id=NULL,
validation_flag='Y',
processing_status_code='PENDING'
WHEREGROUP_ID=***

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 6/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)


UPDATErcv_transactions_interface
SETrequest_id=NULL,
processing_request_id=NULL,
validation_flag='Y',
processing_status_code='PENDING',
transaction_status_code='PENDING',
processing_mode_code='BATCH'
WHEREinterface_transaction_id=***
ANDbatch_id=***


VerificationofthebasetablesOncetheReceivingTransactions
ProcessorisCompleted


select*fromapps.rcv_shipment_headers
wherecreated_by=2083

select*fromapps.rcv_shipment_lines
wherecreated_by=2083
andpo_header_id=619
select*fromapps.rcv_transactions
wherepo_header_id=619
andcreated_by=2083

select*fromapps.mtl_lot_numbers
wherelot_numberin('A6631684','A6631685','A6631686')
select*fromapps.rcv_lot_transactions
wherelot_numin('A6631684','A6631685','A6631686')
select*fromapps.mtl_material_transactions
wherecreated_by=2083
andrcv_transaction_idin(selecttransaction_idfrom
apps.rcv_transactions
wherepo_header_id=619
andcreated_by=2083)

SELECT(SELECTsegment1
FROMpo_headers_all
WHEREpo_header_id=pl.po_header_id
ANDorg_id=pl.org_id)po_number,pl.po_header_id,
pl.item_id,pl.po_line_id,pl.line_num,pll.shipment_num,
pll.quantity,pl.unit_meas_lookup_code,mp.organization_code,
pll.line_location_id,
pll.closed_code,pll.quantity_received,pll.cancel_flag,
pll.shipment_num,pda.destination_type_code,
pda.deliver_to_person_id,
pda.deliver_to_location_id,pda.destination_subinventory
FROM
apps.po_lines_allpl,
apps.po_line_locations_allpll,
apps.mtl_parametersmp,
apps.po_distributions_allpda
WHERE1=1

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 7/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

ANDpl.po_header_id=619
ANDpl.org_id=308
ANDpl.po_line_id=pll.po_line_id
ANDpll.line_location_id=pda.line_location_id
ANDpll.ship_to_organization_id=mp.organization_id
orderby1,5,6

PostedbyJyotiMohanty at5:41AM
Labels:Purchasing

12 com m ents:

Anand June30,2011at12:46AM

whatistheimportprogramforrecievinginterface?
Reply

Anonymous November16,2011at9:00PM
itsreallyverygood

Reply

Anonymous December14,2011at4:27AM

niceone..............

Reply

Prasanta June28,2012at4:12AM

HiJyoti,

Can you pls focus to handle addtoreceipt case through
RCV_TRANSACTIONS_INTERFACE?

Yourearlyinitiativeishighlyappreciable.

Prasanta
BBSR

Reply

Anonymous December21,2012at6:28AM

HiJyoti,

I am looking for PO CORRECTIONS through
RCV_TRANSACTIONS_INTERFACE for OSP Operation
which is failing with 'RVTOO010: Subroutine rvtooperation()
returned error', have you encountered this error, what could

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 8/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

bethecause
thanks

Reply

HemanthRavupalli April26,2013at7:18AM

couldyoupleaseprovideaddtoreceiptinterfaceassoonas
possible

Reply

Anonymous April29,2013at2:20AM

How can we have automate receiving (direct receiving)


throughRCVtransactioninterface
Reply

Anonymous May10,2013at12:31PM
Howcanweusethisprocesstoaddtoexistingreceipts?

Reply

Anonymous June12,2013at7:52AM

How can we create auto receipt through receiving


transaction..
Itrytocreateautoreceiptbyusingthisprocess.itsinserting
into lines tables but in headers base tables records was not
insertingcanyoupleaseanyonehelpforthisissue..

Reply

MuhammadSaad December6,2015at8:00PM

ReceivingTransactionProcessor
Reply

MuhammadSaad December6,2015at9:37PM
When the tables RCV_TRANSACTIONS_INTERFACE and
RCV_LOTS_INTERFACEgetspopulated.
IwanttoreceivePOaftertakingareceipt.
Whatwillbetheprocessorwhattableswillbeaffected?
Reply

SrideviK September25,2016at1:03AM
Regards
Sridevi Koduru (Senior Oracle Apps Trainer

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 9/10
12/04/2017 OracleAppsBlogTricks&Scripts...:ReceivingPOUsingReceivingOpenInterface(ROI)

Oracleappstechnical.com)
LinkedIn profile https://in.linkedin.com/in/sridevikoduru
9b876a8b
Please Contact for One to One Online Training on Oracle
Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at
[email protected]|+919581017828.

Reply

Enteryourcomment...

Commentas: Selectprofile...

Publish
Preview

NewerPost Home OlderPost

Subscribeto:PostComments(Atom)

http://jyotioraapps.blogspot.in/2009/08/receivingpousingreceivingopen.html 10/10

You might also like