Skip to Content
0
Former Member
Feb 26, 2007 at 07:05 PM

BP enhancement : add tab checks using BDT

237 Views

Hi,

According to business requirements, I have to implement some checks inside Business Partner transaction (SAP ECC 6.0). These checks are made ‘tab by tab’. In other terms, they take effect when the user changes the tab inside ‘BP’ transaction and not at the end of the process (before save).

If the user changes the tab, the system has to check all the previous tabs(some fields are required for BP type "Supplier", others fields are required if BP type is Payee Only...) . If control is OK, tab is changed, else errors are displayed on the first tab that is not compliant with controls.

I tried three solutions, without success :

1/ Using BUS7 transaction, I linked a function module with SCRND event. So this function module is called each time screen change :

- Using MF BUS_LOCATOR_OKCODE, I retrieve the tab that has been clicked, so I can check all the previous tab.

- If a tab is not compliant with controls, I use MF BUS_MESSAGE_STORE to store messages and BUS_MESSAGE_SHOW to display those messages. But error messages are not blocking, and I am redirected to the tab I have just clicked.

I would like to be redirected on the tab that contains error, but I haven't found any solution. Any ideas ? If it is not possible, is there a way to stop the process when using MF BUS_MESSAGE_SHOW ?

2/ So I tried to use MESSAGE statement, but there is a strange behaviour : if I'am on tab 1 and I click on tab 2, and if tab 1 is not compliant with controls, I stay on tab 1. Perfect ! But if I click again on tab 2 without making any changes, event SCRND is not thrown, active tab is changed whereas its content stay the same (in my example, active tab is tab 2 but active tab content is tab 1 content). It seems that it's not a good idea to use MESSAGE statement.

3/ Using BUS3 transaction, I linked a function module with BUA120 view. So I'am able to do controls when leaving 'Adress Overview' tab. I tried to find view for the others tab and for a customized tab, butI haven't found view already created. So I tried to copy BUA120 view to define my own view, I changed program and screen number, put a MFs for PBO and PAI, and it doesn't work. Can anyone tell me what I'am doing wrong ?

What do you think about solution 1/ and 3/ ? Is there a best way to implements business requirement ?

Many Thanks

Jean-Christophe