Hello Claudia,
I finally solved the problem, and I hope my solution may suite your problem.
The bigger problem I had was pass the data from the screen to the BADI itself, so I created a function group following the FTR_CUSTOM_BADI_SAMPLE in which I developed the objects.
Those are the steps I followed:
- I enhanced the structure VTBFHA with the custom field I needed;
- I created an implementation for the FTR_CUSTOMER_EXTENT
- in EVT_APPLICATION_START method I called a function module (copied from the FTR_CUSTOM_BADI_SAMPLE_START) in which I started the subscreen I draw in new tab. (Please note that by doing this I now have the interface if_open_trtm_customer_data always at hand). Follow the instruction of the sample code or the http://scn.sap.com/thread/1534252 thread)
- in the PBO of the subscreen I retrivied the custom data via GET_CUST_DATA of the IF_OPEN_TRTM_CUSTOMER_DATA interface and pass the data in my screen fields. In order to do that I called a function module developed in the same function group, so that the interface is ready to be used.
- in the PAI of the subcreen, once the data is entered I pass the new data via SET_CUST_DATA of the IF_OPEN_TRTM_CUSTOMER_DATA interface, again developing a FM within the function group of the EVT_APPLICATION_START custom function module I used.
I am sure there must be a better solution, but it owrked pretty fine for me, so I hope this my help you as well.
Moody