on 08-01-2007 9:41 AM
Hi XI Master,
I am XI beginner. I would like to have some advise from expert about how to do mapping. My target should group by Pay_Type. As long as same Pay_Type, the customer will group under the same Pay_Type.
Let say if my source have 4 different Pay_Type, so my target should have 4 Pay_Type group. Under each of the Pay_Type, it will have more than 1 customer.
Example: I got 1 csv file. the file format is like below:
<u>SOURCE Structure:</u>
<Recordset>
<Record>
<Cust_cd>C001</Cust_cd>
<Pay_Type>P1</Pay_Type>
<Amount>1.5</Amount>
</Record>
<Record>
<Cust_cd>C002</Cust_cd>
<Pay_Type>P2</Pay_Type>
<Amount>2.5</Amount>
</Record>
<Record>
<Cust_cd>C003</Cust_cd>
<Pay_Type>P3</Pay_Type>
<Amount>3.5</Amount>
</Record>
<Record>
<Cust_cd>C004</Cust_cd>
<Pay_Type>P1</Pay_Type>
<Amount>10.5</Amount>
</Record>
</Recordset>
<u>Target structure</u>
<Recordset>
<Type_P1>
<Cust>
<Cust_cd>C001</Cust_cd>
<Pay_Type>P1</Pay_Type>
<Amount>1.5</Amount>
</Cust>
<Cust>
<Cust_cd>C004</Cust_cd>
<Pay_Type>P1</Pay_Type>
<Amount>10.5</Amount>
</Cust>
</Type_P1>
<Type_P2>
<Cust>
<Cust_cd>C002</Cust_cd>
<Pay_Type>P2</Pay_Type>
<Amount>2.5</Amount>
</Cust>
</Type_P2>
<Type_P3>
<Cust>
<Cust_cd>C003</Cust_cd>
<Pay_Type>P3</Pay_Type>
<Amount>3.5</Amount>
</Cust>
</Type_P3>
</Recordset>
Thank you very much and appreciate for your help.
Regards
Lord
Hello Lord,
I've picturised the mapping logics , please find them in the below URL.
Please see the structure , that I've been created as per ur reqmt.
http://www.flickr.com/photo_zoom.gne?id=976271020&size=o
In the above URL, U might wonder why I created the third Data type ,
since the sub-structure is common across Type_P1 & Type_P2 & Type_P3.
I created as separate data type ans used them.
How to use it, please refer the below URL. I knew it's out of scope for
your requirement. Just thought of sharing it.
http://www.flickr.com/photo_zoom.gne?id=976271096&size=o
<b>Mapping Structure & Logic.</b>
Mapping for segment Type_P1& Type_P2 & Type_P3
http://www.flickr.com/photo_zoom.gne?id=976271312&size=o
UDF used for the above segment's
http://www.flickr.com/photo_zoom.gne?id=976271330&size=o
Mapping for segment Type_P1/Cust & Type_P2/Cust & Type_P3/Cust
http://www.flickr.com/photo_zoom.gne?id=976271382&size=o
Mapping for segment Type_P1/Cust/Cust_cd & Type_P2/Cust/Cust_cd & Type_P3/Cust/Cust_cd
http://www.flickr.com/photo_zoom.gne?id=976271390&size=o
Mapping for segment Type_P1/Cust/Pay_Type & Type_P2/Cust/Pay_Type & Type_P3/Cust/Pay_Type
http://www.flickr.com/photo_zoom.gne?id=976278338&size=o
Mapping for segment Type_P1/Cust/Amount & Type_P2/Cust/Amount & Type_P3/Cust/Amount
http://www.flickr.com/photo_zoom.gne?id=976277974&size=o
<b>Results</b>
http://www.flickr.com/photo_zoom.gne?id=976278352&size=o
http://www.flickr.com/photo_zoom.gne?id=976278344&size=o
I hope it helps you!!
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I thought it initially. Before I started working on it, I must have confirmed with u about the structure. But I was confident bcoz in ur structure u have given as Type_P1, Type_P2 and so on. So I had assumption that u will have only 3 paytypes. As per ur new reqmt , u can do it easily, but one criteria u need to change the data type structure.
My email id is sapient.xi@gmail.com. You can mail me, but I'll suggest u to post the questions here, please don't mind that I'm saying this for points. The reason i'm saying this is bcoz there are lot of our friends will have different methods to implement the same, so u can choose the best. I can support u at anytime offline, send me an e-mail.
Best regards,
raj.
Hi Raj,
I have been trying to create the dynamic target structure for many times. however i still cannot figure out how to get ride of the Mapping Constant. I have modified the target structure where it only consist of Type_PX and source structure remain the same.
Would you be able to give me some idea how to create the dynamic mapping?
Thousand times of Thanks.
Best regards
Hi,
Thanks for the patience.
<i>Btw, i am quite interested how you master the XI mapping?</i>
Not at all. There are lot of our friends who is more talented than me, I'm just beginner, please never say that I'm master .:-)
To be frank with you, I started exploring and working my mapping experience only in SDN Forum. I must really thankful to the forum. I'll suggest you to look for the past mapping problems or the current one's and try to simulate them. Trust me , you will learn a lot.
Best regards,
raj.
Hello,
Please find the mapping according to ur new reqmt.
http://www.flickr.com/photo_zoom.gne?id=1055773214&size=o
http://www.flickr.com/photo_zoom.gne?id=1055773256&size=o
http://www.flickr.com/photo_zoom.gne?id=1055773268&size=o
http://www.flickr.com/photo_zoom.gne?id=1055773292&size=o
http://www.flickr.com/photo_zoom.gne?id=1055773276&size=o
UDF - http://www.flickr.com/photo_zoom.gne?id=1054918191&size=o
Results -http://www.flickr.com/photo_zoom.gne?id=1055773306&size=o
I hope it helps!!! Also please do the complete testing, if you find any discrepancies let me know.
Best regards,
raj.
HI,
use copy per value followed by Split by value function in mapping and context change.
Regards,
S.RamNarender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi RamNarender,
First of all, Thanks for the fast reply.
Can you explain in more detail? Coz i am XI greenhorn.
I have this User-defined function call copyPerValue and try SplitbyValue in exercise. However I still cannot figure out how to apply in my problem.
Thank you and appreciate your help XI expert guidance.
check with this
/people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i
/people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-ii
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lai,
Go thorugh the link..
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
might help you ....
vasanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.