on 01-31-2007 1:18 PM
Hi all,
I have an IDOC-XI-File scenario and I have a problem with the file receiver adapter and the content conversion parameters when the final data type has nested structures. Imagine that I have something similar to the following:
My desire is to get something similar to this in the output file:
SEGMENT0;HEADER
SEGMENT1;100
SEGMENT2;0200000716
SEGMENT3;1000
SEGMENT2;0200000717
SEGMENT3;1000
SEGMENT3;1001
SEGMENT3;1002
But what we are getting is this:
SEGMENT0;HEADER
SEGMENT1;100
SEGMENT2;0200000716;SEGMENT3;1000
SEGMENT2;0200000717;SEGMENT3;1000;SEGMENT3;1001;SEGMENT3;1002
The content conversion parameters of the file receiver are as follow:
Recordset Structure: IDOC,EDI_DC40,E1STATS,Z1HDSTAT,Z1ITSTAT
IDOC.fieldSeparator: ;
IDOC. endSeparator: nl
IDOC. addHeaderLine: 0
EDI_DC40.fieldSeparator: ;
EDI_DC40. endSeparator: nl
EDI_DC40. addHeaderLine: 0
E1STATS.fieldSeparator: ;
E1STATS. endSeparator: nl
E1STATS. addHeaderLine: 0
Z1HDSTAT.fieldSeparator: ;
Z1HDSTAT. endSeparator: nl
Z1HDSTAT. addHeaderLine: 0
Z1ITSTAT.fieldSeparator: ;
Z1ITSTAT. endSeparator: nl
Z1ITSTAT. addHeaderLine: 0
Ive tried to use the parameter beginSeparator=nl for the segments Z1ITSTAT but its not working. I havent been able to find a solution in the other forums. Can anybody help me?
Thanks in advance
Roger Allué Vall
Hi,
It is not possible to do a content conversion to this structure. Try to use one more mapping and get the structure like
<MT_TRG>
<Node1>
<fld1>a</fld1>
<fld2>a</fld2>
.
.
<fldN>z</fldN>
</Node1>
<Node2>
<fld1>a</fld1>
<fld2>a</fld2>
.
.
<fldN>z</fldN>
</Node2>
.
.
.
<NodeN>
<fld1>a</fld1>
<fld2>a</fld2>
.
.
<fldN>z</fldN>
</NodeN>
</MT_TRG>
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I understand what you mean. Thanks, it worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is another round about way to keep the sequencing in place(if at all that is getting lost)...
The trick is to convert the IDOC-XML to IDOC flat file format....this can be done very easily using an ABAP mapping and a standrad Function module....it is explained in the How-to document ...
If you were write the output of the mapping to a file using file adapter, without content conversion you would have all the sequencing in place...however, it would have details of the whole IDoc...
Now if you want specifics only..then after the standrad FM is called...loop through the IDOC data and extract only the required stuff....this way the sequencing is not lost..
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as jai pointed out, the expected doc strucutre shud be like
<root>...
<nameA>
<value1>value</value1>
<value2>value</value2>
<value3>value</value3>
</nameA>
<nameB>
<value4>value</value4>
</nameB>
......
</root>
also refer to :
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm">Converting File Content in the Receiver Adapter</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you explain it with my example? I can't see what you mean.
<ZSYSEX01>
.<IDOC BEGIN="1">
....<EDI_DC40 SEGMENT="SEGMENT0">
........<FIELD1>HEADER</FIELD1>
....</EDI_DC40>
....<E1STATS SEGMENT="SEGMENT1">
........<FIELD2>100</MANDT>
........<Z1HDSTAT SEGMENT="SEGMENT2">
...........<FIELD3>0200000716</FIELD3>
...........<Z1ITSTAT SEGMENT="SEGMENT3">
...............<FIELD4>1000</FIELD4>
...........</Z1ITSTAT>
........</Z1HDSTAT>
........<Z1HDSTAT SEGMENT="SEGMENT2">
...........<FIELD3>0200000717</FIELD3>
...........<Z1ITSTAT SEGMENT="SEGMENT3">
...............<FIELD4>1000</FIELD4>
...........</Z1ITSTAT>
...........<Z1ITSTAT SEGMENT="SEGMENT3">
...............<FIELD4>1001</FIELD4>
...........</Z1ITSTAT>
...........<Z1ITSTAT SEGMENT="SEGMENT3">
...............<FIELD4>1002</FIELD4>
...........</Z1ITSTAT>
........</Z1HDSTAT>
....</E1STATS>
.</IDOC>
</ZSYSEX01>
Regards,
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.