XSLT mapping code for N:1 mapping
Hi Guys,
I have got one scenario to collect 5 files to merge as one. To this scenario I want to use N:1 mapping. If I am not wrong, with XSLT mapping is easiest way to do this, please correct me if I am wrong. Can any one provide some links or code to merge these files into one.
Thanks in advance.
San
what is correlation here?
I have three messages coming into BPM....now all the three messages should have a field (any field) whose value will be the same in all the messages.
Ex:
<Message1>
<Name>SAP</Name>
<ID>40</ID>
</Message1>
<Message2>
<Name>SDN</Name>
<ID>40</ID>
</Message2>
<Message3>
<Name>FORUM</Name>
<ID>40</ID>
</Message3>
Now to correlate the above messages, the field ID would be used as it has the same value in all the messages.
How does message mapping looks for the following messages
In your BPM you will have a Transformation step....the mapping included here will have three source messages (File1, File2, File3) and there will be a single target message which will have the below structure:
<ROOT>
<OUTPUT> ...... 0..unbounded
</ROOT>
OUTPUT node of the target should be duplicated (right-click --> duplicate ... in message mapping).....do it twice so that you will have three OUTPUT nodes.
Now each target-OUTPUT node should be mapped to the source OUTPUT node, respectively.
Regards,
Abhishek.
Similar Messages
-
00.02.45.109 Map Series for Nokia/Ovi Maps v3.06
Before anyone asks here are the direct download links for manually installing using method outlined by ovikovi HERE
America
Europe
Africa
Asia
AustraliaOceania
Happy to have helped forum with a Support Ratio = 42.5
Attachments:
catalog-00.02.45.109.pdf 45 KBaspergerguy wrote:
sarim_xyz wrote:
also kindly post the link to download Delhi region.
Here you are in case any one else wants it Delhi, but that can be issue with installing map data manually as it is not recorded upon device although present and functional.
thanku for the link. btw can this problem of map not being recorded fixed anyhow? and is this problem also there with voice files?
Nokia Lumia 920 -
Sales & Marketing Online MapIt URL Maps feature for Addresses Google Maps
We recently enabled the MapIT URL functionality so our users can see street maps from Yahoo from Sales Online when they click on the Map it icon associated with all addresses in Sales and Marketing Online.
See Metalink 280542.1 for how to enable this in the Ebusiness Suite.
Two questions:
1. We would like to use Google Maps; does anyone know how this can be done?
2. Our business is in Australia. By default we hide Australia as a county on our addresses. This prevents us from seeing maps for addresses in Australia. Any body know a way around this?
Image for clarification can be found here: http://www.orafaq.com/forum/t/90720/0/Sorry mate looks like it is not straight forward change that you can make to use Google instead of Yahoo.
You may need to use Google Maps APIs and try to build your own URL and update the profile option.
I am hoping in next version of Oracle Apps has out of the box functionality to use Google maps. -
Best map app for mileage counter, maps and directions?
I'm traveling across country and I want to find a map app that not only shows routes, directions, etc. as maps does, but also can tell me the mileage between two cities, say Chicago and Baton Rouge? Anyone know of a good app for that?
Even though I have a beef on this board about it (map download times) you might want to check out the Motion X family of apps. I have the GPS HD that is for the iPad and it's a nice looking app, lots of features. It does have a measurement tool to get distances between two points, but it is "as the crow flies" and not over roads.
My app was only $2.99 so it's not a bad deal. -
How to get the java code of the message mapping
how to get the java code of the message mapping,
I mean to ask how to get the background java code of the message mapping(graphical mapping).
And where to view it?Hi Satya,
The JAVA code for graphical msg mapping is in below folder:
\usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
Here all the mapping jars are there in this folder.
Just decompile these jars and you can see the code.
Thanks,
Rajeev Gupta
Message was edited by:
RAJEEV GUPTA -
How to view the java code of the message mapping,
Hi Experts,
<b>how to view the java code of the message mapping,</b>
how to get the background java code of the message mapping(graphical mapping).
And where to view it?Hi sowmya,
Open any Message mapping in IR. Press <b>CtrlShift0(zero)</b> to open a new menu.
There you will find an option "Is Java Source Code Available?"
There will be an export button nearby. Use it to get the code.
Open it in a zip , you will see the hide java code.
The JAVA code for graphical msg mapping is in below folder:
\usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
Here all the mapping jars are there in this folder.
Just decompile these jars and you can see the code. -
OMB+ command to generate mapping code
Hi,
I want to generate pl/sql code for an OWN mapping. How can i do it using OMB+ command.
Thansk in advanceHi
The OMB is used in this expert below mentioned in this blog post;
http://blogs.oracle.com/warehousebuilder/entry/headless_operation_owb_code_generation_going_it_alone
Commands such as....
OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' \
ADD ACTION '$object_action' SET PROPERTIES (OPERATION) \
VALUES ('CREATE') SET REFERENCE $object_ref \
'$mapname'
OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' AS SCRIPT TO '$folder'
Cheers
David -
Should we avoid Graphical mapping and stick with Java mapping?
After developing mappings in XI for a month, I just don't see any good reasons to use Graphical mappings over Java mappings. Maybe some experienced users here can give me some valid reasons why we should choose Graphical mappings. Here is what I think:
Disadvantages of Graphical mappings:
1. No way to perform automated unit testings. This is probably the biggest reason I hate it. You can do some tests manually when you work in Integration Builder. But there is no way you can write some unit testing utilities to automate the task.
2. Complexity. Even for some simple requirements, your Graphical mappings can become complicated and hard to understand. A lot of times, I find myself staring at several dozens of graphical nodes and try to understand what it does.
3. Impossible to reuse. This is totally against the DRY (Don't repeat yourself) principle. For example, to generate messages for JDBC adapter, it is common to have two identical fields for primary keys: one in the access node and another in the key node. If you change the mapping logic in one, you have to remember to change the other.
Advantage with Java mappings:
1. Fully automated unit testing. You can create JUnit tests along with your Java mapping classes and use Maven or other build tools to perform automated unit testing.
2. Your choice of XML parsing and binding. With Java mapping, you can choose any open source framework for XML parsing and binding. For example, with XMLBeans, I can convert XML input message to a Java object, transform to another Java object and write to output message. And each Java object is generated from its corresponding XML schema.
3. Highly reusable. We can use fundamental object-oriented designs to create highly reusable mapping components.
4. Better version control. Since the mappings are just Java classes, we can use CVS or SVN to track code changes.
5. Better build tools. We can fully utilize build tools like Ant and Maven to automate the build, unit tests, or even generate documents and mapping web sites.
So do you guys agree? Maybe I am still new to XI or I am missing some important things. But at this point, I just don't see why I should use Graphical mappings. Is there anyone developing XI interfaces completely with Java mappings?
Thanks in advance for any comments!
Kenny CheangHi Suraj,
> Since its graphical the blocks will take space, but
> there is always an adavntage of processing time.
> Ebven though it may appear bigger, it will take less
> time as compared with Java code (for the same
> mapping).
Could you explain more why the graphical mapping has better performance? I thought the graphical mapping is compiled into a Java class in the runtime anyway.
> Yes thats there, but same goes with Java mapping too
> right (if you haven't mentioned it as constants)
I mainly think about inheritance. If I have to build 10 interfaces and they all have some common behavior, I can create a base interface class to encapsulate the common logic. But with graphical mapping, you have to duplicate them in each interface.
> Disadvantages of Java mapping:
> 1. Performance
Same as above. I just don't see why Java has worse performance. I actually think Java should have better performance. You can optimize the code anyway you want. In some cases, you have to use queue functions in graphical mapping but it's not necessary in Java.
> 2. All might not be well versed with Java Code(though
> everyone may know basic java) .
I am not asking everyone to abandon graphical mapping. I am just wondering which one is better when you have skills for both.
> 3. Lot of standard functions are available in GM
> which you can choose, but you have to remember the
> exact code for those in Java mapping.
You can create functions in Java too. All you have to do is to remember the function name.
Kenny -
XSLT samples for XML- ABAP mapping
Hi all,
Does anyone have a XSLT samples for XML->ABAP mapping ?
regardsfirst create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
<b>XSLT code</b>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output indent="yes"/>
<xsl:template match="NewDataSet">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<OUTTAB>
<xsl:for-each select="Table">
<OUTTAB1>
<AIRPORTCODE>
<xsl:value-of select="AirportCode"/>
</AIRPORTCODE>
<CITYOFAIRPORTNAME>
<xsl:value-of select="CityOrAirportName"/>
</CITYOFAIRPORTNAME>
<COUNTRY>
<xsl:value-of select="Country"/>
</COUNTRY>
<COUNTRYABBRIVATION>
<xsl:value-of select="CountryAbbrviation"/>
</COUNTRYABBRIVATION>
<COUNTRYCODE>
<xsl:value-of select="CountryCode"/>
</COUNTRYCODE>
<GMTOFFSET>
<xsl:value-of select="GMTOffset"/>
</GMTOFFSET>
<RUNWAYLENGTHFEET>
<xsl:value-of select="RunwayLengthFeet"/>
</RUNWAYLENGTHFEET>
<RUNWAYELEVATIONFEET>
<xsl:value-of select="RunwayElevationFeet"/>
</RUNWAYELEVATIONFEET>
<LATITUDEDEGREE>
<xsl:value-of select="LatitudeDegree"/>
</LATITUDEDEGREE>
<LATITUDEMINUTE>
<xsl:value-of select="LatitudeMinute"/>
</LATITUDEMINUTE>
<LATITUDESECOND>
<xsl:value-of select="LatitudeSecond"/>
</LATITUDESECOND>
<LATITUDENPEERS>
<xsl:value-of select="LatitudeNpeerS"/>
</LATITUDENPEERS>
<LONGITUDEDEGREE>
<xsl:value-of select="LongitudeDegree"/>
</LONGITUDEDEGREE>
<LONGITUDEMINUTE>
<xsl:value-of select="LongitudeMinute"/>
</LONGITUDEMINUTE>
<LONGITUDESECONDS>
<xsl:value-of select="LongitudeSeconds"/>
</LONGITUDESECONDS>
<LONGITUDEEPERW>
<xsl:value-of select="LongitudeEperW"/>
</LONGITUDEEPERW>
</OUTTAB1>
</xsl:for-each>
</OUTTAB>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:stylesheet>
<b>just create a type 1 program and paste the below given code.</b>
report y_consume_webservice .
data: wf_user type string .
data: wf_password type string .
types: begin of outtab1 ,
airportcode(6) ,
cityofairportname(50),
country(30) ,
countryabbrivation(10),
countrycode(6) ,
gmtoffset(10) ,
runwaylengthfeet(15),
runwayelevationfeet(15),
latitudedegree(10) ,
latitudeminute(10) ,
latitudesecond(10) ,
latitudenpeers(10) ,
longitudedegree(10) ,
longitudeminute(10) ,
longitudeseconds(10) ,
longitudeeperw(10) ,
end of outtab1 .
data: outtab type table of outtab1.
data: wf_o like line of outtab .
data: g_okcode like sy-ucomm .
data: my_container type ref to cl_gui_custom_container .
data: g_dock type ref to cl_gui_docking_container .
data: mygrid type ref to cl_gui_alv_grid .
data: wf_field_cat type lvc_t_fcat .
data: wf_field_cat_wa like line of wf_field_cat ,
wf_is_layout type lvc_s_layo .
data: wf_fld_cat type slis_t_fieldcat_alv .
data: wf_fld_cat_wa like line of wf_fld_cat .
data: wf_repid like sy-repid .
data: int_tab_name type slis_tabname .
data: xslt_err type ref to cx_xslt_exception .
constants:
* encoding for download of XML files
encoding type string value 'utf-8' .
data: rlength type i,
txlen type string .
data: http_client type ref to if_http_client .
data: wf_string type string .
data: wf_string1 type string .
data: wf_proxy type string ,
wf_port type string .
selection-screen: begin of block a with frame .
parameters: uri2(132) type c lower case .
selection-screen skip 1.
parameters: user(50) lower case,
password(50) lower case ,
p_proxy(100) lower case default 'proxy.xxx.com' ,
p_port(4) default '80'.
selection-screen: end of block a .
at selection-screen output.
loop at screen.
if screen-name = 'PASSWORD'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
start-of-selection .
clear wf_string .
concatenate
'<?xml version="1.0" encoding="utf-8"?>'
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
'<soap:Body>'
'<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
'<country>' uri2 '</country>'
'</GetAirportInformationByCountry>'
'</soap:Body>'
'</soap:Envelope>'
into wf_string .
clear :rlength , txlen .
rlength = strlen( wf_string ) .
move: rlength to txlen .
clear: wf_proxy, wf_port .
move: p_proxy to wf_proxy ,
p_port to wf_port .
call method cl_http_client=>create
exporting
host = 'www.webservicex.net'
service = '80'
scheme = '1'
proxy_host = wf_proxy
proxy_service = wf_port
importing
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = user .
wf_password = password .
call method http_client->authenticate
exporting
proxy_authentication = 'X'
username = wf_user
password = wf_password.
call method http_client->request->set_header_field
exporting
name = '~request_method'
value = 'POST'.
call method http_client->request->set_header_field
exporting
name = '~server_protocol'
value = 'HTTP/1.1'.
call method http_client->request->set_header_field
exporting
name = '~request_uri'
value = '/airport.asmx'.
call method http_client->request->set_header_field
exporting
name = 'Content-Type'
value = 'text/xml; charset=utf-8'.
call method http_client->request->set_header_field
exporting
name = 'Content-Length'
value = txlen.
call method http_client->request->set_header_field
exporting
name = 'SOAPAction'
value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
call method http_client->request->set_cdata
exporting
data = wf_string
offset = 0
length = rlength.
call method http_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2.
call method http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
clear wf_string1 .
wf_string1 = http_client->response->get_cdata( ).
replace all occurrences of
'<' in wf_string1 with '<' .
replace all occurrences of
'>' in wf_string1 with '>' .
replace all occurrences of
'xmlns=' in wf_string1 with 'xmlns:xsl=' .
try .
call transformation (`Y_TEST`)
source xml wf_string1
result outtab = outtab.
catch cx_xslt_exception into xslt_err.
data: s type string.
s = xslt_err->get_text( ).
write: ': ', s.
stop.
endtry .
break-point .
Try this and give me your feedback.
Regards
Raja -
Tips on how to write efficient java code for java mapping
hi
I do not have much knowledge in Java
Can anybody tell me some tips on how to write efficient and optimised java code to be used in java mapping
Thanks,
Loveenahi D'za,
JAVA in xi
A very important place where you will use JAVA in XI is while doing your Mapping. There will be cases when JAVA MAPPING is the best solution to go for. There are 2 types of Parsers available for JAVA Mapping. DOM Parser and SAX parser. Just got through the following links to understand more on Java Mapping and the APIs available.http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
JAVA mapping -
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
sample code for java mapping
Re: Example code DOM PARSER API -
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html DOM --- /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs tutorial sax and dom
For a tutorial on the methods of SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/
SAX AND dom PARSER ( BY thorsten) -
example /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs java mapping example ( testing and debugging) /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
regards
biplab
Use a Good Subject Line, One Question Per Posting - Award Points -
Java code for Graphical Mapping
Hi,
I am new to the XI world.I read that when we do graphical mapping a java code is generated in the background.
Can any one tell me how to access that code ?
Any help would be appreciated.
Thnx.hi,
you can find it in the XI server folders
have a look at my previous response:
Re: Access to Java mapping code?
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Specific code for device- kernel mem mapping
I would like to see an example of device memory to kernel memory mapping code.
Yes, there is a section in WDD about memory mapping, but it is geared towards device<->USER-memory mapping.
or kernel<-> user-memory mapping.
Could someone please point me towards a specific example of doing device<->kernelspace memory mapping?I would like to see an example of device memory to
kernel memory mapping code.[CUT]
Could someone please point me towards a specific
example of doing device<->kernelspace memory
mapping?look at the ddi_regs_map_setup(9F) man page. Devices have register
blocks. Assuming this is a PCI card, the pci config registers will be
rnumber=0, device specific registers are usually rnumber=1,
and some device have more after that (i.e. if they have on board memory,
it could be mapped in rnumber=1 or rnumber=2 or even have
a way to access it through config space.
MRJ -
Hi friends
I am new to Abap mapping PLZ can any one helpme on abap mapping code
with Source structure and target structure
Message was edited by:
Viswanadh VaddeHi !!
refer the below links
BAP Mapping is used whenever you explicitly need to build your output XML structure . Its entirely depends on your call which approach you want to adopt i.e. JAVA mapping or ABAP mapping as in both the cases you need to explicitly build the output structure . ABAP Mapping however creates a DOM tree in the memory . Therefore it can be a performance issue whenever your source structure is complex . In case you need an idea of how to go about ABAP mapping here is a link which you can refer
http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
Also ABAP mappings have the handicap that they are separated from usual development in Repository. Additional there is more (ABAP, DOM) experience required as for example for XSLT or graphical mapping (my point of view). So they are used for special reasons like access to ABAP stack (transparent tables!).
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] [original link is broken] [original link is broken]
Comparing Performance of Mapping Programs
/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
ABAP Mapping Blogs
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
How to Use ABAP Mapping
https://wwwn.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
Some more
ABAP Mapping
I suggest you also go through these links to know more on ABAP Mapping:
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
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] [original link is broken] [original link is broken]
This document will help you to create ABAP Mapping.
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
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
why Abap Mapping and how to acheive it
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
<b>Pls reward if useful</b> -
One mapping program for three diferent enviroments
Hello there,
I have developed a scenario in which an rfc requests a web service trough XI. In the process a BPM is involved together with some XSLT mappings.
R3->XI->WebService
The Web service request message looks like follows:
<?xml version="1.0" encoding="UTF-8"?>
<cem:Z_ORDER_SEARCH xmlns:cem="http://XXXXXXXX/yyyyyyyyyyyy">
<messageStructure/>
</cem:Z_ORDER_SEARCH>
Where "http://XXXXXXXX/yyyyyyyyyyyy" Is the web service destination.
Everything works fine, but as I have to manage three different environments for Development, Quality and Production I need three different versions of the XSL mapping since destinations are not the same for Dev, Qlty and Production environments.
I found out that I can get information of the sender using runtime parameters as follows:
<xsl:param name="SenderSystem">
I would like to evaluate this information to determine the target URL destination.
If the sender is the development sender then the URL target is the development destination and so on.
I tried the following code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:cemDev="http://developmentDestination"
xmlns:cemQlty="http://qualityDestination"
xmlns:cemPrd="http://productionDestination"
xmlns:cem=""
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
<xsl:template match="/">
<cem:mappingProgram/>
</xsl:template>
</xsl:stylesheet>
This works all right, but I cannot insert code to evaluate the destination.
On the other hand, this code is not valid:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:cemDev="http://developmentDestination"
xmlns:cemQlty="http://qualityDestination"
xmlns:cemPrd="http://productionDestination"
xmlns:cem="">
<xsl:param name="SenderSystem"/>
<xsl:choose>
<xsl:when test="string($SenderSystem) = 'PRODUCTION'">
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemPrd"/>
</xsl:when>
<xsl:when test="string($SenderSystem) = 'QUALITY'">
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemQlty"/>
</xsl:when>
<xsl:otherwise>
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
</xsl:otherwise>
</xsl:choose>
<xsl:template match="/">
<cem:mappingProgram/>
</xsl:template>
</xsl:stylesheet>
Neither this one:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:cemDev="http://developmentDestination"
xmlns:cemQlty="http://qualityDestination"
xmlns:cemPrd="http://productionDestination"
xmlns:cem="">
<xsl:param name="SenderSystem"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="string($SenderSystem) = 'PRODUCTION'">
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemPrd"/>
</xsl:when>
<xsl:when test="string($SenderSystem) = 'QUALITY'">
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemQlty"/>
</xsl:when>
<xsl:otherwise>
<xsl:namespace-alias stylesheet-prefix="cem" result-prefix="cemDev"/>
</xsl:otherwise>
</xsl:choose>
<cem:mappingProgram/>
</xsl:template>
</xsl:stylesheet>
I tried this other code, which is obviously not valid:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:param name="SenderSystem"/>
<xsl:choose>
<xsl:when test="string($SenderSystem) = 'PRODUCTION'">
<cem:Z_ORDER_SEARCH xmlns:cem="http://productionDestination">
</xsl:when>
<xsl:when test="string($SenderSystem) = 'QUALITY'">
<cem:Z_ORDER_SEARCH xmlns:cem="http://qualityDestination">
</xsl:when>
<xsl:otherwise>
<cem:Z_ORDER_SEARCH xmlns:cem="http://developmentDestination">
</xsl:otherwise>
</xsl:choose>
<cem:mappingProgram/>
</cem:Z_ORDER_SEARCH>
</xsl:template>
</xsl:stylesheet>
So the only way I found to make it works is like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:param name="SenderSystem"/>
<xsl:choose>
<xsl:when test="string($SenderSystem) = 'PRODUCTION'">
<cem:Z_ORDER_SEARCH xmlns:cem="http://productionDestination">
<cem:mappingProgram/>
</cem:Z_ORDER_SEARCH>
</xsl:when>
<xsl:when test="string($SenderSystem) = 'QUALITY'">
<cem:Z_ORDER_SEARCH xmlns:cem="http://qualityDestination">
<cem:mappingProgram/>
</cem:Z_ORDER_SEARCH>
</xsl:when>
<xsl:otherwise>
<cem:Z_ORDER_SEARCH xmlns:cem="http://developmentDestination">
<cem:mappingProgram/>
</cem:Z_ORDER_SEARCH>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Unfortunately this doesnt solve my problem, because I need to reproduce the mapping program three times in the document.
Any ideas, or suggestions how to manage one mapping program for the three different environments?
Thanks a lot in advance, RaúHi there,
I just found one way of getting this done. It may not be the better waw, but I post it in case it is helpfull.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- Sender System at runtime-->
<xsl:param name="senderSystem"/>
<!-- SenderSystem constants (development addressed by default)-->
<xsl:variable name="qualitySenderSystem" select="'WHATEVERTHENAMEOFTHEQUALITYSENDERSYSTEM'"/>
<xsl:variable name="productionSenderSystem" select="'WHATEVERTHENAMEOFTHEPRODUCTIONSENDERSYSTEM'"/>
<!-- Mapping program template to be called-->
<xsl:template name="mappingProgram" match="/">
<!-- MAPPING PROGRAM-->
<UNIQUE_MAPPING_PROGRAM/>
<!-- END OF MAPPING PROGRAM-->
</xsl:template>
<!Receiver determination depending on senderSystem>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$senderSystem=$productionSenderSystem">
<xxx:Z_ORDER_SEARCH xmlns:xxx="http://production">
<xsl:call-template name="mappingProgram"/>
</xxx:Z_ORDER_SEARCH>
</xsl:when>
<xsl:when test="$senderSystem=$qualitySenderSystem">
<xxx:Z_ORDER_SEARCH xmlns:xxx="http://quality">
<xsl:call-template name="mappingProgram"/>
</xxx:Z_ORDER_SEARCH>
</xsl:when>
<xsl:otherwise>
<xxx:Z_ORDER_SEARCH xmlns:xxx="http://development">
<xsl:call-template name="mappingProgram"/>
</xxx:Z_ORDER_SEARCH>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet> -
ABAP mapping code in XI or SAP
Hi All,
Where do I need to write the ABAP mapping code, in XI or SAP. CAn it be written at either of them and used in interface mapping?
Regards,
XIerHi,
These are some of the weblogs which they have used ABAP mapping. In all of them they have used it in XI only. Also I have never seen the way you have mentioned.
/people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
/people/rahul.nawale2/blog/2006/11/01/dynamically-sending-a-mail-to-the-po-creator-using-xslt-abap-mapping
/people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
Regards,
---Satish
Maybe you are looking for
-
Error in using FM BBP_PD_SC_CREATE
Hi I am using FM BBP_PD_SC_CREATE to create a SC backend with an external SC number range but i will get the error message ' No approval workflow found' . Anyone had encountered such errors before ? But on debug when i manually enter the SC number in
-
I'm trying to design an online sticky note. It's working fine in Safari, Firefox (Mac and PC) and IE Mac, but it's not working at all in IE Win. It's supposed to display the entire sticky note over the rest of the content on page load, then the stick
-
I have several playlists on my iPod including one that contains just Christmas music. I typically shuffle songs between all playlists, but would like to exclude the Christmas playlist except during the season. Is there any way to exclude this one pla
-
Trojan found in Lion and on iPhone 4 backup
I recently installed MacKeeper on my Mac and Pc's I have been having major issues with Lion - see my discussion there - But tonight it found a Trojan in my Users/dr/App Support/MobileSync/Backup file - This was as I was restoring my iphone 4 from t
-
Hi, I've created a book using iPhoto. However, the ribbon at the top of the screen (the one showing what the pages look like in a smaller version), shows a few pages that are blank. But when I made the pages (below the ribbon in the main part of the