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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 |