on 08-27-2009 9:11 PM
Hi All,
I have a requirement,
This is teh requirement for mapping,
I have to populate a segment and its fields according to a value comming in inbound side,
for eg if the x segement has value A and B then populate the complete segment .
anybody has any suggestions..
You know satish, I have used the text equals , i think its not getting stuck in if else queue, anyways did u see my previous post with the requirement, please check and see if you can put any light on to the solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ravi,
Dont put X1 directly to boolean OR function. Please do like this:
status_code --> equalsTo (Text) which is input1 to this funciton
constant --> X1
status_code --> equalsTo (Text) which is input1 to this funciton
constant --> AB
Give the above two to OR boolean function. Then give the output of OR function to input of IF function and then in else give Delivery_Update and the output give to target. This should work. I tested this and I cannot give you screen shot because of some restriciton at my clients place. If this doesnot work then please do right click and display queue on target and let us know what you see.
Definitely you are doing somehting wrong in mapping this field.
Regards,
---Saish
Hi Ravi,
Can you send me the screen shot of what you mapped to my id, so that I can take a peak and let you know?
Regards,
---Satish
**********
Please read the Forum's Rules of Engagement,
i.e.,
[/thread/117188 [original link is broken];
and refrain from using email correspondence as the main objective of the Forums is to share knowledge.
SDN PI/XI Forum Moderator*
**********
Edited by: Kenny Scott on Sep 9, 2009 2:59 PM
RuntimeException in Message-Mapping transformation: Exception:java.lang.IllegalArgumentException: Cannot cast X1 to boolean in class com.sap.aii.mappingtool.flib3.Bool method orX1, AB, com.sap.aii.mappingtool.tf3.rt.Context@7b29b561
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok the inbound and outbound DT are as follows:
Inbound
MT_........
Record....
Delivery.....
..........
..................
Status_Code
............
...........
============================================
outbound
ZDEL.........
IDOC
Begin
EDI_DC 40
E1EDL20
Segment
-
-
-
-
-
ZNAEDELVRY_HDR
ZNAE_STATUS_CODE
================================
The inbound status code is mapped to this ZNAE_Status_Code
Now inbound is has X1,X2,X3 and AB as status code, now I have to populate only segments which has X1, AB
hope this shld be clear now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks again, you know what I have tried that , you cant do that operation on the segment right, anyways i tried that too, Iam getting error "X1 Cannot cast to boolean" , advice me thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
It seems somethign wrong you are doing in mapping like you are trying to compare with boolean. Instead compare with equalsto in text function. I think you are using equal in booolean. So change that it should work. Else give the condition of how you are mapping here. somebody will help you here.
Regards,
---Saish
hey thanks guys for the replies,
you know i have tried tha above sugesstion it din work out..
the scenario is like this...
We have sender as file system and receiver is an ECC (IDOC) it has one of the field value as X1,X2,X2 and AB .
now after mapping is done its populating all the fields absolutely fine, now we have an latest requirement wherein we have to populate IDOC just based on input values X1 and AB ( for now its populating for all values).
so it has to basically truncate segments for X2 and X3 i.e other tha X1 and AB....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
so it has to basically truncate segments for X2 and X3 i.e other tha X1 and AB....
I don't think you have to truncate the segments. You have to restrict the segments from getting created, based on the values of that incoming field.
So, put in a condition on the segment and check for the value of X1 and AB. If condition fails, then don't create the segment.
Regards,
Neetesh
Hi Ravi,
Use the "If-else" condition for the segment. If the condition is true, then only segment will be created.
Regards,
Neetesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
You can define the conditions with the standard functions. Map like this:
If --> source value --> equals A or equals B (take constants one for each and map with OR) --> createif --> target segment.
So you will have the target segment when the input has any of the value. If you dont have any of the value then you will not have this segment.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ravi,
This is a very simple requirement. Please search various blogs and threads on SDN. You will be easily able to do it.
Search for Mapping in Blogs.
If you want more help paste your source xml and target xml sample, Forum will help you.
Inder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.