We had this issue @ our client where user accidentally made payment on 21-Jan-11 instead of 21-Jan-12. These kind of mistakes are very frequent. The only Solution you have is to Void that payment and recreate a new one. But the problem doesnt ends there. To clear that you have to open that particular period. Transfer the accounting of payment and reversal and create a new payment.
This practise annoys the data entry user the payable key user and the General Ledger owner because they have to do that same practise all over again.
I Don’t know why we don’t have any profile option to control this. I have already raised an ER for this which might take a couple of more years. As we all know it will might come in future releases. (Please add your vote for this ER by raising an SR)
The only option we were left with was to create a custom.pll and use that. Below you have the step by step procedure to achieve this goal.
(courtesy of Mr Abid Hussain).
1) Open terminal.
2) Issue command Xhost + , this command will enable you to make your connection to the server from any host.
3) Connect to the user by issuing command su – appltest (In case of Al-Abbas clone instance)
4) cd /u02/test/apps/apps_st/appl/au/12.0.0/resource (Path where custom.pll reside check it at your instance).
6) Select library Custom.pll (you will have to select manually)
7) Include Library APPCORE2
8) Now open the Package body of Custom.pll
9) Now add the fallowing code in procedure “Event”
10) Form_Name Varchar2(30) := name_in(‘system.current_form’);
Block_Name Varchar2(30) := name_in(‘system.cursor_block’);
11) Now add the fallowing code in Begin.
If form_name = ‘APXPAWKB’ Then
If event_name = ‘WHEN-VALIDATE-RECORD’ Then
If block_name = ‘ADJ_INV_PAY’ Then
L_invoice_id_scs := name_in(‘ADJ_INV_PAY.INVOICE_ID’);
Select Gl_Date Into L_Gl_Date_scs From ap_invoices_all
Where Invoice_id = L_invoice_id_scs;
If name_in(‘PAY_SUM_FOLDER.CHECK_DATE’) < L_Gl_Date_scs Then
fnd_message.set_string(‘Payment Date Should Not less Then Invoice GL Date’);
Now you can call this custom.pll in personalization on Payment Workbench Form.