Simple value mapping scenario
Hi,
I have a simple mapping scenario but cant find the right functoids to use. I have a simple "if else" functoid
If sender has the value 10 then the equal functoid is true and maps the value Yes. If sender is anything else but true then value mapping is No.
But now I want to add a extra value. So if sender is 10 or 20 then its Yes.
How can I achieve this?
If you want to use functiod to have If-then-else, then this can be archived using the comboination of Equal, Logical Or and Value Mapping fucntiod.
Following article explains this in detail with an example.
http://blogs.msdn.com/b/chrisromp/archive/2007/05/29/to-be-or-logical-not-to-be.aspx
Otherwise a scripting functiod can do this with custom script with if-then-else in it.
You can choose any of these options.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.
Similar Messages
-
Hi all,
I know something about Value Mapping.
And I heard that the Lookups (DB and RFC) are types of Value Mapping.
I am confused how value mapping is related to lookups.
Request you all to provide me some information regd.this.
Thank you.
Regards
Krishna.Hi,
All the links above are quite useful in understanding Value Mapping and RFC lookups.
Both solutions could be used for getting values from R3 tables at runtime. However, there's difference in way both operate.
RFC lookup is performed at runtime, since it is executed from the UDF in message mapping. Thus at runtime, call is made to R3 table and value is fetched.
In value mapping replication, Value Mapping program is run from SAP R3 and values from table are updated in XI Runtime Cache. Thus at runtime, while performing message mapping, call to R3 system is not made. Values are available in XI cache.
Thus, it is quite obvious that Value Mapping is more performace efficient since it doesn't make a call to SAP R3 system for each incoming message. If the table data does not change very frequently(since for every change value mapping scenario has to be run for update of XI cache), and it is not very large, then it is a good option as compared to RFC lookup.
However, in cases where either data is frequently changing in table or the volume of data is too large, RFC lookup should be prefered choice.
Hope it would be helpful.
Thanks,
Bhavish
Kindly award points if comments are useful -
401 - Unauthorized error in Value Mapping Replication scenario
Hi,
I'm trying to push some Value Mapping replication data from one of the clients (which is a non-Integration Server) of XI system to IS. When I execute the program which calls the outbound proxy, the XI message fails with the error HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorised.
As given in SAP help, I registered the inbound java proxies and generated the outbound proxies. I confiured the receiver channel with path /MessagingSystem/receive/JPR/XI. In authentication data, I tried several users such as XISUPER, XIAPPLUSER, XIISUSER..Still I get the same error.
What is missing/wrong?
Thanks in advance
Praveen SirupaHi Praveen,
Could you pls do the following...just for verification....
enter the url http://<was_server>:5<sysnr>00/MessagingSystem/receive/JPR/XI
and when it asks for authentication give the XIAPPLUSER and password...you should get an xml that looks like this...
<?xml version="1.0" encoding="UTF-8" ?>
- <scenario>
<scenname>MSG_SCEN</scenname>
<scentype>SERV</scentype>
<sceninst>MSG_001</sceninst>
<scenversion>001</scenversion>
- <component>
<compname>SERVLET</compname>
<compdesc>Messaging System</compdesc>
<comphost>localhost</comphost>
<compinst>MSG_001</compinst>
- <message>
<messalert>OKAY</messalert>
<messseverity>100</messseverity>
<messarea>QR</messarea>
<messnumber>801</messnumber>
<messparameter>na</messparameter>
<messtext>MessagingServlet is active.</messtext>
</message>
</component>
</scenario>
Thanks,
Renjith -
Explian value mapping with a scenario.
Hello Guru's,
I have seen the material which defines VALUE MAPPING and VALUE MAPPING GROUP. But i am not able to implement in the scenario. ( please don't ask which secnario )
Can any one please give me the scenario which uses VALUE MAPPING and VALUE MAPPING GROUPS.
Thanks in advance.Hi,
Refer this [How to Perform Value Mapping u2013 A Walkthrough|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5].
Thanks,
SaNv... -
AIF Value mapping for outbound scenario
Hello All,
Is there any possibility of using same value mapping which is defined for Inbound scenario can be reused for outbound scenario as well ?
Since, AIF value mapping can be defined based on Sending system but there is no option of creating value mapping pair between sending system and receiving system (similar to SAP PI value mapping) , is it only defined to use for Inbound scenarios ?
Thanks & Regards,
Dijesh TannaMichael
-->>>>you cannot have the same target value for two source values ?
What does this mean? Can't we have If name = A1, then value in the target should be Sales consultant
and if name = A2 then value in the target should be sales consultant?
My question was :
If name = A1, then value in the target should be sales consultant
If surname = A1, then value in the target should be purchase consultant
In the same graphical message mapping, can this be achieved using value mapping?
Thanks -
Error in Domain value mapping.
Dear all,
I was trying a simple file to file scenario using ESB with the Domain value mapping(DVM).
I was trying to replace the incoming long state codes with the short keywords.
I was using the DVM to configure the field to be changed in the XSL map.
I have also configured tracking fields for Routing service and the Outbound adapter in the ESB Console.
But after the instance the long names are not replaced with short keywords it come as blank in the place of names.
In the ESB console the RS is tracking the fields and the outbound adapter not. I was using a simle text file which has two columns Andrew, Bangalore delimited by comma and optionally enclosed by space.
Please help me.Thanks for the reply Chintan,
Yes it is not working, I was doing the esb-customerdvm.pdf sample DVM as specified in the following link
http://www.oracle.com/technology/products/integration/esb/files/esb-customerdvm.pdf
My map also has three columns and I was the specifying Map name, Source column name as "Long" and the target column name as "Short" and the default value as "" in the lookup-dvm function in the XSL stylesheet.
And I have also specified the trackable fields for the Routing service and the Outbound adapter in the ESB Console but after the instance only the RS shows the tracked data and the Outbound adapter doesnot and it shows Nodata.
When I give the Input as the text file with columns Prasath, Chennai in the output file the Prasath is only coming what I expect is Chennai should be replaced by its short name CH but it is not coming like that.
Here I also specify the coding of XSL Stylesheet map.
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="WSDL">
<schema location="DVMapsInput.wsdl"/>
<rootElement name="Leaf" namespace="http://TargetNamespace.com/DVMapsInput"/>
</source>
</mapSources>
<mapTargets>
<target type="WSDL">
<schema location="DVMapsOutput.wsdl"/>
<rootElement name="Leaf" namespace="http://TargetNamespace.com/DVMapsInput"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [FRI MAY 23 12:31:40 IST 2008]. -->
?>
<xsl:stylesheet version="1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:imp1="http://TargetNamespace.com/DVMapsInput"
xmlns:ns0="http://www.w3.org/2001/XMLSchema"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/DVMapsInput/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/DVMapsOutput/"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
exclude-result-prefixes="xsl plt pc imp1 ns0 jca ns1 hdr tns bpws ehdr hwf xp20 xref ora ids orcl">
<xsl:template match="/">
<imp1:Leaf>
<imp1:C1>
<xsl:value-of select="/imp1:Leaf/imp1:C1"/>
</imp1:C1>
<imp1:C2>
<xsl:value-of select='orcl:lookup-dvm("Citycode","Long",/imp1:Leaf/imp1:C2,"Short","")'/>
</imp1:C2>
</imp1:Leaf>
</xsl:template>
</xsl:stylesheet>
Please help on this.
Thanks. -
Value mapping in the ERP system during IDOC creation
We have a PI File-IDOC scenario.
We can translate simple mappings such as currency or unit of measure in PI(7.1) using the Value Mapping function. For complicated mappings involving business logic (e.g. Tax code which is derived from multiple fields) we want to perform these mapping in the ERP (ECC6) system. Is there an approved generic SAP standard process where these value mappings can be done in the IDOC creation which is still valid when re-processing?
e.g. a specific BADI or enhancement point recommended for these mapping?
There might also be a requirement to add segments based on value mapping logic for example when a tax record segment is only required for a non-zero tax code which is mapped via business logic.
Can someone please direct me in the right direction.Thanks for your answers but I assumed that using a user exit / Enhancement point was obvious. What I'd like to know is a generic entry point that I can estabolish a IDOC enhancement framework. Somewhere I can call a class containing methods linked to IDOC message types
e.g. Call similar to my prototype (this will be where dependant on mappings certain segments will need to be inserted such as tax segments.
ASSIGN control-mestyp TO <mestyp>.
CALL METHOD (<mestyp>)
EXPORTING
control = control
data = data
IMPORTING
have_to_change = have_to_change
protocol = protocol
new_entries = new_entries.
The "entry point" must be processed both at creation and reprocess. We are also dealing with Inbound IDOCs not outbound -
I have a normal PI scenario.
SAP -> xi soap -> PI -> soap -> THIRD PARTY SYSTEM
Every request of the third party web service has the element "mandant". But this shouldn't be transparent for the calling SAP system. So I have the following message types:
<request_sap>
<a></a>
<b></b>
</request_sap>
<request_ext>
<a></a>
<b></b>
<mandant></mandant>
</request_ext>
Depending on the calling system (DEV, Q/A, PROD) I want assign a specific value to this "mandant" element. But I donu2019t sure which is the right way.
The easiest way is to use the graphical mapping tool. Because I have only 3 systems it would be quite simple. If sender = xx then mandant = yy. I can use a udf for that purpose too bur in general I have the feeling that this isn't a good way.
Second thought was value mapping but here I have two problems. I have no source value but I can use "sender" as sunstitute here. But I have no idea for my second problem. I read this Wiki here:
http://wiki.sdn.sap.com/wiki/display/XI/Value+mapping
But in my scenario I haven't a sender communication channel. So I can't assign Sender Agency and Sender Schema to this channel.
Or is there a better way to reach my goal?Hi,
Use UDF to achive the same, it is good design.
Regards,
Raj -
Import conversion data table from SAP R/3 into value mapping table in XI
Hi:
Somebody knows how to import a table with conversion data that are in SAP R/3 and to take it to a value mapping table in XI?
The purpose is to use a mapping table that can change in the future. Must I use a ABAP programming that retrieve data and build the value mapping table?
If so, how I specify in the ABAP programming the group id, the scheme, the agency and the corresponding value?
Please, help me.
Regards!!!Hi David,
please refer to this section in the help: http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
There is an interface for mass replication of mapping data. The steps you need to carry out to use this are:
+Activities
To implement a value-mapping replication scenario, proceed as follows:
1. Register the Java (inbound) proxies.
To do so, call the following URLs in the following order in your Internet browser:
¡ http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication (for the asynchronous replication scenario)
¡ http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplicationSynchronous&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplicationSynchronous&method=valueMappingReplicationSynchronous (for the synchronous replication scenario)
You only need to perform this step once (for each installation).
2. Application programming
The ABAP program must perform the following tasks:
¡ Read the value mapping data from the external table
¡ Call the outbound proxy used to transfer the data to a message, which is then sent to the Integration Server
3. Configuration of the replication scenario in the Integration Directory
This involves creating all the configuration objects you need to execute the scenario successfully. One special aspect of the value-mapping replication scenario is that the receiver is predefined (it must be on the Integration Server). The sender, however, is not predefined in the replication scenario and can be defined to meet your individual requirements.
For example, you can use the shipped ABAP proxies.
In the case of the receiver communication channel, choose the adapter type XI. Ensure that you configure a channel for the Java proxy receiver in this case.
Enter the path prefix /MessagingSystem/receive/JPR/XI for this purpose.
+
Regards
Christine -
Mapping multiple source value to one target value in value mapping
Hello experts,
In my scenario, i need to map more than one source value to one target value in value mapping. Like:
1 TenderPickup
2 TenderLoan
7 TenderPickup
101 TenderPickup
102 TenderLoan
107 TenderPickup
But when I enter the same target value for the second time and try to save it, it gives me an error saying value mapping already exists.
But this should logically be allowed. How can this be done. Please provide a solution.
Thanks,
YashHi Prabhu,
When i right click on the target field, it gives me only 3 options:
1) Insert Row
2) Delete Value Mapping
3) Value Mapping in all agencies
I dont see nay option for duplicating rows.
What I hae done is in ID i clicked on TOOLS and then VALUE MAPPING. I checked the option "Value Mapping Agencies" and gave my source and target agencies detials. Then i clicked on DISPLY and in the next page I have 3 columns - Value for <source agency>, Value for <target agency> and Group name.
When I give duplicate values in the column Vlaue for <target agency>, it doesnt allow me to and if i right click in this column, i get the above mentioend options.
Please point out where i m going wrong.
Thanks,
Yash -
Value Mapping through Tables in R/3 from XI
Hi All,
I'm new to XI and got a scenario as "Value Mapping through Tables in R/3 from XI". Kindly do tell me the steps which I should follow to complete this scenario. I'm from ABAP so table creation is known to me, what next should I do after table creation?
Thanks in Advance to all of you,
Sreedharsree,
value mapping are done using message mapping. In message mapping you have to make a RFC call to query the db and get the response. were you have to write a java function in mapping program.
check this blog, it speaks on value mapping
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i -
Value Mapping Problem - Values not appearing in destination system
hello everyone,
Here's my scenario: XML > XI > IDOC
I have a problem with the ValueMapping and FixedValue function in XI. When I test the message in the Integration Repository, I don't get any problems (the value is converted appropriately), but when I view the IDOC in SAP, the value that is supposed to be in the field is missing.
When I check the payload in SXMB_MONI in XI, no conversion occurs. I have refreshed the caches, and everything seems to be fine. I don't know why the value mapping functions seem to have stopped working altogether. Will anyone be able to help me out with my problem?
Thanks in advance!
GlennHi Glenn Bumanlag,
I think the values that you have given for source values (Agency and scheme)
and Target values (Agency and scheme) may be mismatching so kindly chek that...even i got the same error in the past..........
If you the this problem kindly change it accordingly and also refresh the cache once you that with this.........
Kindly follow the below mentioned link and check if you have followed these steps.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5
Thanks
Sai
PS: kindly reward points if helpful -
Accessing values during runtime in value mapping
Hi all,
We have a specific requirement , where in we have a set of fields coming from the source system. All the fields have values expect few. The few which don't have values are reserved for future use, and for each source field there is a corresponding target value and we need map them.
We have used value mapping here, but it doesn't work for fields which don't have values.
We have thought of accessing the fields which do not have values, dynamically or at runtime by connecting the database of the source system.
Is it possible to do this, if yes, please provide with your inputs and alternatives.
thanks,
younusGo through this:
http://help.sap.com/saphelp_nw70/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
<b>To implement Value Mapping, following activities have to be performed:</b>
<b>1.</b> Register Java Proxies. This is one time activity for each installation. Following URL has to be called for registering asynchronous replication scenario:
http://<Server>:<Port>/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication
<b>2.</b> Application Programming: ABAP program has to be written to perform following tasks:
<b>a.</b> Read Value Mapping data from table.
<b>b.</b> Call Outbound Proxy to push the data into a message to Integration Server.
<b>3.</b> Configuration of Replication scenario in Integration Directory.
Regards,
Sarvesh -
Table lookup instead of fixed value mapping
Hi Folks,
My current scenario is that I have used fixed value mapping to map a single target field. These details are actually maintained in the TP_Code table in R3 (a sample table).
TradingPartner:SAP:Short Text
PA:PA:Package
PL:PAL:Pallet
The table contains 20 entries.
I am thinking that fixed value mapping is not a good option since there might have future changes in the TP_Code table.
Is rfc lookup a good option? But I am not sure which rfc to use and if there is any udf availble to be used in parsing the xml payload.
Please advise.
Thanks a ton!Thanks so much for the links!
I managed to use and run the RFC lookup to an R3 table using JCo. However, I am not getting the right result.
I am getting the result in this format -> 800,PA,PAC,Package
The correct output is PAC which is the third node. Could this only be achieved by using java tokenizer?
The code that I have used is as follows:
Import com.sap.mw.jco.*;
//write your code here
String DBTABLE = a;
String WHERE_CLAUSE = b" = ""'"c"'" ;
String sapClient = "xxx";
String hostName = "nnnxxx";
String systemNumber = "xx";
String userName = "nnnnn";
String password = "******";
String language = "EN";
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
sapClient,
userName,
password,
language,
hostName,
systemNumber );
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "SAPLookup", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( DBTABLE, "QUERY_TABLE");
input.setValue( "," , "DELIMITER");
//Fill the where clause of the table
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("OPTIONS");
inputTable.appendRow();
inputTable.setValue(WHERE_CLAUSE,"TEXT");
mConnection.execute( function );
JCO.Table valueSet = function.getTableParameterList().getTable("DATA");
String resultSet = valueSet.getString("WA");
mConnection.disconnect();
return resultSet; -
hi
sdn experts,
could you please explain about value mapping?
where the value mapping is used?
thanks in advance.Hi Chinna Rao,
Value mapping means mapping the data of some source fields to some target fields, in this mapping data can be transform in the format you required for your target system. You can do a value mapping simply by graphical mapping, using UDF etc
Go thru this thread which talks about value mapping:
Value mapping
Value mapping : value mapping function to map different representations of an object to each other. You save the mapping rules for different objects in a value mapping table.
we have two types ,
And Value mapping is used to map different representations of an object to each other.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
You can do value mapping both in IR and ID
IR: Message Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
ID: Tools --> Value Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
Value mapping replication: For uploading data from tables, excel sheet etc. into XI
http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
/people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
/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/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Thanks,
Ram
*Pls reward if you find useful
Maybe you are looking for
-
Help. Please on DVD converting
Help. How do I convert/copy a DVD (copy protected) to iTunes to play on my iPad or iPhone any help is appreciated uk based just in case the us stuff doesn't apply over here. Thanks
-
Similar to another post, I was trying to run this query in SQL Server Management Studio 2008 R2 (64 Bit) running on Surface Pro3 Windows 8.1 SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.15.0','Excel 15.0;Database=C:\Users\File.xlsx', 'SELECT * FROM
-
I didn't notice the problem while filming, but after transferring the tape to my computer, I can see that there's flickering in the footage I shot. I think it may be caused by the lighting from the venue. Is there anyway to fix this, with Final Cut P
-
Documentation for Oracle 10gR2 Installation
Hello, I would like to know which document should I download in order to install Oracle 10gR2 on the following system: -HW: IBM System x3550M3 Intel Xeon -SW: Red Hat Linux 5.4 Thanks in advance for you help. Regards, Juan.
-
GFortran integrated into Xcode 4.3.3
I have xcode 4.3.3 fully installed. I have latest gcc fully installed. I have tested gFortran at the command line. I have OSX Lion and related software up to date. Xcode does not ship with any Fortran support but it seems to have the capacity to do s