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;

Similar Messages

  • Fixed value mapping

    Any one there to explain me what is fixed value mapping Coz when i used LOOK UPS , they told me you can used fixed value mapping instead of it , as i was having only to values , please send me a detail explanation abt it thanking you
    sridhar

    There is a lot of difference between fixed value mapping and Lookup:
    Fixed value mapping is used when you need to populate the some differnt target value based on some inpur value.
    Take example
    I have used fixed value M:
    My input is ABC
    Now for this input I wanted to poupulate some different values.
    Suppose when A comes in File it should map the target value to America.
    When B come it should map to Belgium
    and C -> California
    Now come to Looup:
    What is Lookup and why we need:
    Within an XI mapping it is a common requirement to be able to perform data lookups on-the-fly. In particular, there may be a need to look up some data that is maintained in an R/3 application.
    In the error handling topic we have seen the different validations which need to be performed on file. This can be done through Lookup.
    Some use cases:
    • Look up material number from table MARA.
    • Look up cost center budget.
    • Look up employee information.
    • Look up unit-of-measure (UOM) information from table t006a.
    • Lookup for raising an alert.
    The purpose of the lookup may be:
    • To perform application-level validation of the data, before sending it to the backend.
    • To populate fields of the XML document with some additional data found in the backend application.
    This is a form of value transformation.
    The "value mappings" offered by XI are not adequate in this case, since the data would have to be manually entered in the Integration Directory.
    There are two ways in which we can do lookup:
    • Call lookup method from GUI mapping.
    • Call lookup method from XSLT mapping.
    I think u got ur answer
    Thnx
    Chirag

  • Fix Value Mapping Problem

    Hi All
    I am doing a fix value mapping for a perticular field.I am getting a value say Y001 from the client system which i convert it to Z001 in my system. I tested the XML in the message mapping test tab.It is giving proper result.But at the output file i am getting the same value of Y001 instead of Z001.Can anyone please provide any inputs on this.
    Thanks
    Amit

    HI,
    Please chek the imput values..
    Sure if you fix the value in Fix Value mapping then you will get the resukt value otherwise empty.
    Please see the below links
    value mapping - /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    Value mapping /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    Regards
    Chilla..

  • How to perform fixed value mapping in XSLT?

    Hi All,
    Kindly guide me to do a XSLT mapping for fixed values (done in graphical mapping)
    eg: if  Band         Role
                A             JSE
                B               SE
      and so on.
    Kindly help me out to implement the above logic using xslt.
    Thanks
    Deepika

    Hi,
    Please find the links below.
    xpath functions in xslt mapping
    Design time Value-mappings in XSLT
    File to Multiple IDocs (XSLT Mapping)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    Regards,
    Phani

  • Domain Value Shot Description instead of Fixed Value

    Hi Everyone,
    I am having a peculiar issue in Passing domain values from ABAP webdynpro to Interactive forms.
    The scenario is as given below.
    1> Interactive form is only for display purpose.
    2> Passing fields from a Z structure in interactive forms interface.
    3> Certain fields in the Z structure are having data elements which are linked to domains.
    4> The domains mentioned in point number 3 are having fixed values as well as short descriptions.
    5> Fixed values are stored in the tables in R/3 and not short descriptions.
    6> I want to display the Short Description in Interactive forms as a text box and not a dropdown value. Since it is just for display purpose, i dont want to display a dropdown value. Currently The fixed values are getting displayed.
    I wanted to know if there is some way to do this without using Code.
    I have quite a lot of fields and for all of these fields if we select values from dd07t table, Performance would be severely affected.
    Please let me know if someone has any suggestions. If you need any more clarifications don't hesitate to ask.
    Thanks in advance and Warmest Regards
    Mz

    Hello Robert,
    Thanks for your prompt reply.
    Let me try to clarify a bit more.
    As mentioned by you, let us suppose that i have a field ZBUKRS with the domain ZZBUKRS having the same fixed values.
    In case of Webdynpro ABAP, if i create a dropdown and bind this domain (ZZBUKRS) to the dropdown, when i run the report, i see the short descriptions in the dropdown. When selecting a value, the Fixed value is automatically selected for the selected short description. There is no need to go in for seperate coding to acheive this.
    I was wondering, is there any way that a similar thing can be acheived in interactive forms without doing the coding. I know that we can use the FM 'STF4_GET_DOMAIN_VALUE_TEXT'. But since i have a large number of domains, i will have to use this repeatedly.
    Hope i have not confused you
    Please let me know if any further clarifications are required.
    Thanks & with warmest regards,
    Mz

  • XI Fixed Value Mapping - Mass function?

    Is there a quick way to upload 350 fixed value to value mappings in XI 7.0 (or 3.0)??
    Short of pasting in one entry at a time!
    Is SAP going to develop a more user friendly alternative to this painstaking task?

    > Hi,
    >
    > >>>>Is there a quick way to upload 350 fixed value to
    > value mappings in XI 7.0 (or 3.0)??
    > Short of pasting in one entry at a time!
    >
    > if you talk about fixed values (in message mapping)
    > then
    > you need to go one by one I'm affraid
    >
    >
    > >>>>Is SAP going to develop a more user friendly
    > alternative to this painstaking task?
    >
    > who knows... maybe in next relase
    >
    It is fixed values in mapping!
    I was afraid of that...  I had been putting off the inevitable!
    Is there anyway we can put forward a request (for change) to SAP to change this in a later release??
    This is not the first time I have had to this, and I am sure, it won't be the last, or that I am the only person who has had to do this!

  • Fixed Values and Value Mapping

    Hi Experts,
         I hav a doubt regarding these to funnctions in Messege mapping. In both teh functions , we can change a value coming from Load to some thing else.
    Like
    A=1
    B=2
    C=8.
    The difference i hav noted is the in case of fixed values, we can assign the valsues in the messege mapping itself, and in case  of value mapping it is assigned in the value mapping table  in integartion directory, and thsi can be seen through  Runtime Workbench in Cache Monitering. . Apart from that there seems to be no big significat difference in the application .
    Pls correct me , if I ma missing out something.
    Pls tell me if both hav the same functionality, why were these 2 functions made , any 1 of them, preferably Value Mappimg Function could hav been enough.
    Regards,
    Arnab.

    Hi
    Fixed value mapping is Message mapping Specific
    But Value mapping allows u to create a Schema and group .
    Value mapping functionality will be well understood in large integration where many mapping programs using same conversions.
    Maintain advantage is maintance is easy with value mapping because if any chnages in value , just ID change is enogh no need to go mapping but this is not with fixed value
    For instance if u r using Fixed value in 50 mapping programs u need to change in all
    But if u r using Value mapping just one ID
    Which one u prefer
    all based upon u r landscape for mapping
    Srini

  • Message Mapping - fixed values - not mapping

    Hi
    i have a simple fixed values mapping that is not producing anything.
    the input value can be 'Y' , 'N' , or a blank.
    The fixed value mapping is setting these input values to 'Yes', 'No', and 'No'
    however when i test this, nothing is getting mapped to the output record for this field.
    can someone tell me why?
    many thanks,
    Julia

    Hello,
    What happens when you use this logic?
    Source -> mapWithDefault: -> fixValues -> Target
    Configuration for fixValues would be:
    DefaultValue: No
    BehaviourLookUp: Use Default Value
    key             value
    Y                Yes
    Hope this helps,
    Mark

  • Value mapping does not work

    Hi All,
    I can not get value mapping in XI 3.0 to work. Has anyone experience with this, the documentation is soo bad. This is what I have done:
    In the Graphical mapper I used the object "Value mapping" and filled in the following parameters:
    Value mapping context: http://sap.com/xi/XI
    Source
    Agency: System1
    Schema: UnitSystem1
    Target
    Agency: System2
    Schema: UnitSystem2
    In the directory I created an Value mapping table with the same paremeters as above and filled in the table.
    When I test the complete flow, the value mapping is not used. The unchanged values are just copied over to the target field.
    Any help is appreciated.
    Cheers,
    Frank

    Hi Colin,
    In test Mode you can't test the value mapping, because the value mapping table is part of the Directory. Instead of the Value Mapping I tried "Fixed Values" and that works, but you can not re-used it.
    If this advanced mapping guide explanes how to use the value mapping better then the standard "how to" mapping guide, please send it to me.
    email: [email protected]
    Cheers,
    Frank

  • Fix Values Standard Function

    Hi
    My question is regarding the standard function Fix Values :
    There is a Table where a field from the Legacy File ,if has a value X then 123 has to be passed to ERP and so on .....
    I want to use Fix Value (key-Value Pair) in the same , but the limitation is that there are 200 such combinations
    Is it advisable to manually fill these or is there a way that it can be accomplished in SAP XI  deriving it from an excel sheet or somewhere?
    The same are not stored in SAP and thus can't be looked up  !
    Kindly advise if there is an alternate if the Key value pairs are of large number of the order say 500 etc
    Thanks
    Dev

    >
    sd wrote:
    > Hi
    >
    > My question is regarding the standard function Fix Values :
    > There is a Table where a field from the Legacy File ,if has a value X then 123 has to be passed to ERP and so on .....
    >
    > I want to use Fix Value (key-Value Pair) in the same , but the limitation is that there are 200 such combinations
    > Is it advisable to manually fill these or is there a way that it can be accomplished in SAP XI  deriving it from an excel sheet or somewhere?
    >
    the best is to go for a value mapping instead of fixed values when the count is high
    > The same are not stored in SAP and thus can't be looked up  !
    >
    > Kindly advise if there is an alternate if the Key value pairs are of large number of the order say 500 etc
    >
    > Thanks
    > Dev
    For mass loading of values, value mapping replication can be used - /people/udo.martens/blog/2009/04/03/value-mapping-replication-scenario

  • Reg:Value Mapping Replacment

    hi friends
    i need to design a scenario using value mapping .i have nearly 600 records to be replaced but i observed in the configuration part that we have to enter all the values manually which is not prefferable for 600 records. so is there any alternative to place the values like copy paste from excel sheet.
    regards
    suman

    Hi,
    >so is there any alternative to place the values like copy paste from excel sheet.
    there is something called value mapping mass replication
    it's an interface for value mapping table
    and you can use it in your own abap report that will
    process excel files
    but remember you will not see those values in ID
    you can only view them from RWB but they will work
    in standard value mappings
    but I'd suggest doing a normal lookup and not using value mapping tables at all
    Regards,
    Michal Krawczyk
    https://mypigenie.com XI/PI FAQ

  • How to associate a fixed $ value to a date cell?

    I'm trying to keep track of payments made, according to date.
    I have one column where I enter dates.
    Can I associate these date cells to a fixed $ value, so that each time I enter a new date the SUM cell will automatically update?
    I hope so...
    Thanks!

    HI cp,
    By "associate these cells to a fixed $ value," I assume you mean that fixed value will be added to the sum as each date in sentered.
    Here are two examples, one showing the fixed amount in the adjacent column when the date (or anything) is entered in column A, the other showing only the total.
    Both use a second table to hold the fixed value, making it easy to edit, if necessary.
    Formulas:
    (Method 1)
    B2, and filled down to B10: =IF(LEN(A)>0,Fixed value :: A$2,"")
    LEN(A) returns the length (in character) of the entry in the cell in this row of column A. If anything is entered, the IF condition is TRUE, and IF returns the value in A2 of the smaller table. If nothing has been entered, the condition is FALSE, and IF returns a null string to the cell.
    B11: =SUM(B)
    Row 11 is a Footer row, and is not included in the cells to be summed.
    (Method 2)
    D11: =Fixed value :: A2*COUNTA($A)
    COUNTA counts the number of entries in column A of the Main table, then multiplies the fixed value in the small table by the result of the count and returns the result.
    This formula may be placed in any cell.
    (Both methods)
    The cell reference to Fixed Value::A2 (or Fixed Value::A$2) may be replaced with the actual value, and the second table eliminated, if desired.
    Regards,
    Barry

  • How to read Group ID from Value Mapping Context in Cache Monitoring ?

    Hi friends,
        In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
        Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU....  For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code)  which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
        So, in essence, how to read the GUID from value mapping context.
        Friends, Kindly help me to do this.
    Thanks in advance.
    Jegatheeswaran P.

    Did you get the way to read group id?

  • Value Mapping  Transport Problem

    Hi All,
    I hv some value Mapping Values  in my XI Devvelopment system while i am transporting these values to the XI Quality System  all Development values are able to transport but,some values are duplicating.aferter that
    In  XI Production System newly added values are not transported eventhough imported Sucessfully.
    I was tryed two transport systems i.e CMS & File System.
    Plz, help me to solve this is....
    Thanks
    Mahesh

    Hi Mahesh,
    while value mapping make sure that u refresh the run time cache
    in value it uses another table that which helps in value mapping
    make sure that even that table is imported if any doubt pls chk this link
    value mapping uses values from the cache so you can you value
    mapping replication for your purpose - but you will not
    see those values from ID
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    if found  worth pls do reward points
    Thanx
    Sampath
    Edited by: venkata sampath on May 29, 2008 11:15 AM

  • Value Mapping replication GUID Logic

    HI,
    We are doing Value Mapping replication from ECC table entries to Pi Runtime Value Mapping cache.
    We are generating the Group ID required for Value Mapping from ECC.
    Here we are confused with the logic for GUID Generation.
    At first I thought the driving factors are -- if there is already an entry for the same Source Agency, Source Scheme, Target Agency, Target Scheme and Target Value then it should go in the same group id, else a new gr id needs to be generated.
    However it looks like that is incorrect.
    Can somebody help us on what should be the logic for generating group id for Value mapping replication.
    We have the scenario where the same source Agency, Scheme ,Value maps to multiple target Schemes... and it is not working if we have different Group ids...
    Thanks,
    Himadri

    > We have the scenario where the same source Agency, Scheme ,Value maps to multiple target Schemes... and it is not working if we have different Group ids...
    If you want to have multiple targets, then you have create pairs with unique GUID
    like this:
    A - 1 GUID X
    A - 2 GUID Y
    A - 3 GUID Z
    The standard value mapping function does not work, when you have multiple targets. It will not return an entry.
    You have to create a UDF for this purpose. You need to identify which target do you want to select from different values.
    An UDF could look like this extract:
    IFIdentifier source = XIVMFactory.newIdentifier(source_context,source_agency,source_scheme);
    IFIdentifier target = XIVMFactory.newIdentifier(target_context,target_agency,target_scheme);
    IFRequest request = XIVMFactory.newRequest(source,target,sourceValue);
    try{
      IFResponse response = XIVMService.executeMapping(request);
      if (response.countTargetValues() > 0){
        String[] targetValues = response.getTargetValues();
    // take first value of result
         return targetValues[0];
    This example is taken from PI 7.1
    Edited by: Stefan Grube on Oct 22, 2010 9:32 AM

Maybe you are looking for

  • How do I add a speed dial to my iphone with a pause in it to dial an extension?

    I can make an icon for a speed dial, but it will not allow me to use a comma as a pause to dial an extion to the phone number.  Example: phone number being dialed is 507-555-555 (pause) extension: 55555  http://5075554444,12345.tel.qlnk.net is what I

  • Revised Schedule VI Depreciation related changes in SAP?

    As per Revised Schedule VI requirements related to Depreciation accounting, each and every asset has to be depreciated at individual asset depreciation rates instead of the Asset class. How would this be adjusted in SAP?  Do we need to create new Dep

  • Sap script - please use meaningfull subject titles....

    Hi, My requirement is to print theree texts in theree different lines.So I declared the texts in SAP script with the command "/". Buut in spool I am getting all the three texts in one single line.Can anyone suggest how to get the texts in three diffe

  • JSP with MYSQL 4.0

    May i know is JSP works well with MYSQL 4.0 database?

  • How to connect to SAP DB2 server in Biztalk 2013

    I have Biztalk 2013 server installed.I have installed all the adapters installed during the instllation wizard. But I am not able to find the Db2 adapter in consume adapter metadata option. Can someone suggest what i am missing ot how to consume it ?