Defining mapping program
hi all.
here iam dealing with file to BAPI.
mw sender sample file is
in sender file.
HEADER|22012007|WMD
123565139|220.05
133565127|1230.05
143565511|260.00
153565812|11345.05
122565912|320.05
123565013|21259
125565814|232.05
131565212|200.00
132565145|38.05
134565173|5213.10
136565191|298.05
137565132|228.10
TRAILER|12|40843.55
for this i have created my data type as
header
under header my datatypes are
docdate
siteid.
nad under body
accno
amount
and under footer
totrec
toamt
here when iam mapping with BAPI.
and while iam testing iamgetting docdate and siteid only for first record and for remaining records it remains blank,
but
i should get the doddate,siteid for all the records in bapi.
waiting for the great answer.
bye.
regards.
seeta ram.
Seeta,
I couldn't understand what happens if we add three lines of code, will make big complexity in the program. Of course we do have some standard functions, choose whichever is comfortable for u.
Source structure.
MT_Input
<b>Header 1..1</b>
docdate 1..1
siteid 1..1
<b> Body 1..unbounded</b>
accno 1..1
amount 1..1
<b> Footer 1..1</b>
Totrec 1..1
Totamt 1..1
MT_Output
<b>yisu_bapi 0..1</b>
<b> e_waste 0..1</b>
<b> item 0..unbounded</b>
docdate 0..1
siteid 0..1
amount 0..1
accno 0..1
totrec 0..1
Note : Bolded letters are node with same level.
UDF : Create advanced UDF with Queue[option select] with two inputs.
For example lets say input variable name is input1 and input2
<u><b>Code</b></u>
int cnt = input2.length;
for(int i=0;i<cnt;i++)
result.addValue(""input1[0]"");
Mapping logic.
Don't Map -
> <b>MT_Output</b>
Constant -
><b>yisu_bapi</b> [bcoz u didn't mentioned what is the source for this node]
Constant----
><b>e_waste</b> [bcoz u didn't mentioned what is the source for this node]
Body -
> <b>item</b>
docdate[input1] & accno[input2][change context to MT_Input] -
> UDF -
> Splitbyvalue[EachValue]----><b>docdate</b>
siteid[input1] & accno[input2][change context to MT_Input] -
> UDF -
> Splitbyvalue[EachValue]----><b>siteid</b>
amount -
><b>amount</b>
accno -
><b>accno</b>
Totrec[input1] & accno[input2][change context to MT_Input] -
> UDF -
> Splitbyvalue[EachValue]----><b>totrec</b>
Note : No need to import anything.
I hope it helps you!!!!
Best regards,
raj.
Similar Messages
-
Dear SDNs,
I write a user defined mapping program under a namespace, and I want to use it in other namespaces by drag and drop instead of importing, is that possible?Hi,
<i>>>>Prakash, I'm a little confused, I think mapping program like java and XSLT can only imported in user defined function in Mapping, isn't it?</i>
No, you will be importing it under Imported Archive. You will find User Defined Function inside the Graphical Mapping.
Refer this link for UDF
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
<i>>>>What do you mean by the "F4"? Can you explain it to me ?</i>
F4 is Value request. In the Interface mapping when you are assigning the mapping program you will click on the "?" button which is nothing but F4. You can also press F4 which is equal to pressing "?"
Thanks,
Prakash -
Hi Expets,
We know that there are different mapping programs are available in XI environment like Graphical Mapping, Java Mapping, ABAP Mapping and XSLT Mapping. But on what basis we will choose one of these mapping programs?
I mean, which constraints would make me to choose specific mapping program?
Thanks,
Vijay Kumar T.Hi Vijay,
This is a very good question!!!
We need to decide mapping based on performance ,response time and complexity.It is found that, one should try Graphical mapping first, and if its not possible by this,then go for other mappings.
see here for more detalis of mapping
/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
At what situations we will go for ABAP mapping?
See these threads of similer discussion
ABAP Mapping
when we wil go for abap mapping ??
abap mapping
ABAP Mapping
A few example cases in which an XSLT mapping can be used:-
When the required output is other than XML like Text, Html or XHTML (html displayed as XML)
When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
When data is to be filtered based on certain fields (considering File as source)
When data is to be sorted based on certain field (considering File as source)
When data is to be grouped based on certain field (considering File as source)
Advantages of using XSLT mapping
XSLT program itself defines its own target structure.
XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
File content conversion at receiver side can be avoided in case of text or html output.
Multiple occurrences of node within tree (source XML) can be handled easily.
XSLT can be used in combination with graphical mapping.
Multi-mapping is also possible using xslt.
XSLT can be used with ABAP and JAVA Extensions.
Disadvantages of using XSLT mapping
Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
XSLT mapping requires more memory than mapping classes generated in Java.
XSLT program become lengthier as source structure fields grows in numbers.
XSLT program sometimes become complex to meet desired functionality.
Some XSL functions are dependent on version of browser.
see these also .. u might need this some day!!
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
Some scenarios
/people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
JAVA mapping
How is JAVA mapping different from Graphical, XSLT and ABAP mapping?
Graphical mapping is an easiest and common approach followed by everyone for generating desired target structure. It involves simple drag-n-drop to correlate respective nodes (fields) from source and target structure. It may involve Java UDFs as a part of the mapping program. But sometimes with graphical mapping it is difficult or it may seem impossible to produce required output; for example text/html output, namespace change, sorting or grouping of records etc. A person comfortable with Object Oriented ABAP can go for ABAP mapping instead. One can also think of XSLT mapping as another option. In such cases, when java mapping is used the developer has full control over the message content and could manipulate it based on the output requirement. Hence, java mapping can prove to be an efficient approach.
A few example cases in which Java mapping can be used:-
When the required output is other than XML like Text, Html or XHTML (html displayed as XML).
When the data is to be extracted from input which is in text format.
When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
When data is to be filtered, sorted or grouped based on certain fields (considering File as source)
Advantages of using Java mapping
Java program itself defines its own target structure.
File content conversion at sender side can be avoided in case of text or html input.
File content conversion at receiver side can be avoided in case of text or html output.
Java can be used in combination with graphical mapping.
Multi-mapping is also possible using Java mapping.
Using Mapping Runtime constants we can determine all message related information such as Message ID, sender service etc.
Disadvantages of using Java mapping
Once the java mapping has been imported into XI, to incorporate any further changes one has to compile the java program and import the class file again into XI.
Thanqs
Biplab -
How to pass input parameter (parameterized mapping) to java mapping program
Hello
I have a question about the parameterized mapping with Java (PI 7.1).
In the operation mapping (using Java-class) I defined a inputer parameter (string). I think I am supposed to retrieved the value using:
arg0.getInputParameters().getString("myInputParameterName");
where arg0 is the TransformationInput object.
However I am not able to get the value, I got runtime exception saying the inputer parameter doesn't exit.
Then I figured out maybe I need to bind the OM input parameter to Java mapping parameter, just like in case of message mapping, you need to bind OM parameter to MM parameter. However there is no way to define input parameter for the java mapping program.
Anybody has done java mapping with parameterized mapping?
Anybody can give any hint for this?
Thanks
JaysonInputParameters params = container.getInputParameters();
DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
Edited by: Anand on Dec 10, 2008 4:13 PM -
hi all.
i want to clear one thing that.
i have defined graphical mapping in design.
i.f a file to bapi.
so i created a graphical mapping program and in that i just need to check no of records in body witn trailer and sum of individaul amounts in body with trailer info .
if they both match then i need to set BAPI flag in reciever side as Y Otherwise N.
so just created my mapping program and tested it with only one record in body.
in this case it is sucess but when i tested the mapping program by putting two records in body (by duplicate subtree option in design mapping) .
in this case even the checking matches the flag in reciver side i.e BAPI is set to N.
so i just nee d to conform what is the way for testing mapping program in design.
waiting for u r response.
bye.
regards.
seeta ram.Hi Ram,
your this way of testing msg mapping is okay.......just check the logic of your mapping and correct it, then you will get correct output in your this scenario.....
Thanks,
Rajeev Gupta -
Can we create the Mapping program,when source and target structures same?
Hi Friends,
if we have the same structure at source side and target side:
1) Is it necessary to create the mapping program?
2) If no need of mapping program what you will mention in the Interface Mapping?
3) In ID part which objects no need to create when both structures are same?
Regards,
Naidu.Hi
>1) Is it necessary to create the mapping program?
No need to create mapping if both structure identical in all respects.
>2) If no need of mapping program what you will >mention in the Interface Mapping?
Dont define mapping and iterface mapping.
>3) In ID part which objects no need to create when >both structures are same?
You cannt assign a interface mapping as it is not defined in IR. leave that as interface mapping is not mandatory in Interface Determination Step.
Thanks
Gujjeti -
Using a lookup for mapping program to retrieve the specific value
Hi All,
I have a scenario like I need to use a lookup for mapping program to retrieve the specific value based on the input parameters.
Here I have got some rough idea like
1. Creation of java program to connect the DB table and access the values, Import this java program as archive into XI.
2. Creation of user defined function to use the above java program
3. Include the user defined function in the interface mapping.
Here I feel it needs some more info to complete this scenario, so can anyone provide the step by step procedure for the above scenario.
Thanks in advance.
Vijay.Hi Vijay,
Basically you have embed Database lookup code in the UDF. For all kind of Lookups refer to below links..
Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
Lookups in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Ranjeet Singh. -
Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a blur.
Do you have a question? This is a user to user help forum. Apple is not here only other users like yourself. You don't report problems to Apple here.
By the way, it might help if you indicated where you are located.
To complain to Apple use http://www.apple.com/feedback/ipad.html -
Hi Microsoft Excel Power Map program team!
I looked @ your Excel Power Map program add on, and it’s great.
However everyone is looking for the ability for the user to create polygon (boundary) maps.
It should not be that hard to add this functionality onto such a great map program you already have.
For example: let’s say one has 10 latitude & longitude coordinates and he wants to see the polygon (boundary) of them on your great map. One should be able to just put those 10 latitude & longitude coordinates in an Excel sheet, fire up your Power
Map, select that it should be plotted as a polygon (boundary) and it will display on the map.
Does Microsoft have any plans to add user polygon (boundary) map creation ability to your great Excel Power Map program?
I would also like to see Excel Power map have USA census tracts built into it just like is has USA zip codes built into it. Census data is also very important as thousands and thousands of people need to display polygon (boundary) for census tracts.
Please let me know if Microsoft has any plans to add user polygon (boundary) creation ability to its great Excel Power Map program?
Thank you very much!Hi,
Thanks for your feedback, based on your feature required, I'll move your thread to Power Map forum, there might be give us some light.
https://social.technet.microsoft.com/Forums/en-US/home?forum=powermap&filter=alltypes&sort=lastpostdesc
Regards,
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
ABAP MAPPING PROGRAM TRANSPORTATION ISSUE
Hi Experts,
Our issue is as following:
Already one ABAP mapping program is there in our DEV and in QA also.
Now we have changes the code according to some requirement.
Now we need to reflect the same in QA also.
For that I have certain doubts.
1) after releasing the request number in R/3, will it effect there in integration builder of the QA?
2) Is there any need to do in ADMINISTRATION to reflect the same?
Please revert urgenly.
Regards
sreenihi barry,
thanks a lot . we have released it into integration it is working fine.
thanks once again and i wll reward points also.
I think you can tell my one more doubt is as:
I have one new ABAP mapping program which is not used till now in any interface mapping in ID of XI.
now want use this my integration builder ID in as mapping program.
in this case is any requirement to enable the same in Integration ADMINISTRATION tab.
plz clarify me.
regards
sreeni -
XI 3.0: Additional libraries for mapping program
Hello,
I got the scenario that the program within my Interface Mapping is making use of additional custom java resources (jar's).
I know that in XI 2.0 I had to put these additional libraries into the directory:
..\j2ee\cluster\server\additional-lib
and register them in the files:
..\j2ee\cluster\server\managers\library.txt and
..\j2ee\cluster\server\managers\reference.txt
Now in XI 3.0 I don't have these folders and files anymore. Therefore I simply imported the jar files into the repository...But I do neiter know wether that is the right way at all for registering additional libs in XI 3.0 nor I don't know if I have to import them into the same software component or namespace then the mapping program.
Does anybody know how to make use of additional libraries within a XI 3.0 Stack 5 landscape? I would very much appreciate any recommendations on that!
Kind regards,
Sven LattermannHi Advait,
From the below what I understand is that you are not able to do value mapping for the follwoing
1 A
2 A
3 B
As value mapping allow one to one mapping only. Please do it like as mentioned below
1 1*A
2 2*A
3 3*B
Then in the graphical mapping of Integration Repository do the mapping for the same as shown below
source field > VALUEMAPPING> UDF--> TARGET Field
In UDF suppress the value of 1* , 2* , 3* which can be done as follows
create one UDF with one input field
//write the code as below to suppress the field
return input.substring(2);
Here the davantage of using 1* , 2* , 3* etc is that you have the option to use value mapping for 100 values which I think is not normally the case for any Interface.
If you have same source you can do the same thing for that.
Hope this helps you to resolve your query.
Thanks & Regards
Prabhat -
Hi friends,
I am tryin java mapping for first time.. and created one java program using link https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wholePayloadtoaXML+field
But when I am compiling it using JAVAC, I am getting following error message that
package com.sap.aii.mapping.api does not exist . How can I solve this error.
Complete error is as follows:
C:j2sdk1.4.2_16-x64 in>javac PayloadToXMLField.java
PayloadToXMLField.java:1: package com.sap.aii.mapping.api does not exist
import com.sap.aii.mapping.api.StreamTransformation;
^
PayloadToXMLField.java:2: package com.sap.aii.mapping.api does not exist
import com.sap.aii.mapping.api.AbstractTrace;
^
PayloadToXMLField.java:3: package com.sap.aii.mapping.api does not exist
import com.sap.aii.mapping.api.StreamTransformationConstants;
^
PayloadToXMLField.java:8: cannot resolve symbol
symbol : class StreamTransformation
location: class PayloadToXMLField
public class PayloadToXMLField implements StreamTransformation {
^
PayloadToXMLField.java:16: cannot resolve symbol
symbol : class AbstractTrace
location: class PayloadToXMLField
AbstractTrace trace;
^
PayloadToXMLField.java:27: cannot resolve symbol
symbol : class AbstractTrace
location: class PayloadToXMLField
(AbstractTrace) param.get(
^
PayloadToXMLField.java:28: cannot resolve symbol
symbol : variable StreamTransformationConstants
location: class PayloadToXMLField
StreamTransformationConstants.MAPPING_TRACE);
^
PayloadToXMLField.java:43: cannot resolve symbol
symbol : variable outputPayload
location: class PayloadToXMLField
outputPayload =
^
PayloadToXMLField.java:50: cannot resolve symbol
symbol : variable outputPayload
location: class PayloadToXMLField
out.write(outputPayload.getBytes());
^
9 errors
Thanks,
Brijesh Sonithanks , it is done now..
the program is compiled properly and class file is generated.
but m gettin error in mapping.
in IR i created two message type with data type as string.
and i had imported the class file and java program using Imported archives.
now in interface mapping mapping program i had selected type as Java Class.and name of java program.
but when i tested it, it is giving error as Linkage error occurred when loading class zip/PayloadToXMLField
Please suggest, M i doing some thing wrong?is any thing missing?
Program tht i had used in java
from link (https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wholePayloadtoaXML+field):
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import java.util.Map;
import java.io.*;
public class PayloadToXMLField implements StreamTransformation {
String strXML = new String();
String outputPayload = new String();
//Declare the XML tag for your XML message
String StartXMLTag = "<Payload>";
String EndXMLTag = "</Payload>";
AbstractTrace trace;
private Map param = null;
public void setParameter(Map param) {
this.param = param;
public void execute(InputStream in, OutputStream out) {
trace =
(AbstractTrace) param.get(
StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo("Process Started");
try {
StringBuffer strbuffer = new StringBuffer();
byte[] b = new byte[4096];
for (int n;(n = in.read(b)) != -1;) {
strbuffer.append(new String(b, 0, n));
strXML = strbuffer.toString();
} catch (Exception e) {
System.out.println("Exception Occurred");
outputPayload =
"<?xml version="1.0" encoding="UTF-8"?>"
+ StartXMLTag
+ strXML
+ EndXMLTag;
try {
out.write(outputPayload.getBytes());
trace.addInfo("Process Completed");;
} catch (Exception e) {
trace.addInfo("Process Terminated: Error in writing out payload");;
and detailed trace of error is:
11:34:21 Start of test
LinkageError at JavaMapping.load(): Could not load class: zip/PayloadToXMLField
java.lang.NoClassDefFoundError: zip/PayloadToXMLField (wrong name: PayloadToXMLField) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.load(RepJavaMapping.java:136) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:50) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
11:34:21 End of test -
Error in mapping program in scenario
Hi all,
here i am facing an issue which is to be fixed very urgently. please help me masters.
here i am having a single source structure and multiple receiver structures. after confirming many sources i finally started my work with the help of this blog.
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
But now i am facing a problem that my mapping program and interface mapping are executing the file successfully when i tested in the test tab of both of them.
When i tried to test my scenario in TOOLS-----TEST CONFIGURATION . there it is showing error in the interface determination/mapping step.
here on the receiver side we are going to use proxies. for that we used XI adapter.
please check the above blog and let me know whether my total procedure is perfect or not
THANKS in advance to all .
HELPFUL ANSWERS WILL BE REWARDED.Hi Ramana !
Could you take a screenshot of your error and put it in www.imageshack.us, then give us the link to see exactly which error are you getting. Please expand the node of the error message.
Does the scenario works actually?? I've noticed some cases where the test tool gives errors but once the scenario is running everything works fine.
Regards,
Matias
Message was edited by:
Matias Denker -
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> -
How to enable ABAP Mapping Program in Integration Builder
i have changed ABAP mapping Program in my DEV. Now i want teransport it to INT server.
After releasing it in DEv, it should go through request number.
but to enable the same mapping in integration builder i think we need to some thing in ADMInistration of integration builder.
plz tell me what to do.
regards
sreeniHi kancham sreenivasulu ,
These web-sites may help u solving u'r problem:
How 2 connect non SAP RFC-Programs with XI
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0a8949b-098d-2910-2b8e-b5e9b7daeb26
http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/6f1741b393f26fe10000000a1550b0/content.htm
http://help.sap.com/bp_bpmv130/Documentation/Planning/HighAvailability.pdf
http://www.erpgenie.com/netweaver/xi/XI%20Service%20Packs%20Described.doc
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/704357d9-ce6e-2910-f085-bb1a238b6330
cheers!
gyanaraj
*****Pls reward points if u find this useful
Maybe you are looking for
-
My Blu-Ray player has a USB input but it doesn't have an HDMI input. Can I connect my Apple TV to the Blu-Ray using an HDMI/ USB adapter? It would allow me to run the audio through my stereo. Thanks to all for your help.
-
Training & Event Management - Budgeting
Dear All, In Training & Event mgt, there is one Budgeting function. It budgeting function what I know is some amount is assign to the head org unit & to its all corresponding org units. Then when an employee from the org unit is booked with attendee
-
Video playback so sluggish on eMac 1GHz G4
Just installed Mac OS X 10.5 clean to newly formatted drive. Has 768MB of RAM and enough hard drive space. Getting to the desktop, it feels sluggish. IE and webpages load slowly (that's relative , I guess). But what is surprising is that video playba
-
Need to find out link between reservation created and actual issue of mater
Hi I am going to develop a Y report for client, where they want to see the reservation details created in MB21 and the actual goods issue against the reservation (some more details also). Now from the table RESB I got the details of reservation and a
-
What to do for sucesful installation of 10g on AIX 6.1
Hi.. I have to install oracle 10g on AIX6.1 I have found that oracle 10.2.0.3 start supporting AIX6.1 , but it is a patch and must be installed over base version 10.2.0.1. So i want to ask should i create database while installing oracle 10.2.0.1 or