Skip to Content
Author's profile photo Former Member

User-exit to stop editing Bank data from FK02/FD02


This document is intended to show user-exit SAPLBANK to stop editing of bank data from FK02. This is because if user changes the bank data information through FK02 then that changes will be effecting for all vendors using that house bank. If at all the user wants to change the bank data then it can be changed using FI02 transaction code.

We can achieve this by before saving vendor master user-exit as well but with this only from vendor level can be stopped, but by using Bank Data User-exit this will work for both Vendor and Customer master bank data editing stopping. And when user clicks on Bank data then T-code F102 will be called so implemented user-exit of bank will be a good idea.


Stopping user to edit bank data from vendor master FK02/FD02.


In SMOD user-exit for bank data.


Creating a project in CMOD


*&  Include           ZXF12U01

* Bank data before change
  data: wa_bbnka type bnka.

* If T-code is FI01 or FI02 only then allow Bank Data changes
if sytcode eq ‘FI01’
   or sytcode eq ‘FI02’.
* Fetching BANK data before changes
   select single *
           from bnka
           into wa_bbnka
          where banks = i_bnkabanks
            and bankl = i_bnkabankl.
   if sysubrc eq 0.
* Checking any info of bank data is changed
     if i_bnkamandt = wa_bbnkamandt
     and i_bnkabanks = wa_bbnkabanks
     and i_bnkabankl = wa_bbnkabankl
     and i_bnkaerdat = wa_bbnkaerdat
     and i_bnkaernam = wa_bbnkaernam
     and i_bnkabanka = wa_bbnkabanka
     and i_bnkaprovz = wa_bbnkaprovz
     and i_bnkastras = wa_bbnkastras
     and i_bnkaort01 = wa_bbnkaort01
     and i_bnkaswift = wa_bbnkaswift
     and i_bnkabgrup = wa_bbnkabgrup
     and i_bnkaxpgro = wa_bbnkaxpgro
     and i_bnkaloevm = wa_bbnkaloevm
     and i_bnkabnklz = wa_bbnkabnklz
     and i_bnkapskto = wa_bbnkapskto
     and i_bnkaadrnr = wa_bbnkaadrnr
     and i_bnkabrnch = wa_bbnkabrnch
     and i_bnkachkme = wa_bbnkachkme
     and i_bnkavers  = wa_bbnkavers
     and i_bnkabicky = wa_bbnkabicky
     and i_bnkarccode = wa_bbnkarccode.
     if sytcode eq ‘FK01’
       or sytcode eq ‘FK02’
       or sytcode eq ‘XK01’
       or sytcode eq ‘XK02’.
     message ‘Bank data cannot be changed or created from vendor master’ type ‘I’.
     leave to transaction sytcode.
     elseif sytcode eq ‘FD01’
       or sytcode eq ‘FD02’
       or sytcode eq ‘XD01’
       or sytcode eq ‘XD02’.
     message ‘Bank data cannot be changed or created from customer master’ type ‘I’.
     leave to transaction sytcode.

Make sure the project is Active.


By clicking in Bank Data button.

Open the below screen and change any info and press enter then the message will be triggered as given in User-exit.

Good Luck..!!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Raymond Giuseppi
      Raymond Giuseppi

      When I used this customer-exit, I allow bank creation, and allow modification only if the bank is only linked to the current customer/vendor, prohibiting it if a personal number Infotype or another customer/vendor uses the bank.



      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Raymond,

      Thanks for sharing your req of implementation with the customer exit shown above.

      It absolutely make sense, In our case it should not allow to edit any from vendor/customer master.



      Author's profile photo Mart Mattikas
      Mart Mattikas

      To prevent editing bank data it works well, but how to prevent creation of bank data from FK02?