on 01-22-2007 6:50 PM
Hello,
We have a PlainFileTOIdoc SAP XI Scenario. We have configured everything and it is working fine. However, we have a new requirement: every plain file can contain multiple IDOCs. I mean, in the text file we can have something similar to this:
HEADER;0200000140;AH02;20061205
REGISTRY;000000000000000011;AH02
REGISTRY;000000000000000012;AH02
REGISTRY;0200000144;AH03
HEADER;0380000990;AH02;20061205
REGISTRY;000000000000000012;AH02
Where:
HEADER;0200000140;AH02;20061205
REGISTRY;000000000000000011;AH02
REGISTRY;000000000000000012;AH02
REGISTRY;0200000144;AH03
It should create an IDOC and
HEADER;0380000990;AH02;20061205
REGISTRY;000000000000000012;AH02
It should create another one.
So, in this case XI should receive 1 file and R/3 system should receive 2 IDOCs. But, it is not working. We have investigated several XI forums and finally we found that in the Message Mapping theres a tab (Messages) where you can indicate the occurrences of each message. If we try to set the IDOC Message as unbounded, the message structures in the Message Mapping changes from:
For the file:
MT_Struct
IDOC
E1SEGMENT1
FIELDs
E1SEGMENT2
FIELDs
For the IDOC:
IDOC_NAME
IDOC
BEGIN
EDI_DC40
E1SEGMENT1
FIELDs
E1SEGMENT2
FIELDs
To something like this:
For the file:
Messages
Message1
MT_Struct
IDOC
E1SEGMENT1
FIELDs
E1SEGMENT2
FIELDs
For the IDOC:
Messages
Message1
IDOC_NAME
IDOC
BEGIN
EDI_DC40
E1SEGMENT1
FIELDs
E1SEGMENT2
FIELDs
Now the problem is that the message mapping fails because we are not able to create an XML structure with more than 3 levels deep. The mapping process returns Cannot produce target element /ns0:Messages.
When we had 1 File > 1 IDOC, the file sender content conversion was configured, for example, as follows:
Document Name: MT_Struct
Recordset Name: IDOC
Recordset Structure: E1SEGMENT1,1, E1SEGMENT2,*
Key Field Name: KField
E1SEGMENT1.fieldSeparator: ;
E1SEGMENT1.keyFieldValue: 1
E1SEGMENT1.fieldNames: KField, Field1, Field2
E1SEGMENT1.endSeparator: nl
E1SEGMENT1.ignoreRecordsetName: true
E1SEGMENT2.fieldSeparator: ;
E1SEGMENT2.keyFieldValue: 2
E1SEGMENT2.fieldNames: KField, Field1, Field2, Field3, Field4
E1SEGMENT2.endSeparator: nl
E1SEGMENT2.ignoreRecordsetName: true
This configuration generated something like this:
But we dont know how to generate the XML tags for the fields: Messages and Message1 because the content conversion configuration does not allow generating 3 or more level structures deep.
So can you tell us how to solve this problem? Is there anything we can do to configure SAP XI so we can send 1 File to multiple IDOCS.
Thanks in advance.
Roger Allué Vall
Hi Roger -
Given that you original scenario was working fine, another approach to this would be to use the "Recordsets per Message" parameter (setting it to 1) in your sender file adapter config. Given that your recordset is something like: <i>HEADER, 1, REGISTRY, *</i>, adding this new parameter would send a new message for each HEADER, REGISTRY recordset at the adapter level (there would be a separate resulting IDOC for each new message as well). That way, you wouldn't need to change any mappings or anything else from your original working scenario.
Regards,
Jin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just change the occurrence of IDoc as mentioned in the below weblog. Then your issue should be resolved:
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
have a look at Anish's weblog, /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Hope this will help you.
Thanks
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.