Mapping - Referencing another segment
Hello,
I have an incoming XML document that I am mapping into an IDOC.
<ASN>
...<Item> 0...999
........<ItemID>
........<PO Reference>
.............<PONum>
.............<POLine>
...<barcode> 0...999
.........<handling Unit data>
.........<delivery item>
.............<itemID>
.............<quantity>
The <item> and <barcode> segments are on the same level. And they can each occur 0..999. So I can have 2 item segments and 10 barcode segments for those two PO/Lines. Or I can have 10 PO/Lines with only 3 barcodes...etc.
Using the matching <itemID> fields I'd like my mapping to fill the barcode segment of the IDOC with all the <barcode> data but also reference the matching <PONum> and <POLine> from the <item> segment.
How can I write a "lookup" that will find the matching <itemID> so we can match the data for the IDOC segment?
Thanks,
Matt
Edited by: Matthew Herbert on Aug 4, 2011 9:49 PM
Thanks for the suggestions but this solution only works if the <item> and <barcode> segments are in order. I cannot guarantee that the documents will be sent in a sorted order.
Which means I could get a document like this
<ASN>
...<Item> 0...999
........<ItemID>1
........<PO Reference>
.............<PONum>450000123
.............<POLine>1
...<Item> 0...999
........<ItemID>2
........<PO Reference>
.............<PONum>450000555
.............<POLine>1
...<Item> 0...999
........<ItemID>3
........<PO Reference>
.............<PONum>450000123
.............<POLine>2
...<barcode> 0...999
.........<handling Unit data>
.........<delivery item>
.............<itemID>1
.............<quantity>10
...<barcode> 0...999
.........<handling Unit data>
.........<delivery item>
.............<itemID>2
.............<quantity>50
.........<delivery item>
.............<itemID>3
.............<quantity>44
In the above example the EqualS/IF/Split function solution will fail.
What I really need to is to be able to "lookup" the value in PONum when the barcode <itemID> matches the line <itemID>.
Can this be done?
I can write a Java UDF that will loop through everything in the <line>-<itemID> to get the correct data but if the document has 100 lines and 50 barcodes. I will have to loop through 100 <lines> for each of the 50 barcodes. This could be a performance problem. I'm hoping there is a better solution for this.
Thanks,
Matt
Similar Messages
-
Invoking a mapping from another DB in a process flow
Hi experts, have anyone try to invoke/execute an OWB mapping from another database in a process flow? Is it possible to do that?
My process flow (in the Staging db) scenario is to execute several OWB mapping in the Staging db, then the final step is to execute an OWB mapping which is created in the warehouse db.
Is that possible?
Edited by: wwardana on Apr 5, 2009 9:09 PMLook at this thread
[Calling WB_RT_API_EXEC.RUN_TASK over database link|http://forums.oracle.com/forums/thread.jspa?threadID=775938]
Regards,
Oleg -
Get the mapping values from one message mapping into another message mappin
Hi All,
I created two graphical message mappings. In first message mapping i created one user defined function and set one global container parameter and I need to use this parameter in my second message mapping user defined function. But the global container parameters can be used in different user defined functions in same message mapping. So is there any way to use the values which are set in one message mapping into another message mapping. If yes, please help me how to get?Hi Koteswara rao,
As you said global container parameters from first message mapping are not accessible from second message mapping program.
i haven't faced situation like this.but, if you have some unmapped field in target message in first message mapping,you can put global variables data in that unmapped field.
anyway the output of first message mapping would be input for 2nd messages mapping,so you can access global data(unmapped field filled with global data in 1st MM) from 2nd mapping program..
Cheers,
Jag -
Hi all,
My scenario File to IDoc. I am doing the mapping from Flat file to Idoc. whenever I imported Idoc in Message mappin i am finding the dublicated segments with the same name. Whether I have to map for all the segments ? If yes which one I have to map to which segment.
thanks in advance.
Regards,
AnjaneyaAnjaneya,
it all depends upon business rules or mapping rules, so first of make sure if you have to map only one segment or not.
If you have to map only one segment, then just map with any one, since they are duplicate and disable the other one by right click on segment and chose disable.
Note: Make your requirement very clear, mapping is not a problem (map to any segment).
Regards,
Sarvesh
****Reward points, if found helpful. -
Dynamic Calc referencing another Dynamic Calc
Hi,
I found a problem today in a Dynamic Calc member formula.
Member A has in formula: B;
Member B has in formula: C + D;
Both members are Dynamic Calc and while member B shows the correct result, member A shows nothing in forms. If I switch the formula of member A to C + D; then it shows results.
Is there any problem of Dynamic Calc members referencing another Dynamic Calc members?
Thank youor change the position of member A/member B in the outline.^^^Exactly, Essbase is calculating the dimension top to bottom and if A needs B, it needs to be after B or as Andre stated, you need to stick a two-pass on A. I prefer not to use two-pass unless i need to as it can FUBAR my YTD and variance calcs. It's just easier to have it work in the "right" order.
Regards,
Cameron Lackpour -
How to add another Segment field in OBC4
Dear Experts,
OBC4 -> select Comp. Code -> field Status Group -> select Field St. Grp -> Duuble click on Field St. Grp
I have a requirement to make Business Place/secn field Mandatory where ever it is used in transaction F-43 , F-02 , F-48 .
So for this am going through OBC4 . But there (Under Field status Grp.) am not getting any field named as Business Place . There exists a field Business Area . But Business Area and Business Place both are different .
So Is it possible to add another segments named as Business Place/secn there with 3 options Supress , Req. Entry , Opt. Entry . So that i can change it to Mandatory .
Thanks in Advance
JackHi,
Check this sample process
To get custom fields on IDOC you need to add custom segment on IDOC and for that you have to create a extension IDOC with reference to Basic IDOC.
You can do that as explain below.
Here for example you have basic idoc ORDERS05 and you want to add additional segments at header level - ZE1EDK01 and line item level ZE1EDP01
1. TCode - WE31 : Create custom segments ZE1EDK01 and ZE1EDP01 with the fields you want and release these segments.
2. TCode - WE30 : Create extension IDOC
In WE20 enter extension IDOC name - ZORDERS05, select "Extension" option and hit "create" button. When it gives pop-up, select "create new" and enterd linked basis type as "ORDERS05". Enter proper description and save.
3. On the next screen of WE30, select the segment under which you want to add your additional segment. Save everything.
4. TCode - WE82. Here you link extension idoc to basic idoc and message type.
Go into change mode. Hit "New entries button" Enter Message type = "ORDERS", basic type = "ORDERS05" and extension type = "ZORDERS05".
Regards,
Satish -
Make a dff segment mandatory based on another segment
Hello All,
I have the following requirement in R12
In the receivables application for Address Information flexfield there are 2 segments..
for segment1 there is an LOV and segment2 is a free text.
If segment1 is say 'xyz' then we have to make segment2 as mandatory.
This flexfield is in customer sites and this is an oaf page.
Iam new to oaf and not aware of the personalizations in OAF. Any help provided would be great.
Thanks in Advance.Hi,
In ProcessFormRequest method we can't set Bean's property as per your requirement.
But still you can try following programatically. Not sure as I have never tried but give it a shot :)
In ProcessRequest:
1. Create a VO dynamically having a transient attribute. Attach this VO to AM of that page.
2. Create a new row for this VO and set the transient value to "no"
3. Bind an event (firePartialAction) on the item mapped to 1st segment i.e. your LOV.
4. Bind a SPEL to Required property for the textInputBox mapped to segment2. SPEL will have the VO you have created in step 1.
In ProcessFormRequest:
1. Check for the event of segment1
2. If yes, Check the value selected.
2. If this is the value you want textInputBox to set mandatory, set the transient Attribute of VO created in ProcessRequest's Step 1 to "yes".
Hope it works.
Thanks,
Mukesh Uchaniya -
Hi
I am using ARTMAS04 idoc from sender side in which i have segments and following fields
E1BPE1MATHEAD(Segment max occurence is 1)
MATERIAL
E1BPE1MARMRT(Segment max occurence is 999999)
MATERIAL
EAN_UPC
Even my target side also is ARTMAS05
My condition for mapping is i need to compare material in E1BPE1MATHEAD segment with material in
E1BPE1MARMRT if both are same then i should not pass EAN_UPC field to other side, if materials are different then only i should pass the field EAN_UPC to target side.
What is the logic should i right to meet the above condition.
I tried by using equals and if logic,but it is not working.
regards
raghuHi Raghu
Try with this
IfWithoutElse(Not(E1BPE1MATHEAD/MATERIAL equalS E1BPE1MARMRT/MATERIAL)) then EAB_UPC -> Target
Thanks
Gaurav -
Graphical Mapping Problem : Create Segments by conditions
Hi,
i have a problem while mapping an incoming invoice to IDoc Invoic02. I had to create some Segments (E1EDP02) on basis of identifiers in the incoming message. I hope the following example i created will help to understand my exact problem:
EXAMPLE MESSAGE:
<invoice>
<document>
<position>
<line>
<posnum> 1 </posnum>
<IMD>
<ident> Name </ident>
<val> Maxx </val>
</IMD>
<IMD>
<ident> Age </ident>
<val> 19 </val>
</IMD>
<IMD>
<ident> Gender </ident>
<val> Male </val>
</IMD>
</line>
</position>
<position>
<line>
<posnum> 2 </posnum>
<IMD>
<ident> Name </ident>
<val> Tina </val>
</IMD>
<IMD>
<ident> Age </ident>
<val> 28 </val>
</IMD>
<IMD>
<ident> Gender </ident>
<val> Female </val>
</IMD>
</line>
</position>
</document>
</invoice>
THE RESULT I WANT:
<invoic02>
<E1EDP01>
<SEGMENT> </SEGMENT>
<POSEX> 1 </POSEX>
<E1EDP02>
<SEGMENT> </SEGMENT>
<QUALF> 021 </QUALF>
<BELNR> 19 </BELNR> // THIS should be the Age
</E1EDP02>
<E1EDP19>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<SEGMENT> </SEGMENT>
<POSEX> 2 </POSEX>
<E1EDP02>
<SEGMENT> </SEGMENT>
<QUALF> 021 </QUALF>
<BELNR> 28 </BELNR> // THIS should be the Age
</E1EDP02>
<E1EDP19>
</E1EDP19>
</E1EDP01>
</invoic02>
I tried to different ways to get the above result but i failed
My first try:
ident -------|--- equalsS ------ createIf ---- E1EDP02
Constant[000] --------- SEGMENT
Constant[Age]--|
ident -------|--- equalsS ------ ifWithoutElse ---- QUALF
Constant[Age]--| |
|
Constant[021]
ident -------|--- equalsS ------ ifWithoutElse ---- BELNR
Constant[Age]--| |
|
val
Result:
The E1EDP02 Element will not created reliable. Sometimes it is there sometimes not dunno why ? Any Idea ?
My second try:
IMD -------------- E1EDP02
Constant[000] --------- SEGMENT
ident -------|--- equalsS ------ ifWithoutElse ---- QUALF
Constant[Age]--| |
|
Constant[021]
ident -------|--- equalsS ------ ifWithoutElse ---- BELNR
Constant[Age]--| |
|
val
Result:
Now every E1EDP01 Element has two E1EDP02 Elements. One correct one and an empty one with only a segment element. Is there a way to delete this empty elements ?
Any ideas to create a working mapping ?
Thanks@Liang Ji
When i do this i have only the first E1EDP01 Element
@Tarang Shah
Which function i had to use for this ?
Thank you -
Idoc error mapping error for segment "E1EDT13 006" in DESADV idoc
Hi SAP Gurus,
DESADV IDOC for few articles is not getting passed from SAP to legacy system. It is missing one segment"E1EDT13 006" for goods issue.
Why is this mapping error happening. How can this be resolved.
Regards.
SumiHi Nsangle/SAP gurus,
Thanks for that. But, I have already compared the failing idoc with the successful one. It's the segment E1EDT13 006 missing in the wrong idoc. I have already added that idoc and reprocessed it.
But, I wanted to know why such kind of idoc segment missing/ mapping error happens.
Regards.
Sumi -
Mapping of multiple segments of Idoc HRMD_A06 to flat file
Hi Experts,
I am doing an Idoc to file scenario. Idoc i am using is HRMD_A06, which is having around 38 segments, contains the hiring action details of multilpe employees (Infotypes 0000,0001,0002,0003,0302,1001).
When i have send the idoc , I am getting the file in the destination path, but having only one line which is having the the details of first employee.
As the segments are repeating my mapping is not proper. Can anyone please help me with some details for mapping Idoc to file, when the segments repeats in a single idoc.
Please also give me the details regarding the destination message interface.Hi
Please go through below link,
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
Its very simple to do some changes in your existing mapping and some occurance changes.
Verify that if your file message structure has 0..Unbounded Occurance.
Use 0..Unbounded and map accordingly to target structure with 0...unbounded..
and test with sample xml in message mapping with multiple idocs data and see whther u get multiple records in target
Also if you need each sengment on new line with FCC then refer below links
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM
Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM -
BIC Mapping creates wrong segment sequence
Hello,
i have a problem with Seeburger BIC Mapping invoic02 => Edifact D96a. From the PI Message mapping is the following source structure
Segment Value
S_BGM
C_C002
D_1001 380
D_3055 9
D_1004 91156548
BIC Mapping creates this wrong Edifact Code
BGM380::991156548'
correct code would be:
BGM 38091156548+9'
What am I doing wrong? Or how can I change the sequence in the BIC?
kind regards
Tobias
Edited by: Tobias Landbeck on Aug 3, 2010 3:27 PMHello Tobias,
I doubt,if you can achieve the order what you have mentioned because as per the structure of EDIFACT ,the order:
BGM380::991156548' is correct.This is the structure:
BGM
|_C002
| |__1001
| |__3055
|_1004
+ indicates element at different level, : indicates element at same level.
If you edit BIC mapping to change delimiter rules,then this would be reflected in all fields.
The only option to achieve this ,would be to change your EDIFACT xsd ,but if you change standard EDIFACT structure ,you need to adjust your BIC mapping accordingly.In this case,EDIFACT structure should be:
BGM
|_C002
| |__1001
|_3055
|__1004
Thanks.
Regards,
Shweta -
856 EDI mapping for G_SHL Segment
Hi Guys,
I have a question regarding the G_SHL segement mapping in DELVRY01.-- EDI856 scenario.
I have this mapping for other customer now i need to implement the same for new customer.
In that mapping they created 3 duplicalte G_SHL .
For 3rd G_SHL they created a UDF for generating ITEMS, PACKS, and their count by taking the inputs as E1EDL24 and TDLINE.
what is the need of these two inputs.
Regards,
SandeepI think TDLINE is just a free field to fill data as description and stuff like that, on the other hand the EDL24 contains all the position data and packing data
for example, if you have 2 positions in the delivery and they're packed in two packs, you would have 4 EDL24, the 2 positions and the 2 positions within the packs (maybe some reference to how the pack is done?) : (00001), (00002), (90001), (90002)
I think that's easier than to check for EDL37 and the sub EDL44 (Pack and Item segments)
but since the TDLINE can be used in many ways as reference you should probably check the logic and any document for that development
By the way, i was currently requesting in one of my questions how to create a UDF for the Pack, items structure, could you provide more info about that? thanks! -
OWB Run mapping of another project in the current project
I have to projects (one for the Phase 1 and one for the Phase 2 area).
In every project I have one process flow for each mapping.
Now I want to create a process flow in the first project which calls a process (contains a simple mapping)of the second project.
How can this be achieved?
Regards
Thanach... we do a trick. We copy a mapping from project 1 and paste it to project 2. Than we edit it and delete all unnecessary operators exept the table we want to reuse in the project 2. After this we add the necessary operators and deploy this mapping into the same target as project 1.
I think this approach will work for processflows too. It'S a workaround because you can not choose an object from one project in another without this trick.
We have one project for each version, so project 2 should only includes the deltas to the version in project 1 and use the other objects from project 1.
Regards,
Detlef -
Mapping: Each IDoc Segment to single new IDoc
Hi, can someone provide me with infos on how to solve this problem?!
Do i have to use BPM and when, is there any tutorial on this?!
We have two different Segments in IDoc and for each occurance they should be collected in two different IDocs, so that each contains one type of segment.
Can u please help?!
brHi Fritz,
You can use collect pattern when there is requirement of collecting multiple messages .For example i have an applicaion where i can send purchase order from different vendors.Now i wish that at the end of day i get one consolidated purchase order for each vendor instaed of multiple orders from a particular vendor then i can utilise it.Correlation will be required as the messages have to be grouped based upon a particular Information like in our example its vendor
Collection of IDoc to Single File
IDOCs (Multiple Types) Collection in BPM
Collecting IDocs without using BPM By Stefan grube's
Collecting IDocs without using BPM
BPM CollectPattern..
http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure
Posting multiple IDocs with Acknowledgement
Also have a look at these seminars,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c6d54e02
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37bec4706cc
IDOCs (Multiple Types) Collection in BPM - Collection of IDoc to Single File
Using a BPM to collect messages for a set interval of time
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b
Also this link,
http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
Regards,
Vinod.
Maybe you are looking for
-
Hi All, I have a requirement where I want to call the custom RDF from AR Dunning Letter generate program. The original concurrent program needs to be change in a way to look at the custom executable report having custom output layout. Thanks
-
How can I tell if my hard drive crashed
I've had my MacBook for slightly more than one year and for no reason that I can think of it will only boot up to a screen that looks like an apple with a problem. I took it to an Apple store and they told me that he hard driv crashed and it would co
-
Hi there, I am not entirely sure, if this is the right section of this forum. If not, can any moderator please put it into the right section? Thank you. So here's the problem: Let's assume, we have a class Car which associates loads of Part classes.
-
Crawler on DEV portal to index collaboration rooms on PROD portal
Hi, We have two portal systems (HP-UX (IA64W) B.11.23) System1 / NW2004 SP17: DEV System2 / NW2004 SP17: PROD TREX is running on a separate Windows 2003 server. All crawler tasks are configured on our DEV system. The PROD portal uses the created inde
-
My motion menu's look like trash! Help!
I made some motion menus (in Motion) and am using them in a DVDSP project. Anywho, the DVD motion menu images look pretty pixilated, and some of main intro motion flickers a bit when it's moving. Got any ideas why this is happening? Also, if it's hel