Flattening an IDOC via Graphical mapping
Hi,
I'm still new to the context mapping functions.
Though there are numerous examples to do parts of what I would like to do, none seems to address my scenario in such a way that I can combine the mapping methods.
My scenario
Source IDOC
<SEG1> (Occurs 1)
<PLANT>P1</PLANT>
</SEG1>
<SEG2> (Occurs 1..9999)
<MATERIAL>
<MATNR>M1</MATNR>
<MAKTX>D1</MAKTX>
<SEG3>
<UOM>U1</UOM>
<UOM>U2</UOM>
<UOM>U3</UOM>
</SEG3>
</MATERIAL>
<MATERIAL>
<MATNR>M2</MATNR>
<MAKTX>D2</MAKTX>
<SEG3>
<UOM>U4</UOM>
<UOM>U5</UOM>
<UOM>U6</UOM>
</SEG3>
</MATERIAL>
</SEG2>
Target flat structure
<Target> (Occurs 0 to unbounded)
<Plant/>
<Matnr/>
<Desc/>
<UOM/>
</Target>
What I'm looking for is :
<Target>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U1</UOM>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U2</UOM>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U3</UOM>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U4</UOM>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U5</UOM>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U6</UOM>
</Target>
and so on.
I can flatten the structure to get the <Plant><Material> part with the <removeContext> method
and
the <Matrial><Desc><UOM> with a <copyHeaderPerUOM> user function folowed by a <SplitByValue> assignment but I cannot seem to combine the two methods to get to resultant flat structure I'm looking for.
Any help will be appreciated.
Thanks
Andre
Mapping:
UOM(WITH CONTEXT as ROOT)-->TARGET
PLANT--->|
UOM(WITH CONTEXT as ROOT)->|UseOneAsMany>SplitByValue-->Plant
UOM(WITH CONTEXT as ROOT)--->|
MATNR--->|
UOM(WITH CONTEXT as MATERIAL)->|UseOneAsMany>SplitByValue-->Matnr
UOM(WITH CONTEXT as MATERIAL)--->|
MAKTX--->|
UOM(WITH CONTEXT as MATERIAL)->|UseOneAsMany>SplitByValue-->Desc
UOM(WITH CONTEXT as MATERIAL)--->|
UOM>SplitByValue>UOM
InputData:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<SEG1> (Occurs 1)
<PLANT>P1</PLANT>
</SEG1>
<SEG2> (Occurs 1..9999)
<MATERIAL>
<MATNR>M1</MATNR>
<MAKTX>D1</MAKTX>
<SEG3>
<UOM>U1</UOM>
<UOM>U2</UOM>
<UOM>U3</UOM>
</SEG3>
</MATERIAL>
<MATERIAL>
<MATNR>M2</MATNR>
<MAKTX>D2</MAKTX>
<SEG3>
<UOM>U4</UOM>
<UOM>U5</UOM>
<UOM>U6</UOM>
</SEG3>
</MATERIAL>
</SEG2>
</ROOT>
oUTPUT:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<Target>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U1</UOM>
</Target>
<Target>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U2</UOM>
</Target>
<Target>
<Plant>P1</Plant>
<Matnr>M1</Matnr>
<Desc>D1</Desc>
<UOM>U3</UOM>
</Target>
<Target>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U4</UOM>
</Target>
<Target>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U5</UOM>
</Target>
<Target>
<Plant>P1</Plant>
<Matnr>M2</Matnr>
<Desc>D2</Desc>
<UOM>U6</UOM>
</Target>
</ROOT>
Regards,
KNS Kumar.
Similar Messages
-
Graphic Mapping:IDOC to File-Avoid Error in Adapter Engine
Hi all,
I'm using Graphic Mapping in my IDOC to File scenario in which each segment in source IDOC will generate a ROW in target File with the condition: DATBI >= currentdate (and some other conditions)
I have a UDF and use the mapping function CREATEIF for this purpose:
DATBI -> UDF -> CREATEIF -> ROW
Problem scenario: In the source IDOC if all the segments have DATBI < currentdate then there is no ROW created, and I get the error in Adapter Engine
Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure ...
How can I avoid this?
I've tried to put this condition using XPATH in Interface Determination and got the error.
There is a way to use function current-date() in XPATH condition?
Thanks for your help,
ElaineHi all,
How can I "suppress the row node if condition fails"? I'm new in PI, so please give more details.
My FCC as follows:
Record Structure: Record, Row
Row.addHeaderLine 0
Row.fieldSeparator ,
Record.fieldSeparator 'nl'
Row.endSeparator ; 'nl'
It works fine if the condition satisfied.
In Message Mapping, I've use Test to double check my mapping, and in the scenario that conditions fails, there is no Row in the target message.
Please advise.
Thanks,
Elaine -
Is it possible to replace XSLT mapping in place of Graphical mapping
Is it possible to do XSLT mapping in place of Graphical mapping, in any normal scenario?
Means the fuctionality we do by using Graphical mapping(like the operations by using node functions etc...) could possible to do with XSLT Mapping?HI
yes it is possible to replace the graphical mapping with the XSLT mapping.
But using XSLTs degrade the performance of the interface and moreover they are not easily maintainable.
Refer the below links for assistance on XSLT Mapping:
XSLT MAPPING:
Generic XSLT Mapping for SAP XI,Part I
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
Generic XSLT Mapping for SAP XI,Part II
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
XSLT: Recursive Templates
XSLT: Recursive Templates
Easy RFC lookup from XSLT mappings using a Java helper class
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
Step u2013 By u2013 Step Simple Approach for XSLT Mapping
Step By Step Simple Approach for XSLT Mapping
http://www.devguru.com/Technologies/xslt/quickref/xslt_element_applytemplates.html
XSLT Mapping
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
xpath functions in xslt mapping
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
Using XSLT mapping in a ccBPM scenario
File to Multiple IDocs (XSLT Mapping)
Comparsion of Different mappings:
Comparing Performance of Mapping Programs
Complete mapping guide url:
http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
cheers -
Idoc with XSLT Mapping ALE service error
Hi all,
I have the same problem with "converting to an ALE logical system".
In this case I have a Business System without logical system name in the SLD. This information for the IDoc control record, like SNDPOR, I will map with a xslt mapping.
In weblogs from Michael are the properties for the directory described.
/people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
I selected in the comminication channel the last two check boxes, as described in SAP help.
"Take Sender from Payload
If you want to take the sender of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
Take Receiver from Payload
If you want to take the receiver of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
If you set both of the above indicators, you do not require a heading mapping and do not need to set the alternative identifiers.
However, you must ensure that the SNDPRN, SNDPRT, RCVPRN, and RCVPRT fields are set in the IDoc control record.
Setting the senders and receivers of a message from the payload simplifies configuration and speeds up processing.
If the sender and receiver are not set correctly in the payload, the resulting error is only visible in the receiving system. "
In my XSLT-Mapping I set the appropriate Idoc fields:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="DATEN">
<_-XXX_-018_XXXXX_XIDATEN>
<IDOC>
<xsl:attribute name="BEGIN">1</xsl:attribute>
<EDI_DC40>
<xsl:attribute name="SEGMENT">1</xsl:attribute>
<TABNAM>EDI_DC40</TABNAM>
<DOCREL></DOCREL>
<DIRECT>2</DIRECT>
<IDOCTYP>_-XXX_-018_XXXXX_XIDATEN</IDOCTYP>
<MESTYP>_-XXX_-018_XXXXX_XIDATEN</MESTYP>
<SNDPOR></SNDPOR>
<SNDPRN>XXXXX01IN</SNDPRN>
<SNDPRT>LS</SNDPRT>
<RCVPOR>xxx</RCVPOR>
<RCVPRN>xxx</RCVPRN>
<RCVPRT>LS</RCVPRT>
</EDI_DC40>
<xsl:variable name="pid" select="substring(.,1,1)"/>
But in the sxmb_moni the message is red with the error message :" converting to an ALE logical system"
Have you any idea?
With another interface I used a graphic Mapping and the same properties in the directory and it works.
Bye
StefanHi togehter,
it works now, after cpa_cache and sxi_cache.
and and ...
<IDOCTYP>/XXX/018_XXXXX_XIDATEN</IDOCTYP>
<MESTYP>/XXX/018_XXXXX_XIDATEN</MESTYP>
Without: _-...
I would write a blog.
Does know one how that goes here?
Thanks
SDN is great
Stefan -
Graphical mapping issue with useOneAsMany if segment does not exist
Hi all
I have an issue with graphical mapping in an IDoc to file scenario. I need to have header level fields mapped to line item fields. Whether or not and how many source header segments of the same type exist depends on a qualifier (QUALF). This is generally working if I use the following graphical mapping:
if QUALF = 001 then <source> -> removeContext -> useOneAsMany -> splitByValue -> <target>
... with setting QUALF, <source>, and the second input for the useOneAsMany to the highest possible context node.
Nevertheless, if the segment with the qualifier 001 does not exist in the source then the mapping throws the error "Too few values in first queue in fuction useOneAsMany". Whatever I've tried, the mapping wants to execute the useOneAsMany statement anyway and I haven't found a way to omit this. Whether the target would be created with an empty value or not created at all would be secondary. Would eventually somebody have a solution to this problem?
Thanks in advance,
DanielDaniel,
try using mapWithDefault function before useAsmany
if QUALF = 001 then <source> -> removeContext -> <b>MapwithDefault</b>->useOneAsMany -> splitByValue -> <target>
I think it takes care even if the value occur in the contaxt or.
Babu -
Non-XML payload in graphical mapping
Experts,
I have a scenario where I need to trigger a graphical map which eventually populates an IDoc (custom) structure but the Idoc is not being populated with any of the source field.
My source data is a flat file.
1. I dont want the src file content to be transformed to XML.
2. But need to trigger the map (graphical map) to populate the constant values in IDoc.
However, even with a src message type with a single String type element (no sub-element), the mapping is failing giving XML parsing error.
Question is:
1. If it is possible to call a Graphical map without the XML conversion of the source? if yes.. how?
2. Otherwise can I use Java / ABAP mapping? because since the input parameter for IF_MAPPING~EXECUTE - source is XSTRING type. So can I pass a flat file instead?
- ShibajiHI Shibaji
1. I dont want the src file content to be transformed to XML.
2. But need to trigger the map (graphical map) to populate the constant values in IDoc.
XI expects some XML if it is empty also it will work but you need to send dummy XML for triggering the mapping. You can pass just a blank field as source to trigger this.
. If it is possible to call a Graphical map without the XML conversion of the source? if yes.. how?
IE expects XML to process so you need to send some data to execute mapping. I don't think you can avoid XML conversion.
Otherwise can I use Java / ABAP mapping? because since the input parameter for IF_MAPPING~EXECUTE - source is XSTRING type. So can I pass a flat file instead?
Java or ABAP mapping also require some source and target to be formed and when you can meet the requirement for triggering the mapping from Graphical. It will complicate using Java/ABAP mapping
I think if you have a source dummy message with single field with 0..1 occurrence then it should trigger your mapping without any error
Thanks
Gaurav -
Hi,
plz tell me about graphical-mapping.
with warm regards.
vikashHi
MAPPINGS STANDARD NODE FUNCTIONS:
Remove Contexts: We use it to remove Header Contexts from source side. If we donu2019t want header context to repeat in target structure, use this. It removes repeated header contexts and all the items come under the same contexts.
Split by Value: This is counter part of remove context. Use this to add the header context at the target side. Suppose if we wan to separate header contexts for every value of item at source use this.
Copy Value: We can use this to copy the value of a position in the source structure and assign it to a target field for frequently occurring source structure element. The value is copied each time the target field occurs in the target structure.
Createif (): Use it to create a tag in the target structure depending on the condition. Use it, if the nodes at the target side have to be created only after certain condition is true. If value type is u2018INTENALu2019 Internal request node is created and if value type is u2018EXTERNALu2019 external request node is created.
Collapse Context: We use it, if we have to create empty tags in target for every context change in the source.
Exists: While mapping idoc structure to file structure, Lot of times we come across a scenario where the fields (occurrence=0) are not mandatory in the idoc. They are not populated in the source xml and they are required in the target xml (occurrence=1) which gives runtime exception that target element canu2019t be created.
u can also refer the below links for further assitance
/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
Different Node Functions in Graphical Mapping.
: /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6658bd90-0201-0010-fbb6-afe25fb398d3
cheers
reward points if found useful -
Message split - XML to IDOCs - (1:n) mapping
I have to split an incoming XML(in idoc DEBMDM format) from MDM to 2 Idocs (ADRMAS & DEBMAS).
Target message set to occurences "0:unb".
Have tested my graphical-mapping in IR and its working fine. Tested the configuration and got error in IB.
In SXMB_MONI i find the error message,
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Messages in multi-message format can only be sent to one Adapter Engine</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Read in few threads about creating a "custom adapter module"...is this right? if so.... how to proceed ?
Appreciate any help.Ram,
Message Split using Graphical Mapping that ur using now supports adapter which are on same J2EE engine .
In ur case Ur trying to post IDOCS ( I suppose ) which is not
supported in using Graphical mapping.
U need to change the design.
-- Kavitha -
Help needed for Graphical mapping.Tag only once produces
Hello experts,
I have a problem in my graphical mapping.This is the example:
from each segment A in IDOC has to be made Tag A or Tag B in output XML.
Segment A has a field USER_STATUS and if it is X than Tag B has to be made otherwise Tag A.
Segment A is 0..9999999. occurence
Tag A 0..unbounded
Tag B 0..unbounded.
I made a mapping
mapping for Tag A:
USER_STATUS -> mapwith default(empty)->length->EqualsA (with Constant =0)-> createif->Tag A
for Tag B as following:
USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)-> createif->Tag B
The problem is that in output XML, I have only one Tag A or B (depending on field USER_STATUS in first occurence of the segment) while in inbound IDOC 5 segments are with different value of the field: USER_STATUS.
Does anyone idea to solve this problem!
Thank you very much for your effort.
King regards,
Danijela ZivanovicHI,
CAn you try this way,
Use Maping Node UseOneAsMany for Tag B
and pass 3 inputs as
Constant[]----
>
USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
>
USER_STATUS -> mapwith default(empty)->EqualsS (with Constant =X)----
>
Same way try for Tag A also.
Thanks
Swarup -
Hi Everyone,
I have a problem with mapping. My Scneario is Idoc to RFC.
Eg. Sender: GSVERF03
->IDOC
E1EDP01 (Occ. 0 to n)
...Field_A
...Field_B
...E1EDP02 (Occ 0 to 25)
...... Field_C
...... Field_D
...... Field_E
Receiver: ZRFC
->T_DELVRY
... ->item
........ Field_1
........ Field_2
........ Field_3
Conditions:
If Field_A = 001, then Field_B = Field_3.
If Field_A = 001,
then
If Field_C = 001, then Field_D = Field_1.
If Field_C = 001, then Field_E = Field_2.
As per my business requirement, i wont get more than one E1EDP02 segment.
How to do this mapping using Graphical mapping.
Rgds,
¬NavField_3
+If Field_A = 001, then Field_B = Field_3
>
This can be achieved by IfWithoutElse
Check your condition using If and give Field_B as second parameter
Field_1
If Field_A = 001,
then
If Field_C = 001, then Field_D = Field_1.
If Field_C = 001, then Field_E = Field_2.
>
here check Field_A condition , 2nd input of this IfWithoutElse check for conditions on FIeld_C
Similar would be for Field_2
You will have to check with context. try by setting context of Field_C,Field_D,Field_E to
E1EDP01 -
Issue with a graphical mapping -
Hi folks,
I have an issue with a graphical mapping.
We are replicating the Material Master, with an interface of ECC -> PI -> JDBC.
The idoc we are using is the MATMAS.MATMAS05, and in the database we created 5 tables, simulating the structure of the source idoc. The tables are: MARA, MARC, MARD, MBEW, MAKT.
The fact is that we need some data of some segments (tables) in another ones.
In this case we I need to take a value of the segment E1MARCM (MARC) to the MBEW table. The value is: SERNP.
The condition to copy that value is the centre (WERKS). So, the condition will be:
If MBEW-WERKS == MARC-WERKS,
then MBEW-SERNP = MARC-SERNP.
The problem I'm having is that I have to lookup in many different E1MARCM segments, and the relation is not 1...1, nor, E1MBEWM is a child of it (they are in the same level.)
For example there could come:
- E1MARCM_1 (WERKS = 0001)
- E1MARCM_2 (WERKS = 0002)
- E1MARCM_3 (WERKS = 0003)
- E1MBEWM_1 (WERKS = 0001)
- E1MBEWM_2 (WERKS = 0002)
- E1MBEWM_3 (WERKS = 0002)
- E1MBEWM_4 (WERKS = 0003)
- E1MBEWM_5 (WERKS = 0003)
Am I clear with the requirement?
Any answer will be greatly appreciated.
Thanks in advance.
.Juan.Hey folks, any advice or input about this?
Thanks again.
Juan -
Flat-Idocs via the IDOC-adapter
Hi All,
I want to send a flat-IDOC via the IDOC Adapter to a SAP R/3 system. The IDOC adapter does not accept flat-IDOC, but wants xml-IDOC. Does anyone know how to send this flat-IDOC to the SAP R/3 via ALE, but without XML-lizing the IDOC?
I am looking in to the principle of tunneling, but that will involve some ABAP coding.
Cheers,
FrankHi Bhavesh,
I tried, but the IDOC adapter wants XML. The receiver IDOC adapter checks the type of the payload and determines if IDOC tunneling is used or not. I don't know yet how to change the type of the payload:
<i>method CL_IDX_IDOC_SERVICE-GET_PAYLOAD, part of package SIDOC_ADAPTER
test if idoc is in tunnel-payload-format
l_content_type = l_payload->getcontenttype( ).
IF l_content_type = if_xms_resource=>mimetype_idoc.
l_idoc_resource ?= l_payload->getdata( ).
l_tunnel_flag = 'X'.
ELSE.</i>
and with tunneling the idoc must be stored in certain tables where the receiver idoc adapter will get the IDOC instead of the payload. And our flat-idoc is in the actual payload. So the direction I am looking into is an abap mapping, which will change the payload type and stores the flat idoc in these tables, so the idoc adapter is "fooled" to believe it is IDOC tunneling.
Cheers,
Frank -
Global Counter Variable - Graphical Mapping
Hi there.
Can anybody help with implementing a global counter variable in the graphical mapping please.
I am trying to populate the "SEGMENT" field of an IDoc with the correct sequence, i.e. add 1 for each new segment. The IDoc has several segments, most of which are embedded. I have tried using the "<b>counter</b>" function but this seems to reset back to one for each instance of it being called.
I would appreciate any pointers.
Thank you.
Mick.Hi see this for implementation
<b>defining Global Variables</b>
ArrayList arrVI;
int counter =0;
<b>Initialization Section</b>
arrVI= new ArrayList();
<b>assignment</b>
arrVI.add(sVI[iLoopCounter]);
counter++;
<b>
fetch Values</b>
for (int i =0;i<counter;i++)
result.addValue(arrVI.get(i)+"");
Mudit -
Hi
I am trying to sort idoc segments based on values like below. I have written XSLT before which just broken after applying SPs. i need a break fix immediately before SAP look into the SP issue.
Now i am leaning towards graphical map. Please help with this
Sample Structure
<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
</E1EDL37>
Here is the output i am looking for
<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
</E1EDL37>Hello,
This can be done using graphical mapping and without udf. See mapping below:
Legend: rc = removeContext, sBV = splitByValue :EV = eachValue :VC = ValueChanged, mWd = mapWithDefault
fBe = formatByExample
For E1EDL37
E1EDL37 -> E1EDL37
For EX1DV
EX1DV -> rC -> sort:ascending -> sBV:EV -> EX1DV
For VHILM
EX1DV -> rC -> sortByKey:ascending -> sBV:EV -> VHILM
VHILM -> rC -> /
Now for the fun part
For E1EDL44
EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> E1EDL44
EXIDV(setContextTo E1EDL37) -> mWd: -> / / Constant: /
EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
EXIDV(setContextTo E1EDL37) -> mWd: -> /
For EXIDV
EX1DV -> UseOneAsMany (2,3) -> rC -> sortByKey:ascending -----> fBE -> equalsS: -> not -> ifWithoutElse (output of fBE is mapped to then) -> sBV:EV -> EXIDV
EXIDV(setContextTo E1EDL37) -> mWd: -> / / Constant: /
EX1DV -> UseOneAsMany (2,3) -> rC -> sort:ascending -> sBV:VC -> /
EXIDV(setContextTo E1EDL37) -> mWd: -> /
Hope this helps,
Mark -
Bug in exists() function of XI Graphical Mapping Tool?
Hi!
If I connect a source field with the exists() function in XI Graphical Mapping Tool and the tag exists it returns TRUE, otherwise it returns FALSE, so everything works as expected.
But I have to connect a user-defined function with exists(). The user-defined function will either calculate a value or set Resultset.SUPPRESS.
If there is a value the exits() function returns TRUE, however if Resultset.SUPPRESS is set it does also return TRUE! This looks to me like a bug in exists() function. Shouldn't it always return FALSE if the input is Resultset.SUPPRESS?
Regards, TanjaHi Stefan!
> The exists() function checks, if a queue is empty.
> An empty queue is <b>not</b> represented by the
> SUPPRESS value.
> If inside a queue there is a SUPPRESS value, the
> queue is <b>not</b> empty.
Ok, so it's not a bug and the exists() function is working as expected.
> If you want the exist() function after a UDF, provide
> an empty queue, or easier: return the values "true"
> or "false" directly from the UDF.
Yes, that's how I actually solved the problem. The UDF was used at several places where the ResultList.SUPPRESS output was needed. So I copied the UDF and changed it so that the output was TRUE or FALSE instead.
Regards, Tanja
Maybe you are looking for
-
Bing "Map It" not showing up in any window accept when imputing a contact for the first time
Bing's "Map It" function that is supposed to be present in office 2013 through emails is not... ive tried many different tests trying to input the addresses in different formats and there is no ability to get a map to the location. Maybe i am just mi
-
How to integrate Power BI features in a Windows Store App?
I need to show PowerBI reports inside a windows 8 app along with filters. Is there any way to do it??
-
DVCPRO HD720P50 conversion to SD Issues
I'm working in FCP with HD720P50 footage - the original files in qtime state HD720P25/50 The sequence settings are 960x720 25fps I have exported the sequence as Qtime reference file using the sequence settings and then imported to DVD Studio Pro I've
-
Does photoshop touch have the clipping feature?
Does photoshop touch have the clipping option / feature?
-
Hi, we are recorded in a course of training about Oracle 9i Enterprise. Our professor said us to download the software from OTN that could be free for this purpose. Please, could you confirm us if we can use this free software downloaded, according t