on 11-24-2006 5:41 AM
HI,
My scenario contains an IDOC which consists of multiple Site data.
The challenge here is splitting the incoming Idoc into different files based on the Value of Site.
Say My Idoc Structure is Like this.
Root
Node
-
Site1
Node
-
Fields
-
Fields
-
Fields
Node
-
Fields
-
Fields
Node
-
Site2
Node
-
Fields
-
Fields
-
Fields
Node
-
Fields
-
Fields
Node
---Site3...and so on.
So a single IDOC can contain data related to 6 different sites and each of their occurence can be unbounded.
The target Message type i am using is same for all the sites and also the mapping is same, However the files are to be generated as per the value of the SITE field,
So on a single occurence of an IDOC i may have to generate multiple files for multiple Sites.For example If IDOC contains data for SITE1,SITE2,SITE3 then i have to generate 3 Files for each each site.
what would be the best approach to do this.
Hi Bhavesh
<i>It would be very difficult to help you without the exact source and target strucutre.</i>
This is the follwoing source & target structures and i am using message split.
Source Structure is as fallows :
IDOC
Segment1 (1..Unbounded)
Field1
Field2
Segment_A (1..Unbounded)
Field3
Field4
<b>Segment_B(0..Unbounded)</b>
Field5
<b>Field6</b>
-
Filed 10
Segment_n(0..Unbunded)
Field11
-
Filed n
Target Structure is as fallows :
Record Set (0..Unbounded)
F1
F2
F3
--
--
Fn
We have to create a file per site.
In message mapping, mapped like Segment1 --> Recordset, For other fields as per mapping conditoins.
Idoc would contain multiple sites data.The site value hold by Field6.
Suppose an idoc contain Segment1 for 3 times, The site values are AAA,BBB,CCC.Then we have to create 3 Files.It is working fine.The strucure of the Message type populates three times and writing 3 files.
If the site values are like AAA,BBB,AAA then we have to create 2 files only.We have to combine the data for Site AAA and write a one file for Site AAA & one file for Site BBB.
Could you please suggest me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
<i>What you would be doing is changing the occurence of the target message type and message interface so that the mapping can produce multiple messages. Now, using multimapping you will have "N" messages ( same message format but different message content) and each of these will create a separate file in the target.</i>
As per your valueable input i did the message mapping with one target Message Type.When testing its creating the multiple message types for diffrent message content in the IDOC.
Here my problem the IDOC contains multiple segments which hold data for one site each,however if say an IDOC contains 5 such segments and segment 1 & 4 contain records for Site 100 and Segment 2,3,5 contain records for Site 200, then in multimapping i Suppose it would create 5 different files,But I want just two files one for Site 100 and one for site 200 containing coresponding records.how can i collect these independent messages pertaining to a particular site while mapping.
Your input would be very valuble.
.
Thanks in Adavance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Multimapping as per above weblog and the techniques mentioned at the following link would help.
http://help.sap.com/saphelp_nw04/helpdata/en/d9/cea942ad920c31e10000000a1550b0/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey thanks for ur replies,
Quite confused about this, So u mean to say that I dont need 6 different Message Types for each Site, however would need 6 different Interfaces,
Then how would i multimap with One single Message type,Is that possible could u breifly let me know the right steps I would be greatful, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need a single message type anda single message interface.
What you would be doing is changing the occurence of the target message type and message interface so that the mapping can produce multiple messages. Now, using multimapping you will have "N" messages ( same message format but different message content) and each of these will create a separate file in the target.
Multi mapping also implies same message occuring N times in the target and not only N number of message in the target. Hope it clairifies.
Regards,
Bhavesh
Anjan,
This is a usual requirement in XI. You can do this easily in Graphical mapping. You need to use some Node functions to achieve the same. Also some context handling will be involved..
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.