on 03-17-2009 9:25 AM
Hello
I have an input stream that looks like this:
Order, Description
A FRED
B JIM
C HARRY
D
E
F
And an output stream that is giving me :
Order, Description
A FRED
B JIM
C HARRY
D HARRY
E HARRY
F HARRY
i.e. how do I stop the output values of Description persisting on the records where it should be blank?
(the xml tags for Description on the records for orders D,E and F are empty)
Thanks
Robert
Better to check your test message in test tab. I guess you just duplicated the last field C with a value HARRY and this the reason you are getting this value in rest of the fields.. Check your test data again..
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
What I have is on the input side is a record structure of :
MT_SalesOrder 1..1
>SalesOrder 1..unbounded
OrderNumber 1..1
Description 1..1
And the target is actually an ORDERS idoc, and the segment I'm having problems with is E1EDK02 which occurs 0..10
So I have a mapping of
Ordernumber -> removecontext - > splitbyvalue(value changed) -> collapsecontents -> splitbyvalue(each value) - > E1EDK02
..and then I tried :
Description -> BELNR ....and I get my problem, the last description is used on records which don't have one.
The stupid thing is, I can map:
Ordernumber -> concat ->Description -> removecontext - > splitbyvalue(value changed) -> collapsecontents -> splitbyvalue(each value) -> BELNR , and I get what I want, i.e. the description is correct on all the output records (but of course combined with ordernumber)
Regards
Robert
Hi Robert,
You can use the text function replaceString for this. Refer to the mapping below:
For the node BELNR
Ordernumber --> concat --> removeContext --> splitByValue:value changed --> collapseContext --> replaceString 1.
Description --> /
Ordernumber --> concat --> removeContext --> splitByValue:value changed --> collapseContext --> substring (0..fixed length of OrderNumber) --> replaceString 2.
Description --> /
Constant: --> replaceString 3.
Then map the output to BELNR. Please take note that for this solution to work, you need to have a fixed length for OrderNumber. This can be remedied by using the formatNumber function.
Hope this helps,
hello,
Verify the occurances of your field "Description". it should be 1:1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
You can use CreateIF standard function for same:
Check this blog:
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
5th option
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can You Just share Your Mapping...............
Because it is very easy if you use simple one to one mapping.........
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
How you have done your mapping. it seems simple 1 to 1 mapping so this problem shouldn't come.
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.