Help!! - File to Idoc Mapping with Nested structure
Scenario:
I have an inbound file that has three nested records.
eg. A00, B00 and C00. C00 is nested structure of B00 and B00 nested structure of A00. All these structure can repeat N number of times in a file.
How do I map this to IDoc structure that have one segment each for the three structures in the file and nested in the same way.
Question: How is the parent child relationship established?
Suppose I have a file
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
A00 5678 Joe 22
B00 US 23456
If I make a nested structure and then say in the file conversion properties that A00 go to segA and then B00 go to segB, but then when I come back to A00, how do I move the data to the A00?
Thanks in Advance
Rgds
From what you have layed out, you can create a data type with 3 children, all 1..unbounded cardinality, each containing their own elements. You say they are nested, but the example you gave isn't nested... it's just A's followed by B's followed by C's. If that is the case, you can then use a data type w/ 3 subelements (A, B & C) and each of those is actually a container with the real attributes of that line in your file. (I can email you a schema quickly if you need it)
If you are saying they can occur like this:
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
B00 US 23456
C00 2 XYZ
THEN they are nested - ie B's & C's repeat under any A. Then you must create segment B as a subelement of segment A instead of on the same level, then bury C under B. (I find this easiest w/ a text tool rather than inside XI, as I can cut/paste segments where I want them to belong...)
Good luck with setting up content conversion on that file adapter... We have done this a few times, and it can be quite interesting.
If you have trouble with the schema, you can post your email & I can give you a quick example.
Message was edited by: Amanda Derringer
Similar Messages
-
FILE TO IDOC SCENARIO WITH SCREEN SHOTS
can u please send me FILE TO IDOC SCENARIO WITH SCREEN SHOTS and do the needful for me
/people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi
/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
Also have a look at these forum threads...
IDOC TO FILE SCENARIO
idoc to file scenario
I hope this answers your query.
regards
Sreeram.G.Reddy
Message was edited by:
Sreeram Reddy -
Receiver File content conversion with nested structure
Hi Guys,
I have the below nested structure and have to convert it using receiver file content conversion.
<Header> [o, unbounded]
<A>a</A>
<B>b</B>
</Header>
<record> [0, unbounded]
<field1>
<X1>x</X1>
<Y1>y</Y1>
</field1>
<field2>
<X2>x</X2>
<Y2>y</Y2>
</field2>
</record>
The file is a comma separated one. Please let me know how to configure the content conversion.
ThanksHi Mukesh,
Have a look at the Shabz's blog for the receiver File content conversion : File Adapter (Receiver) - Are we "really" sure about the concepts?
Thanks,
Pooja -
Hi all,
i'm getting an error from SXMB_MONI in a scenario File to Idoc.
I have done the mapping from source file and Idoc CREMAS03, when i try to test from Integration Repository it's all ok, but when the scenario is executed i find this error in Idoc Adapter :
<SAP:P1>MSGGUID EF7E2140A08811DDBE1202004C4F4F50: Tag #TEXT found instead of tag IDOC BEGIN=</SAP:P1>
The field BEGIN in idoc structure is filled with constant value 1, than i dont understand the error.
This is the xml source file :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Vendor xmlns:ns0="urn:tbit40:workshop:group01:legacy">
- <Address>
<Country>IT</Country>
<Zip>001</Zip>
<City>ROMA</City>
<Street>SATTA</Street>
</Address>
<Currency>USD</Currency>
<SearchTerm>TEST</SearchTerm>
<LastName>GUIDA</LastName>
<VendorNumber>44332</VendorNumber>
</ns0:Vendor>
Any help is really appreciated.
Thanks.Hi all and thanks for your answer.
My problem is that for what i can see all Idoc attribute (like the attribute BEGIN) are mapped with constant value.
In taget source i can see : BEGIN = Constant([value=1])
What i dont understand is why when i execute the scenario it ends with this message :
<SAP:P1>MSGGUID EF7E2140A08811DDBE1202004C4F4F50: Tag #TEXT found instead of tag IDOC BEGIN=</SAP:P1>
It seem to me that the tag BEGIN is not filled with value, i also tried to copy the source xml file directly from SXMB_MONI (from payload) and test it in Integration Repository mapping section, but here is all ok and the test end succesfully. -
Hi Experts
I have facing some confusion when i am doing mapping for my scenario FILE to IDOC.
The IDOC Structure is as follows
HeaderRecord 0-1
DataRecord1 0-unbounded
(Subnode)DataRecord2 0-unbounded
(Subnode)DataRecord4 0-unbounded
DataRecord5 0-unbounded
(subnode) DataRecord6 0-unbounded
TrailerRecord 0-1
when the DataRecord1 is executed, an idoc is generated and all the DataRecord2,DataRecord4,DataRecord6 shld come under that particular Idoc. And when another Idoc is generated,all the DataRecord2,DataRecord5,DataRecord6 shld come under that particular Idoc.
How to achieve mapping for this??
please help me out.
Edited by: vemuganti naga phalguna on Oct 27, 2010 7:56 AM
Edited by: vemuganti naga phalguna on Oct 27, 2010 7:59 AMHi
1) Source file is Text File.
sample source data.
A|20101006142345|SAPQMP|40|
B|5999|R00003D||N|20072008|Unknown|
C|T0014|M1556||colourless Pale yellow||Receipt-Bulk|1|Yes|Y|Text||
C|T0001|M1556||Limpid liquid ||Receipt-Bulk|1|Yes|Y|Text||
C|T1379|M1398|18||23|Receipt-Bulk|1|Yes|Y|Number|mm²/s|
B|5998|R00014A||N|20072008|Unknown|
C|T0014|M0211||2.0||CoA|1|No|Y|Text||
C|T0014|M0211||2.0||Receipt-Bulk|1|No|Y|Text||
C|T0014|M0211||2.0||Transfer|1|No|Y|Text||
C|T0051|M0271|97|||CoA|1|No|Y|Number|None|
C|T0073|M1356|Pass|||Receipt-Bulk|1|No|Y|||
C|T0073|M1356|Pass|||Transfer|1|No|Y|||
C|T0025|M0331||0.880||CoA|1|No|Y||g/ml|
C|T0025|M0331||0.880||Receipt-Bulk|1|No|Y||g/ml|
C|T0025|M0331||0.880||Transfer|1|No|Y||g/ml|
C|T0001|M1556||Clear & Bright ||CoA|1|No|Y|Text||
C|T0049|M0341|28.0||32.0|CoA|1|No|Y|Number|mm²/s|
C|T0049|M0341|28.0||32.0|Receipt-Bulk|1|No|Y|Number|mm²/s|
C|T0049|M0341|28.0||32.0|Transfer|1|No|Y|Number|mm²/s|
C|T0042|M0422|||-15|CoA|1|No|Y||°C|
C|T0092|M0578|||16|CoA|1|No|Y|Number|% Loss|
C|T0021|M0199||||CoA|1|No|Y||minutes|
C|T0039|M1453|Mktble|||CoA|1|No|Y|||
C|T0050|M0341||5.1||CoA|1|No|Y|Number|mm²/s|
C|T0050|M0341||5.1||Receipt-Bulk|1|No|Y|Number|mm²/s|
C|T0050|M0341||5.1||Transfer|1|No|Y|Number|mm²/s|
C|T0026|M0412|210|||CoA|1|No|Y|Number|°C|
Z|20101006142355|SAPQMP|40|
where Records A indicate File Header, Z indicates File Trailer
Recodrs B indicateds Material header and Would be repeating multiple times
No. of B Records = No. of Idocs generated with corresponding C records data which indicates Component Rows (multiple)
i.e as many B records file contains, that many Idoc will be created
For Mapping I require B and C Records. Field Separator is Pipe | symbol
I need to Ignore A B C Z
How to define the source structure and the respective FCC Parameters
please help me out -
Hi all
I dont know much about idocs. I am creating a file to idoc scenario. i have done with(hope so) all the other settings, design and configuration. BUt dont know how to do the mapping.how the control segment fields have to be mapped. what are the mandatory fields in idoc?Hi Aarthi,
You can leave the control records of the Idoc blank since XI fills them up. This is because XI would be the sender for the idoc. If you select "Header mapping" then you have to map control records else not.
Also in the idoc data segments all fields with a red dot are mandatory. If you do not have a field from the file to map with the mandatory idoc field then either you can suppress it or map it to a constant.
Hope this helps.
Regards. -
Flat File to IDOC Mapping requirement to generate Multiple Segments
Hi Experts,
I got a requirement were i have 2 records in a file and i need to generate 2 IDOCs with multiple segments in it.
FILE :
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
Idoc should generate 2 IDOCs with multiple segments as shown below
I have imported the IDOC and changed the occurrence to " unbounded "
The Basic IDOC Type : WMMBID02
I need to generate Multiple segments of E1MBXY1
i.e.., First IDOC should contain two E1MBXY1 segments
Second IDOC should contain Four E1MBXY1 segments
IDOC1 : WMMBID02
Segment : E1MBXY1( 2 segments)
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
IDOC2 : WMMBID02
Segment : E1MBXY1 ( 4 segments)
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 30-0257 3521 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3521 1 2 ea 110000 10
Can anyone suggest me how to generate IDOCs with multiple segments
what are multiple ways of generating it
Whether it can be achieved using Multi-mapping or I need go for UDF
If any one has done has done this type of requirement ,please share the points.
Thanks
SaiBasically you need to generate idoc per record in the flat file. During fcc conversion you convert flat file to xml structure at the sender side. In the mapping use xml file structure source and idoc as receiver structure. You just export idoc and update the idoc segment 1 to unbounded. Please follow the michael blog for file to idoc multimapping without bpm. Yes without bpm it is possible.
see this link... This will answer your requirement.
https://wiki.sdn.sap.com/wiki/display/XI/File%20to%20Multiple%20IDOC%20Splitting%20without%20BPM
>Whether it can be achieved using Multi-mapping or I need go for UDF
you dont need udf for this. -
Query on Context Handling ( File to IDOC mapping )
Hi All,
I've a scenario from file to IDOC. The structure of file is as follows.
Struct ( occurs unbounded times )
|
- Name
Str. of IDOC
Node
|
- name1
- name2
- name3
- name4
The problem is that the name in file can occur many times.
So if say name occurs 2 times in the file then it has to be mapped to name1 and name2 in IDOC.
If Name in file occurs 3 times it'll be mapped to name1, name2 and name3 in IDOC.
Am looking for some help.
Thanks,
Joe.Hi Joe,
For every name in the file, you will have to map the value to the name field in the IDoc. Use SplitByValue node function available in the graphical editor. You will be able to achieve this mapping. For more about the usage, here's the documenation and a blog(where an example has been given):-
http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/frameset.htm
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Regards,
Sushumna -
Problem in Sender File Adapter using FCC with Variable structure
Hi Experts,
Hi Experts,
I have facing an issues while using FCC in Sender File adapter. Below are the configs for the same:-
Recordset structure required is ==HEADER,1,DATA,*,TRAILER,1
Recordset per message == *
Key Field Name == Key
(Sorry i dont know how to insert screen shot here..pls tell me how can i insert screen shots here on sdn)
HEADER.fieldSeparator ,
HEADER.endSeparator u2018nlu2019
HEADER.fieldNames Key,x,y,zu2026
HEADER.keyFieldValue 1
HEADER.keyFieldInStructure ignore
HEADER.fieldContentFormatting trim
HEADER.additionalLastFields ignore
HEADER.missingLastFields ignore
DATA.fieldSeparator
DATA.endSeparator
DATA.fieldNames
DATA.keyFieldValue
DATA.keyFieldInStructure
DATA.fieldContentFormatting
DATA.additionalLastFields
DATA.missingLastFields
Using same variables for Trailer record as well.
Source CSV file which i am picking:-
ADSE ,RASD,replan Contact ,2 0080509 0 8:43:25 ,
EMPL ,0011111, S Top Up ,20080401 ,20080430 ,sdf , 00000000431250 ,2007 , , , , , ,20080414 18:07:35,
EMPL ,0222222, r Cash Award ,20070701 ,20070703 ,ded , 00000000023509 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0233333, Cash Award ,20070801 ,20070831 ,df , 00000000044057 ,2007 , , , , , ,20080414 18:10:56,
EMPL ,0244444, Cash Award ,20080101 ,20080111 ,sf , 00000000026717 ,2007 , , , , , ,20080414 18:08:29,
BTRL , 5140,
When i tested the scenario and monitored it using MDT in CC monitoring tool its giving me below mentioned error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing resource 'http://myurlname/mdt/me...
However if i change the occurence of DATA as some specific value for eg 4 instead of * it works fine.
Kindly help me in solving this problem.
Thanks,
Aditya VermaHi Madan,
Thanks a lot for giving me the way to this. But when i tested this with the below file its giving me the same error. Please let me know if i need to do any changes to the parameters mentioned above:-
ADSE ,ASDA,Sha replan Fr ont Feed Contact ,2 0080509 0 8:43:25 ,
EMPL ,0011111, Cash Top Up ,20080401 ,20080430 ,TPV , 00000000431250 ,2007 , , , , , ,20080414 18:07:35,
EMPL ,0222222, r Cash Award ,20070701 ,20070703 ,TPV , 00000000023509 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0233333, r Cash Award ,20070801 ,20070831 ,TPV , 00000000044057 ,2007 , , , , , ,20080414 18:10:56,
EMPL ,0244444, Cash Award ,20080101 ,20080111 ,TPV , 00000000026717 ,2007 , , , , , ,20080414 18:08:29,
EMPL ,0255555, Cash Award ,20080301 ,20080320 ,TPV , 00000000027870 ,2007 , , , , , ,20080414 18:08:25,
EMPL ,0266666, Cash Award ,20071001 ,20071020 ,TPV , 00000000020681 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0877777, Cash Top Up ,20080401 ,20080430 ,TPV , 00000000036000 ,2007 , , , , , ,20080414 18:07:05,
EMPL ,0888888, Leaver Cash Award ,20071201 ,20071231 ,TPV , 00000000157200 ,2007 , , , , , ,20080414 18:11:29,
EMPL ,0899999, S Leaver Cash Award ,20080301 ,20080331 ,TPV , 00000000153530 ,2007 , , , , , ,20080414 18:07:42,
EMPL ,0800000, S Leaver Cash Award ,20070701 ,20070731 ,TPV , 00000000012234 ,2007 , , , , , ,20080414 18:08:34,
BTRL , 5140,
This the original csv file which i'll get in live. Kindly suggest as ur solution worked with other file but not working with this scv file.
Thanks a lot,
Aditya. -
Help required in Idoc mapping!!
Hi,
I have an idoc to file scenario:
Idoc looks like this
Idoc
Header
E1BPE1WLMV (0.....999)
field1
E1BPE1MALG (0.....999)
field2
Target
Details
field3
My requirement is that :
field 3 should b mapped to only the first occurence of field1. (and not the subsequent occurences).
Please suggest how can i proceed ?Thanks guys...but I have got some more inputs for my requirement now:
Source:
Idoc
Header
E1BPE1WLMV (0.....999)
field1
E1BPE1MALG (0.....999)
field2
Target:
Details
field3 (= field1)
field4 (=field2)
The Details should be created for unique combination of field1 and field 2. For e.g.
Field 1 comes 2,3,4
Field 2 comes 1,5
Then detail should be created 6 times for
field1= 2 & field2= 1
field1= 2 & field2= 5
field1= 3 & field2= 1
field1= 3 & field2= 5
field1= 4 & field2= 1
field1= 4 & field2= 5
Could you please help ?
Edited by: jayagupta21 on Apr 14, 2011 7:24 AM -
File to IDOC mapping - Message Type WMMBXY
Hi
I am working on FILE to IDOC Scenario. I have records like the following in my file:
301 ABC455559 03.11.2009 02u0391B13 01 OBAF515150 G378378 15 PC 20090311 MIGO
301 ABC455560 03.11.2009 02u0391B13 01 OBMN515040 437482 50 PC 20090311 MIGO
Using an ABAP Program I added DTL in front of every record as I have to convert text file to XML mapping.
DTL 301 ABC455559 03.11.2009 02u0391B13 01 OBAF515150 G378378 15 PC 20090311 MIGO
DTL 301 ABC455560 03.11.2009 02u0391B13 01 OBMN515040 437482 50 PC 20090311 MIGO
When I did this my mapping is fine from source side. For the above two records there are two records created in xml format. But only one record is created at target side. I changed message type WMMBXY to unbounded in the external message but still only one idoc is created.
Please let me know if anyone faced the same issue.
Thanks
Naga1..Please mapping ur sorce node (has occurance 0..unbound) with target node.
2...change occurance in message tag in mapping for IDOC message
3...change occurance in message mapping for IDOC message
Regards,
Manisha -
File to idoc scenario with controls
I am working on file to idic scenario.
file has four types of lines :
Begin of file.
header.
items.
end of file.
each line has a element Record type and some other elements.for header record type is A , for item its B , for Begin of file its C and for end of file its D.
we have to check for every line that it should have record type as one of these four and if not so we have to send a mail through alert functionality.we have to send a mail which has all errors by checking the whole file for record types.we have to ignore these lines in the file and proceed with the rest.
how can we implement this?
regards,
rohitHi,
Please go through these links
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
/people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
/people/sravya.talanki2/blog/2005/08/17/outbound-idocs--work-around-using-party
/people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
Thanks
Vikranth Khimavath -
File to IDOC - issue with partner profile
I have done File to IDOC scenario and tested it end to end successfully. For same have done all require configuration setting in R/3 like defining logical System and partner profile. And it sends new IDOC successfully in R/3 with status code 50 (IDoc added).
But when I create new logical system and partner profile in R/3 and when I use same logical system in my above mention scenario then my new generate IDOC in R/3 return status code 56 (EDI: Partner profile inbound not available). But same scenario work fine with my earlier partner profile. Here I have done all require changes at adapter level like adapter specific identification and same new logical system I have update in SLD with my business system Logical System Name.Hi Bhavesh,
Thanks for your reply.
In control record, I checked with sender and receiver partner. In this sender partner is new partner profile which I have created with port details. Receiver partner has logical system name which I have mentioned in my SLD for my receiver business system. But in receiver partner dont have any port details.
But still it has same problem.
-Sunil -
Hi,
I am mapping a flat file to idoc in xi. If I execute the test data it works fine. But in actual run, it gave me the following mapping error:
com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_MT_APPayment_to_FIDCCP02_: Runt
imeException in Message-Mapping transformatio~
Exception of class CX_XMS_SYSERR_MAPPING
Is it due to some mapping error or some basis config issue?
Thanks,
JassiHi Jassi,
This may be a mapping issue, try this:
a)in interface mapping see if grids are formed at source and target after executing the test option,
b)also take the xml of the idoc from sxmb_moni , copy it and paste it at the source of the mapping ( use the src tab now) and execute the mapping, is your file structute formed?
Check the following link:
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Amaresh -
File to idoc scenario with file size 16 MB
Hi experts
We are developing a file to idoc scenario.The file is a 16 mb CSV txt file.Is it feasible to poll a 16 mb file at a single shot or any mechanism can be followed which would split the 16 mb file into manageable size files so that it can be polled from the adapter engine side.Will there be any performance bottleneck fr polling 16 mb file .Plz provide help in this regardHi Sabyasachi,
There would be absolutely no problem , you need not worry. I myself am using a 16 MB master record file.
The problem only arises when you need to open this 16 MB file for into some errors or some other changes then invariably what happens is that my desktop hangs.
Regards
joel
Maybe you are looking for
-
Duplex printing second side upside down
I believe there is something in my InDesign file that is causing a few of my files to print the second side upside down. My files are vertical (portrait) layout/setting with the two sided option on long-edge binding. I don't think it is the printer b
-
I'm trying to create something similar like on this site http://www.mitsubishimotors.com/MMNA/jsp/index.do there are 2 flash element on this page the top big image and the bottom image slide show. My question is when you rollover on an image on the s
-
Internal Error: 8004, 7074840, 7076383, 6297905
Has anyone encountered this error, and do you have a fix or workaround? It's not in the knowledgebase. Symptoms are: FM 8.0 p277, creating PDF using Distill Professional 8.1.2; FM crashes when you try to build a PDF out of a book in one file. I have
-
Import target folder templates
I would like to rationalise my current workflow by eliminating Breeze Systems' Downloader Pro, but in order to do that I need to be able to set an import's target folder from a template. What I want to be able to do is have Lightroom calculate a targ
-
Hi guys, I do not know if this is the correct place to post this, inform me if not. 1.Why should someone use an object oriented database? What are the benefits and the drawbacks? 2.The member functions of the objects usually contain insert/update/del