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: 

Posting statistical debit item in mass write off process FP04M

ankit_munshi2
Participant
0 Kudos

Hi,

We have a requirement for which the solution proposed involved posting a statistical debit item during write off process. So we enhanced event 5040 to post item there (called function module ISU_S_FICA_DOC_CREATE).

Now this solution is working fine for single write off process, but for mass process FP04M, we get an error - function modules called in incorrect sequence.

Is this a known problem? Is there any configuration that we may be missing ?

Any help would be appreciated!

Regards,

AM

7 REPLIES 7

william_eastman
Advisor
Advisor
0 Kudos

Ankit:

I would not recommend that approach.  SAP provides doubtful and IVA process for managing these scenarios. Beyond that you should only use bapis.

regards,

bill.

Former Member
0 Kudos

Hi Ankit ,

                   we have a similar development for write-off , we use BDC of FPE1 to post a statistical debit items , i think  you need to recheck how you have implemented the function module in event 5040 .

Although the only issue we have faced with our approach is that some times the line items are written off perfectly but the posting of debit line items has not happened (may be due to user authorizations for posting document missing for certain account class etc) ,  it increases the post processing time as we need to take care that all CA  where items were written off a debit line item  must be posted .

would advise you to add a error message to the application log of the mass process to identify such cases or develop a report to check the amount written off and the amount posted .

0 Kudos

You cannot reliably use BDC with ISU, especially in mass activity processes.

0 Kudos

Hi,

Thanks for your response.

Did you run BDC inside FQevent or as a separate object ?

Regards,

AM

0 Kudos

Hi ,

        we have run BDC inside fqevents .(event 5040)

AmlanBanerjee
Active Contributor
0 Kudos

Hi Ankit,

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.

Hope it helps.

Thanks,

AB

0 Kudos

Thank you all for your response.

I tried to use ISU_S_FICA_DOC_CREATE / ISU_FICA_DOC_CREATE and BAPI_CTRACDOCUMENT_CREATE . All of these eventually call function module FKK_CREATE_DOC.

The very first code line inside this function module is

IF    I_UPDATE_TASK EQ MEM_UPDAT
     AND   I_RESOB       EQ MEM_RESOB
     AND   I_RESKY       EQ MEM_RESKY
     AND   I_TEST        EQ SPACE
     AND ( I_FKKKO-FIKEY EQ SPACE AND MEM_FIEXT EQ SPACE OR
           I_FKKKO-FIKEY NE SPACE AND MEM_FIEXT NE SPACE    ).


...

..

ELSE.
       MESSAGE E174.
     ENDIF.


In my case MEM_RESOB and MEM_RESKY values (populated from config table TFK090A probably) are populated but i_resob and i_resky values are blank (as these parameters are not passed through import parameter.


Error E174 is thrown thereby. if we try to reset MEM_RESOB and MEM_RESKY values it gives a short dump due to nested call of perform ON COMMIT.


Any idea what we could be missing here?


regards,

AM