You are on page 1of 6

/*

delete ap_suppliers_int
delete ap_supplier_sites_int
commit

select AUTHORIZATION_STATUS,SEGMENT1 from PO_HEADERS_ALL


WHERE SEGMENT1 LIKE '300017%'
delete from RA_CUSTOMERS_INTERFACE_ALL
where customer_name like '%AMARASEKARA M (MRS)%'
select COUNT(ACR.CASH_RECEIPT_ID) , COUNT(RCT.CUSTOMER_TRX_ID)
FROM AR_CASH_RECEIPTS_ALL ACR,RA_CUSTOMER_TRX_ALL RCT
WHERE ACR.pay_from_customer in (select bill_to_customer_id
from RA_CUSTOMER_TRX_ALL
where bill_to_customer_id = RCT.bill_to_
customer_id
union
select RELATED_CUST_ACCOUNT_ID
from hz_cust_acct_relate_all
where CUST_ACCOUNT_ID = RCT.bill_to_custo
mer_id )
AND ACR.receipt_number = 'HO-44504-161486'
and ACR.REVERSAL_DATE is null
AND RCT.trx_number = '161486PI' -- Output is 0 on both the columns

select pay_from_customer
from AR_CASH_RECEIPTS_ALL ACR
where receipt_number = 'HO-44504-161486' -- 13737
select bill_to_customer_id
from RA_CUSTOMER_TRX_ALL
where trx_number = '161486PI' -- 15499
select RELATED_CUST_ACCOUNT_ID
from HZ_CUST_ACCT_RELATE_ALL
where CUST_ACCOUNT_ID = '15499' -- No output
*/
/*
select * from PO_HEADERS_ALL
where Segment1 like '3000087%'
select * from FND_USER
where user_id = '1159'
select * from ORG_ORGANIZATION_DEFINITIONS
SELECT * FROM HR_ORGANIZATION_UNITS
*/
desc RA_INTERFACE_LINES_ALL
commit
delete from RA_INTERFACE_LINES_ALL
where trx_number = '251665'

------------------------------------------------------------------------------

select * from AAI_AP_SUPPLIER_MASTER


-- update aai_ap_supplier_master set upload_flag = '' , supplier_address_line1 =
'53/5 , KATUWAWALA ROAD, BORALESGAMUWA.'
where supplier_name = 'K.M.N.PERERA.' and
SUPPLIER_NUMBER = '47458'
and SUPPLIER_SITE_CODE = 'KT2006-868'
COMMIT
select * from AAI_AP_INV_HDR
--update aai_ap_inv_hdr set upload_flag = ''
where upload_flag = 'E' and upload_message like '%Charge Account incorrect%'
update AAI_AR_CUST_MASTER
set STATUS = 'U', upload_flag = ''
where CUSTOMER_SITE_CODE in
(select a.CUSTOMER_SITE_CODE, a.customer_name,a.upload_flag,a.upload_message,
a.status, A.CUSTOMER_NAME
from AAI_AR_CUST_MASTER a, AAI_AR_INV_HEADER B
where a.CUSTOMER_SITE_CODE = B.CUSTOMER_SITE
and B.UPLOAD_FLAG = 'E'
and b.entity = 'NL'
and b.upload_message like '%Customer or Site Invalid%')
commit
select * from aai_ar_inv_header
-- update aai_ar_inv_header set upload_flag = 'Y',upload_message = ''
where upload_flag = 'E' and ENTITY = 'NL'
and upload_message like '%Invoice Number Duplicating%'
select * from AAI_AR_CUST_MASTER
--update aai_ar_cust_master set upload_flag = '', CUSTOMER_ADDRESS_LINE1 = 'MORA
GALLA ,'
where customer_number = '98551'
and customer_site_code = 'FCPJE0000013'
update aai_ar_inv_header
set upload_flag = ''
where upload_flag = 'E' and GL_DATE = '31-JAN-2011'
select * from aai_ar_inv_header
--update aai_ar_inv_header set upload_flag = '', upload_message = ''
where upload_message like '%Customer or Site Invalid%' AND UPLOAD_FLAG = 'E' an
d entity = 'NL'
commit
select * from AAI_AR_CUST_MASTER
--update aai_ar_cust_master set STATUS = 'U',upload_flag = ''
where CUSTOMER_NUMBER = '102829' and upload_flag = 'E' and SALES_EXECUTIVE_CODE
_FOR_CUST = 'CL145'
and customer_site_code = 'NG2010-13720'

select * from aai_ar_cust_master


where CUSTOMER_NAME = 'GARDIYAWASAM KOTHTHIGODA KANKANANGE CHULANI DILRUKSHI PRI
YANGIKA DARMASENA'
and CUSTOMER_NUMBER = 'D10953'
and customer_site_code = 'DT11/6366'

select * from AAI_AR_CUST_MASTER --88


-- update AAI_AR_CUST_MASTER set upload_flag = '', status = 'U'
where upload_date between '02-FEB-11' and '08-FEB-11' and entity = 'NL' and upl
oad_flag is null and status != 'U'
order by CUSTOMER_NUMBER
rollback
select * from AAI_AR_INV_HEADER
--update AAI_AR_INV_HEADER
set UPLOAD_FLAG = 'R'
where upload_flag = 'E' and upload_message like '%Many Lines for One Header,%'
commit
select * from AAI_AR_INV_HEADER --59
--update AAI_AR_INV_HEADER set UPLOAD_FLAG = ''
where upload_flag = 'E' and entity = 'NL'

select * from AAI_AR_CREDIT_MEMO_MATCH--55


-- update aai_ar_credit_memo_match set UPLOAD_FLAG = ''
where upload_flag = 'E' and entity = 'NL' and upload_date between '01-JAN-11' an
d '08-FEB-11'

select to_date(upload_date,'DD-MON-YY HH24:MI')


update AAI_AR_RECEIPT_MATCH
set upload_flag = ''
where upload_flag = 'E' and entity = 'NL'
select count(*) from AAI_AR_receipt_MATCH --431
--update AAI_AR_RECEIPT_MATCH SET UPLOAD_FLAG = ''
where upload_flag = 'E' and entity = 'NL' and upload_date between '01-JAN-11' an
d '08-FEB-11'
select a.INVOICE_OR_DEBIT_MEMO_NUMBER, B.INVOICE_AMOUNT
from AAI_AR_RECEIPT_MATCH a, AAI_AR_INV_HEADER B
where a.INVOICE_OR_DEBIT_MEMO_NUMBER = B.INVOICE_NUMBER
and TRIM(a.UPLOAD_DATE) = '03-FEB-11'
and a.upload_flag = 'Y'

update AAI_AR_RECEIPT_MATCH
set ADJUST_AMOUNT = '217215.88'
where INVOICE_OR_DEBIT_MEMO_NUMBER = '170723PI'

update aai_ar_credit_memo_match -- 61
set upload_flag = 'U'
where upload_flag = 'E' and entity = 'NL' and upload_date between '01-JAN-11' an
d '05-FEB-11'

update aai_ar_receipt_match -- 61
set upload_flag = ''
where upload_flag = 'E' and entity = 'NL' and upload_date between '01-JAN-11' an
d '05-FEB-11'
select count(*) from AAI_AR_RECEIPT_match -- 453
where upload_flag = 'E'
and entity = 'NL'
and upload_date = ''
--update aai_ar_receipt set upload_flag = ''
where UPLOAD_FLAG = 'E' and entity = 'NL'

select RECEIPT_AMOUNT from AAI_AR_RECEIPT


where upload_flag = 'E' and entity = 'NL'

select * from AAI_AR_INV_HEADER --125


update aai_ar_inv_header
set upload_flag = 'R'
where upload_flag = 'E' and entity = 'NL' and upload_message like '%Invoice Num
ber Du%'
commit
select COUNT(*) from AAI_AR_RECEIPT_MATCH
-- update aai_ar_receipt_match set UPLOAD_FLAG = ''
where UPLOAD_FLAG = 'E'
and UPLOAD_DATE > '01-FEB-11'
--and upload_date between '01-JAN-11' and '28-FEB-11'
and UPLOAD_MESSAGE not like '%Receipt, Invoice already matched in Oracle%'
and ADJUST_AMOUNT != 0
select * from AAI_AR_RECEIPT
where RECEIPT_NUMBER = 'MTDM6581429';
select * from AAI_AR_INV_HEADER
where invoice_number = '176280PI';
select count(*) from aai_ar_inv_header
--update aai_ar_inv_header
--set upload_flag = ''
where entity = 'NL'
and upload_flag is null
UPDATE AAI_AP_INV_HDR
SET UPLOAD_FLAG = ''
WHERE upload_flag = 'E' and invoice_date > '01-DEC-10'

rollback
commit

select * from aai_ar_receipt


--update aai_ar_receipt set upload_flag = '', BANK_ACCOUNT_NUMBER = '7564190000'
where upload_flag = 'E' and entity = 'L'

select distinct(invoice_or_debit_memo_number) from AAI_AR_ReCEIPT_MATCH --224


-- update aai_ar_receipt_match set upload_flag = ''
where UPLOAD_FLAG = 'E' and UPLOAD_DATE > '01-FEB-11'
and UPLOAD_MESSAGE not like '%Receipt, Invoice already matched in Oracle.%'
and ADJUST_AMOUNT != 0
and ENTITY = 'NL'
and UPLOAD_MESSAGE like '%not available%'

select distinct(invoice_or_debit_memo_number) from AAI_AR_ReCEIPT_MATCH --224


-- update aai_ar_receipt_match set upload_flag = ''
where UPLOAD_FLAG = 'E'
and UPLOAD_DATE > '01-FEB-11'
and UPLOAD_MESSAGE not like '%Receipt, Invoice already matched in Oracle.%'
and ADJUST_AMOUNT != 0 and ENTITY = 'NL'
and upload_message not like '%Receipt Number not available in Oracle%'
commit
------------------------------------------------------------------------------
Dear Shiroma,
With respect to the event of some February receipt matches interfaced on March 4
th and March 5th is due to manual rectification which have been done. And also f
or your information, many receipt match events cannot be corrected unless there
is an immediate preventive action taken place. Some examples explaining the reas
on why there was a delay in these ratifications are:
Receipt amount greater than adjust amount
Even though day to day transactions are logically correct and the data flowing f
rom the front end are also correct, still at certain times the unapplied amount
in Oracle are lesser than the adjust amount, hence the data does not get interfa
ced unless manual intervention.
Receipt Date greater than adjust date.
Even if the receipt date and the invoice date is equal still the system requires
the receipt date should be lesser than the adjust date, and we will have to man
ually intervene and correct the error.
Matching issue on the one cent difference
Manual Matching not done on timely basis from Users.
Still certain receipts are pending where manual receipt matching are required by
the user. For example with respect to USD invoices ( Example of such invoices:
168700PI, 170859PI, 173360PI)

Therefore, certain times it is improbable to finish all the receipt match events
to be interfaced on timely basis with respect to heavy manual intervention need
to troubleshoot such events and some of manual matching required. Therefore unl
ess we sought out the issue at the coding level, I believe these issue will rais
e in the future and we will have to face the time delay in correcting such issue
s.

You might also like