2013 Sep 17 6:37 PM
Hi,
I have create a sub screen in customer master using SPRO navigating like below.
SPRO -> Logistics – General - Business Partner - Customers - Control - Adoption of Customer’s own Master Data fields - Prepare Modification - Free enhancement of Customer Master Record.
Created a sub screen and few fields in it. Created append structure for knvv. Everything was working fine until my functional asked me for an error message.
In the sub screen few fields are mandatory, i have validated that using chain-end chain and its working.
Mandatory field validation is only working when we go into that screen. For example if we save the data without going to the screen, the system was accepting it with no values for that mandatory fields in the sub screen.
For this, in the customer exit
EXIT_SAPMF02D_001 - Customers: User Exit for Checks prior to Saving, written the code to raise the error messgae, its working with constraints.
In standard SAP, when there is mandatory field different tab or screen, system navigates to that area.
When i call that sub screen, i am getting run time error, screen not found. Because the screen is different package and user exit is in different.
Is it possible to achieve this.
2013 Sep 17 6:51 PM
Hi
You should use the method CHECK_ALL_DATA, I suppose you have implemented the BADI CUSTOMER_ADD_DATA to manage your view
Max
2013 Sep 17 6:51 PM
Hi
You should use the method CHECK_ALL_DATA, I suppose you have implemented the BADI CUSTOMER_ADD_DATA to manage your view
Max
2013 Sep 17 7:10 PM
Hi Max,
yes you are correct, i have an implementation for that BADI, but didnt used that method.
Shall i use the commands, leave scree or call screen in that BADI? becuase i want to show the error message in the sub screen. Please help
2013 Sep 18 9:08 AM
Hi
I've never used that method too, but I've seen it returns the error message and the ok_code for tabstrip, so I suppose it allows to manage what you need to do:
- To show the error and then to go to your tabstrip
max
2013 Sep 18 9:49 AM
Hi Neeraj,
Though the method has screen number, screen group, function code of the tab to which it has to navigate to, it is not working for my custom developed screen number 9000.
In the subroutine determine_target_screen (in include MF02D_ADD_ON_FD0), it is clearing the field E_TARGET_DYNNR. So, I updated my screen number in E_TARGET_DYNNR using implicit enhancement at the end of the subroutine.
In the subroutine navigate_to_affected_screen ( include MF02D_ADD_ON_FN0) again using implicit enhancement at the beginning of subroutine , I have written one case statement for my screen and copied the same code which is there for screen 4000.
It is navigating to my custom screen and displaying the error message.
Regards,
Poornima
2013 Sep 18 9:52 AM
I have used this method, and yes you have to return the screen number with screen group and related function code. (Look also at the SAP standard implementation of this BAdi, even if not active in your system either via SE19 or using where-used of interface IF_EX_CUSTOMER_ADD_DATA in classes)
Regards,
Raymond
2013 Sep 25 1:40 PM
Hi Raymond,
Functional is now OK without traversing to the sub screen, I will do the require changes when they come back. Thanks for your suggestions.
Regards,
Neeraj