on 07-09-2009 7:59 AM
Hi All,
In Mapping I have to check for a field, ie if the field has value i need to pass it to target or else need to throw error.
mapping is X (1) ---> Y (0..1) , X is coming from CSV file , if i give blank in the file its processign , but it should throw error.
Do i need to write UDF or can i do it using graphical mapping..
Thanks ,
Monish.
use this UDF
if(a.equals(""))
throw new RuntimeException("Empty input");
else return a;
use mapping
Sourcefield---.UDF--->TargetField
Check this blog also
[/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
]
Edited by: Kubra fatima on Jul 9, 2009 9:33 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the mapping as given below
sourceField---.equalS---->not---->createIf----->targetField
constant[]/
do not give any value in the contant function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Yes you need to write a UDF. In this UDF check the value to X field. If it is space then through an error else return the value.
Regards,
Shweta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can use exist
http://help.sap.com/saphelp_nw04/helpdata/en/1a/318c4024d26e1de10000000a1550b0/content.htm
and createIf functions
http://help.sap.com/saphelp_nw04/helpdata/en/63/308c4024d26e1de10000000a1550b0/content.htm
Regards,
Michal KRawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.