on 10-01-2009 6:33 AM
Hello All,
I need to convert the EDI data into XML. The data format of EDI is as below.
ISA00 00 010430000964203 ZZXXXXXX 0908161545U004010000007720P?/GSLB0430000964203XXXXXXX2009081615451X004010/ST823000000001/N1BKYYYYYYY13043000096/N1PEXXXXXXXXXZZ1019796429/DEP064420320090816**01043000096DA1019796429/AMT3188227.23/QTY411/QTY424/BAT20090816163/AMT2188227.23/QTY424/BPRC86843.12CCHK01053101561DA2079900582385/REFBT163001/REFCK0100705804/RMRIV91037498*1356.30/RMRIV9103773661470.340/RMRIV9103781324016.480/BPRC13518CCHK01041000124DA2637881/REFBT163002/REFCK049503/RMRIV91039174*135180/BPRC27855.36CCHK01041000124DA534165600/REFBT163003/REFCK118034/RMRIV91039386*27855.360/BPRC60010.75CCHK01053000196DA000693964223/REFBT163004/REFCK004752/RMRIV91039287*29428.960/RMRIV9103785828615.80/RMRIV910397701965.990/SE31000000001/GE11/IEA1*000000772/
I need to pick this file, i know PI cant not conver the EDI data but client want this data to be split when ever the "/" comes and send it to the proxy end at proxy side they can convert the data into IDOC format.
My question is at the sender side what FCC parameters i need to keep.
I created the source and target structure like this.
Source structure:
Soutce_MT
-
data 1..1
-
datastream 1..1
Target_MT
-
data 0....UN
-
datastream 0...UN
-
dataout 0...UN
in the mapping
datastream---->UFD---->dataout
UDF code.
String s;
String [] temp = null;
for(int i=0; i<var1.length; i++){
s = null;
temp = null;
s = var1<i>;
temp = s.split("/");
for (int l = 0 ; l < temp.length ; l++) {
result.addValue(temp[l]);
}
result.addContextChange();
}
now to PI pick the file what are the FCC parameters i need to keep and what are the changes i need to do to execute sucessfully this scenario.
Thanks and Regards,
Chinna
the UFD i wrote is
refer this wiki for How to use FCC parameter
http://wiki.sdn.sap.com/wiki/display/stage/StepbyStepGuidetoValidateEDIANSIX12DocumentusingJavaMapping
In this wiki I have the similar source structure and I have used FCC parameter at sender file adapter to read the complete EDI doc in a single field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fatima,
Thanks alot for your reply,
I done same way as it is given the blog, i have not kept the validation part java code.
i done the mapping as it is given, when i test the mapping its working fine.
but when i test the complete scenario......... at target side its not getting splitted.
its getting output as same as sending format.
Please tell me how it can be split and store at the target file.
Thanks and Regards,
Chinna
Have you specified the FCC aparameter at receiver as
Recordset Structure : datastream
choose + to specify following parameter
Name Value
-------------------------------------------------
datastream.fieldSeparator 'nl'
datastream.endSeparator 'nl'
if the above FCC parameters does not solve your problem then
Check the occurence of your Target structure with the occurence in my Target structure.(there is little difference)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See the Message Mapping MM_String_2_XML created in my wiki and a UDF used to split the EDI Doc(I have used ~ as segment terminator but in your case it is /)
In my scenario I have used the FCC at File receiver.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your case there is no need of mapping development.Make your source and target structure as same.
-
data 0....UN
-
datastream 0...UN
-
dataout 0...UN
Recordset Name : data
Recordset Structure : datastream,*
datastream.fieldSeparator : 'nl'
datastream.endSeparator 😕
datastream.fieldNames : dataout
Regards,
Prakasu.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.