2012 Sep 17 9:36 AM
Hello,
I have done a development for manual posting transaction-FPE1.
The development is whenever tries to post the credit amount, the amount should be less than or equal to open debit amount.
Here the open debit amount is after giving the company code, Main transaction, sub transaction amount, the program checks the wheather the main and sub transaction entered in FPE1 is exists in a varant or not.
If exists the programme goes to table DFKKOP table and after giving input parameters Clearing status not equal to 9,VKONT,HVORG and the final amount is taken after adding both the debit and credit amount.
If the Net amount is positive,the credit amount entered in FPE1 should be less than or equal to the Net Debit amount.
Now my question is if there is a debit amount of 1000 and customer paid same amount. Now the Net balance of customer is Zero.
If the user wants to do refund of Rs 650 from 1000 and the user has to pass another credit entry of Rs.650.
accoording to my development this would not be possible until i remove that main transaction from the variant.
But i want to make possible the credit amount even the net balance is Zero without removing the main transaction from a variant.
Plz suggest me the possibilities.
2012 Sep 17 12:25 PM
Hi Srikant,
For that main transaction u need to develop the code in event 0061 for this particular main transaction if u want to give credit then it would not check whether open debit is there or not just put a check he can not give credit more than debit amount.for this u need not to remove main transaction from variant and consider the previous credits of that main transaction also.
2012 Sep 17 12:25 PM
Hi Srikant,
For that main transaction u need to develop the code in event 0061 for this particular main transaction if u want to give credit then it would not check whether open debit is there or not just put a check he can not give credit more than debit amount.for this u need not to remove main transaction from variant and consider the previous credits of that main transaction also.
2012 Sep 18 1:37 AM
Hi Srikanth,
I would suggest you to use the combination of document type and main transaction as a check to pass the credit entry for refund.
So, in the program that you have developed, as a pre-requiste include a check for the combination of document type and main transaction. If that is allocated for refunds, then pass the parameters to the FM "FKK_DOC_CREATE" so that the Credit entry is posted against the account.
However, if the combination of document type and main transaction does not mathces with that of the refunds one, then proceed with your existing logic mentioned above.
Hope it helps...
Thanks,
Amlan
2012 Sep 18 4:16 PM
Hi Amlan,
Could u plz tell me what could be doc type for refund doc type.
Is that doc type and main transaction have to be maintained in a variant or is there any alternative.
Plz tell me how can i check the doc type and main transaction check for refund entries for my development.
2012 Sep 19 8:55 AM
Hi,
Firstly, the doc type for refunds is not SAP Standard. Its a configurable value and you can look for the refund document type in the following Config node.
IMG->Financial Accounting->Contract Accounts Receivable and Payable->Basic Functions->Postings and Documents->Document->Maintain Document Assignments->Document Types->Maintain Document Types and Assign Number Ranges.
There are multiple ways to check the doc type and main transaction.
The easiest of them is to declare them as constants in your program and every time you are posting an entry, it will check whether the main tr and the doc type that is being used matches with them or not.
If yes, then post a credit entry, else proceed with your existing logic in your development.
Hope it helps..
Thanks,
Amlan