Idoc mapping to group similar items under one idoc
Hi,
I have a file to multiple idoc scenario.
My Source structure:
Msg type
Data Type
Header (1) (field1, field 2, field 3 etc)
ITEM( 0 to U) (field X, field Y, field Z etc)
Target structure:
Idoc Type
IDOC (1 to U)
Begin
Idoc Ports (1) (field a1, field a2, field a3 etc)
Idoc_HDR (1) (field1, field Y, field 3 etc)
Idoc_ITM (1 to 99999999) (field X, field Z etc)
Idocs are generated only for some ITEM lines of source and so the value of field X is used and mapped to IDOC node using createif.
Rest of the mapping is done normally and works fine and creating multiple idocs if there are multiple ITEM lines in the source file. This mapping is doesn't work if I want to create multiple Idoc-ITMs
My requirement is to create multiple Idoc_ITM nodes under one parent IDOC node for for all ITEMs relating to one "field Y" of source. At the moment I am creating 4 idocs for the below example, but I want 3 like below:
For example:
Source file:
Country, city, date
emp1, department1, roleA
emp2, department1, roleB
emp3, department2, roleC
emp4, department3, roleC
Required Target file:
IDOC 1
Idoc_HDR
Country, department1, date
Idoc_ITM
emp1, department1, roleA
Idoc_ITM
emp2, department1, roleB
IDOC 2
Idoc_HDR
Country, department2, date
Idoc_ITM
emp3, department2, roleC
IDOC 3
Idoc_HDR
Country, department3, date
Idoc_ITM
emp4, department3, roleC
How can achieve it please?
Many thanks.
Ramesh.
Hi Muni,
The source and required target xmls are here: I made it a bit simpler for better understanding and space.
If you want the xml of the source message structure, I can send that too.
Source:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:expense_source_msg xmlns:ns0="http://dtsp.com/postexpense">
<Online_Expenses>
<Expenses_Header>
<Constant/>
<BatchDate>20140320<BatchDate/>
<Record_Count/>
<Amount_Total/>
</Expenses_Header>
<Expenses_Item>
<Employee_ID>test1<Employee_ID/>
<Employee_Name>RAMESH<Employee_Name/>
<price>10.00<price/>
<Org_Unit>z1<Org_Unit/>
<Type>Price<Type/>
</Expenses_Item>
<Expenses_Item>
<Employee_ID>test2<Employee_ID/>
<Employee_Name>ANKIT<Employee_Name/>
<price>20.00<price/>
<Org_Unit>z2<Org_Unit/>
<Type>Price<Type/>
</Expenses_Item>
<Expenses_Item>
<Employee_ID>test3<Employee_ID/>
<Employee_Name>SIVA<Employee_Name/>
<price>30.00<price/>
<Org_Unit>z2<Org_Unit/>
<Type>Price<Type/>
</Expenses_Item>
</Online_Expenses>
Required Target:
</ns0:concur_online_expense_source_msg>
<?xml version="1.0" encoding="UTF-8"?>
<ZFI204_AR_INV01>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="EDI_DC40">
<TABNAM>EDI_DC40</TABNAM>
<DIRECT>2</DIRECT>
<IDOCTYP>ZFI204_AR_INV01</IDOCTYP>
<MESTYP>ZFI204_AR_INV</MESTYP>
<RCVPRN/>
</EDI_DC40>
<Z1ZFI204_HDR SEGMENT="Z1ZFI204_HDR">
<DOCUMENT_TYPE>KX</DOCUMENT_TYPE>
<DOCUMENT_DATE>20140320</DOCUMENT_DATE>
<POSTING_DATE>20140320</POSTING_DATE>
<COMPANY_CODE>z1</COMPANY_CODE>
<Z1ZFI204_ITM SEGMENT="Z1ZFI204_ITM">
<NET_INVOICE_AMOUNT>10.00</NET_INVOICE_AMOUNT>
<EMPLOYEE_NAME>RAMESH</EMPLOYEE_NAME>
<EMPLOYEE_NUMBER>test1</EMPLOYEE_NUMBER>
</Z1ZFI204_ITM>
</Z1ZFI204_HDR>
</IDOC>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="EDI_DC40">
<TABNAM>EDI_DC40</TABNAM>
<DIRECT>2</DIRECT>
<IDOCTYP>ZFI204_AR_INV01</IDOCTYP>
<MESTYP>ZFI204_AR_INV</MESTYP>
<RCVPRN/>
</EDI_DC40>
<Z1ZFI204_HDR SEGMENT="Z1ZFI204_HDR">
<DOCUMENT_TYPE>KX</DOCUMENT_TYPE>
<DOCUMENT_DATE>20140320</DOCUMENT_DATE>
<POSTING_DATE>20140320</POSTING_DATE>
<COMPANY_CODE>z2</COMPANY_CODE>
<Z1ZFI204_ITM SEGMENT="Z1ZFI204_ITM">
<NET_INVOICE_AMOUNT>20.00</NET_INVOICE_AMOUNT>
<EMPLOYEE_NAME>ANKIT</EMPLOYEE_NAME>
<EMPLOYEE_NUMBER>test2</EMPLOYEE_NUMBER>
</Z1ZFI204_ITM>
<Z1ZFI204_ITM SEGMENT="Z1ZFI204_ITM">
<NET_INVOICE_AMOUNT>30.00</NET_INVOICE_AMOUNT>
<EMPLOYEE_NAME>SIVA</EMPLOYEE_NAME>
<EMPLOYEE_NUMBER>test3</EMPLOYEE_NUMBER>
</Z1ZFI204_ITM>
</Z1ZFI204_HDR>
</IDOC>
</ZFI204_AR_INV01>
Similar Messages
-
Grouping similar movies under one thumbnail
Hi,
I've bought a few movies from iTunes that are part of a series, like Star Trek, Die Hard, etc.
I want to group such moves together so that (for example), all the Star Treks appear together under one thumbnail - like episodes are grouped in seasons in TV Shows.
In Get Info, I've named the Album and TV Show (in Video) Star Trek, called the Season " 1 " and given "episode" numbers to each movie.
When I view them in Cover Flow and List, they are grouped together under one "poster" (thumbnail), but if I view them in Grid they are all scattered about. As is the case when transferred to an iPod.
And how do I get the them to appear under one thumbnail on an iPod - like TV Seasons (without needing to class my movies as TV Seasons)?
RegardsHi,
Try to use BankID instead. I think by using this you can find the bank even though they use different spellings.
If bankID is not there then try to enhance that to the InfoObject.
Regards,
rik -
Retrive all the items under one folder
Hi,
I am new to ContentArea API's in 9ias.
I am looking for Sepecific API's to retrive all the Items
under one folder.
thanks
shaI'd love to know that API also. I have resorted to accessing the tables containing that information.
wwv_corners contains an entry for each folder. wwv_things contains an entry for each folder item. You can join the two tables as
wwv_corners.id = wwv_things.cornerid
You could do something like:
select folders.name, items.id
from portal30.wwv_corners folders
,portal30.wwv_things items
where folders.id = items.cornerid
and folders.id = 99999;
(where 99999 is the folder id.)
Mike Kleiman -
Multiple purchase orders with items in one IDOC
Hello Team
Now i got a the below requirement. please check and suggest me accordingly.
1. In my souce system (ie legacy system) i have a table which is having PO related header and item data. now i need to post that data into SAP by using IDOC. so now i need to create a IDOC in middleware system with PO related data. Here my question is for how many POs i can create 1 idoc, i mean i want to know what is the maximum PO's i can put in 1 IDOC. parallely i want to see the performance issue also. so please suggest me on what is the maximum no of POs with item data i can put in 1 idoc and suggest me what is the preffered limit based on performance issues.
2. Suppose if i put 10 POs in 1 idoc, out of which there is issue with PO data for 1 PO in that idoc. so i want to know whether the idoc will process or not. if process how many PO's it will process. is it like 9 POs it will process and 1 PO it wont process. please clarify.
Regards
RajHi Nagaraju,
As others suggested you can use 1 idoc per po. So for each header and its items in XI a message will be created.
Else
With select statement you can select all the POs and change the occurrence of idoc from 1..1 to 1..unbounded. Now also one message will be created in xi, (within the message you will have multiple idocs) but when posting in sap each one post as a seperate idoc. Here the advantage is you have one message where as in another you have multiple messages. But the disadvantage is trouble shooting might have some issues and if it is more than 1000 idocs the performance may take a hit. Here 1000 is just an example.
Regards,
---Satish -
Grouping single songs under one artist
Hi,
I've been busting my brain; how do you group single songs to appear all under ONE artist? Is there a way to do this without changing the artist field? Has it something to do with compilations/sorting category?
Note, this is for playback on the iPhone but hope this is the right category as you have to do this in iTunes!
ThanksMusioMan wrote:
Haha, i'm now talking to my email subscriptions so i've gone mad! I do thank you for the help though.
So say you have these random songs;
Yesterday by the Beatles
Hey Jude by the Beatles
Hotel California by the Eagles
Respect Aretha Franklin
On my iPhone, they each appear under the artist name (Beatles/Eagles/Aretha)
There still doesn't seem to be a way to plan all these songs from the ARTISTS menu by selecting say, 'various artist' or miscellaneous.
The only way i can think is rename every artist field to 'various artists' but you loose the artist name this way.
Message was edited by: MusioMan
Nope, the artists menu is just that, a list of artists. If we had an *Album Artists* menu then you could find such collections under say "Various Artists" if you grouped them together with an Album name. Even though we don't get an *Album Artist menu* if you do go to the trouble of creating an album name for this collection then you can just choose it from the Album menu. If you happen to be browsing the artists and notice the Beatles entry you can drill down into it, then the album for this collection then having selected a track, turn your iPhone into landscape mode and reselect the album so that all tracks play. Otherwise playlists may be a better bet, and at least you can then leave these tracks with their original album art and other details.
tt2 -
Can you move a group of items from one keychain to another?
In the process of setting up Leopard, I wound up with a "login" keychain and an "old" keychain. The login keychain opens nicely when I login, but the old one needs me to open it manually the first time its called during a session. Not a great inconvenience, but it seemed to make more sense to take all the items in it and drag them into the "login" keychain. It appears you can't do this without entering the password for each item. Way too boring! Is there an easier way?
If the help files don't address that, report that to Apple—sorry, I didn't look. However, I did open Keychain Access->selected import and the dialog box seem self-explanatory. I only have one keychain, but it appears that you can select any residing in Keychains and import its information into any other one listed. As for having to enter a password for every entry, I can't help with that. If you want to merge them, then that's the price one pays for having multiple keychains.
-
How to group Similar Rows into One Row ?? Suggestions??
Hi there , I am having a problem in my project you see I have 2 dimensions in my cube called Username and Symbols and a measure called M1.
You see in the Symbol dimension there is repeated data in multiple rows such as the following
Pepsi
Pepsi
Pepsi
CocalCola
Now when i display the dimension Username with the dimension Symbol using the Measure value M1. I get something like this
UserName A
Pepsi---- 10
Pepsi---- 10
Pepsi---- 10
CoacalCola--- 20
Now in the above table UserNameA represents a member of Username Dimension and cold drinks represent members of the Symbol Dimension
and the numarical value represents the measure M1.
I want it to appear something like this
UserName A
Pepsi 30 (Notice The measures of Pepsi have been added)
CocalCola 20
Any idea on how i can accomplish this or tip i would be really thankfulHi
Use the aggregator operator in mapping. You can use the SUM function on the columns you wish to sum for example, and group by the other columns.
Cheers
David -
IDOCs Packaging ... What if one IDOC is in error in the packet ?
Hi all,
What will happend to the rest of the IDOC in the packet ?
Lets say, i packaged my IDOC in a bunch of 5. The first 3 IDOCs, their payload are ok. However the 4th has a bad payload and it crash in the mapping section ...
Does the first 3 IDOC (and the 5th one) will be sent and the one in error (4th one) will remain (in XI for mapping error) ?
Thank.
michel osborneHi chandrakanth.k,
Thank for your response. I have seen these blogs. I am not using the BPM.
I am using the IDXPW + Messages filter (sxmsfilter) to packaged the IDOCs.
I have made some tests ... wird enough ...
test #1:
idoc (1) - error
idoc (2) - valid
idoc (3) - valid
.... etc ...
test #2:
idoc (1) - valid
idoc (2) - error
idoc (3) - valid
test #3:
idoc (1) valid
idoc (2) valid
idoc (3) - valid
idoc (4) - error
In the "test #1", idoc (2) & idoc (3) are processed correctly (idoc sent to the SAP ECC backend system). Idoc (1) is stuck in XI with errror (mapping) which is OK.
In the "test #2", work the same as in test #1, idoc(1) & idoc(3) hs been delivered to the SAP ECC backend system.
However, in the "test #3"all idoc (1, 2, 3,4) are stuck in XI ... idoc(4) in error (which is ok), idoc(1) up to - idoc(3) in sxmb_moni has the racing flag .... but not delivered to the SAP ECC backend system ... they have the status: Message Schedule for outbound side ....
It seem that each time the package end with and idoc in error, the entire batch get stuck in XI .
How can i get sent them (test case #3) !!?!?
Thank in advance ! -
Mapping Issue: one IDoc to multiple IDocs concerning incoming segments
Hi,
i want to devide one incoming IDoc to two or more outgoing IDoc's of same type concerning the appearance of one segment.
Incoming is:
<IDOC BEGIN=""> 1...1
<EDI_DC40 SEGMENT="">
</EDI_DC40>
<..>
<Z1MOV SEGMENT=""> 0..99999
</Z1MOV>
</IDOC>
Target should be:
for each Z1MOV one IDOC.
<IDOC BEGIN=""> 1...1
<EDI_DC40 SEGMENT="">
</EDI_DC40>
<..>
<Z1MOV SEGMENT=""> 0..1
</Z1MOV>
</IDOC>
I already did the occurance change, like imported target IDoc with changed attribute maxOccurs="unbounded".
I mapped the segment Z1MOV to IDOC but when Z1MOV occurs more than one time the target gets generated only one time. I changed the occurance of the IDoc to maxOccurs="unbounded".
What do i have to do to make it run?!
brCan someone help?
When i switch to debug while testing message mapping i get following:
Close tag
Close tag
Start tag
Targetelement /ZIDOC/IDOC[2]/BEGIN kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. Zielelement /ZIDOC/IDOC[2]/BEGIN kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt.
I hope you can get the idea of this error because i can't tanslate.
But the BEGIN is required for each message so how to get rid of it. This also concerns the SEGMENT-tag under each Segment of the IDoc.
br -
How can I group collaborations under one artist?
Hi, this is hard to explain but I'm trying to group various collaborations under one artist so that it looks neater on my iTunes/iPod. I haven't managed to get it working right yet. I'll give an example:
I have various albums involving Elvis Costello. They include solo albums, but also albums credited to "Elvis Costello and the Attractions", "...and the Imposters", "...with Burt Bacharach" and so on. I don't want to drop these titles, but I would like them all to be sorted on my ipod in a folder named "Elvis Costello". I've tried fiddling about with the Artist, Album Artist, Sort Album, Sort Album Artist fields etc but i haven't had any luck.
I'm using iTunes 11.1.5.5, and an iPod Classic 2.0.4.
Does anyone know how I can do this? Thanks.I have exactly this situation, with the following solution:
In all cases where I have one Artist per album (most of EC's albums), set the Sort Artist to "Costello, Elvis", leave the Album Artist and Sort Album Artist fields blank
For compilations like "Out of Our Idiot", where the Artist field varies across tracks, set Album Artist to "Elvis Costello" and Sort Album Artist to "Costello, Elvis", leave the Sort Album field blank
For all albums set the Sort Album to "Costello, Elvis yyyymmdd" where yyyymmdd is the release date - this is a standard scheme that I use to ensure than when sorted by Artist & Title albums appear in correct release order (sorting by Album and Year doesn't always work when an artist has more than one release per year - I categorize live albums by recording date, so this works particularly well for artists with multiple live releases from the same year, e.g. I have 33 Grateful Dead albums* where the Year field is 1972, including the recording/release date field in the Sort Album ensures that these are listed in correct sequential order).
With this approach the Albums listing on my iPod Nano 7th gen is (to me) correct, being ordered by artist and then by release date.
* I have each of the 22 shows from the "Europe '72" box set in iTunes as separate albums. -
Gurus,
I have a flat txt file of following format
Doc# Whse Item Matnr date code
3256999 WH20 1001 861927 09/12/200713:24 9596 2
3256999 WH20 1002 861928 09/12/200713:24 9596 2
3256999 WH20 1003 861929 09/12/200713:24 9596 2
3257169 WH20 2000 861964 09/12/200713:24 9596 2
The first 2 columns are header fields rest all are item fields. How do i map this to an Idoc, so as to move doc# and whse to header segment and rest of columns to add multiple item segments on the same idoc ? So for above file i should get 2 idocs only.You can navigate thru these links to get more information:
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/frameset.htm
Do your want the source and target structures to resemble the structures below?
Source:-
<source_file>
<row_1>
<item_a>
<item_b>
<item_c>
</row_1>
<row_2>
<item_p>
<item_q>
<item_r>
</row_2>
<row_3>
<item_x>
<item_y>
<item_z>
</row_3>
</source_file>
Target:-
<target_idoc>
<item_a>
<item_b>
<item_c>
<item_p>
<item_q>
<item_r>
<item_x>
<item_y>
<item_z>
</target_idoc>
If so, then all you need to do is to use the node function: "remove context" for all the items under your rows. In other words,do the following mapping:-
*source_file mapped to target_idoc
*map each of the items under all the three rows in the following way:-
"source item" mapped to "remove context" (node function) mapped to (corresponding) "target item".
Also check the occurences for each of your variables in both source and target structures.
/people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi
Regard's
-Prabhakar.A -
I have two iTunes libraries (one under my gmail address and one under my work email address). My work laptop is usually how I access my account and in the past 3 months that laptop has had to be replaced twice, causing me to redo my entire library. Each time, the laptop was not deauthorized, of course and I had to go through all that rigamarole. I have all of my music backed up and am able to also retrieve anything purchased over the years from the cloud, but once i get it set up and authorize the laptop to both of the email address accounts, some of the items that are in the gmail library will not play. It says that it cannot locate. At one point, a friend spent a lot of time getting it to finally recognize everything (a lot of that music that said cannot locate was from burned CD's or mp3s downloaded, not purchased from iTunes). So there is that issue and I'm not sure how to fix that.
The other thing is that I would like to have ALL of my items under one iTunes account (my personal gmail) in the event that i no longer work for this company and have no access to that email address as it will be turned off. How can I remove one email and merge all purchases over to the gmail address account?
Thanks!You cannot combine actual accounts (as in iTunes Store account).
You can combine the music into a single iTunes collection on a computer. There's many ways to do this. There are some utilities to assist with keeping maximum metadata (ratings, playcount, etc.) but I am not familiar with Windows platform ones to do this, though I am sure a web search of merge iTunes library would uncover some. -
Unable to create item under a region
Hi All,
I wanted to create a item under one region in a seeded page. When I went to Personalize page, next to the region where I need to create the item, I don't see the "Create Item" button. But for the other regions I see that button. Any ideas what could be done to enable this?
Regards,
PradeepHi,
It could be a dynamic region itself or a region extended.
If its a dynamic region, you will have to do Controller extension to extend it.
-Idris -
Multiple Podcasts under one Artist
I am looking for information on how to build a group of podcasts under one artist? Just like the VH1 podcast. A main page with all vh1 podcasts listed (with graphic). Thank you for your help.
Now the site won't let me edit my original post yet again, so I'm going to have to "Reply" to my own thread.
After removing all the Minutemen songs from my iPod, and re-editing all the ID3 tags for the MP3 files on my hard drive, then dumping all back onto my iPod, I'm still having the same problem.
<Edited by Moderator> -
Same EDIDS-STATUS for the one IDOC NUM
Hi Experts,
I would like to ask if its possible that one IDOC no. could have make use of one IDOC Status no. and only the message will be changed.
Let say: I have the following EDIDS structure:
IDOC_NUM IDOC_STATUS IDOC_MESSAGES
000000238 50 PO 00000051 created
000000238 50 PO 00000052 created
000000238 50 PO 00000053 created
This question pops-up in my mind because when I check the table EDIDS, the status no is not one of the primary keys...
Can anyone help to validate? Will it cause error ?
Thanks!
NosajHi
Yes an Idoc can use the same STATUS and provide multiple messages.
Refer the below code, using the same 51 status multiple error messages are written into IDOC STATUS.
READ TABLE i_return_order INTO wa_return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
v_error = 'X'.
v_so_create_err = 'X'.
LOOP AT i_return_order INTO wa_return WHERE type = 'E'.
CLEAR idoc_status.
idoc_status-docnum = v_docnum.
idoc_status-status = '51'.
idoc_status-msgid = wa_return-id.
idoc_status-msgno = wa_return-number.
idoc_status-msgv1 = wa_return-message_v1.
idoc_status-msgv2 = wa_return-message_v2.
idoc_status-msgv3 = wa_return-message_v3.
idoc_status-msgv4 = wa_return-message_v4.
APPEND idoc_status.
CLEAR wa_return.
ENDLOOP.
ENDIF.
Regards
Kathirvel
Maybe you are looking for
-
My iphone no longer syncs with outlook 2007
My iphone suddenly no longer syncs with Outlook 2007. I have checked the Outlook add-ins list. I can find no solutions. Apple phone support did not help, genius bar did nto help. Any suggestions ??
-
Bug? Socks Proxy not taking effect for SocketChannel
I find there's something not working when setting socks proxy in my java application. In java api there's such introduction about socks proxy setting: (from http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html) SOCKS protocol support setting
-
Having a bit of an issue with .png files. It happens randomly, but recently I've been seeing it a lot lately. Most .png files I see while browsing the web of with the preview program itself will show random colored lines with a shadowed out image (th
-
Split an inbound xml message in to multiple o/b idocs
HI, We have a requirement to split an XML message(Source) into multiple idocs with different order nos and respective item details. We are working on XI 3.0 and we have a restriction not to use the BPM. Could you please let me know whether its possib
-