SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancement for Development

Former Member
0 Kudos
266

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
215

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.  

View solution in original post

4 REPLIES 4

Former Member
0 Kudos
216

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.  

AmlanBanerjee
Active Contributor
0 Kudos
215

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

0 Kudos
215

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.

0 Kudos
215

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