Converting File Content: 2 different record structures
Dear all,
I have the following question: Is the PI 7.0 file adapter capable to convert the file content of a file which has two different record types? E.g.
Rekord 1: String(2) String(4) String(19)
Rekord 2: String(2) String(7) String(8)
In the XML structure I need for each of the record set, an own record structure e.g.
<documentName>...
<recordset1>
<NameA>
<field-nameA1>field-value</field-nameA1> // String(2)
<field-nameA2>field-value</field-nameA2> // String(4)
<field-nameA3>field-value</field-nameA3> // String(19)
</NameA>
</recordset1>
<recordset2>
<NameA>
<field-nameA1>field-value</field-nameA1> // String(2)
<field-nameA2>field-value</field-nameA2> // String(7)
<field-nameA3>field-value</field-nameA3> // String(8)
</NameA>
</recordset2>
The different record sets can be determined by the value of field 1 (string(2))
Thanks and best regards
Florian
HI,
I can see that.
The number of characters in the file for TABLE2 is lesser then the number of field size given.
for eg. if the table2 fixed field length sum is 20 ,your file contains only 10 characters. Please give complete data for table2
Test file
100WELCOME 0430000960603201321
<b>2000000000040008000803</b>
Table2.fieldFixedLengths: 1,10,10,10,3,3,4,1,38
Ragards
vijaya
Message was edited by: vijaya kumari
Similar Messages
-
XI 3.0 File Adapter: Converting File Content in Sender Adapter
Hi,
This is probably a basic question but does anyone have an example of the parameters used when you are using the 'Converting File Content' option on the File Adapter ?
Also, where do the record sets have to be defined ? Are these data types in the Integration Builder ?
The documentation is to say the least a bit flaky.
Any help would be appreciated.
Kind regards
Colin.Hello,
I'm wondering if someone has experience setting up conversion for different record structures. The example shown (in a greate way) only picture one kind of structure.
How should it be done if the file would contain
10Mat1
20100PCS
The first record structure has columns
ID(2),Material(10)
The second redcord structure has columns
ID(2),Quantity(3), Unit of messure (3)
Brgds
Kalle -
Howto use Converting File Content in Rec. Adapt. to suppress a xml-element
Hi,
we use PI/700, SP6.
I have following structure (example):
<MsgOut>
<Sender>Partner1</Sender>
<Receiver>Partner2</Receiver>
<FlatPayload>
blabla blabla
</FlatPayload>
</Msgout>
Now I wanna use a XI-File-Adapter to write just a Flat-File with the content (of the element <FlatPayload>):
blabla blabla
(in other words: I wanna suppress all other xml-elements beside of FlatPayload)
But I'm not able to configurate this with the function "Converting File Content"
I tried different possiblities:
e.g.
setting yyy.fieldFixedLengths = 0 and yyy.fixedLengthTooShortHandling = Cut
(yyy = Sender and Receiver)
or
just defining "MsgOut,FlatPayload" as RecordSet Structure (without Sender and Receiver)
Result: no success.
Now my question: is it possible to suppress some xml-elements?
Thanks for your help!
bye
WolfgangHI,
You can suppress the XML Nodes/Elements over here. Not Fields ..
For e.g if your outout xml is like this
<MsgOut>
<Sender>Partner1</Sender>
<Receiver>Partner2</Receiver>
<FlatPayload>
<flatdata> blabla blabla</flatdatat>
</FlatPayload>
</Msgout>
In this case you can suppress the <FlatPayload> node/element here.. Using Cut Parameter in the Receiver File Content COnversion.
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
So in your case, you can restructure your data type as you required.. I have mentioned in vice-versa here
Hope this helps,
Regards,
Moorthy
Message was edited by: Krishna Moorthy P -
Converting File Content.Unexpected XML format
Hello,
I need to convert file content in File Receiver Adapter.
In my opinion, i have unexpected XML format of a payload message. (At least, the format does not contain a structure element):
That is,
I have the XML message:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
I need to convert it into plane text format with fieldseparator.
How to convert this xml message into plane text format if it does not contain any structure elements (that is, <struc1> <field1>value</field1> </struc1>) according to help guide?
How should i configure RecordSet in File Adapter?
I am confused.
Thank youIgor,
Are u getting the format from the source?
<ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
If yes, then create one more data type with structure
<Record>
<ID/>
<BirthDay/>
<Title/>
<Name/>
<LastName/>
</Record>
And do direct mapping. So now you can easily configure the content conversion for the target format isn't it?
Its my thought, I don't know whether its feasible for you or not..
raj. -
Reading fixed length file with different record types
Hi,
I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
How we need to read such files.
Thanks
Ravdeephi ,
u cannot use the default wzard for this
use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm -
Need help in file content conversion complex structure
Hi Guys ,
Iam new to this file content conversion , Please let me know whether below requirement is possible .if yes than how ?
Inbound XML file from Proxy
<Data>
<keyfield1>0011</keyfield1>
<keyfield2>0012</keyfield2>
<Keyfield3>0013</Keyfield3>
<field1>Test1</field1>
<field2>testfield1</field2>
<field3>0001</field3>
<Data>
<keyfield1>0021</keyfield1>
<keyfield2>0022</keyfield2>
<Keyfield3>0023</Keyfield3>
<field1>Test2</field1>
<field2>testfield2</field2>
<field3>0002</field3>
output pgp flat file .
pgp file format should be as below after file content conversion
0011|0012|0013|Test1||||||
0011|0012|0013|Testfield1||||||
0011|0012|0013|0001||||||
0021|0022|0023|Test2||||||
0011|0012|0013|Testfield2||||||
0011|0012|0013|0002||||||
thanks a lot .
Regards
PrabhuHi.
Try this.
First you need to use a message mapping and create a target structure to convert a similar output structure that do you want. like this
<Target>
-- Field1
-- Field2
-- Field3
-- Field4
-- Field5
-- Field6
-- Field7
-- Field8
-- Field9
</Target>.
Then map
keyfield1-> Field 1 ,keyfield2-> Field 2 , keyfield 3---> Field 3
map field1-> field4 .. for the others fields duplicate the Target node (right click) and map map field2-> field5 ..etc.
For the field 5 until field 9 map with constant ("'')
Then in you receiver comunication channel put simple parameters.
Target.fieldSeparator = |
Target.endSeparator = 'nl'
Regards. -
File content conversion : Deep Structure
Hi,
I have to do a file conversion(receiver file adapter) of an xml file which has a structure
<root>
<header>
<recordtype>H</recordtype>
</header>
<company>
<recordtype>C</recordtype>
<companycode>001</companycode>
<detail>
<recordtype>D</recordtype>
<customer>c1</customer>
</detail>
<detail>
<recordtype>D</recordtype>
<customer>c2</customer>
</detail>
</company>
<company>
<recordtype>C</recordtype>
<companycode>002</companycode>
<detail>
<recordtype>D</recordtype>
<customer>c3</customer>
</detail>
<detail>
<recordtype>D</recordtype>
<customer>c4</customer>
</detail>
</company>
<trailer>
<recordtype>T</recordtype>
</trailer>
</root>
I would like to convert it into
H
C001
DC1
DC2
C002
DC3
DC4
T
This is what i put in the
content conversion parameters..
HEADER,COMPANY,DETAIL,TRAILER
HEADER.fieldFixedLengths 1
COMPANY.fieldFixedLengths 1,3
DETAIL.fieldFixedLengths 1,2
TRAILER.fieldFixedLengths 1
the file adapter failed during conversion.
I am just wondering if it is to do with the deep structures
ANY THOUGTHS....what do you mean by target structure.the mapped structure or the final file that is written to the FTP Folder.
the mapped structure is a treee
<root>
<header>
<recordtype>H</recordtype>
</header>
<company>
<recordtype>C</recordtype>
<companycode>001</companycode>
<detail>
<recordtype>D</recordtype>
<customer>c1</customer>
</detail>
<detail>
<recordtype>D</recordtype>
<customer>c2</customer>
</detail>
</company>
<company>
<recordtype>C</recordtype>
<companycode>002</companycode>
<detail>
<recordtype>D</recordtype>
<customer>c3</customer>
</detail>
<detail>
<recordtype>D</recordtype>
<customer>c4</customer>
</detail>
</company>
<trailer>
<recordtype>T</recordtype>
</trailer>
</root>
with the company 1 to unbounded
under which there can be multiple details... -
File content conversion record set per message
Dear All,
Problem:- File is of huge size because of which file content conversion is taking longer time and is failing.
File format:-
Header
Detail
Detail
Header
Detail
Detail
Detail
Detail
Header
Detail
Detail
Trailer
Trailer has total count of all detail record,header record and there are few checks as well as wrt other fields.
We need to do all the above validation on the file and if it successful it shud process it otherwise alert shud be raised.
As a step:-
I have used record set per message for splitting up the file because of huge size this functionality is working fine but because of spitting of file i am not able to do trailer validation as XI is creating multiple records with different message ID's
Is any other approch which will help to achieve both Spliting as well as validation
chiragChirag,
simplest scenario I can think of is splitting the 2 reqs.
1. create 2 folders, one for "in process" files and other for "validated" files.
2. create 2 scenarios:
2.1. your current sender system to in process folder (whatever to File).
=> In this you just do the validation, without FCC. You could create a simple module for that or even do it at mapping runtime, as you said (mapping may be easier to handle errors), and throw a runtime exception (which will eventually trigger an alert).
=> At the end, only files that go successfully throug the validation will be located in the "In Process" folder.
2.2. do a simple file to file scenario (from "In Process" to "Validated" folder), this time executing FCC & splitting messages if necessary.
Of course, this will only work if the module/mapping is able to process the large file anyway (hopefully yes, since it will still be a flat file and not XML yet).
BR,
Henrique. -
File Content Conversion : Recordset Structure with * not reading file
Hallo all,
we have the following problem.
we implemented a scenario as sown in this blog
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
but there is a problem.
If the file structure is declared as :
Header,1,Items,*
then the adapter does not even read the file from the directory (so I assume that for some reason the file structure is not as expected).
If on the other had the structured is declared as :
Header,1,Items,3
everything works.
Obviously though, this is not satisfying since we need variable cardinalities.
Here is an example :
I have a specific file in a standard directory, called xi_input.
The file is edited straight into that directory, so there can't be filename errors etc.
If the file is left empty :
Nothing happens . No message of any kind in sxmb_moni/monitoring xml messages .
If the file contains the following (data is random) , where 'H' is the key for the header and 'I' is the key for the items :
H 20060403 16 3 316001 kapou lalla morellala 20060403 F3 23
I 277101010 2
I 277101011 3
I 277101012 4
There are to cases :
if the file structure is declared as :
Header,1,Items,*
Then nothing happens .
If on the other had the structured is declared as :
Header,1,Items,3
everything works .
Any suggestions and help is appreciated
Thank you .Actually yes, there is an error message :
Error 5/30/08 3:12:45 PM fda9d3c5-4775-4df8-17b8-dfd14191171d
Retry interval started. Length: 5.0 seconds
Error 5/30/08 3:12:45 PM fda9d3c5-4775-4df8-17b8-dfd14191171d
Could not archive file 'E:\tmp\NetBeauty\In\xi_input.dat' after processing
5/30/08 3:12:45 PM Processing started
And the details are :
2008-05-30 16:07:00 Success Channel CC_File_adapter: Entire file content converted to XML format
2008-05-30 16:07:00 Warning Channel CC_File_adapter: Empty document found. Proceed without sending message
2008-05-30 16:07:00 Error Attempt to archive file "E:\tmp\NetBeauty\In\xi_input.dat" after processing failed. Retry
Only that they don't look very helpful. From this I only understand that the data in my input.dat file is not in the format expexced.
I Have configured key fields as :
keyfield name : keyfield
Header.fieldNames : keyfield,CreationDate,CentralCustomerCode,CustomerCode,ReferenceDocumentNumber,DeliveryPlace,Message,ReturnMessage,DeliveryDate,SalesmanCode,Rest
Items.fieldNames : keyfield,Material,Quantity
Header.keyFieldValue "H"
Items.keyFieldValue "I" -
Error in Converting File Content in a Sender Adapter
Hi everyone.
We are using File content conversion as message protocol for a simple flat file (sender) .
In the sender communication channel we have configured the recordset structure as follows:
order_row.filedNames : orderid,item,quantity,price
order_row.filedSeparator : ,
order_row.endSeparator : 'nl'
<b>Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'order_row.fieldFixedLengths' or 'order_row.fieldSeparator' is missing Mandatory parameter 'order_row.fieldNames': no value found </b>
In monitoring no XML messages are seen in IDX5.
What is the solution for this kind of problem.you have to provide values for the recordset structure?
Below i am refering multiple blogs on Content conversion, please refer them to help you get a hand on the same.
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter - TAB delimited
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter -
File Content Conversion - Recordset Structure required??
Hi,
I have a File Sender Communication Channel (CC) to convert very simple csv format to XI data type (XML).
The contect of csv file will look something like this and will always have one line per file.
111,222,333,444,555
And I have defined the Data Type/Message Type with 5 fields as follows:
Sender_DT
---F1
---F2
---F3
---F4
---F5
Assuming that I'll always get one line of data in a csv file, I don't really need to set Recordset Structure in Content Conversion Paramters of File Sender CC but it is required parameter so you can't save it without populating this parameter.
I understand that I can add a recordset to my DT so that it will look like below and type in Recordset in the Recordset Structure parameter but wanted to see if there is any other way to go around this without adding Recordset to DT.
Sender_DT
---Recordset
F1
F2
F3
F4
F5
Thanks,
JayHi Jay,
You are correct. You can't have a struct like
DT_SOURCE
--F1
--F2
--F3
You need another node with in DT_SOURCE like recordset
DT_SOURCE
-Recordset
--F1
--F2
--F3
If you don't get multiple lines in source file, you can simpl set the Recordset occurance to 1..1 but it is mandatory.
Regards,
Jai Shankar -
Sender FCC for CSV file with Reoccuring Record Structures
Hello,
I am trying to use FCC to bring in an X12850 Purchase Order file layout WITHOUT using seeburger, etc.
The Configuration I have in place works if the text file is:
Heading1
Heading2
detail1
detail2
detail3
Footer1
OR the text file contains:
Heading1
Heading2
detail1
detail1
detail2
detail2
detail3
detail3
Footer1
Unfortunately, the file I need to work has the format:
Heading1
Heading2
detail1
detail2
detail3
detail1
detail2
detail3
Footer1
When I try to send process this file I get the error ERROR consistency check in recordset structure validation (line no.6 : missing structure(s) before type detail1
Is it possible via FCC to bring in this file as XML?If you change the record sequence to variable it works.
-
CS3: Any way to Batch convert files from different directories?
Using CS3. I want to open a bunch of TIF files and re-save using different file options. The only way I know to do this is with File > Automate > Batch. But that only works if the destination folder for all files is the same. It's not.
Ideally I would not need to first open the files in Photoshop. Perhaps something with Bridge will work. Tools > Photoshop > Image Processor looks promising. There's even an option called "Save in same location", which does not do what it says so is totally useless.>Bridge and Finder. They might both be running, but they are two programs that aren't Photoshop to do one simple thing Photoshop should do already by version 11.
The whole point is that Bridge is supposed to be used as an integral part of the CS4 SUITE.
I keep Bridge CS4 running at ALL times (it uses a minute amount of resources when it is just in standby mode) and I consider it to be an essential adjunct to Photoshop particularly if you deal with digital camera files.
I use its "Get Photos from Camera" to download from my card reader in preference to Nikon's download program; and I open whole batches of RAW files for processing in Bridge-hosted ACR 5.2.
ACR 5.2 also handles scanned Tiffs and JPEGs.
And I use Bridge to output Web Galleries; attach files to e-mails; collect aliases of all the files of any kind (and from any folder) that are needed for a particular project into a single Collection: and generally to organize file storage throughout my System.
The only thing that I can't yet do directly from Bridge is to burn a Collection to a CD or DVD.
Hopefully, someone like David Franzen will create a Script to do that too? -
File Content Conversion - nested structures
In the above bolded message ...
2 Records are repeating for multiple times..
i know how to do..
if its repeats like below.. i know how to do..
Record1
Record1
Record1
Record1
Record1
Record1
Record1
Record2
Record2
Record2
Record2
Record2
Record2
Record2
Record2
But in my case its Records are repeating in this way...
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
Record1
Record2
can some help me .. please..
Thanks
sagar
Message was edited by: sagarkavi srungarakaviIf each record type starts with a key, and it looks like they do, it shouldn't matter what order they are in.
In the recordset structure just make sure both of those are set like: Record1,,Record2,
Set the recordset sequence to variable.
Fill in the key field name and type, and then use the keyFieldValue parameter below.
Record1.keyFieldValue PO1
Record2.keyFieldValue PID -
LSMW load a file with different record format
anyone can help me out here?
I am trying to load a file which has exactly same record format except for the first line, and the first line is not neglectable. If i want to load this file to SAP within one LSMW load, is it feasible?
thanks in advance.LSMW records fields screen by screen. When you have recorded your LSMW, the country code, company code and personnel area are in the first screen. So, this data must be on every line of your data file.
Example of how your data file should be:
Country CoCd Pers.Area Field1DataLine1 Field2DataLine1 ...
Country CoCd Pers.Area Field1DataLine2 Field2DataLine2 ...
Country CoCd Pers.Area Field1DataLine3 Field2DataLine3 ...
Maybe you are looking for
-
Missing Button Graphics (E.g. Search/Submit type buttons)
Hi, This problem has plagued me for a while now and I've made a few attempts at finding a solution but none have worked. Basically in place of the 'Post Question' button below which should be in green I have a 'place holder' grey button with the word
-
BW configuration in dev server
hi all Due to money constraints company are planning to implement Biw in the same system as development or in prd .Please can anyone post how to configure a client as a biw client in the same system on dev or on prd thanks
-
Regarding scheduling interface
Hi Xi guru's please give information how to schedule our interfaces In our project i have to run our run our interface weekly once i.e Xi need to pick the file at friday morning 5:00 clock. For frequent picking of file we go for poll int
-
Assigning keywords to multiple photographs
Hello. I can't seem to assign keywords to selected batches of pictures, the way it's supposed to work by dragging and dropping. Each time only the one picture is tagged, not the whole selection. This happens in the light table, and in the view window
-
Can a N router provide faster speed to client than modem speed?
Excuse my off-thread basis, but the knowledge I need will be here I felt. I have a 2.5m download speed from my DSL modem and am using an 802 -G router to serve 2 clients. If I bought a 802 - N router could it actually server the clients faster than t