on 05-08-2008 11:05 PM
Hi
I want to do the Date validation in mapping using the UDF...if Validation fails i wanna throw the Runtme Exception in UDF
SV
Hey
You can try the following
/people/ranjit.deshmukh/blog/2008/01/14/validations-using-java-for-those-not-having-pi71
/people/jacob.vandborg/blog/2005/11/29/schema-validation-of-incoming-message
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The following blog contains your full solution:
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5479] [original link is broken] [original link is broken] [original link is broken];
In the udf ThrowException in the blog just give the validating condition of the date as you wish and IF the condition doesn't satisfy write the statement
ExceptionThrower.fire("Validation of date failed.");
by using this UDF in your graphical mapping you will be able to throw a Runtime Exception.
**Reward points if helpful.
--Sankar Choudhury
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes u can do it in UDF.
1) By using If-Else check your date validation.
2) Use two input in UDF 1st is date 2nd one constant which u want to validate.
3) Use RemoveContext before UDF
4) To throw an exception use any java function and give wrong input to it.
e.g. Use Substring to detect 10 characters and send blank input. this will throw exception.
Regards,
Rohit.
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.