on 09-08-2011 7:03 AM
Hi,
I faced a mapping issue.
Mapping check the decimal pont position in the total string.
suppose value from ABAp side is 9.55
if length is 5.
then XI will give the value is 00955 ( i applied the right justified condition )
This is OK...
But in mapping when no value is coming from ABAP side,that time XI give error.
How do i create this mapping...????????
Regards,
sanghaitra
Hi,
Add an If condition to check if there is a value for the element. If element is empty or length = 0, use constant zero value.
Regards,
Jenny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanghaitra,
Put it on the first part. Do the following logic for your target element:
1. from the source element, use trim function to remove spaces
2. check the length of the Element using IfThenElse function. If length Equals 0, Then use Constant 0. Else, use source element
3. Add mapwithDefault - 0
4. Use formatNumber function to format the value in your desired output.
I have exactly the same scenario and it is working. Hope this helps.
Regards,
Jenny
Edited by: JennyAmi on Sep 8, 2011 9:00 AM
Hi,
Try to use MapwithDefault function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use "mapwith default" function in ur mapping..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This is OK...
But in mapping when no value is coming from ABAP side,that time XI give error.
Assuming that the value is null or suppressed, you can use the node function mapWithDefault for your mapping e.g
source -> mapWithDefault:00000 -> target
If the value is a space or blank, you can use this logic
constant:00000 -> \
source -> trim -> equalsS ----> ifThenElse -> target
constant: -> / source -> /
Hope this helps,
Mark
Edited by: Mark Dihiansan on Sep 8, 2011 8:08 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
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.