on 08-03-2009 8:01 PM
Hi,
I have a flat file to IDOC scenario where the file is in the following format , wondering is this file is able to process using File adaptor content conversion?
Header 1 + Item 1
Header 1 + Item 2
Header 1 + Item 3
Header 2 + Item 1
Header 3 + Item 1
Header 3 + Item 2
Header 3 + Item 3
Regards,
Rajeev
Hi Rajeev,
Yes, it is possible to convert this kind of flat file into an IDoc. This will happen in 2 steps:
1. Here, you use the FCC at the file adapter level to convert the text file to a simple XML format.
<record>
<header>
<item>
<record>
<header>
<item>
2. Inside the mapping, graphical, you can format the simple XML structure to an Hierarchical XML structure.
<Header>
<item>
<item>
<Header>
<item>
<item>
Converting the file directly into Idoc format using FCC, I don't think it is possible.
Hope this helps,
Sumant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sura,
Flat file contains multiple header corresponding to multiple items.. and This layout structure combined with field position into each row to distinguish between Header and Item.
Header1,Item1
Header1,Item2
Header2,Item1
Header3,Item1
Header3,Item2
Idoc should sent with one header with all corresponding items to it and the structure which I am going to receive doesnt have any header identication. Does it possible to configure in FCC?
Thanks alot
Rajeev
Hi Jose,
Thanks for your reply,
Can I use header first field as a key field value? Each row contains header and item detials (Header is repeated):
ABC,11,22,XX,YY,CC
ABC,11,22,TT,RR,FF
ABC,33,44,PP,JJ,MM
ABC,55,66,SS,WW,LL
I receive a fixed length flat file with header (First three fields) and items (last three fields). Of which can I use first field of header as Key field value (ABC) and use FCC to convert to XML then map to IDOC?
IDOC should receive one header with multiple items as
ABC,11,22
-
XX,YY,CC
-
TT,RR,FF
ABC,33,44
-
PP,JJ,MM
ABC,55,66
-
SS,WW,LL
Is this possible?
Thanks
Rajeev.
Can I use header field as a key field value? Each row contains header and item detials (Header is repeated):
Yes You can
I receive a fixed length flat file with header (First three fields) and items (last three fields). Of which can I use first field of header as Key field value (ABC) and use FCC to convert to XML then map to IDOC?
Yes
IDOC should receive one header with multiple items as
ABC,11,22
---------XX,YY,CC
---------TT,RR,FF
ABC,33,44
---------PP,JJ,MM
ABC,55,66
---------SS,WW,LL
Yes, but you need you build the correct datatype which support you flat file content, then you will need to make some logic in message mapping to group your items.
For FCC, see these links:
[http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm|http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm]
[/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion|/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion]
Regards
Ivan
Hi Rajeev,
Using FCC, convert you file into a simple XML structure:
ABC,11,22,XX,YY,CC
ABC,11,22,TT,RR,FF
ABC,33,44,PP,JJ,MM
ABC,55,66,SS,WW,LL
into following XML format:
<record>
<f1>ABC</f1>
<f2>11</f2>
<f3>22</f3>
<f4>XX</f4>
<f5>YY</f5>
<f6>CC</f6>
</record>
The above conversion can be done easily by usign the following 2 parameters in FCC:
.fieldFixedLengths
.fieldNames
Once you have the above XML format, using graphical mapping I sort and create the IDoc required Header/Item format.
For doing this, I will mail, to your yahoo account, you a document with a sample mapping on how to do this.
This is the method I used in our scenarios.
Regards,
Sumant.
Hi ,
Is it also possible to make key filed value is in between a header as of following structure?
Key field value is second field which identifies new header: 11, 33 and 55 when ever there is a change its a new header: Fields before this key value are part of header field.. Does it possible to achieve below target strcuture if I use key value in between header field? I am using FCC of sender File Adaptor.
Fixed flat file :
ABC,11,22,XX,YY,CC
ABC,11,22,TT,RR,FF
ABC,33,44,PP,JJ,MM
ABC,55,66,SS,WW,LL
It should produce 3 IDOCs not 1 IDOC is it acheivable?
Target IDOC:
ABC,11,22
-
XX,YY,CC
-
TT,RR,FF
IDOC2
ABC,33,44
-
PP,JJ,MM
IDOC3
ABC,55,66
-
SS,WW,LL
Is this possible?
Can some on light on this issue?
Thanks
Rajeev
Edited by: rajeev raj on Sep 3, 2009 11:50 AM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.