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.
- Method EVT_TRANSACTION_CHECK – it starts when we press “Check” button inside our transaction/deal
- 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:
pi_proxy_messages->set_message or pi_proxy_messages->set_messages – to set message/messages.
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
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 ?
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.
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).
Hello, D.V ZHURBENKO
In your case use TPM_CASHFLOW_CALC badi.