User-Exit: EXIT_SAPLF050_008 Change Fields for FI Document [SAP]

SAP ECC 6.0 SAP_BASIS 700

We use IDoc Type FIDCCP02, Message Type FIDCC2 for one of our interface project. The process code is FIDCC2 - IDOC_INPUT_FIDCC2. It creates FI documents.

So everything was okay until we realized the process didn’t create subsequent documents like Profit Center document, Special Purpose Ledger, Controlling Document. Then after searching a lot on SCN, internet, and OSS we found that we can use EXIT_SAPLF050_008 user-exit to control that. In nature FIDCC2 is designed to create only FI document. The SAP Note 114814 (ALE FIDCCP01/02: Questions and problems with FI distribution) explains the case:

In the SAP standard system, only the FI document, general ledger and subledger are updated in the receiver system. This is the same update logic as in the FIDCMT and FIROLL message types.
The reason for this is that there is a danger of posting errors in other applications because of missing data. In addition, overlapping with other ALE linkages can occur, for example with CO, thereby resulting in duplicate postings.

But the exception comes with:

It is possible to set the I_COMP and I_COMP_CHECK parameters to blank with user exit 008, enhancement F050S005, function module EXIT_SAPLF050_008 (transaction CMOD, see documentation).
The inbound IDoc is processed and the data is forwarded for posting to the AC interface. The I_COMP and I_COMP_CHECK parameters are used to control which applications the IDoc data is transferred to for posting.
The parameters are set to ‘FI’ by default - which is why only the update of data is started in FI.
If the parameters are set to blank (’ ‘), the IDoc data is updated in all applications that are active in the target system.
A selective update in only some applications is not possible - either ONE or ALL active applications are updated.

So I did that I cleared out I_COMP and I_COMP_CHECK parameters of user-exit EXIT_SAPLF050_008. Then yes all subsequent documents were created successfully.

But there is a very bold caution from SAP about that:

Changing the I_COMP, I_COMP_CHECK and I_SUBSET parameters in user exit 008 (FB EXIT_SAPLF050_008) constitutes modification. SAP does not accept any responsiblity for ensuring that the postings actually occur as they should in other applications.

So be careful, it seems we will take the responsibility, at least my colleague FI Analyst said everything is okay.

There are also some fancy information about SUBSET field in the note. But at that that point we don’t deal with that!

Let’s come to the second story with the same user-exit.

We needed to update some fields in the FI Documents by using some logic on SAP side when the IDOC is posted! So after searching on I found I can use the same user-exit EXIT_SAPLF050_008. What I did is I wrote a ABAP code to give values to T_ACCIT table fields FKBER (Functional Area) and ZTERM (Term). So it worked! T_ACCIT represent “FI Document Item (BSEG)”.

As a note if you need some header level fields value -for example BUDAT, BUKRS- you can’t find them in header internal table T_ACCHD; they are alreay in T_ACCIT internal table.

The code for ZTERM as an example:

SELECT SINGLE zterm INTO ls_accit-zterm
FROM lfb1
WHERE lifnr = ls_accit-lifnr AND
bukrs = ls_accit-bukrs.

So EXIT_SAPLF050_008 user-exit function module is called by:

  • IDOC_INPUT_FIDCMT
  • IDOC_INPUT_FIDCC1
  • IDOC_INPUT_FIDCC2

Reference:

Tags: , , , ,

One Response to “User-Exit: EXIT_SAPLF050_008 Change Fields for FI Document [SAP]”

  1. Jay Jayaganesh Says:

    Hi Tuncay,

    Thank you very much for posting this blog. We are experiencing the exact same issue. This blog gives us a way forward.
    I hope this article benefits others as much as it did for us.

    Thanks again
    Regards,

    Jay

Leave a Reply