Skip to Content
Author's profile photo Grigoriy Babitskiy

Check entry of deal’s data.

From time to time we need to check what data is entered in our transaction/deal. But Financial Validation instrument (tr. OB28) is not working here.

So what do we have?

BADI FTR_TR_GENERIC have 2 methods which will help us to fulfill the task.

  1. Method EVT_TRANSACTION_CHECK – it starts when we press “Check” button inside our transaction/deal
  2. Method EVT_TRANSACTION_SAVE_CHECK – method starts when we press “Save” button and before database update take place.

Scenario: Let’s say, we have Credit line. Start date: 01.07.2014. End date: 30.06.2016. And we have term of the tranche (ZZSROK field at custom tab): 01.07.2015. After this date we are not able to get new tranche. When we create new tranche we have to check start date, if it is later then term of the tranche. If it is, set an error message to prevent creation of new tranche.


METHOD if_ex_ftr_tr_generic~evt_transaction_check.
   IF pi_proxy_transaction->a_transaction-sgsart = 'ZTR' .
     IF pi_proxy_transaction->a_transaction-zzsrok IS NOT INITIAL AND
        pi_proxy_transaction->a_transaction-zzsrok < pi_proxy_transaction->a_activity-dblfz .
     
       CALL METHOD pi_proxy_messages->set_message
         EXPORTING
           pi_message_id       = 'ZTR'
           pi_message_number   = '002'
           pi_message_severity = 'E'
         EXCEPTIONS
           OTHERS              = 4.
     ENDIF .
   ENDIF.
ENDMETHOD.

This code we have to enter in both methods.

Inside these methods we can use the following data:

methods:

      pi_proxy_messages->set_message or pi_proxy_messages->set_messages – to set message/messages.

Attributes:

     pi_proxy_transaction->a_transaction – the same as VTBFHA table

     pi_proxy_transaction->a_activity – VTBFHAZU table

     pi_proxy_transaction->a_tab_cashflow – VTBFHAPO table

     pi_proxy_transaction->a_tab_conditions – VTBFINKO table

     pi_proxy_transaction->a_messages – internal table which store our messages

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello Grigoriy ,

      I am trying to modify the value of    pi_proxy_transaction->a_tab_cashflow->sstcktg inside the BADI implementation  ( method  EVT_APPLICATION_START ) any idea of how to achive that  ?

      I was trying something like this

         lwa_activity[] pi_proxy_transaction->A_TAB_CASHFLOW[].

          READ TABLE lwa_activity INDEX 1 into wa_act .

          wa_act-sstcktg = '1'.

      no luck with modifying either , any idea ?

      Author's profile photo Grigoriy Babitskiy
      Grigoriy Babitskiy
      Blog Post Author

      Hello, Jose Palacios

      Sorry for the late answer - somehow missed you question:

      In FTR_TR_GENERIC badi A_TAB_CASHFLOW structure is read only.

      In this case you can use BADI_TB_FIMA_CF_MANIPULATE badi.

      Author's profile photo Former Member
      Former Member

      Hello Grigoriy ,

      How i can make check for  Securities?

      This BADI doesn`t give us information, like Nuber of Units, Price and etc. (tab. VWSFHAPO).

      Author's profile photo Grigoriy Babitskiy
      Grigoriy Babitskiy
      Blog Post Author

      Hello, D.V ZHURBENKO

      In your case use TPM_CASHFLOW_CALC badi.