Skip to Content

Facility product type (56A) is usually used as Credit line. And other transactions (for example, 55A) which are attached to Faciliti – as Tranche.


Let’s assume that we have a custom field (Term of tranche – the last day we can get new Tranche) in Facility transaction. And we want to transfer data of this field to Tranches. Then we can use this field in other situations: Check entry of deal’s data.


We attach tranches to facilities on “Administration” tab of trache transaction. There we input Facility ID.


And at this point Facility ID is attached to Tranche.

Why not use this situation to fulfill our task – transfer data of custom field from Ficility transaction to Tranche transaction.

We can use ABAP knowledge about Enchancement points and Class Interface (tr. SE24) CL_FTR_GUI_DATABIN, method SET_FACILITY – it is very easy!

Here is the sample code (our code is within ENCHANCEMENT operators)

METHOD set_facility.
* ...
   a_fha-facilitynr    = pi_facilitynr.
   a_fha-facilitybukrs = pi_facilitybukrs.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Class CL_FTR_GUI_DATABIN, Method SET_FACILITY, End                                                                                                A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZTR_SET_FACILITY.    "active version
   data : wa_VTBFHA type VTBFHA.
   if pi_facilitynr is INITIAL and pi_facilitybukrs is INITIAL .
    clear : a_fha-ZZVID , a_fha-ZZSROK, a_fha-ZZTSEL .
   else .
                   where  RFHA = pi_facilitynr and BUKRS = pi_facilitybukrs .
   a_fha-ZZVID = wa_VTBFHA-ZZVID .
   a_fha-ZZSROK = wa_VTBFHA-ZZSROK .
   a_fha-ZZTSEL = wa_VTBFHA-ZZTSEL .
   endif .
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply