2016 Jun 06 11:20 AM
Hi experts,
I have a query regarding clearing of installment plan.
My example:
N° Due date Installment amount
1 14.12.2015 10,00
2 14.01.2016 10,00
3 15.02.2016 10,00
4 14.03.2016 10,00
5 14.04.2016 10,95
For some customers we have to clear the last installment before the first ones.
The first installment to be cleared is the installment for which the amount is 10,95.
Previous installments are not cleared yet.
For example:
N° Due Installment amount
1 14.12.2015 10,00
2 14.01.2016 10,00
3 15.02.2016 10,00
4 14.03.2016 10,00
I have ticked “Sort” in the corresponding clearing step.
So the corresponding documents were cleared in the DFKKOP table. This is fine.
My problem is that the first installment was cleared whereas we would clear the last one ; In the DFKKOPW table the first item of the installment plan was cleared. We want to clear the last one
Document N° Due Clearing date Clearing doc
140000000660 2 14.01.2016
140000000660 3 15.02.2016
In the payment lot (FP05) have been used the contract account number (K) and the document number which is related to the installment plan number (B=140000000660)
I need to know, what can be done to clear the last installment before the other ones.
Thanks you.
Kind regards,
Christian
2016 Jun 06 3:21 PM
Hi,
You would have to trigger a function module from the Clearing Variant configuration.
Use Clearing rule "7", which allows you to clear based on your custom function module.
SAP has provided a sample function module that you can use as a template to trigger your own clearing logic.
I hope this helps.
Regards,
Ivor
Message was edited by: William Eastman
2016 Jun 06 5:38 PM
Christian:
What is the business requirement? It seems like maybe you are just creating the installment plan with incorrect parameters.
regards,
bill.
2016 Jun 06 7:07 PM
Hi Christian,
This is achievable through a simple clearing variant.
I am trying to give an example:
Create a custom sort characteristic, say ZIP with Field name OPUPW.
1. For your clearing variant, say Incoming Payment
2. Make a clearing step, say Installment Plan
3. In the Grouping String put the following grouping characteristics
a. 015 - Contract Account
b. 010 - Due date
c. 019 - Statistics Indicator > Grouping Rule > 3 > Choose Char Value = R (for IP)
4. In the Sorting string put the following sorting characteristics
a. 010 - Due date > Check Sort indicator for descending order sorting
b. ZIP - Installment Plan
Now make a custom FM, say Z_ISU_SAMPLE_TFK116 copying the standard ISU_SAMPLE_TFK116.
In this FM in table T_E516_FKKCL you will get all items selected for clearing by the above mentioned clearing variant > clearing step.
Now, for IFNAM is E_FAED you can write your own code to select the last due IP item by sorting T_E516_FKKCL table and do the needful.
You need to assign this custom FM Z_ISU_SAMPLE_TFK116 to the sorting characteristic ZIP in the customizing to make the custom code work.
Hope this helps.
Regards,
Saptarshi
2016 Jun 06 8:45 PM
Hi Christian,
I guess your requirement can be achieved through Standard Clearing Configuration.
Creation a new Clearing Step, in your existing clearing variant, as follows-
Grouping Characteristics-
1.004-Main Tr. Grp Rule-3
Char value-Main Tr. value used to post the IP (Standard SAP Main Tr.-0080)
AIRI- Blank
Group-1
2.010-Due Date
Sorting Characteristics-
1. 010- Due Date
Sort-Ticked.
All the other values will be blank.Configure this and try to check your scenario.
Hope it helps..
Thanks,
Amlan
2016 Jun 08 4:44 PM
Hello Everyone,
Thanks a lot for your answers we're going to check all of them. So I will update you.
In the same time we have tried the following solution.
In the payment lot the Due Date was filled as a criteria in the item selection.
So finally, criteria to be used in the payment lot item are <B> document number (OPBEL) of the installment plan AND <F> Due date of the installment (FAEDN) to be cleared.
We can clear the last installment even if the first ones are not cleared yet.
Kind regards,
Christian