Mapping of repeating structure to nested structure
Hi I have a mapping issue.
My Data type look like this
MT_RcicRecords
-TRNH 1-1
-RECH 0-Unb
-RECL 0-Unb
-ENDT 0-Unb
-TRLR 1-1
In above structure pattern of RECH, RECL and ENDT can occur multiple type.
My output after File content conversion look like
<ns:MT_RcicRecords xmlns:ns="urn:amgen-com:pts:rcic">
<TRNH>
<RECORD_ID>TRNH</RECORD_ID>
</TRNH>
<RECH>
<RECORD_ID>RECH</RECORD_ID>
<ACTION>C</ACTION>
</RECH>
<RECL>
<RECORD_ID>RECL</RECORD_ID>
<ACTION>C</ACTION>
</RECL>
<ENDT>
<RECORD_ID>ENDT</RECORD_ID>
<COMP_CODE>EL</COMP_CODE>
</ENDT>
<RECH>
<RECORD_ID>RECH</RECORD_ID>
<ACTION>C</ACTION>
</RECH>
<RECL>
<RECORD_ID>RECL</RECORD_ID>
<ACTION>C</ACTION>
</RECL>
<ENDT>
<RECORD_ID>ENDT</RECORD_ID>
<COMP_CODE>EL</COMP_CODE>
</ENDT>
<TRLR>
<RECORD_ID>TRLR</RECORD_ID>
</TRLR>
</ns:MT_RcicRecords>
Now i want to map this to another data type whose structure is as follows
MT_RcicRecords_temp
-TRNH 1-1
-RCIC 0-Unb
--RECH 0-Unb
--RECL 0-Unb
--ENDT 0-Unb
-TRLR 1-1
I want to map earlier data in such way that for each pattern of RECH,RECL and ENDT there should be corresponding RCIC node created in target structure.
Any help
Hi,
You can use the graphical node function useOneAsMany to solve this. The node, <RCIC> need to occur atleast once in the source.
This function, generates a particular number of nodes n number of times, depending on the inputs you give to the function.
If this node is not present in the source and you need to create it in the target, you would have to use xslt mapping.
Regards,
Smitha.
Similar Messages
-
Map flat to nested structure by creating a collection
Hi All,
I've got a problem by mapping a flat to a nested structure.
The source structure looks like that:
<b>ISIN</b> = DE00000123450
<b>WKN</b> = 012345
The target structure is build as a collection of identifers:
<i><b>IDENTIFIER (1..unbounded)</b></i>
<b>ID</b> = 01
<b>TYPE</b> = Isin
<b>VALUE</b> = DE00000123450
<b>ID</b> = 02
<b>TYPE</b> = Wkn
<b>VALUE</b> = 012345
Now, it's impossible for me to append a new record to this identifier collection by using the plain mapping functionality without java functions.
Did anybody face and solve this problem?Hi Bhavesh, Marcus,
I'd like to refine the above problem somewhat ..
The main problem here is not to map an element name of a source document to an element value of a destination document, but to construct a collection from a list of source element values (Isin->Value, Wkn->Value):
("." are just for prettyprinting)
Source_1:
<PRICES>
....<Price>
........<Isin>DE0123456</Isin>
........<Wkn>123456</Wkn>
........<Currency>USD</Currency>
........<Amount>123.45</Amount>
....</Price>
....<Price>
........<Isin>DE0123457</Isin>
........<Wkn>123457</Wkn>
........<Currency>EUR</Currency>
........<Amount>987.65</Amount>
....</Price>
</PRICES>
Destination_1:
<PRICES>
....<Price>
........<IDENTIFIERS>
............<Identifier>
................<Key>ISIN</Key>
................<Value>DE0123456</Value>
............</Identifier>
............<Identifier>
................<Key>WKN</Key>
................<Value>123456</Value>
............</Identifier>
........</IDENTIFIERS>
........<Currency>USD</Currency>
........<Amount>123.45</Amount>
....</Price>
....<Price>
........<IDENTIFIERS>
............<Identifier>
................<Key>ISIN</Key>
................<Value>DE0123457</Value>
............</Identifier>
............<Identifier>
................<Key>WKN</Key>
................<Value>123457</Value>
............</Identifier>
........</IDENTIFIERS>
........<Currency>EUR</Currency>
........<Amount>987.65</Amount>
....</Price>
</PRICES>
So the main question for me seems to be: How to do the transpose of Isin and Wkn to the Value elements:
Source_2:
<Price>
....<Isin>DE0123456</Isin>
....<Wkn>123456</Wkn>
....<Currency>USD</Currency>
....<Amount>123.45</Amount>
</Price>
Destination_2:
<Price>
....<IDENTIFIERS>
........<Value>DE0123457</Value>
........<Value>123457</Value>
....</IDENTIFIERS>
....<Currency>EUR</Currency>
....<Amount>987.65</Amount>
</Price>
Since the length of the source list has very few items (comparable to columns in a database table), they could easily be set as constant Key's in the destination. The problem is: how to map element values of different source elements (Isin, Wkn) into a collection of destination elements (comparable to rows in a database table). The mapping from Destination_2 to Destination_1 could be done by a SplitByValue.
I couldn't find a mapping in the GUI which allows to do the latter mapping. More precisely to sort-of reference the destination elements by an index or to simply add more elements to the collection without overwriting the first one.
A Java Mapping doesn't seem to be appropriate, since it seems, that only 1 result value can be returned (or is it possible to modify the destination DOM/XML with a Java Mapping ? Or to return a list of values ?).
An XSLT Mapping seems to be possible, but unfortunately it imposes bigger efforts when additionally conversions or value-mappings are needed.
In the case that XSLT mapping is the only solution to the problem: is it possible, to do a XSLT mapping pipelined with a GUI mapping, such that the structural mapping can be done by XSLT and the conversions / value-mappings can be done via the GUI ?
Best regards,
Marc -
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
RgdsFrom 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 -
Message Mapping Nested Structure to key node in JDBC XML SQL Structure
Hello everybody,
I'm facing the next problem, I have the following nested structure
<ns0:MT_Irdoc_ArchivoNested xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">
<Header id_consecutivo="">
<Transaction/>
<Header2/>
<Header3/>
<Header4/>
<Header5/>
<Detail>
<Transaction/>
<Detail2/>
<Detail3/>
<Detail4/>
<Detail5/>
</Detail>
</Header>
<NombreArchivo/>
</ns0:MT_Irdoc_ArchivoNested>
as you can see, Detail is a nested Node from Header Node, and Detail is with occurrence 0...unbounded, I need to generate a SELECT XML SQL Structure as follows
<StatementName>
<dbTableName action=u201DSELECTu201D>
<table>realDbTableName</table>
<access>
<col1/>
<col2/>
<col3/>
</access>
<key1>
<col4>val4</col4>
<col5>val5</col5>
<col6>val6</col6>
</key1>
</dbTableName>
</StatementName>
now my problem is that col4 and col6 are values mapped from Header fields values, and col5 mus be mapped from Detail2 field of Detail Nested Structure, and Detail is 0...unbounded so it can contain any number of values and must included in the key structure, I tried by mapping the Detail Node to the key1 node, so it will generate n numbers of key1 nodes to include in the query, and the Detail number of nodes are not constant so I can't generate key2, key3, keyn...., so what I need is to create n numbers of instances of key1 node, but the problem is that when the mapping try to generate the second instance of key1 node it gives an error in the fields that comes from Header structure, maybe I'm trying to solve my problem wrong, could anyone give some advices or direction?, thanks in advance.
Regards,
Julio CesarJulio,
After placing the below logic in the mapping editor
Details2 > SplitByValue> col5
Right click on the Details2 node and choose Context. By Default you will see Details, because Details2 is the child of Details node. I want you to choose the Parent of Details node, I believe that would be HeaderID, am I right?
If you don't want to do that then,
Details2 ---> Remove Context > SplitByvalue> col5 will do the trick!
raj. -
Nested Structure handling in XML2Plain module of receiver SFTP aadaptor
Dear Experts,
Greeting for the day...
I am working on Receiver SFTP Adaptor scenario where I have to generate CSV file at receiver end. I am using XML2Plain module for the same. But I have a nested structure at receiver end. Receiver structure is given below.
General Header
Packet1
Node1
Field1, Field2...
Node2
Field1, Field2..
Node3
Field1, Field2..
Node4
Field1, Field2..
Packet2
Node1
Field1, Field2...
Node2
Field1,Field2...
Node3
Field1, Field2...
Node4
Field1, Field2..
File structure is as given below
General Header
Node1-field1,Field2..
Node2-Field1,Field2..
Node3-field1,Field2..
Node4-Field1,Field2..
Node1-field1,Field2..
Node2-Field1,Field2..
Node3-field1,Field2..
Node4-Field1,Field2..
I tried regular XML2Plain configuration but it is giving error "Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'Node1'".
Kindly suggest..
Thanks in advance.
Vinit.hi Vinit,
You can add another message mapping next to the original one such that Node1 can be treated as a field in new target and concat fields of Node1 with comma.
this way u can bring down the levels.
and finally the output mapping will look something like this
[General Header]
[Node1-field1,Field2..] [Node2-Field1,Field2..] [Node3-field1,Field2..] [Node4-Field1,Field2.]
[Node1-field1,Field2..] [Node2-Field1,Field2..] [Node3-field1,Field2..] [Node4-Field1,Field2.]
[Node1-field1,Field2..] [Node2-Field1,Field2..] [Node3-field1,Field2..] [Node4-Field1,Field2.]
[Node1-field1,Field2..] [Node2-Field1,Field2..] [Node3-field1,Field2..] [Node4-Field1,Field2.]
then in the channel u can give
field separator for the node fields as 'nl' which will bring your output as below.
General Header
Node1-field1,Field2..
Node2-Field1,Field2..
Node3-field1,Field2..
Node4-Field1,Field2..
Node1-field1,Field2..
Node2-Field1,Field2..
Node3-field1,Field2..
Node4-Field1,Field2..
hope this helps
thanks and regards,
Praveen T -
How to convert sequencial textlines into nested structure?
Hi experts,
I have an input-TXT file in which I get headerdata (1 line), positiondata (n lines) and for each position partnerdata (n lines). I have to map this data to Idoc ORDERS05. In this structure, there is 1 element per position (E1EDP01) which contains a subelement where I can enter position-partners. How can I achieve this mapping using the graphical message mapping tool in XI?
Example lines of inputfile:
(headerdata) 199992;100;10;...
(positiondata) 10;100200;50
(positionpartners) 10;partner1
(positionpartners) 10;partner2
(positionpartners) 10;partner3
(positionpartners) 10;partner4
(positiondata) 20;100201;100
(positionpartners) 20;partner1
(positionpartners) 20;partner2
(positiondata) 30;100202;75
must result in:
headerdata linked to E1EDK01, no problem
positiondata linked to E1EDP01, no problem
positionpartners linked to E1EDPA1 within E1EDP01. Here is the problem...just linking the input-positionpartners to EDEDPA1 does not work. Then I get all positionpartners of the complete inputfile linked to the first E1EDP01, and no partners from the second E1EDP01 on...
Regards,
WilliamHey,
First step is create a mapping structure(i.e data type and message type) which will be convenient
for you to map with the Idoc.
Then you can use File content conversion to convert the text file into the nested structure(one which you have created))
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
refer to this blog in order to convert the input file stream into the required nested structure.
Once done this map the message type to your Idoc.
revert in case of any problem with FCC(file content conversion).
reward points if useful. -
How to delete a value from the nested structure?
Hi Friends!
I have a nested structure such as
multimap<int, map<int ,set<int>>> FinalMul
It contains sample values
1=>4--->1
6=>4--->1
6=>9--->4
11=>4--->1
11=>5--->1 4
11=>9--->4
12=>2--->1 4 5
I want to delete the value 4 from the second and third column,
So, it looks like
1=>
6=>
6=>9--->
11=>
11=>5--->1
11=>9--->
12=>2--->1 5
after deleting 4, if I have a key(first) (1, 6, 11) and secondkey (second)(6=>9--->, 11=>9--->) with no values, then delete them also.
Finally it looks like
11=>5--->1
12=>2--->1 5
Can anyone help me how to solve it?
I just tried something;
set<int> tempV;
map<int, set<int>> tempM;
multimap<int, map<int, set<int>>> FinalMul
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(1, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(6, tempM));
tempV.clear();
tempM.clear();
tempV.insert(4);
tempM.insert(make_pair(9, tempV));
FinalMul.insert(make_pair(6, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1); tempV.insert(4);
tempM.insert(make_pair(5, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(4);
tempM.insert(make_pair(9, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1); tempV.insert(4); tempV.insert(5);
tempM.insert(make_pair(2, tempV));
FinalMul.insert(make_pair(12, tempM));Check this attempt:
typedef
set<int>
SET;
typedef
map<int,
SET>
MAP;
typedef
multimap<int,
MAP>
MULTIMAP;
// remove '4' from second column
for_each( FinalMul.begin(), FinalMul.end(),
[]( MULTIMAP::value_type
& mmv )
MAP & m =
mmv.second;
m.erase( 4 );
// remove '4' from third column and remove empty entries
for_each( FinalMul.begin(), FinalMul.end(),
[]( MULTIMAP::value_type
& mmv )
MAP & m =
mmv.second;
for(
auto i = m.begin(); i != m.end(); )
SET & s = i->second;
s.erase( 4 );
if( s.empty() )
i = m.erase( i );
else
++i;
// remove empty entries
for(
auto i = FinalMul.begin(); i != FinalMul.end(); )
MAP & m = i->second;
if( m.empty() )
i = FinalMul.erase( i );
else
++i; -
Nested structure and FCC problem (Header Problem)
Hi all,
I have a target structure like this:
MT
-Recordset (0..unbounded)
--field1 (1)
--field2 (1)
Record (0..unbounded)
field6 (0..1)
field7 (0..1)
After mapping:
MT
-Recordset (0..unbounded)
--field1 (1)
--field2 (1)
Record (0..unbounded)
field6 (0..1)
field7 (0..1)
-Recordset (0..unbounded)
--field1 (1)
--field2 (1)
Record (0..unbounded)
field6 (0..1)
field7 (0..1)
-Recordset (0..unbounded)
--field1 (1)
--field2 (1)
Record (0..unbounded)
field6 (0..1)
field7 (0..1)
I need header like this after FCC:
field1,field2, field6,field7
But Iu2019m getting something like this:
field1,field2,Record (Because of the nested structure, I can't change the structure)
I have used xml.addHeaderLine = 1 it didnu2019t work it gives something like the above structure.
I have also used xml.HeaderLine = field1,field2,field6,field7 and xml.addHeaderLine =3
Nothing is working is there any option.
Thanks,
Srinivas
Edited by: Srinivas Davuluri on Jul 17, 2008 10:13 PMHi,
one option could be
RecordSet.addHeaderLine = 3
Recordset.headerLine = field1<ur seperator>field2<ur seperator> field6<ur seperator> field7
Edited by: Progirl Progirl on Jul 18, 2008 9:50 AM -
Query on Receiver FCC for nested structure
Hi Friends,
I want to configure the Receiver side FCC for the below nested structure.
Can you guide me how can i achicve it? or its not possible for nested structure?
Seg100,Seg200.Seg300 and Seg400 are nested one below the other.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Test xmlns:ns0="http://hello.com">
--<Seg100>
--<field1>0000564.30</field1>
--<field2>KG</field2>
--<Seg200>
---<field3>1070</field3>
---<Seg300>
<field4>5</field4>
<Seg400>
<field4>5</field4>
</Seg400>
---</Seg300>
--</Seg200>
-</Seg100>
</ns0:Test>
Regards
VenkateshHi,
For nested structure we cont do the File content conversion.
so that we need to convert it a flat structure in the mapping level and then we can go for FCC.
Regards,
Prakasu -
Sending nested structure in PostLVUserEvent
Hi All,
I getting an exception when calling a c++ dll which has PostLVUserEvent to trigger the LabVIEW event structure.
This dll has typedef stuct as described below (nested structure type), the same data structure is sent using PostLVUserEvent to the LabVIEW event.
typedef struct abc
utf8_t *name;
uint32_t numChildren;
struct abc *children;
abc;
Please help me to create a nested structure cluster in LabVIEW. I am creating a cluster as shown below:
Sorry if this post is repeated.
Thank in advanceThis is not the datatype of a LabVIEW structure as you depict it!
The data structure would be something like this in C syntax:
typedef struct abc
LStrHandle name;
uint32_t numChildren;
struct children
LStrHandle name;
uint32_t numChildren;
} children;
} abc;
So the name is a LabVIEW string handle and has to be allocated, resized and deallocated using LabVIEW memory manager functions and the struct is not an array pointer but simply embedded. If it was an array in the LabVIEW cluster it would be really a LabVIEW array handle too.
Simplified it would really be equal in memory layout to this:
typedef struct abc
LStrHandle name;
uint32_t numChildren1;
LStrHandle name;
uint32_t numChildren2;
} abc;
Generally what you seem to want to do is a pretty bad idea. Managing LabVIEW arrays and strings on C level is quite a hassle, combining it with a recursively defined data structure is simply going to be a major pita. In fact you can't define fully recursive data structures in LabVIEW. The data type graph would end up being an infinite type description and that will blow up every memory immediately.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Hello,
I am building menu menu from the xml file using Spry Widget.
My XML structure is
main id="002">
<title>Payment Reports</title>
<link>#</link>
<submenu id="21">
<linkinner>/lckbx/main/payment_default</linkinner>
<titleinner>Check Payment Report</titleinner>
</submenu>
<submenu id="22">
<linkinner>/lckbx/main/postedpayment_default</linkinner>
<titleinner>Posted Payment Report</titleinner>
</submenu>
</main>
My nested xml calls are
var dsItems = new
Spry.Data.XMLDataSet("/menu/lockbox_menu.xml", "/buildmenu/main");
// Setup a couple of nested data sets:
var subItems = new Spry.Data.NestedXMLDataSet(dsItems,
"submenu/titleinner", "submenu/linkinner");
My problem is I am not be able to access the value of
"submenu/linkinner" from the xml file.
<li spry:repeat="subItems"
title="{subItems::titleinner}"><a
href="{subItems::linkinner}">{subItems::titleinner}</a></li>
I can not either create and use the thrid dataset as nested
data regions are not allowed if I create a third data set then they
over laps.
I can only fetch the value from the first element of the
nested structure. Please help me out how to fetch value from the
second sub value from nested tag.
Thank you,
Kamal.Kamal,
The problem lies in your constructor for the
nestedXMLDataSet. That constructor should have only two arguments
(it can have optional arguements as well, but it's not necessary to
go into those to solve your issue). The two arguments for the
nestedXMLDataSet constructor should be, the previously defined
DataSet and the xPath for the nested data.
You could solve this a couple ways. This would be a way to do
it without changing your XML file (or much else) -- change your
nestedXMLDataSet constructor to provide only one xPath argument at
the "submenu" level of your XML doc:
<script type="text/javascript">
<!--//
var dsItems = new
Spry.Data.XMLDataSet("/menu/lockbox_menu.xml", "/buildmenu/main");
var subItems = new Spry.Data.NestedXMLDataSet(dsItems,
"submenu");
//-->
</script>
For your nestedXMLDataSet, you need only go one level further
(beyond the level indicated in the dsItems dataSet) to get to the
data you want. The <linkinner> and <titleinner> tags
are both child nodes nested at the same level below the
<submenu> node of your XML doc, so you can access them then
(when your nested set is simply "submenu") by the tag names, as in:
{subItems::linkinner}
Accessing them in your page body would look like this:
<div spry:region="dsItems subItems">
<ul>
<li spry:repeat="subItems"
title="{subItems::titleinner}"><a
href="{subItems::linkinner}">{subItems::titleinner}</a></li>
</ul>
</div>
For the spry:region, reference the primary dataSet (dsItems)
as well as the nested set (subItems), and then the rest of it for
the list item is the same as what you already listed in your post.
-dustin- -
Nested structure when using FM XXL_SIMPLE_API
I use this logic to fill in the headings before calling the FM xxl_simple_api in one of my programs. Is it possible to have nested structure(for <b>i_tab</b> in my code) and still use same kind of logic to fill in the headings? Not sure if this Fm would display data correctly when there is a component of strucutre type. I tried it, the field was blank with no contents in excel.
DATA : nlines TYPE i,
tempfile LIKE gxxlt_f-file,
descr_ref TYPE REF TO cl_abap_structdescr,
header LIKE gxxlt_v OCCURS 0 WITH HEADER LINE,
it_print LIKE gxxlt_p OCCURS 0 WITH HEADER LINE.
*data: keycol type i.
FIELD-SYMBOLS:
<comp_wa> TYPE abap_compdescr,
tempfile = file_name.
REFRESH header.
CLEAR header.
descr_ref ?= cl_abap_typedescr=>describe_by_data( i_tab ).
DESCRIBE TABLE descr_ref->components LINES nlines.
nlines = nlines + 1.
LOOP AT descr_ref->components ASSIGNING <comp_wa>.
IF sy-tabix = nlines.
EXIT.
ELSE.
header-col_no = sy-tabix.
header-col_name = <comp_wa>-name.
APPEND header.
ENDIF.
ENDLOOP.
CALL FUNCTION 'XXL_SIMPLE_API'
EXPORTING
filename = tempfile
N_KEY_COLS = keycol
TABLES
col_text = header[]
I appreciate your help. ThanksHi,
It's better to use another FM 'SAP_CONVERT_TO_XLS_FORMAT'
call function 'SAP_CONVERT_TO_XLS_FORMAT'
exporting
I_FIELD_SEPERATOR = seper
I_LINE_HEADER = 'X'
I_FILENAME = P_FILE
tables
I_TAB_SAP_DATA = itab
exceptions
CONVERSION_FAILED = 1.
Svetlin -
File sender adapter: Content conversion for very deep nested structure
Hi all
I have a file which looks like this
HDOCKET 9800000660980000061911062009AA123456bbWM100012349800000619
DDOCKET_TEST001 4012YAG1
WZOA00000000010000000001
WZOA00000000020000000002
WZOB00000000030000000003
IAAXX000001
IAAXX000002
C0000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004
T2
and my structure is
Header - 1
Detail - 0....Unbounded
Bag - 0.....Unbounded (sub node of detail)
Track - 0.....Unbounded (sub node of detail)
Customer - 0.....Unbounded (sub node of detail)
Trailer - 1
and in the file sender adapter i mentioned the following content conversion setting
HEADER,1,DETAIL,*,Bag,*,Track,*,Customer,*,TRAILER,*
But when i go and see in the monitoring i received the following conversion
<?xml version="1.0" encoding="utf-8" ?>
<ns:MT_REQ xmlns:ns="http://royalmail.com/dd_c">
<HEADER>
<ID>H</ID>
<INT>DD</INT>
<CAR>9899999660</CAR>
<CUS>9899999619</CUS>
<POST>11062009</POST>
<NUMBER>AA123456bbWM10001234</NUMBER>
<ACC>9899999619</ACC>
</HEADER>
<DETAIL>
<ID>D</ID>
<Bag>DOCKET_TEST001</Bag>
<S>4012</S>
<Code>YAG</Code>
<mat>1</mat>
<count/>
<Mixed />
</DETAIL>
<Bag>
<ID>W</ID>
<Zone>ZOA</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>ZOA</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>ZOA</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
</Bag>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Track>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Tracked>
<Customer>
<ID>C</ID>
<OrigCustomer>00000000000000000001</OrigCustomer>
<Field1>00000000000000000001</Field1>
<Field2>00000000000000000002</Field2>
<Field3>00000000000000000003</Field3>
<Field4>00000000000000000004</Field4>
</Customer>
<TRAILER>
<ID>T</ID>
<Count>2</Count>
</TRAILER>
</ns:MT_REQ>
whereas i wanted it like:
<?xml version="1.0" encoding="utf-8" ?>
<ns:MT_REQ xmlns:ns="http://royalmail.com/dd_c">
<HEADER>
<ID>H</ID>
<INT>DD</INT>
<CAR>9899999660</CAR>
<CUS>9899999619</CUS>
<POST>11062009</POST>
<NUMBER>AA123456bbWM10001234</NUMBER>
<ACC>9899999619</ACC>
</HEADER>
<DETAIL>
<ID>D</ID>
<Bag>DD_TEST001</Bag>
<S>4012</S>
<Code>egg</Code>
<mat>1</mat>
<count/>
<Mixed />
<Bag>
<ID>W</ID>
<Zone>zzz</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>zzz</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>zzz</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
</Bag>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Track>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Tracked>
<Customer>
<ID>C</ID>
<OrigCustomer>00000000000000000001</OrigCustomer>
<Field1>00000000000000000001</Field1>
<Field2>00000000000000000002</Field2>
<Field3>00000000000000000003</Field3>
<Field4>00000000000000000004</Field4>
</Customer>
</DETAIL>
<DETAIL>
<ID>D</ID>
<Bag>DD_TEST002</Bag>
<S>4012</S>
<Code>egg</Code>
<mat>1</mat>
<count/>
<Mixed />
<Bag>
<ID>W</ID>
<Zone>zzzzzz</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>ZOA</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
<Bag>
<ID>W</ID>
<Zone>zzz</Zone>
<Item>0000000001</Item>
<Number>0000000001</Number>
</Bag>
</Bag>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Track>
<Track>
<ID>I</ID>
<Item>AAXX000001</Item>
</Tracked>
<Customer>
<ID>C</ID>
<OrigCustomer>00000000000000000001</OrigCustomer>
<Field1>00000000000000000001</Field1>
<Field2>00000000000000000002</Field2>
<Field3>00000000000000000003</Field3>
<Field4>00000000000000000004</Field4>
</Customer>
</DETAIL>
<TRAILER>
<ID>T</ID>
<Count>2</Count>
</TRAILER>
</ns:MT_REQ>
i.e. i need all Bag ,Track and Customer inside detail tag.
could anyone help me in this..i've already searched SDN and got some link as useful but none of them were totally related.
Regards
NainaNaina
Pls. check my forum link, i had the single level hierarchy XML file which I converted into nested structure & then into flat file.
File Conversion in Rec File Adapter with subnodes
This can give you an idea how to go ahead. Let me know in case you need any more info about this. -
I would like to know how to use nested structure in a ABAP program.
Thanks in Advance!A <b>nested structure</b> is a structure that contains one or more other structures as components.
Flat structures contain only elementary data types with a fixed length
(no internal tables, reference types, or strings).
The term deep structure can apply regardless of whether the structure is nested or not.
Nested structures are flat so long as none of the above types is contained in any nesting level.
Any structure that contains at least one internal table, reference type, or string as a component
(regardless of nesting) is a deep structure.
Accordingly, internal tables, references, and strings are also known as deep data types.
The technical difference between deep structures and all others is as follows:
When you create a deep structure, the system creates a pointer in memory that points to the
real field contents or other administrative information.
When you create a flat data type, the actual field contents are stored with the type in memory.
Since the field contents are not stored with the field descriptions in the case of deep structures,
assignments, offset and length specifications and other operations are handled differently from flat structures.
Kindly check the following link for more information on Nested structures:
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/frameset.htm
<b>Examples:</b>
DATA: BEGIN OF itab.
include structure vbak.
DATA: END OF itab.
DATA: BEGIN OF itab OCCURS 0,
itab1 LIKE mara,
itab2 LIKE vbak,
END OF itab.
Kindly reward points if it helps!
best regards,
Thangesh -
How to map idoc segments to multiple output structures
Dear experts,
On Pi I need to map segments from an Idoc to 2 different outputstructures. My scenario is as follows:
incoming Idoc on PI -> if segment eq 'X' then map to outputstructure '1'; if segment eq 'Y' then map to outputstructure '2'
Idoc structure is as follows:
- 1 header segment
- 1..n detail segments (which I need to map to outputstructure 1)
- 1 summarisation segment (which I need to map to outputstructure 2)
Output needs to be a .txt file.
I would like to use the graphical message mapping on PI, how can I map the Idoc to multiple output structures?
Thanks in advance,
WilliamHi
You can do 1:n multimapping
in message mapping in messages tab ..add both the structures in target tab and do the mapping
and in operation mapping add both the message interface on the target side
PLease go through this blog
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
Maybe you are looking for
-
A little info on my question, I had it stoeln on June 22nd 2013. I had recently bought it so had not installed any software on it nor did I have registered with icloud. I had contacted police, registered it stolen with Apple (but then just discovered
-
"Error Details" is empty...
When ever I've got an error in the ESB Control instances, and tryr to open the the error tab page - the dialog is completely empty? Is this a bug or? Regards, Henrik
-
Best practice for p2p video chatting
I use netgroup to implement a video chatting program. The # of memebers in this group is small (2 or 3). I find the audio is delayed (sometimes by 4s) and even cut (e.g. I count number from 1 to 10 but the other memeber only heard 1,2,3 then jump to
-
In den letzten Tagen hate ich öfter den Ausfall der ADOBE-ID Zugangsdaten. Jetzt ist es mir nicht mehr mögli9ch die DRM-geschützten Titel auf dem Reader zu lesen. Frustriert ahabe deshalb das Gerät auf die Werkseinstellungen zurückgestellt und alle D
-
Applying audio parameter to an iobject
Hello everybody: I have a little problem... I am trying to apply a behaviour to an object. The audio parameter to make it follow the audio track I am playing. I select the object, apply the behaviour and in the inspector window in the audio source I