on 05-29-2007 6:58 PM
I have CSV files coming into XI. There are up to 3 different types of structures per a file. Each file does have a "record type" defined in one of the columns, but I am having difficulties figuring out how to set up the DataTypes and the mapping.
The end goal is to send them to a JDBC adapter and commit the different structures into different tables within the same oralce database.
Each different record structure will go into a different table in the database.
Any help would be greatly appreciated.
Skip Ford
Here is a sample of the data coming in, you can see that the second column is the record type (1000,2000,3000), each record type has a different structure.
79-36280-03,1000,4/13/2007,9:27 AM,7064903362,79-36280-03,1234,HR2B2095,294.2432,0.233254,-6.56E-06,test,Failed
79-36280-03,2000,1,4,16.6,21.8,3184,368,-5.5,6.2,369.6,1,2,50,,,,,,,,,,,,,,
79-36280-03,2000,2,12,16.5,21.7,3602,367.1,-5,7.1,369.7,1,2,50,,,,,,,,,,,,,,
79-36280-03,3000,294.2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
79-36280-03,3000,294.5,139,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<i>79-36280-03,1000,4/13/2007,9:27 AM,7064903362,79-36280-03,1234,HR2B2095,294.2432,0.233254,-6.56E-06,test,Failed</i>
>>
1st segment - >say this is your header then in your DT create a node Header. And add the fields from 79-36280-03 to Failed in it.
<i>79-36280-03,2000,1,4,16.6,21.8,3184,368,-5.5,6.2,369.6,1,2,50,,,,,,,,,,,,,,
79-36280-03,2000,2,12,16.5,21.7,3602,367.1,-5,7.1,369.7,1,2,50,,,,,,,,,,,,,,</i>
>>>
Second segment (occurance unbounded)-> this should be the next node (say body) and add the fields
<i>
79-36280-03,3000,294.2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
79-36280-03,3000,294.5,139,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 </i>
>>>
Third segment (occurance unbounded) -> create a node for this followed by the fields
Whatever is record structure it is not going to affet. I have done similar scenario and it is working fine. But I have used 3 different receiver channels.
What I have done is I am just specifying key fields which is must for such type of scenario. Also u have to specify all the content conversion parameter properly.
In your case it seems these 1000, 2000, 3000 are key fields for 3 structure. If it is so then it is enough for this scenario.
I hope it will solve your problem. If still u have any problem let me know.
Warm Regards,
Gouri
(Award Points if useful )
Whatever is record structure it is not going to affet. I have done similar scenario and it is working fine. But I have used 3 different receiver channels.
What I have done is I am just specifying key fields which is must for such type of scenario. Also u have to specify all the content conversion parameter properly.
In your case it seems these 1000, 2000, 3000 are key fields for 3 structure. If it is so then it is enough for this scenario.
I hope it will solve your problem. If still u have any problem let me know.
Warm Regards,
Gouri
(Award Points if useful )
Reginald,
Please follow the below weblog. Its the same that your scenario deal with.
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
Whether key field work with second field? Please see the below forum, it might help you.
If its not clear reply back, I'll help you out.
Best Regards,
raj.
Hi,
I think you can have multiple statements in the structure for JDBC Receiver for each database table.
for more information :
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm</a>
Thanks,
Beena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ford,
If you have three different structures then I dont think it is possible to do in one interface.
Either you can create 3 separate interfaces one for each structure or you have to develop a module for this.
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reginald,
First Convert the CSV file to XML using file content conversion. There you can defined Key field name and value to separate the diifferent record structure in separate XML tag.
Then you can use multimapping(1:n) to send different record into different tables.
You can check how to do multimapping in XI in SAP library.
Hope this would solve your problem and reward points if it does.
Regards,
Vishal Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Reginald,
Can you paste the sample outbound CSV file .So that we can suggest the object structure you need to define.
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.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.