I would like to define different posting rules for the same external transaction type. The scenario is like this, I have two types of charges, the normal Bank charges and then the Government Levy. On the MT940 bank statement, both of the charges are coming under the same transaction type NCHG. In the system these charges are to be posted to different accounts. How do I define different posting rules for this, given that the external transaction type is the same ?
There are multiple ways to adjust the posting rules. One approach is to use account modification that will adjust the GL account for the posting. See the following blog post for an example.
Another approach is to configure the search string that will change the posting rule - see another post, where it was described.
Alternatively, if above two approach do not work, you can implement an enhancement via BADI FIEB_CHANGE_BS_DATA to adjust the determination of posting rule - see another post on this topic (also you might want to check this one). This BADI offers the same interface as the user exit FEB00001, which was suggested by thomas.vanaken2, but it is a more modern way to implement the enhancement via object-oriented approach.
You need to activate standard exit FEB00001 to assign an alternative posting rule to the external transaction based on some informations (text...) avaiable in the bank statement