Hello Friends
While looking for an option in SDN to trigger custom message (as per customer requirement) , found that different posts suggesting BTE or validation.
This blog is to demonstrate the example on how to trigger custom error message in F110 and do not proceed for payment due to the error.
Introduction
There is a requirement that the payment run process should not happen when there is custom error. Here, this blog will cover the error that ‘ if the vendor email is not maintained’ then the F110 payment run will not proceed and will show the error.
We will use validation to check if the vendor email is blank then give error. The validation has to be done at the Complete document level, as shown below
Configuration
- T-code – OB28
And mark the activation level as ‘1’
2.T-code GGB0, create new step - 003 as ‘Vendor Email Validation’
2.1 Pre-requisite
You should have the condition to check as pre-requisite so as to trigger the validation. Let’s say for different document type
2.2 In the step CHECK- you need to give user-exit name where the logic will be written to get vendor email and check if it is blank like here U105
This user-exit need to be created in program – ZGGBR00
Write the logic in U105 Form –End form which will have parameters as
using bool_data type gb002_15
changing b_result.
If the email Is not found then set b_result = b_false. Below is the sample code for U105.
2.3 if pre-requisite and check are fulfilled then we will have an error message , as shown below , Since this is of message type as 'E' so further processing in F110 payment run will not happen
So all the config set up is done, now run F110 for vendor having blank email id.
vendor is maintained as having blank mail id
F110 Test
Now run F110 – steps , the blank email for vendor will come during proposal and it will be in error.
Hope this may be of help !! Thanks..
Regards,
Mohan