Mapping dilemma

I'm stuck with this mapping issue and cannot find a way out on my own. It seems rather simple to look at.
In my source file I have a REF tag with several qualifiers(field-type) such as AB, BC, CD, etc. I want to map the value stored in AB to my target field. It's quite possible that AB could be missing at times and in that case I need to map "".
If I use if(with else), with else mapping to "" it maps the next BC value 'cause there seems like no way to set 'keep suppress values' unlike statement if(without else). But if I use if(without else) it gives an error if AB is missing.
Right now my logic is I compare type = 'AB' using stringEquals and if true, then target field = str1. And before I map to target field I use removeContext and splitByValue. I have keeps = false. But this throws an error for the second item set since AB is missing. Only works when all Item nodes have AB present.
Can someone please tell how I can come out of this mess?
Here's my source file -
Source: x_MT
<?xml version="1.0" encoding="UTF-8"?>
<ns:x_MT xmlns:ns="urn:abc.com/IAM">
<Header>
<Label>H1</Label>
<str>00</str>
</Header>
<Item>
     <REF>
        <type>AB</type>
        <str1>140152</str1>
      </REF><Item>
     <REF>
        <type>BC</type>
        <str1>562</str1>
      </REF><Item>
     <REF>
        <type>CD</type>
        <str1>345</str1>
      </REF><Item>
</Item>
<Item>
     <REF>
        <type>BC</type>
        <str1>562</str1>
      </REF><Item>
     <REF>
        <type>CD</type>
        <str1>345</str1>
      </REF><Item>
</Item>
</ns:x_MT>

Hi Parimala,
Directly pass your source field to exists function.
sourcevalue->exists->(true or false)ifwithelse->'ValueMapping'->target.
in ifwithelse (requires three inputs)
1.if - output of exists function
2.then - source value
3.else -constant, say " " (space)
Define a adavanced user defined function say 'ValueMapping'(input for this is ifwithelse output)  with one input parameter.
for(int i = 0; i < a.length; i++ ){
if(a[ i ].equalsIgnoreCase(" ")||
a[ i ].equalsIgnoreCase("") ) {
result.addValue(" ");
}else{
result.addValue(a[ i ]);
Also set the context of your source field to x_MT.
Regards
Anand
Message was edited by: Anand Torgal

Similar Messages

  • External URL Mapping and Full-Text Search Generation

    I have a dilemma,
    I can map external URL all fine e.g.
    <map version="1.0">
    <mapID target="Welcome" url="http://docweb.net/help/test.html"/>
    </map>
    but the html files are not contained in the local directory, and thus the jhindexer is unable to (as far as i know anyway) generate full-text search using the externally linked html files
    also from using a decompiler I have found that you can "force" it to generate the help for external urls (as the indexer prefixes all urls with the "file:" protocol, but I can only get this to work under debug mode, else it gives a heapSpace exception, so I wish to avoid having to do anymore unneccesary digging/decompiling.
    Also just as a gripe, why is most of the java help source code unavailable, and the Indexer seems to be very inflexible (ontop of not having any documentation)

    That's the way it worked in X4 and later versions up but not including RH8. RH8 includes phrase searching in webhelp.
    See www.grainge.org for RoboHelp and Authoring tips

  • Decode Dilemma

    I'm working on particular mapping that requires the use of DECODE after a JOIN. The code generated for SET based processing is correct while that for ROW based processing actually does not compile.
    The offending syntax has the following construct
    var1 := decode(var2,1,True,False);
    Altering the OWB code as follows does the trick
    SELECT decode(var2,1,True,False)INTO var1 FROM DUAL;
    Has anyone encountered such a requirement and resolved this ?
    Thanks,
    Albert

    Thank you all for you feedback. These are my conclusions (have been tested) of the Decode Dilemma.
    1. The Decode function in a transform after a join produces code that does not compile.
    2. Wrapping the Decode function in a function resolves problem 1.
    3. Resolution 2 forces the SQL execution plan from n parallel slaves to a single slave
    ie single threaded thus slowing drastically the mapping performance.
    4. The way we have resolved this ( thanks to all your feedback) is as follows : -
    a. After the join introduce the Decode function in a transform
    b. Introduce the table "dual" from sys
    c. Introduce a join and map the Decode transform and the dual table to this join without a
    where clause.
    Thanks,
    Albert Lateo

  • [ERR]crypto map WARNING: This crypto map is incomplete

    i have PIX 501 ver6.3(5) when i setup VPN i get this error message
    WARNING:This crypto map is incomplete to remedy the situation add a peer and a valid access-list to this crypto map.
    although it seems fine in sh conf command
    but tunnel is not started
    when i review log i found
    sa_request,ISAKMP Phase 1 exchange started

    i could successfully establish VPN with another FW cisco 501 6.3
    but still can't fix my dilemma which i connect to Huawei Eudemon 500‎
    sh isakmp
    PIX Version 6.3(5)‎
    interface ethernet0 10full
    interface ethernet1 100full
    nameif ethernet0 outside security0‎
    nameif ethernet1 inside security100 ‎
    access-list inside_outbound_nat0_acl permit ip host internal IP host name remote internal IP1‎
    access-list inside_outbound_nat0_acl permit ip host internal IP host name remote internal IP2‎
    access-list outside_cryptomap_100 permit ip host internal IP host remote internal IP1‎
    access-list outside_cryptomap_100 permit ip host internal IP host remote internal IP2 ‎
    global (outside) 1 interface‎
    nat (inside) 0 access-list inside_outbound_nat0_acl
    sysopt connection permit-ipsec
    crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac ‎
    crypto ipsec security-association lifetime seconds 3600‎
    crypto map outside_map 100 ipsec-isakmp
    crypto map outside_map 100 match address outside_cryptomap_100‎
    crypto map outside_map 100 set peer remote peer
    crypto map outside_map 100 set transform-set ESP-3DES-SHA
    crypto map outside_map 100 set security-association lifetime seconds 3600 kilobytes 1843200‎
    crypto map outside_map interface outside
    isakmp enable outside
    ‎ ‎
    isakmp key ******** address remote peer netmask 255.255.255.255 no-xauth no-config-mode ‎
    isakmp policy 20 authentication pre-share
    isakmp policy 20 encryption 3des
    isakmp policy 20 hash sha‎
    isakmp policy 20 group 2‎
    isakmp policy 20 lifetime 86400‎
    sh crypto map
    Crypto Map: "outside_map" interfaces: { outside }‎
    Crypto Map "outside_map" 100 ipsec-isakmp
    Peer = remote peer
    access-list outside_cryptomap_100; 2 elements‎
    access-list outside_cryptomap_100 line 1 permit ip host 10.102.0.11 host remote internal IP1 ‎‎(hitcnt=14) ‎
    access-list outside_cryptomap_100 line 2 permit ip host 10.102.0.11 host remote internal IP2 ‎‎(hitcnt=6) ‎
    Current peer: remote peer
    Security association lifetime: 1843200 kilobytes/3600 seconds‎
    PFS (Y/N): N
    Transform sets={ ESP-3DES-SHA, }‎
    Crypto Map: "set" interfaces: { }‎

  • None of my maps app use GPS, triangulation only.

    Thanks in advance for taking a look at this issue.
    I'd like to think I know my way around the iPhone/apple products in general VERY well, but I cannot crack this one.
    I am using an 8gb iPhone 3G that I bought about 10 months ago. Running a fresh "default factory settings" restore of 3.1.2 firmware.
    I do NOT get any GPS. I have full 3G coverage standing outside, clear view of the sky, and all of that...and it still insists on only using triangulation.
    I had the same exact model iPhone on the same firmware in my other hand, and that one was picking up perfectly accurate GPS of the position.
    I've tried the bunch of solutions out there
    -Turning off location services, restarting, turning back on...
    -turning off 3g. opening maps and trying to find my location, then restart 3g...
    None of that works. Which makes me think its a hardware problem. Like I said, it's a fresh Restore and still the issue exists.
    Is it possible that something could be wrong with the hardware?
    If that's the case, I didn't buy an 'extended warranty' or apple care or whatever it is. So now I'm wondering what would they do at the apple store?
    Will they replace it at all, or would I have to buy a brand new iPhone for whatever retail is now w/o contract, $399 or something (since I already have a contract)
    This is quite the dilemma, so I appreciate all the help you guys might be able to provide!

    Certainly could be a problem with the GPS radio in the iPhone. An Apple Store could confirm that. They don't 'repair' them, per se - warranty service means you get handed a new (refurbished, generally) iPhone at the Genius Bar. If you're out of warranty but your iPhone is undamaged, you are eligible for Out-of-Warranty Service, meaning you pay $199 for a replacement iPhone of the same model you have.

  • Graphical Map - Layers - JButton

    I have a map made up of a JScrollPane that contains a differing number of JButtons in a gridlayout. Each grid sector needs to allow the user to zoom in and this is why I have used JButtons. I load an Icon into the JButton and use setToolTipText to add location data. This gives a nice visual map that is inter-actable, but lacks visual depth.
    The query I have is that I need to have multiple layers so that semi-opaque graphics can be used to add more visual information to the map, which is better than creating millions of unique individual little icons.
    Is there a way to add layers to a JButton?
    If not is an alternative method someone can recommend that I can take to resolve this dilemma?
    Cheers in advance

    Solution
    I initially thought the issue was solved based on my response listed below the astericks; however, the real solution is making sure that the "Save Data with Report" option is checked under the file menu before you save the document.
    So I found out the answer via SAP support. Although the map component was installed and I could insert a map into Crystal Reports, I didn't realize I had to register the dll files for the map component as well.  Here are the steps to register the dll files:
    1) Close Crystal Reports (I am using Crystal Reports 2008 SP3 on a Windows XP SP3 machine)
    2) Navigate to C:\Program Files\Business Objects\MapInfo MapX\Program
    3) Click on the migm30.exe file (Geodictionary Manager pops up)
    4) Under "Registered Tables" column select the item you need to register (i.e. "USA") - (I haven't verified this, but you may need to select each item (i.e. Mexico, Asia Capitals, Europe, etc.), you want to register individually and complete steps 5 - 7 below)
    5) Click "Register" from the column on the right
    6) Okay this part is weird ("Open MapInfo Table" pops up) select the .tab file you need to register and click open
    - Error message appears (MapInfo Geodictionary Manager: Map layer is already installed in the data dictionary.)
    7) Click "Ok"
    8) Click "Exit" and you should be all set.
    I hope this helps.
    Edited by: johnlo on Mar 10, 2011 10:27 PM

  • Hello.  I am using Breeze text editor on my macbook.  To exit the editor I need to use "keypad 8".  Is there a way to map this to the keyboard or a series of shortcut keys?

    Hello.  I am using Breeze text editor on my macbook.  To exit the editor I need to use "keypad 8".  Is there a way to map this to the keyboard or a series of shortcut keys?

    I have found the solution for myself for the above.  I use a specific scripting program which is accessed by Control A. To pause it, you need to use Control B. not sure if this would work for any other application but it resolves my dilemma after hours of trying!

  • Map all SAP entities

    Hello Guys,
    I am just in a Dilemma. My company is a product (Middle-ware software) based company, Which has been thru ‘XI’ and ‘EP-BP’ certifications. After that I have got my first Duty to do. The duty is to “MAP all the SAP entities” .
    To make the thing simpler-
    <b>Explain the full network of SAP and a SAP certified software product.</b>
    Can you explain me or get me some details?
    I am a fresh certified SAP consultant I am confused in this. Please help.
    Thanking you all in advance
    Regards
    AK

    Hello Gregor,
    I had Visited the URL that you gave me http://service.sap/pam
    They asked me to enter the username and password for the service-market place...But when I entered the username and pw...an error came...
    What happened?
    The Url is not defined as Alias
    What can you do?
    Check the spelling of the Url
          Error code: WEBSMP102-20070604071751-0036
          Error details: 2491D7E-702/1A00C/3162-71A9CFB9-3CB9265-2992F9
          Service Name: ALIAS
          Service Server: WEBSMP102
          Process-ID: 1000
          Thread-ID: 5532
    This was the error could you just help me..
    Thanks..
    Take care
    Regards
    AK

  • Remote System and Remote Key Mapping at a glance

    Hi,
    I want to discuss the concept of Remote System and Remote Key Mapping.
    Remote System is a logical system which is defined in MDM Console for a MDM Repository.
    We can define key mapping enabled at each table level.
    The key mapping is used to distinguish records at Data Manager after running the Data Import.
    Now 1 record can have 1 remote system with two different keys but two different records cannot have same remote system with same remote key. So, Remote key is an unique identifier for record for any remote system for each individual records.
    Now whenever we import data from a Remote System, the remote system and remote key are mapped for each individual records. Usually all records have different remote keys.
    Now, when syndicating back the record with default remote key is updated in the remote system that is sent by xml file format.
    If same record is updated two times from a same remote system, the remote key will be different and the record which is latest contains highest remote key.
    Now, I have to look at Data Syndication and Remote key.
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back. But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    Regards
    Kaushik Banerjee

    You are right Kaushik,
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back.
    Yes, but if they are duplicate, they needs to be merged.
    But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    This is after merging. So whichever remote key has tick mark in key mapping option(default) , it will be syndicated back.
    Pls refer to these links for better understanding.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/80eb6ea5-2a2f-2b10-f68e-bf735a45705f
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/7051c376-f939-2b10-7da1-c4f8f9eecc8c%0c
    Hope this helps,
    + An

  • Error while deleting a mapping

    Hi all,
    I am getting the following error while deleting a mapping. My client version is 10.2.0.4.36
    API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    oracle.wh.util.Assert: API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
         at oracle.wh.util.Assert.owbAssert(Assert.java:51)
         at oracle.wh.ui.jcommon.OutputConfigure.showMsg(OutputConfigure.java:216)
         at oracle.wh.ui.common.CommonUtils.error(CommonUtils.java:370)
         at oracle.wh.ui.common.WhDeletion.doActualDel(WhDeletion.java:512)
         at oracle.wh.ui.common.WhDeletion.deleteObject(WhDeletion.java:203)
         at oracle.wh.ui.common.WhDeletion.deleteObject(WhDeletion.java:283)
         at oracle.wh.ui.jcommon.tree.WhTree.deleteItem(WhTree.java:346)
         at oracle.wh.ui.console.commands.DeleteCmd.performAction(DeleteCmd.java:50)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Thanks in advance!
    Sebastian

    These type of Internal Errors are all too common in OWB and it's difficult to diagnose the exact problem.
    I'd suggest closing the Design Centre, going back in and trying to delete it again, this will often resolve Internal errors.
    There's also an article on Metalink Doc ID: 460411.1 about errors when deleting mappings but it's specific to an ACLContainer error, so may or may not be of use.
    One of the suggestions is to connect as the Repository Owner rather than a User and try to delete the mapping.
    Cheers
    Si
    Edited by: ScoobySi on Sep 10, 2009 11:44 AM

  • FileName in ABAP XSLT Mapping

    Dear SDN,
    In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
    Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    but the following error raised:
    <SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
    have you had this situation?

  • Sample source code for fields mapping in expert routine

    Hi All
    Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2
    same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be heighly appreciatble,it's an argent.
    regards
    eliaz

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • How can I distinguish different action mapping in one ActionClass file?

    I would like to create a ActionClass which will handle 3 mapping which comes from /add, /show or /del.
    My question is how can I change the code so that the ActionClass servlet can distinguish the request from different url mapping ? Can anyone give me some short hints? Thx.
    struts-config.xml
    <action-mappings>
    <action name="MemberInfoForm" path="/add" scope="request" type="com.myapp.real.MemberAction">
    <action name="MemberInfoForm" path="/show" scope="request" type="com.myapp.real.MemberAction">
    <action name="MemberInfoForm" path="/del" scope="request" type="com.myapp.real.MemberAction">
    </action-mappings>MemberAction.class
    public class MemberAction extends org.apache.struts.action.Action {
        private final static String SUCCESS = "success";
        public ActionForward execute(ActionMapping mapping, ActionForm  form,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {
            return mapping.findForward(SUCCESS);
    ...

    http://struts.apache.org/1.2.x/api/org/apache/struts/actions/MappingDispatchAction.html
    http://struts.apache.org/1.2.x/api/org/apache/struts/actions/DispatchAction.html
    Thank you so much for all of your suggestion.
    I read the document of MappingDispatchAction and its note say:
    NOTE - Unlike DispatchAction, mapping characteristics may differ between the various handlers, so you can combine actions in the same class that, for example, differ in their use of forms or validation.........
    I wonder in DispatchAction, we can also have various forms or validation as MappingDispatchAction does, just by using different name in the action tag, for example:
    <action input="/p1.jsp" name="MForm1" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">
    <action input="/p2.jsp" name="MForm2" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">
    <action input="/p3.jsp" name="MForm3" path="/member" scope="session" parameter="action" type="com.myapp.real.MemberAction">Hence, it is not the difference as stated from the NOTE, right?
    Edited by: roamer on Jan 22, 2008 10:32 AM

  • How can I save to the same map every time when printing pdfs?

    How can I save to the same map every time when printing pdfs?
    Finder points to the document map even when I chose a different map recently.
    I often print series of pdfs from the print dialog box, I'd like to choose the map to save to and then have all subsequent pdf prints automatically directed to the same map until I decide otherwise.

    that link seems to be broken right now:
    403 Error - Forbidden  - No cred, dude.

  • Sensor Mapping Express VI's performanc​e degrades over time

    I was attempting to do a 3d visualization of some sensor data. I made a model and managed to use it with the 3d Picture Tool Sensor Mapping Express VI. Initially, it appeared to work flawlessly and I began to augment the scene with further objects to enhance the user experience. Unfortunately, I believe I am doing something wrong at this stage. When I add the sensor map object to the other objects, something like a memory leak occurs. I begin to encounter performance degradation almost immediately.
    I am not sure how I should add to best add in the Sensor Map Object reference to the scene as an object. Normally, I establish these child relationships first, before doing anything to the objects, beyond creating, moving, and anchoring them. Since the Sensor Map output reference is only available AFTER the express vi run. My compromise solution, presently, is to have a case statement of controlled by the"First Call" constant. So far, performace seems to be much better.
    Does anyone have a better solution? Am I even handling these objects the way the community does it?
    EDIT: Included the vi and the stl files.
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:16 PM
    Solved!
    Go to Solution.
    Attachments:
    test for forum.vi ‏105 KB
    chamber.zip ‏97 KB

    I agree with Hunter, your current solution is simple and effective, and I can't really visualize a much better way to accomplish the same task.
    Just as a side-note, the easiest and simplest way to force execution order is to use the error terminals on the functions and VIs in your block diagram. Here'a VI snippet with an example of that based on the VI you posted. (If you paste the image into your block diagram, you can make edits to the code)
    Since you expressed some interest in documentation related to 3D picture controls, I did some searching and found a few articles you might be interested in. There's nothing terribly complex, but these should be a good starting point. The first link is a URL to the search thread, so you can get an idea of where/what I'm searching.You'll get more hits if you search from ni.com rather than ni.com/support.
    http://search.ni.com/nisearch/app/main/p/q/3d%20pi​cture/
    Creating a 3D Scene with the 3D Picture Control
    Configuring a 3D Scene Window
    Using the 3D Picture Control 'Create Height Field VI' to convert a 2D image into a 3D textured heigh...
    Using Lighting and Fog Effects in 3d Picture Control
    3D Picture Control - Create a Moving Texture Using a Series of Images
    Changing Set Rotation and Background of 3D Picture Control
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

Maybe you are looking for

  • Can't change Apple ID on all devices

    I changed my Apple ID on my iMac from an att.net ID to a gmail ID-that worked fine.  All is well in iCloud, etc for the iMac. Now, I want to change my iPhone6 and iPad, but they are still asking me for the password for the att.net account. I did mana

  • My WiFi signal takes 60 Seconds for MacMini to see

    I just upgrades to Snow Leopard last week from Leopard. Leopard found and recognized my Airport Extreme as my primary WiFi very quickly after waking up/starting MiniMac. Now, with Snow Leopard, my MacMini sees a neighbor's signal fairly quickly, but

  • What are the steps follows after creation of holiday calender,......

    Hi Experts.... I have created Holiday calender for the year 2008 and successfully tranported to production server.What are the further things to be done to get complteness... Please advice.... Regards, Sai.

  • How to watermark or sign a photo

    how to watermark or sign a photo

  • IPhone 6 music library keeps being deleted

    Every time I connect my iPhone to my Mac my music library vanishes off my phone except previously purchased songs. I have reinstalled iTunes 12 and restored my phone but it keeps happening. I have my iTunes set to manually manage my library. I will s