Target structure generation using GUI mapping
Hi Experts,
I have two nodes in source and one node in target structure .
Source
permanentemployee (0..n)
name
dept
contract employee (0..n)
name
dept
Target
Employee (0..n)
name
dept
If both nodes (permanentemployee & contract employee )are present in source then I should get two occurances of target..
Please watch that I have same subnodes in permanentemployee & contract employee .
Please let me know your thoughts.
Hi Vamsi,
Duplicate the target structure.
then map
permanentemployee (0..n) node to Employee (0..n) target node and fields should map to the target side fields [like name --> name and dept --> dept]
and contract employee (0..n) node to Employee (0..n) target node [this is the duplicated node] and map the corresponding fields to tarhet fields. [like name --> name and dept --> dept]
Regards
Ramesh
Edited by: Venkataramesh Boppana on Oct 8, 2009 12:43 AM
Similar Messages
-
Message Mapping : content based target structure generation
Hi Team,
As per my requirement , mapping should generate target structure based on one "field" value in source srtucture.i.e target structure should generate for some of the custid values , not for all cust id's . also I dont want empty files .
Source:
MT_SOURCE
-Custid
-CustName
Target:
MT_TARGET
-Custid
-CustName
But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
Thanks.
DrumiBut I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
might be it is helpful for ur requirement:
Custid + constant(001) +equals ->(first) if
Custid->then
Custid + constant(002) +equals-> else
First if ending -> Second if
Custid->then
Custid + constant(003) +equals-> Second else ->target Custid -
XML Structure Conversion using JAVA Mapping
Hi Experts,
I am having a requirement in which i want to convert the contents of source xml structure into a string and map it to the target field.
Source Structure:
<SRC>
<Node1>ABCD</Node>
<Node2>XYZ</Node2>
<Node3>1234</Node>
</SRC>
Target Structure:
<TRG>
<Node1>ABCDXYZ</Node1>
</TRG>
Both the source and target structures are in xml format only.....just the condition is that I have to use Java mapping to achieve it.
The contents of Source node Node3 are not to be mapped.
Since I have very less knowledge of Java it will be very helpful if you provide the complete code to me.
Thanks,
Abhishek.Hello Udo,
Thank you for reply. It seems ABAP mapping is easier.
What do you think about the idea of using Value Mapping for such conversion task? In this case is it obligatory to use Java coding? And how about performance - will it be better than in case of ABAP mapping, can you say?
Thank you,
Igor -
IDOC Generation Using XSLT Mapping[Query]
Hi,
I am working on File to IDOC scenario. I have used XSLT mapping. It is necessary to generate EDI_DC40 segment for IDOC in XSLT?
-KavitaHi Kavita,
please take a look at note: 728792
(Fields of the IDoc control record )
it describes your scenario
Regards,
michal -
IDOC--XI--IDOC Using ABAP MAPPING
Hi all,
My requirement is to map source IDOC fields to target IDOC fields using ABAP Mapping.
few fields in source idoc structure has to be merged into a single field in target idoc structure.
need help on how to start with as i am not exposed to ABAP Mapping.
regards,
SubbaHi Subba,
I suggest you also go through these links:
https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
/people/r.eijpe/blog
ABAP Mapping Vs Java Mapping.
Re: Message Mapping of type ABAP Class not being shown
Re: Performance of mappings (JAVA, XSLT, ABAP)
Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken]
This document will help you to create ABAP Mapping.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
Regards,
Abhy
Message was edited by: Abhy Thomas -
How to map multiple source structures to single target structure
Hi all,
I have the scenario of 2 input files so i am using BPM for it. I have created the message types of the 3 input files. I have to finally generate an XML file which will contain the data of all the 2 files. That is i have to do 3:1 mapping.
Source Structure of File 1:
<b>DT_PWC_Customer</b>
<i>RECORDSET</i>
<u>CUSTOMER</u>
<i><b>REF_NO</b></i>
<i><b>CUSTOMER_NO</b></i>
Source Structure of File 2:
<b>DT_PWC_Customer</b>
<i>RECORDSET</i>
<u>METER</u>
<i><b>REF_NO
METER_NO</b></i>
Target Structure of Final Output File:
<b>DT_PWC_CustomerMeterData</b>
<i>RECORDSET</i>
<u>CUSTOMER_METER</u>
<i><b>REF_NO
CUSTOMER_NO
METER_NO</b></i>
Above nodes i have shown in a heirarchical order..nodes with same indentation are at same level.
Can anybody tell me how to do this mapping in IR in graphical editor.
RAJEEV GUPTAHi,
To elaborate my requirement, I want to tell that since i will be having 2 input files- one for Customer & one for Meter. I want to finally generate one XML file which will have data from both these 2 input files. That is, if Customer file has 3 records(3 REF_NO, 3 CUSTOMER_NO) and Meter file has 4 records(4 REF_NO, 4 METER_NO), the final output XML file will have 7 records(7 REF_NO, 3 CUSTOMER_NO,4 METER_NO).
Thanks,
Rajeev Gupta -
Mapping Multiple line item. Target node generation problem
Hi,
I am trying to create a mapping to handle multiline items.
my source structure is
ns0:OrderCreate>
<ns0:Header>
<ns0:OrderCreateBody>
-<ns0:OrderCreateProperties>
-<ns0:PurchaseOrderNumber>
-<ns0:OrderCreatePartners>
-<ns0:OrderCreateDetails>
--<ns0:OrderCreateProductLineItem>
-</ns0:OrderCreateDetails>
</ns0:OrderCreateBody>
</ns0:OrderCreate>
Here <ns0:OrderCreateProductLineItem> is the node which will occure multiple time in new requirment (which is mapped to E1EDP01).
my target structure is
<ORDERS05>
<IDOC>
<EDI_DC40>
<E1EDK01>
<E1EDK14>
<E1EDK05>
<E1EDK02>
<E1EDKA1>
<E1EDKT1>
<E1EDK36>
<E1EDP01>
- - POSEX
- - MENGE
- - MENEE
- - <E1EDP02>
- - <E1EDP19>
- - <E1EDP35>
Currently for each line item ( <ns0:OrderCreateProductLineItem>) target structure contains one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode ).
In Multiline Scenario for each occurance of node <ns0:OrderCreateProductLineItem> target structure should have one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode for every line item ).
For example if source is ::
ns0:OrderCreate>
<ns0:Header>
<ns0:OrderCreateBody>
- <ns0:OrderCreateProperties>
- <ns0:PurchaseOrderNumber>
- <ns0:OrderCreatePartners>
- <ns0:OrderCreateDetails>
- - <ns0:OrderCreateProductLineItem>
- - <ns0:OrderCreateProductLineItem>
- - <ns0:OrderCreateProductLineItem>
</ns0:OrderCreateDetails>
</ns0:OrderCreateBody>
Then target should be ::
<ORDERS05>
<IDOC>
<EDI_DC40>
<E1EDK01>
<E1EDP01>
- - POSEX
- - <E1EDP02>
- - <E1EDP02>
- - <E1EDP19>
<E1EDP01>
- - POSEX
- - <E1EDP02>
- - <E1EDP02>
- - <E1EDP19>
<E1EDP01>
- - POSEX
- - <E1EDP02>
- - <E1EDP02>
- - <E1EDP19>
How to acheive this mapping please suggest ?
Edited by: gumshu on Oct 4, 2011 2:26 AMHello,
The details you have provided are incomplete, e.g where do you get
- - POSEX
- - <E1EDP02>
- - <E1EDP02>
- - <E1EDP19>
But if you want E1EDP01 to appear multiple times, you can use this mapping
OrderCreateProductLineItem -> removeContext -> E1EDP01
Hope this helps,
Mark -
Idoc to jdbc mapping duplicate source node to target structure
Dear all,
I am working on PI 7.1
My sceniro
IDOC to JDBC [sap to mssql ] where the target is a table structure shown below: I execute a stored procedure to insert the below message type into sql table.
<ns0:MT_SP_LFBK xmlns:ns0="http://test.com">
- <Statement_Name>
- <storedProcedureName action="EXECUTE">
<table>spr_test</table>
<BANKS type="Char">BOA</BANKS>
<BANKL type="char">122207</BANKL>
<BANKN type="char">4555--0</BANKN>
<LIFNR type="char">1100000218</LIFNR>
<KOINH type="char">varchar</KOINH>
<BKONT type="char">01</BKONT>
<BANKA type="varchar">S.A.</BANKA>
</storedProcedureName>
</Statement_Name>
</ns0:MT_SP_LFBK>
The mapping is between source CREMAS02 and the above target structure. Everything works fine.
The problem is when the vendor has more than one bank account number the IDOC CREMAS02 replicates the below segment E1LFBKM for each BANK account information. Since target and source are mapped one to one how can i map the second bank account information to the same target structure or genereate a new target Message type for the second bank account information and send it to sql ?
<E1LFBKM SEGMENT="1">
<MSGFN>005</MSGFN>
<LIFNR>110000021</LIFNR>
<BANKS>BOA</BANKS>
<BANKL>122207</BANKL>
<BANKN>4555-0</BANKN>
<BKONT>02</BKONT>
<BANKA>S.A.</BANKA>
<BNKLZ>3000000</BNKLZ>
</E1LFBKM>
Thank you ,
TeresaHi Teresa,
which segment have you mapped with <storedProcedureName action="EXECUTE"> ?
Because according to me , if you send <E1LFBKM> to <storedProcedureName action="EXECUTE">
, you will be able to use your stored procedure several times, in fact each times that you have a <E1LFBKM>.
Reminds: inside <Statement_Name> you can do several SQL actions like execute one or several stored procedures (could be different).
Of course, after that your table should accept to have several bank account for a same customer.
So to have something like that:
<Statement_Name>
<storedProcedureName action="EXECUTE">
</storedProcedureName>
<storedProcedureName action="EXECUTE">
</storedProcedureName>
<storedProcedureName action="EXECUTE">
</storedProcedureName>
</Statement_Name>
regards
mickael -
Source of xslt mapping and XSD/ XMT target structures for standard Idocs
Hi,
I am working on R/3 - XI - ICH scenario. I need xslt mapping and XSD/ XML target structures for standard IDoc like PROACT01,DELFOR01, DELVRY03. I tried to search it on marketplace but couldn't find it there. As per configuration document, these things are shipped with XI mapping content in live cache CD. But I don't have this CD with me. Can anybody tell me the source for these target structures and mapping program. ( Please share marketplace, site link or send me across the mail [email protected])
Thank you in advance.
Anand More.Anand the other option is to import the corresponding idocs into your integration repository and then you can view the generated XSD there.
As regards XSLT mapping, you need to basically first identify as to what form you want to transform your source idoc into.
For some help on XSLT mapping check the following threads,
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/topusers.jspa%3FforumID%3D44
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-6&contenttype=url&content=https://Process Integration (PI) & SOA Middleware
Also have a look at my code samples,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic xslt mapping in sap xi, part i.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
cheers
Sameer -
Message mapping---1 source structure and n target structures
I would like to know how many message mappings we need if we are mapping one source structure to 3 different target structures of a single receiver. I am assuming its just one message mapping.
Depending on the above answer how many interface mappings do we need.Kalyan,
you need multi-mapping that maps one source structure to multiple target structures. Just search multi mapping in SDN and you will find many good posts.
Basically, in MM editor, go to signature tab and in the target messages add additional message types. Simple. --> Only one MM and one IM
Jayson -
Changing source/target structure without recreating mapping
Hi Experts,
There is a requirement where we need to add one field in target structure of an interface. Based on my limited knowledge, I know that if source or target structures are changed then the entire mapping has to be recreated from scrach. Is my understanding correct? If not, how do I go about this change?
Thanks,
DhawalIn any version of XI/ PI you can insert the new fields/ nodes at the end of the parent segment....if done in this manner then the mapping wont be lost:
Old:
<SRC>
<Name>
<First>
</Name>
</SRC>
New
<SRC>
<Name>
<First>
<Last>
</Name>
</SRC>
In this case the mapping wont be lost....however if you add a new node somewhere in middle or at the top of the existsing nodes then mapping will be lost:
<SRC>
<Name>
<Last>
<First>
</Name>
</SRC>
In short the sequencce of apperance of nodes should not change
Regards,
Abhishek. -
I have source and target structures like thais how to map
source structure: name
id
addr
description
details
dept
target structure: name
id
addr
deptsource structure: target structure:
1...1
name _____________ name
1...1
id _____________ id
1...1
addr _____________ addr
description <no mapping>
details <no mapping>
1.....1
dept _____________ dept
Thanks,
Varun -
How to remove namespace prefix from target payload when using HTTP in PI7.0
Hi,
i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
Target structure after mapping now is:
<?xml version="1.0" encoding="UTF-8"?>
<ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
fields
</ns3:Order>
i need the target structure after mapping should look like:
<?xml version="1.0" encoding="UTF-8"?>
<Order xmlns:="urn:xxx-com:pi:project">
fields
<Order>
i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
Please reply if anyone has solved this problem before.
ThanksHi ,
>>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
Quick Tips: Dealing with Namespaces in XI/PI
Regards,
Priyanka -
How to write XSLT codeing in file to file using XSLT mapping?
Hi ,
Experts,
I am new to XSLT coding as iam doing File to File XSLT Mapping for i have created IR and ID part and i have wriiten XSLT codeing which is not working.
source structure: Target structure
Fname Name = (Fname+Lname)
Lname
maths
science Total_marks = (mathssciencesocial)
social
<?xml version='1.0' ?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
<xsl:template match="/"> |
<aash:mt_student_result> this is my Naming Space
<Data>
<Name>
<xsl:value-of select="concat(ns0:mt_student/data/FName,ns0:mt_student/data/LName)"/>
</Name>
<Marks>
<Total_Marks>
<xsl:value-of select="(ns0:mt_student/data/Marks/Maths)(ns0:MT_Student/Data/Marks/Science)(ns0:mt_student/data/Marks/Social)"/>
</Total_Marks>
</Marks>
</Data>
</aash:mt_student_result>
</xsl:template>
</xsl:transform>
while testing in Interface mapping the values are not comming into result side please verify the code and suggest me the correct one.
Thanks in advance
shabeer ahmed.Hi Shabeer,
PFB, the corrected XSL.
try using it, it would work.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
<xsl:template match="/"> |
<aash:mt_student_result> this is my Naming Space
<Data>
<Name>
<xsl:variable name="vFName" select="ns0:mt_student_result/Data/FName"/>
<xsl:variable name="vLName" select="ns0:mt_student_result/Data/LName"/>
<xsl:value-of select="concat($vFName,$vLName)"/>
</Name>
<Marks>
<Total_Marks>
<xsl:variable name="vMaths" select="ns0:mt_student_result/Data/Marks/Maths"/>
<xsl:variable name="vScience" select="ns0:mt_student_result/Data/Marks/Science"/>
<xsl:value-of select="concat($vMaths,$vScience)"/>
</Total_Marks>
</Marks>
</Data>
</aash:mt_student_result>
</xsl:template>
</xsl:transform>
I have given input as,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_student_result xmlns:ns0="http://xlst.file2file">
<Data>
<FName>FName</FName>
<LName>LName</LName>
<Marks>
<Maths>M</Maths>
<Science>S</Science>
</Marks>
</Data>
</ns0:mt_student_result>
Output was,
<?xml version='1.0' ?>
|
<aash:mt_student_result xmlns:sap="http://www.sap.com/sapxsl" xmlns:ns0="http://xlst.file2file" xmlns:aash="http://xlst.file2file"> this is my Naming Space
<Data><Name>FNameLName</Name><Marks><Total_Marks>MS</Total_Marks></Marks></Data></aash:mt_student_result>
It worked.Try it out.
Regards,
Swetha. -
Change Filename using XSLT mapping without variable subtitution
Hi,
My scenario is IDOC to file...i am using XSLT mapping, i want to change the filename format to OUT_<Purchase Number>_<DDMMYYYYhhmmss>_KKKK.txt, i cannot use UDF function as i do XSLT mapping i also i cannot use variable substitution as the target structure doesn't have PO and timestamp as tag elements. Can i acheive using writing a adapter module? I appreciate if anyone could help me with this..
Many thanks>
Ravibabu Adari wrote:
> Hi,
> If i go with Option1: what changes i need to do in the file adapter to tell the adapter to pick the filename from XSLT ?
> If i go with Option2: To which element to the target structure should i map the filename using UDF ? do i have to add additional element to the target structure? what changes i need to do in the file adapter to tell the adapter to pick the filename from Message mapping ?
>
> Many thanks
Hi,
in both cases you need to enable file adapter specific properties and enable the file name...
for this you need to use the dynamic configuration properties for the same...
usage of this option using udf in message mapping is rather easy than to use in XSLT...for this you dont need to change the structure in the message mapping...message mapping is just needed for execution of the udf.. thats it..
HTH
Rajesh
Maybe you are looking for
-
HT5148 how do i take my edited video from final cut pro and save it to my hard drive
how do i take it from the program and save it as a .mp4
-
Rerence key is not picking up in ZFBL5N
Hello SAP Expert !! I got one issue,in ZFBL5N report reference key is not picking for few plants,kindly suggest me asap as this is very urgent issue. Thanks in advance !!!
-
Updating iPhoto Library fails to complete in iPhoto '08
I'm upgrading my mother's eMac from OS10.2 to OS10.5 (and iPhoto from 'really ancient, perhaps '04 if not earlier' to '08). The OS 10.5 upgrade appears to work '100%' but the iPhoto '08 hangs while attempting to Upgrade the photo library. The upgrade
-
Portal themes for SAP GUI for HTML
Dear SDNs, We have a portal theme designed with good and look and feel, but most of our applications are SAP Transaction iViews for HTML GUI. can we apply the same theme to HTML GUI applications? or at least can we change the background color and win
-
How to remove special Charecters
Hi I have a internal table having text 900 charecters. Hacving Special Charecters also (like !,@,# etc) Here I need to remove all special charecters only from internal table itab. Can you please tell me the logic?