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: 

Statistical Document posting failed using BAPI_CTRACDOCUMENT_CREATE for FP04M

Former Member
0 Kudos

Hi There,

My requirement is to post a statistical document while Write-Off in following cases:
1. Online Write-Off: T Code FP04
2. Mass Write-Off: T Code FP04M

I have implemented FQ Event 5040, and used BAPI BAPI_CTRACDOCUMENT_CREATE to create the Statistical Document when Write-Off is performing.

Things are working properly in case of FP04 (Online execution), but while Mass (FP04M) execution the BAPI is not working and I am getting error 'Formal error: Invalid calling sequence for function modules'.

As of my analysis from SCN and debug that the BAPI (BAPI_CTRACDOCUMENT_CREATE) is not working for Mass transactions as expected.

Please propose me if there is any alternate BAPI/FM which can be used in case of Mass transactions to create Statistical Document. Also if I need to use any specific steps to use the same BAPI, or any guidance.

Thanks in advance.


Regards,
Ankur

7 REPLIES 7

ivor_martin
Active Contributor
0 Kudos

Hi Ankur,

Have you explored the function module ISU_CREATE_DOCUMENT?

Perhaps it would work for you.

Regards,

Ivor

AmlanBanerjee
Active Contributor
0 Kudos

Hi Ankur,

Try using the FM FKK_CREATE_DOC in event 5040.

I think using this FM in write-off mass process, FP04M will not create any issues.

Thanks,

Amlan

0 Kudos

Hi Amlan,

Thank you for your reply.

FKK_CREATE_DOC is having the same problem, working for FP04 (Online) but not working for (FP04M) the mass Write-Off transaction. It is giving same error as the BAPI.

Please let me know if you find any other way to do the solution.

regards,

Ankur

william_eastman
Advisor
Advisor
0 Kudos

Why would you do this?  The correct approach would be to use receivable adjustment.

Former Member
0 Kudos

Hi Guys,

 

Thank you for your reply.

Still I am struggling to get my solution.

The requirement is to post a Statistical Document when Write-Off happens. I
have been suggested to use FQ Event 5040 for this. I have copied the function
module for 5040 and created my own FM (where I have implemented logic to post
Statistical Document using BAPI BAPI_CTRACDOCUMENT_CREATE). This approach is
working for Single run (FP04), but not for Mass run (FP04M).

 

Please let me know if any idea on the solution.

    

Regards,

Ankur

gimenezjota9
Member
0 Kudos

Hi Ankur. Is any update on this? I have the same request, and need to solve it. Thanks!

0 Kudos

Please refer the previous comment and also try exploring the FQEVENT 5020 for your requirement.

Thanks,

Srini