Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos


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 sy-tcode eq 'FI01'
   or sy-tcode eq 'FI02'.
* Fetching BANK data before changes
   select single *
           from bnka
           into wa_bbnka
          where banks = i_bnka-banks
            and bankl = i_bnka-bankl.
   if sy-subrc eq 0.
* Checking any info of bank data is changed
     if i_bnka-mandt = wa_bbnka-mandt
     and i_bnka-banks = wa_bbnka-banks
     and i_bnka-bankl = wa_bbnka-bankl
     and i_bnka-erdat = wa_bbnka-erdat
     and i_bnka-ernam = wa_bbnka-ernam
     and i_bnka-banka = wa_bbnka-banka
     and i_bnka-provz = wa_bbnka-provz
     and i_bnka-stras = wa_bbnka-stras
     and i_bnka-ort01 = wa_bbnka-ort01
     and i_bnka-swift = wa_bbnka-swift
     and i_bnka-bgrup = wa_bbnka-bgrup
     and i_bnka-xpgro = wa_bbnka-xpgro
     and i_bnka-loevm = wa_bbnka-loevm
     and i_bnka-bnklz = wa_bbnka-bnklz
     and i_bnka-pskto = wa_bbnka-pskto
     and i_bnka-adrnr = wa_bbnka-adrnr
     and i_bnka-brnch = wa_bbnka-brnch
     and i_bnka-chkme = wa_bbnka-chkme
     and i_bnka-vers  = wa_bbnka-vers
     and i_bnka-bicky = wa_bbnka-bicky
     and i_bnka-rccode = wa_bbnka-rccode.
     if sy-tcode eq 'FK01'
       or sy-tcode eq 'FK02'
       or sy-tcode eq 'XK01'
       or sy-tcode eq 'XK02'.
     message 'Bank data cannot be changed or created from vendor master' type 'I'.
     leave to transaction sy-tcode.
     elseif sy-tcode eq 'FD01'
       or sy-tcode eq 'FD02'
       or sy-tcode eq 'XD01'
       or sy-tcode eq 'XD02'.
     message 'Bank data cannot be changed or created from customer master' type 'I'.
     leave to transaction sy-tcode.

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..!!

Labels in this area