on 11-10-2005 9:13 AM
Is it possible to throw an error when a value mapping is not available in XI3.0?
In my current mapping the input value is returned if the value mapping is not available in the Value Mapping table.
Hi,
I had the same issue and opened an OSS for it. The asnwer from SAP was:
<i>The ValueMapping function used to throw an exception in cases when
mapping is not found in early development versions of XI2.0, but then
somebody complained that maybe it's not a reason to abort the mapping
and it was decided to write a log message and continue processing.
Now, customers have again complained that they want to decide themselves if the transformation should
proceed or abort and we're going to make
it exactly as you suggested: give a choice to throw exception or return
some kind default value. This is planned for XI 7.1.</i>
(XI 7.0. will the next release after 3.0 - so it will take quite a while until this is available)
regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the replies.
But actually I was looking for a more standard solution.
Apparently this is not available.
I think it is an important design choice for value mappings:
What to do when a value mapping entry is not available?
Stop the process / Go on with the process.
I think this should be a standard choice which the developer should make, without having to write some own (dirty or not) javacode around the value mapping.
Maybe SAP can add a radiobutton to the value mappings in the next XI release with the choice "Stop message" / "Do not stop message" when value is not available in the mapping table??!!
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
you can define a default value "error". If you want to have an exception, ask for that (if / compare to constant) and call a self written java function where devide with 0.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!!!
I think that divide by 0 is not the best solution.
I would prefer to throw a runtime exception in user-define funtion, for example:
throw new RuntimeException("value not found in value mapping for key :" + source_value);
In this way you would also get a nice description about a problem in the monitor.
Regards,
Andrzej
I am comparing result from value mapping.
If it equals source field I am adding ERROR_CODE = 1. I check this code in swith block .
I have one dataType and 2 interfaces For example: BusinessObject and ValidatedBusinessObject
Message was edited by: Sergey A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.