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: 

Create debit entry in DFKKOP during Return processing

murtuza_chhatariya
Active Participant
0 Kudos

Hi,

I have a requirement where an debit entry with particular main/sub needs to be created in DFKKOP during return processing. Can anyone have idea how we can approach for this requirement? Any FQEvent and FM/BAPI for debit entry creation.

Thanks in advance,

Murtuza

1 ACCEPTED SOLUTION

raviahuja
Contributor
0 Kudos

Hi,

You can use event 0020, which can be used to post extra FI document during a FI process. In your case, check for I_PROCESS to be 3 which is for return and check for clearing documents.

Now fill the FKKKO, FKKOP structures as per your requirement. Fill complete BP and G/L items using FM 'FKK_COMPLETE_CHARGE_DOCUMENT'. Then finally, when all structures are filled, use FM 'FKK_CREATE_DOC_ADDITIONAL' to create additional document.

You can also, retrieve the additional document number through event 0031.

I would prefer you to use event 0020 because it is triggered when DB commit has not taken place, so if any error happes during standard process, you additional document will roll back as well and data consistency will be maintained.

Thanks.

Ravi

View solution in original post

10 REPLIES 10

AmlanBanerjee
Active Contributor
0 Kudos

Hi Murtaza,

You can use event 299 for your requirement.

Event 0299 is processed when all items from the returns lot have been posted, the database update was successful, and the reconciliation key has been closed.

You will get the return lot in the object in I_KEYR1 parameter and then for each item in the return lot you can use any standard FM like FKK_COMPLETE_CHARGE_DOCUMENT to post a debit entry against the contract account\contract.

Hope it helps...

Thanks,

Amlan

raviahuja
Contributor
0 Kudos

Hi,

You can use event 0020, which can be used to post extra FI document during a FI process. In your case, check for I_PROCESS to be 3 which is for return and check for clearing documents.

Now fill the FKKKO, FKKOP structures as per your requirement. Fill complete BP and G/L items using FM 'FKK_COMPLETE_CHARGE_DOCUMENT'. Then finally, when all structures are filled, use FM 'FKK_CREATE_DOC_ADDITIONAL' to create additional document.

You can also, retrieve the additional document number through event 0031.

I would prefer you to use event 0020 because it is triggered when DB commit has not taken place, so if any error happes during standard process, you additional document will roll back as well and data consistency will be maintained.

Thanks.

Ravi

0 Kudos

Thanks for the reply Amlan and Ravi

Both options are good event 0020 or 0299.

Before that, I tried to create document in DFKKOP with help of one custom FM in our system which internally calls BAPI_CTRACDOCUMENT_CREATE. This BAPI gives error after calling FKK_FKKOP_COMPLETE_CHECK that EK(157) - "Transaction (CC = xxxx, div. = , MTrans = xxxx, SubTrans = xxxx) not allowed"

Can you please explain what is the reason behind this? If I see FKK_COMPLETE_CHARGE_DOCUMENT then it also calls FKK_FKKOP_COMPLETE_CHECK so I will get the same error there.

0 Kudos

Hi Murtaza,

For any financial posting in FI-CA, you need to maintain transactions EK01 and EK02.

Normally, EK01 contains the combination of combination of cocd, div, AD ID, Main transaction and it points to the Debtors A/c.

While,EK02 contains the combination of combination of cocd, div, AD ID, Main transaction,Sub transaction and it points to the Revenue A/c

For any postiing, you need to maintain these combinations in these transactions.

Hope it helps.

Thanks,

Amlan

0 Kudos

Let me explain the exact requirement. Actually this requirement is a suggested solution of the below issue.

In our system, there is an extra charge called NC charges along with consumption for selected accounts.

So with consumtion line item in DFKKOP, there is NC line item having main/sub for example as 999/S*

Now payment is made with full amount (consumption + NC charge), then system clears both consumption+NC items with payment and also creates one more line in DFKKOP with main/sub as 999/A* having the exact amount of 999/S* item. (I dont know the reason for this logic and how it is implemented)

Issue comes when Return is processed for the above payment. It removes clearing status of consumption+NC items and clears payment document with return document. But here is fails to create debit entry for 999/A* item (as it was created extra with payment). So my requirement is to create this line during Return. Otherwise it shows reconciliation difference during G/L posting for NC business unit.

0 Kudos

Hi Murtuza,

When you posted the full payment for consumption +nc chargees a new transaction is getting postd under 999/A* is this a debit or credit transaction ?

Thanks,

VR

0 Kudos

When there is open item as 999/S* ,then with payment it clears this item with payment document and

also creates one more debit entry with exactly same amount of 999/S* item.

Its main sub is 999/A* and it also gets cleared with payment document. Also this new line does not reflect in FPL9

0 Kudos

Hi Murtuza,

As I understand your scenario, when Payment is reversed, clearing status of (Original consumption + NC charges) is reversed. But since during Payment, one extra Debit Document was posted (999/A*), It should have also been reversed which is not happening.

Then, what I suggest is again use event 0020 for reversal, I_PROCESS = 2 (I think, please confirm). Here post a Credit document of same a amount as debit item (999/A). What this would do is, during auto clearing, these items would automatically be cleared. My only concern is if debit item(999/A) is posted with any restriction. If not then there is no issue.

Thanks.

Ravi

0 Kudos

Yes Ravi, That's the issue.

Now another thing is 999/A* is not possible for manual posting. So I have to make some configuration such that it get created automatically.

I debugged FP05 and found that the relation (999/A* should be created for 999/S*) is stored in TFK033D and fetched during payment. This table is maintained through transaction FQZG.

So is there any way where we configure such information for Return processing for reversal of 999/A* entry?

0 Kudos

I'm not sure if there is any configuration with which extra document can be reversed directly. But yes extra documents can be posted like e.g. Return Charges. Just confirm if something like this can be done.

Ravi