Monday, 14 November 2016

oracle.apps.iby.exception.PSException: Error: bad data - the instruction status is invalid.

http://aporaclepayables.blogspot.com/2016/11/oracleappsibyexceptionpsexception-error.html

+---------------------------------------------------------------------------+
Payments: Version : 12.2

Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.

IBY_FD_PAYMENT_FORMAT: Format Payment Instructions
+---------------------------------------------------------------------------+

Current system time is 14-NOV-2016 12:15:25

+---------------------------------------------------------------------------+

FDExtractAndFormatting->runProgram():TEST
RequestId:(TEST)1721435
Start time:(TEST) Mon Nov 14 12:15:28 PKT 2016
Before calling OraPmt.init()::(TEST)
After calling OraPmt.init()
Before setparams - m_instructionID : null
FDExtractAndFormatting->Setting Parameters
Enter: iby.scheduler.FDExtractAndFormatting.setParameters()
Param name: InstructionReferenceNumber value: 53725
Param name: ReprintFlag, value: N
FDExtractAndFormatting->Set Parameters ...
After setparams - m_instructionID : 53725
Enter: iby.scheduler.FDExtractAndFormatting.lockInstruction()
Executing BEGIN IBY_DISBURSE_UI_API_PUB_PKG.lock_pmt_entity(:1, :2, :3, :4); END;
Successfully executed PL/SQL.
Exit: iby.scheduler.FDExtractAndFormatting.lockInstruction()
After lockInstruction()
Before runmainlogic - m_instructionID : 53725
Enter: iby.scheduler.FDExtractAndFormatting.runMainLogic()
Enter: Mon Nov 14 12:15:29 PKT 2016
Before load FD profile - m_instructionID : 53725
After load FD profile - m_instructionID : 53725
Enter: iby.payment.FundDisbursementProfile.load
Preparing to load profile. instructionID := 53725
Found profile. parsing records.
Done parsing. Instruction records : FundDisbursementProfile{instructionID:=53725,instruction_status:=TERMINATED,instruction process_type:=IMMEDIATE,processing_type:=PRINTED,electronic_processing_channel:=null,transmit_immediate_flag:=N,print_immediate_flag:=N,printer_name:=null,payment_format:=Format{formatCode:=IBY_PAY_CHK_STANDARD_1,formatType:=OUTBOUND_PAYMENT_INSTRUCTION,templateCode:=IBYDC_STD1,defaultOutputType:=null,locale:=en_00,extract:=Extract{extractCode:=IBY_FD_PAYMENT_INSTRUCTION,extractVersion:=1}} ,transmit_configuration:=null ,default_output_type:=null }
Exit: iby.payment.FundDisbursementProfile.load
Payment process profile successfully loaded.
oracle.apps.iby.exception.PSException: Error: bad data - the instruction status is invalid.
 at oracle.apps.iby.scheduler.FDExtractAndFormatting.runMainLogic(FDExtractAndFormatting.java:350)
 at oracle.apps.iby.scheduler.FDExtractAndFormatting.runProgram(FDExtractAndFormatting.java:159)
 at oracle.apps.fnd.cp.request.Run.main(Run.java:156)

Error: bad data - the instruction status is invalid.
An error occurred. Roll back any changes.
Done roll back changes.
Request completed in error.
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+


+---------------------------------------------------------------------------+
No completion options were requested.

Output file size: 
0

+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 14-NOV-2016 12:15:29

+---------------------------------------------------------------------------+

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

This happens when User Creates Payment and in a second he Voids the Payment.

SELECT  *
  FROM   IBY_PAY_INSTRUCTIONS_ALL
 WHERE   payment_instruction_status = 'TERMINATED'
 order by creation_date desc

Wednesday, 2 November 2016

WHT Tax Code Information Query

http://aporaclepayables.blogspot.com/2016/11/wht-tax-code-information-query.html

Tax Codes

select   cc.NAME, mm.VENDOR_SITE_CODE, vv.TAX_RATE, vv.START_DATE, vv.END_DATE, vv.START_AMOUNT, vv.END_AMOUNT
, cc.DESCRIPTION, cc.ATTRIBUTE1 Section, cc.ATTRIBUTE2 Description
 from AP_AWT_TAX_RATES_ALL vv,  AP_TAX_CODES_ALL cc, po_vendor_sites_all mm
where vv.TAX_NAME=cc.NAME
and vv.ORG_ID=cc.ORG_ID
and mm.VENDOR_SITE_ID=cc.AWT_VENDOR_SITE_ID
and mm.ORG_ID=cc.ORG_ID
and vv.ORG_ID=82
and cc.ENABLED_FLAG='Y'
and vv.RATE_TYPE='STANDARD'
and vv.END_DATE is null
order by cc.NAME

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

Tax Groups

select * from AP_AWT_GROUPS kk, AP_AWT_TAX_RATES_ALL jj, AP_AWT_GROUP_TAXES_ALL xx
where 1=1
and jj.TAX_NAME=xx.TAX_NAME
and kk.GROUP_ID=xx.GROUP_ID
and jj.END_DATE is null
and jj.RATE_TYPE = 'STANDARD'
and xx.TAX_NAME in ('SS0','SS1','SS2','US1')

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

Tax Codes Location & Vendor Site

select tt.NAME, rr.SEGMENT2, oo.VENDOR_SITE_CODE, qq.TAX_RATE
  from AP_TAX_CODES_ALL      tt,
       gl_code_combinations  rr,
       ap_supplier_sites_all oo,
       AP_AWT_TAX_RATES_ALL  qq
 where tt.TAX_CODE_COMBINATION_ID = rr.CODE_COMBINATION_ID
   and tt.AWT_VENDOR_SITE_ID = oo.VENDOR_SITE_ID
   and qq.TAX_NAME = tt.NAME
   and tt.ORG_ID = oo.ORG_ID
   and oo.ORG_ID = 82
   and tt.NAME in ('PS0', 'PS1', 'UP1')

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

select kk.NAME Group_Name,
       kk.DESCRIPTION Group_description,
       jj.TAX_NAME Tax_Code,
       jj.TAX_RATE,
       jj.START_DATE,
       oo.VENDOR_SITE_CODE Site,
       ww.DESCRIPTION Tax_Name_Description,
       ww.ATTRIBUTE1 DFF_Section,
       ww.ATTRIBUTE2 DFF_Description,
       gc.SEGMENT1 Company,
       gc.SEGMENT2 Location,
       gc.SEGMENT4 Account

  from AP_AWT_GROUPS          kk,
       AP_AWT_TAX_RATES_ALL   jj,
       AP_AWT_GROUP_TAXES_ALL xx,
       ap_supplier_sites_all  oo,
       AP_TAX_CODES_ALL       ww,
       gl_code_combinations   gc
 where 1 = 1
   and jj.TAX_NAME = xx.TAX_NAME
   and kk.GROUP_ID = xx.GROUP_ID
   and jj.ORG_ID = xx.ORG_ID
   and ww.NAME = jj.TAX_NAME
   and oo.VENDOR_SITE_ID = ww.AWT_VENDOR_SITE_ID
   and gc.CODE_COMBINATION_ID = ww.TAX_CODE_COMBINATION_ID
   and ww.ORG_ID = jj.ORG_ID
   and xx.ORG_ID = jj.ORG_ID
   and jj.END_DATE is null
   and jj.RATE_TYPE = 'STANDARD'
   and kk.CREATION_DATE > '27-OCT-2016'
   and kk.INACTIVE_DATE is null
 order by jj.ORG_ID, kk.NAME
--and xx.TAX_NAME in ('SS0','SS1','SS2','US1')