cancel
Showing results for 
Search instead for 
Did you mean: 

Write data to VTBFHA fields while creating or updating a financial transaction

Former Member
0 Kudos

I've created a custom subscreen within the transaction manager. My efforts so far have been based on this blog post, although I've found a number of issues with this post and things that were also left out that I will expand upon in a later post. I have an append structure for VTBFHA that I am using and I would like to take one of the fields in my append structure and additionally write it to the MERKM field in VTBFHA (I know that it doesn't seem to make much sense but that's the requirement).

Using the interface IF_OPEN_TRTM_PROXY_DEAL_DATA in my function group, I have access to all of the current transaction data for a deal that I am creating/updating via the A_TRANSACTION attribute. Using this attribute I can identify the current row that I am in during updating although during the creation of a new deal I think the RFHA part of the key in VTBFHA is only issued after the deal has actually been saved, so I will likely only be able to change MERKM at the very last second. What I cannot figure out is how to update the MERKM field of the current row that I am editing or creating.

If someone can steer me in the right direction, I would be most appreciative. I imagine that I need some function module but I am really stuck. Hopefully someone here knows what to do.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

feng_dong
Contributor
0 Kudos

Hi

Generally you should use BADI FTR_CUSTOMER_EXTENT to save the data.
Like the method EVT_TRANSACTION_SAVE_CHECK etc.


Regards, Feng

Former Member
0 Kudos

I'm already using that BAdI but I'm unsure of how to continue from here. Unfortunately I'm very much new to the SAP world and a bit lost at the moment. Is there any chance you can give me some more assistance here?

feng_dong
Contributor
0 Kudos

I think you can just check the sample provided by sap.
The funtion group is FTR_CUSTOM_BADI_SAMPLE.
I think you can read the sample coding and adjust it accordingly according to the post you described.
Also there is a special description about this topic in the treasury book.SAP Treasury and Risk Management. of Rudolf Bryša, Thomas Fritzsche, Markus Heß, Sönke Jarré, Reinho...


Regards,
Feng