on 11-14-2005 6:34 PM
My Scenario File(Payroll) ==> XI ==> IDOC
I am having 5 records in my file (For simplicity), once the file reaches XI, I need to Create the IDOC based on the SSN.
For example
File
Employee Name SSN
Name1 100
Name2 100
Name3 100
Name4 955
Name5 955
For the above file I need to create 2 IDOCs based on the SSN, one for SSN 100 and other for SSN 955.
Now my question is
1) How should I define the above data strcutre in Repository both for FileDataStructure and IDOC-DataStructure.(i.e File 0.Unbounded and IDOC 0..Unbounded)
2) How should I group these records into the IDOC based on the SSN?
Thanks.
Hi Karen,
import the whole structure into XI
100 and 955 in one XML
sort your tags (SSN)
then do 1:N mapping
one outbound : many idocs
create as many idocs as SSNs
if you're working with SP12
you have to use BPM to do 1:N mapping
and you cna send all of your idocs from one BPM
(block step)
block step with parforeach example:
http://help.sap.com/saphelp_nw04/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm
Regards,
michal
Message was edited by: Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Michal, why do I need 1:N Mapping? I have only one Structure at Target(IDOC). Only thing what I need is I need to group the related SSN's and need to bundle them into single IDOC and so on. So IDOC1 will contain all the Records for the SSN 100 and the IDOC2 will contain all the records for the SSN 955.
So Please guide me, I am completely missing this point or confused at this point
http://help.sap.com/saphelp_nw04s/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/frameset.htm
Multi-mappings reference multiple message structures. To map these structures to one another, the mapping runtime gathers all the source messages of one multi-mapping in one source structure and all the target messages of one multi-mapping in one target structure. This means that instead of trying to map multiple messages to each other, you only have a source structure being mapped to a target structure.
hi Karen,
you have to map one XML message (with all SSNs) to many ( 2 ) idocs
this is why you need 1:N mapping
inside your message mapping you have to change
the occurance of your IDOC structure to 0...unbounded
this is the only way you'll be able to map
one source structure to 2 target structures
Regards,
michal
I am trying to do the following scenario
File -
> XI -
> IDOC
I need to group the Related records in File and then need to Create the IDOC(Please read the earlier Message I have sent)
Step 1:
File Data Structure
-
File_Dt
-
Empno-Element-String----- 0..1
IDOC Data Structure
-
IDOC_DT
-
Empno-Element-String----1
*********************************************
Step 2
Created the Corresponding Message types
**********************************************
Step 3
Created the Message Mapping
Source message Type
-
File_MT-------Occurence = 1
Target Message Type
-
IDOC_MT----
Occurence = 0..Unbounded
Design Tab
==========
File_MT =========================IDOC_MT
Messages 1..1 ===========Message 1.1
-- Message1 1..1============Message1 1..1
-- File_MT 1..1==============IDOC_MT 0..Unbounded
-- Empno 0..1=================EmpNO 1..1
Mapping
Empno - SplitbyValue(ValueChanged)---Message 1
Empno ->SplitbyValue(ValueChanged)---IDOC_MT
Empno -
>SplitbyValue(ValueChanged) -
Empno
Test Tab
-
<?xml version="1.0" encoding="UTF-8"?>
<ns:Messages xmlns:ns="http://sap.com/xi/XI/SplitAndMerge">
<ns:Message1>
<ns0:File_MT xmlns:ns0="urn:ABC.com:FileIdoc">
<Empno>1</Empno>
<Empno>1</Empno>
<Empno>1</Empno>
<Empno>2</Empno>
<Empno>3</Empno>
<Empno>3</Empno>
</ns0:File_MT>
</ns:Message1>
</ns:Messages>
OUTPUT
<?xml version="1.0" encoding="UTF-8"?>
<ns:Messages xmlns:ns="http://sap.com/xi/XI/SplitAndMerge">
<ns:Message1>
<ns0:IDOC_MT xmlns:ns0="urn:ABC.com:FileIdoc">
<Empno>1</Empno>
</ns0:IDOC_MT>
<ns0:IDOC_MT xmlns:ns0="urn:ABC.com:FileIdoc">
<Empno>2</Empno>
</ns0:IDOC_MT>
<ns0:IDOC_MT xmlns:ns0="urn:ABC.com:FileIdoc">
<Empno>3</Empno>
</ns0:IDOC_MT>
</ns:Message1>
</ns:Messages>
Question : IN Input I have empno = 1 has 3 records but it is appearing only once in the Target.
Please help me.
I gave the following input for my employeenumber
11
11
11
22
33
44
The outputwhat I got was
IDOC_MT
11
11
11
IDOC_MT
22
IDOC_MT
33
========================
I have never seen the Employeenumber 44 at all. The other point I have noticed is, I was able to produce only 3 nodes(IDOC_MT) at any given point of time.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.