How to build such mapping?

Hi XIer,
I am currently working on such mapping requirement as following:
source structure:
<MT_SRC>
  <row> -
1 to unbounded
     <ID>001</ID>
     <Name>Jonathan</Name>
     <Age>27</Age>
     <***>M</***>
     <JobCode>123456</JobCode>
  </row>
  <row>
     <ID>002</ID>
     <Name>James</Name>
     <Age>25</Age>
     <***>M</***>
     <JobCode>127890</JobCode>
  </row>
</MT_SRC>
I need to check field <JobCode>, if it is starting with "123", I need to create 2 entries in the target structure, and put "SAP" and "Programmer" into field <Cate>, else, just put "No Cate" in to field <Cate> as following:
<MT_TAR>
  <row>
    <ID>001</ID>
    <Name>Jonathan</Name>
     <Age>27</Age>
     <***>M</***>
    <Cate>SAP</Cate>
  </row>
  <row>
    <ID>001</ID>
    <Name>Jonathan</Name>
     <Age>27</Age>
     <***>M</***>
    <Cate>Programmer</Cate>
  </row>
  <row>
    <ID>002</ID>
    <Name>James</Name>
     <Age>25</Age>
     <***>M</***>
    <Cate>No Cate</Cate>
  </row>
</MT_TAR>
Could you please let me know how can I do this? thank you for your time

Hi Qi,
This can be achieved using user defined function.
Try this code;
(send sourceEmpid as input)
String empId = new String();
empId = sourceEmpid.substring(0,3);
if(empId == "123")
empId = "SAP";
else
empId = "Employee"
return empId;
You can achieve using even graphical mapping also.
empId -> substring(0,3) | equals(true)
         constant "123" |
direct equals to ifthen block set properties true
if true constant"SAP" -
> result field
else
        constant"Employer"-----> result field
Message was edited by:
        Ramesh Parashivamurthy

Similar Messages

  • About how to build dynamic maps using jdeveloper 10g and mapviewer

    i follow the guidance (about how to build dynamic maps using jdeveloper 10g and oracle application server mapviewer) to write a jsp file,but error take palce ,i get information "Project: D:\jdev1012\jdev\mywork\WebMap\ViewController\ViewController.jpr
    D:\jdev1012\jdev\mywork\WebMap\ViewController\public_html\WebMap.jsp
    Error(12,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,190): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,102): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,28): cannot access class oracle.lbs.mapclient.MapViewer; file oracle\lbs\mapclient\MapViewer.class not found
    Error(12,40): cannot access class oracle.lbs.mapclient.MapViewer; file oracle\lbs\mapclient\MapViewer.class not found
    Error(13,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(13,198): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(13,106): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(14,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(14,188): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(14,101): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(15,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found
    Error(15,200): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found
    Error(15,107): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found"
    can you help?
    greetings

    I found a lot of information in document 133682.1 on metalink.
    step by step example how to deploy a JSP business component application.

  • How to build a measurement system using NI products and the system is outside PC

    I would like to build a system that uses NI's following products:
    1. Wave form generator
    2. Switches
    3. A/D board
    My question is: How to build such a system such that
    the system is outside PC? For example, the system is
    like an ordinary instrument that can be connected to
    PC through RS 485 port.
    Thanks!

    If you are planning on using SCXI, you have two options. You can still use the PXI-1000B chassis, and you will need to connect your DAQ board to the SCXI system with a cable.
    You can also consider using a PXI-1010 or PXI-1011 chassis. We call them combo chassis because they come with some PXI slots and they have an SCXI chassis attached to them. In this chassis, you can connect your DAQ board in the PXI slot closest to the SCXI chassis, and the DAQ board will communicate with the SCXI chassis through the internal PXI backplane, so you will not need to connect them through a cable. The PXI-1010 chassis has 8 PXI slots and 4 SCXI slots, and the PXI-1011 chassis has 4 PXI slots and 8 SCXI slots.
    The MXI-3 extender will let you control any PXI chas
    sis from a desktop. Keep in mind that there are two interfaces: the PCI-PXI-8330, which uses a copper cable, and the PCI-PXI-8335, which uses a fiber optics cable. The advantage of the fiber optics cable is that it is less likely to have noise and the PXI chassis can be up to 200 meters away from the computer.
    Now, given that your signals have a 150V amplitud, you will need a SCXI-1127 module instead of a PXI-250x.
    Finally, we do not have an amplifier in PXI form that can read a 50 KHz - 300 KHz and peak voltage 5v, and amplify it to 120v. However you could check other PXI vendors for those boards. You can find some information of third party vendors by going to the NI Developer Zone and clicking on the Third Party Product Advisor link on the left.
    Hope this helps,
    Claudia Lorente
    Applications Engineer
    National Instruments

  • How to build an editor

    I am going to build an editor with which I want to be able to create document-templates. These templates should be stored as XML. These XML-Files will later be transformed into XSL:FO and then into PDF with FOP.
    So I am really interessted in how to realize the user interface in a way that the user can drag&drop (if possible) elements and so on.
    What I'm thinking of is a surface that (for example) an UML-editor has. (Just to make it clear.)
    Can anyone give me some clues on how one builds such a graphical surface. Are there editorkits or some kind of apis that I can use? Or what is the normal way of building such applications?

    Hehe, so your question is, can someone provide you with the source code for such an application? Um.....
    Try narrowing the scope of your question some.

  • How to build a query to join on two tables without mapping

    I did Automatic mapping by the workbench Directofield mapping with the table and java object.
    Wanted to build a simple join query by joining on the same field on both the tables.Not the sql query through the toplink using expression builder.
    Please help.............
    Spent one full day for this................

    Thanks Don for the reply,sorry to bug you,but i need help.....
    SELECT A.AGNCY_C,
         A.TYPE_C,
         A.RESN_C,
         A.S_TYPE_C,
         A.SUB_ID_C,
         A.RY_C
    FROM RATING A, REF B
    WHERE A.ID_C = B._ID_C
    AND A.ALPHA_C = B.ALPHA_C
    AND A.EFF_D >= B.MATURITY_D
    This is the real query i was talking about.I did mapping automatically through the workbench,generated java classes also throught the workbench.
    Now they don't want to execute the raw sql.They wanted to get all the RATING objects with the where condition.
    So how to build a query by using toplink.
    tried your example
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression creditRating = builder.getTable("RATING").getField("ID_C");
    Expression issue_ref = builder.getTable("REF").getField("ID_C");
    Expression join = creditRating.equal(issue_ref);
    I am getting java.lang.OutOfMemoryError
    error.
    I selected the option generate classes and descriptors
    from the tables (RATING,REF).,so it created the classes and dscriptors automatically.
    In Database script for the table RATING like this
    ALTER TABLE RATING ADD (
    CONSTRAINT RATING_F1 FOREIGN KEY (ID_C, ALPHA_C)
    REFERENCES REF (ID_C,ALPHA_C));
    I think when i generate descriptor automatically it is keeping this association.
    Please help me.........

  • How to build a search engine in the database?

    Hi there,
    say I have 3 tables:
    1. Table_empl: idEmpl, fname, lname, dob...
    2. table_department: idDpartment, idEmpl, departmentName, section...
    3. table_fligths: idFlight, idEmapl, departure date, destination, carrier...I would like to provide the end-user a text box (in my GUI) where he can write whatever he would like to get info about. If, for example, he'll write: british-airways, I expect the system to search everything in the db that matches this input.
    Question: How can I design such a search engine that retrieve information from every possible table in the db with reference to every column.
    thanks for any pointers

    thanks darted for your reply. so what do you recommend? should i give the end user all names of tables and columns and ask him to choose from the list and than build a query based on that?
    this is optional but i'd rather have one exec button and to return all possible results from the db. if (in the example i provided) it found 'british airways' in the carrier - than that a result. if it founds 'british' in the lname of table_emple - that's another result. so the output should be something like:
    found 2 matches:
    1. british airways, 10/10/2006, LHR
    2. British, John, 12/01/63,
    any idea how to build that?

  • How to build my own SELECT-OPTIONS?

    Hi experts,
    I hv 4 values like for a field, (say VBAK-BNAME),
    NAME_A
    NAME_D
    NAME_M
    NAME_Z
    My selection- screen is like,
    SELECT-OPTIONS: MANAGER FOR VBAK-BNAME.
    So,
    1) How to build the SELECT-OPTIONS table in my ABAP code?
    I mean, if the user enters the NAME_A TO NAME_Z in select-options, the system shuld take in-between NAMEs also!
    (Actually, I thiught that, the SAP will take care of building the select-options table based on Alphabetical Order, but, When I observed in debug mode, its not like that!)
    2) And Where I hv to write the code for building select-options? I mean, Is it DATA DECLARATION part, AT SELECTION SCREEN or AT SELECTION SCREEN OUTPUT or START OF SELECTION?
    thanq.
    Message was edited by:
            Sridhar
    Message was edited by:
            Sridhar

    Hi,
    Pls. suggest me other than RANGES?
    Well, if you don't want to use RANGE then you can do it at SELECT statement.
    SELECT BNAME
    INTO TABLE ITAB
    FROM VBAK
    WHERE BNAME IN ( NAME_A, NAME_D, NAME_M, NAME_Z )
    OR
    SELECT BNAME
    INTO TABLE ITAB
    FROM VBAK
    WHERE BNAME BETWEEN 'NAME_A' AND 'NAME_Z'.
    2) under which event i hv to write it?
    If you are using in SELECT statement, then you use at START-OF-SELECTION.
    If you are buiding RANGE, then you can use at any events such as INITIALIZATION, AT SELECTION-SCREEN OUTPUT, START-OF-SELECTION, etc.
    Regards,
    Ferry Lianto

  • How to create interactive map in SAP Visual Business using SAP UI5 SDK

    Hi,
    Please tell me,
    How to create interactive map in SAP Visual Business using SAP UI5 SDK.
    Is it possible to create interactive map using VB Control in SAP UI5 SDK..?
    if possible please any one let me know.

    Hi folks, one question:
    We have our development close moved and now it is earlier than originally planned. 
    That means that we maybe can't finish our convenient API and you have to wait till we will release it - early 2015 is planned.
    But there is another option:
    Currently we have a API based on json. The developer has to create json and  to transfer it to the Visual Business control.
    This interface is more used as a low level API and we are developing on top the more convenient one. So all the features are the same.
    It will stay stable & compatible in the future and you can build on it.
    Do you want to use this interface?  
    Then I will publish the documentation.
    Let me know.
    Thanks

  • How to build an E-mail sending and receiving application in Windows Azure?

    I am a beginner Windows Azure Developer and I am trying to build applications like Gmail, Hotmail, YahooMail, etc. However, I am unable to build such an application. I have come to know how to send e-mail using SendGrid. Even, I don't know how to configure
    to receive e-mails. Please help me on how to develop such an application in windows azure.
    Regards

    hi Yash,
    Thanks for posting!
    About how to send mail using sendgrid, I suggest you could try this tutorials firstly via smarx's blog(http://blog.smarx.com/posts/emailtheinternet-com-sending-and-receiving-email-in-windows-azure).
    It supplied the method and code sample you could download . You may need create a listener to listen on the right port on workrole always.
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to run a mapping from plsql procedure in some common group?

    Hi,
    I have a Workflow process, when I running him from OWB I saw in OWB Browser first the name of this process and under this process mappings that in this process.
    In one mapping I have some pre-mapping procedure that doing something and prepare some parameters for other mapping and run it (steps for running a mapping I take from sqlplus_exec_template.sql script) and I can't put this mapping into Workflow process for some reasons.
    But in OWB browser this mapping doesn't belong to my Workflow process, they located on the one level.
    How to modify steps for running mapping so that my mapping is located under this Workflow process in OWB Browser?

    Hi,
    It sounds like what you are trying to do, is run one mapping in a pre-mapping process of another mapping. You use a wrapper that implements sqlplus_exec_template.sql in PL/SQL. Is that correct?
    I don't think that by the way you execute this mapping, it ends up in the context of the process flow. The reason is because according to Warehouse Builder the mapping is being invoked standalone (through the wrapper that implements the template). As a result, the context in which Warehouse Builder would log the messages is lost.
    What I suggest you do (assuming I understand the problem correctly), is run the mapping as a separate mapping in the process flow. Because in the current release we do not support passing output parameters in the process flow, you will have to (temporarily) store the results of the first mapping in a table and pick it up from there in the other mapping. In the next major release (autumn 2004) we will support passing parameters between activities.
    Thanks,
    Mark.

  • HOW to build ruby 1.8.6 package (p287) ???

    Currently distro offers latest ruby version ruby-1.8.7_p72-3
    Some my projects is not compatible with v1.8.7  so I need v1.8.6.
    I have tried to build custom package ( just modify official PKGBUILD file from extra/ruby ABS)
    But it has issue with openssl:
    compiling openssl
    make[1]: Entering directory `/home/wireless/aur/extra/ruby/src/ruby-1.8.6-p287/ext/openssl'
    gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -march=i686 -mtune=generic -O2 -pipe -fPIC -c ossl_x509name.c
    In file included from ossl.h:197,
    from ossl_x509name.c:11:
    openssl_missing.h:123: error: conflicting types for 'BN_rand_range'
    /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed/openssl/bn.h:420: error: previous declaration of 'BN_rand_range' was here
    openssl_missing.h:124: error: conflicting types for 'BN_pseudo_rand_range'
    /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed/openssl/bn.h:421: error: previous declaration of 'BN_pseudo_rand_range' was here
    ossl_x509name.c: In function 'ossl_x509name_initialize':
    ossl_x509name.c:135: warning: passing argument 2 of 'd2i_X509_NAME' from incompatible pointer type
    make[1]: *** [ossl_x509name.o] Error 1
    make[1]: Leaving directory `/home/wireless/aur/extra/ruby/src/ruby-1.8.6-p287/ext/openssl'
    make: *** [all] Error 1
    ==> ERROR: Build Failed.
    Aborting...
    Damn...
    HOW TO BUILD IT?

    ==> Leaving fakeroot environment.
    ==> Finished making: ruby 1.8.6_p287-1 i686 (Sat Mar 21 13:40:10 EET 2009)
    SOLVED with such PKGBUILD:
    # $Id: PKGBUILD 26958 2009-02-14 23:32:24Z jgc $
    # Maintainer: dorphell <[email protected]>
    # Contributors: John Proctor <[email protected]>
    # Jeramy Rutley <[email protected]>
    pkgname=ruby
    pkgver=1.8.6_p287
    _pkgver=1.8.6-p287
    pkgrel=1
    pkgdesc="An object-oriented language for quick and easy programming"
    arch=(i686 x86_64)
    license=('custom')
    url="http://www.ruby-lang.org/en/"
    depends=('gdbm>=1.8.3' 'db>=4.7.25' 'openssl>=0.9.8j' 'zlib>=1.2.3.3' 'readline>=5.2.013')
    makedepends=('tk>=8.5')
    source=(ftp://ftp.ruby-lang.org/pub/ruby/1.8/${pkgname}-${_pkgver}.tar.bz2)
    options=('!emptydirs' 'force')
    md5sums=('80b5f3db12531d36e6c81fac6d05dda9')
    build() {
    cd "${srcdir}/${pkgname}-${_pkgver}"
    ./configure --prefix=/usr --enable-shared --enable-pthread || return 1
    # Fix for conflict with openssl
    sed -i'' -e "123,124s/.*//" ext/openssl/openssl_missing.h
    make || return 1
    make DESTDIR="${pkgdir}" install || return 1
    #generate the ri docs
    make -j1 DESTDIR="${pkgdir}" install-doc || return 1
    install -d "${pkgdir}/usr/share/licenses/${pkgname}"
    install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
    Thx anyone

  • How to use Nokia maps

    Hi,
    I have Nokia 7510 Supernova Model, I would like to know how to use Nokia maps in it. I tried using Navicore Extenal Bluetooth ( Wayfinder), but i couldnt use it. Is there any way to use maps in Nokia.

    Hi mdmalik
    Provided this isn't a typographic error for 7610 Supernova, unfortunately you cannot use Nokia Maps on your S40 device. You could use application such as Nav4All although you would need to download data with asscociated costs:http://www.nav4all.com/site2/www.nav4all.com/index.php
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • How to build formula?

    Hi,
    Maybe someone of you can help me in such issue.
    I have data in that form:
    City, salesman, revenue.
    In Webi I want to create report wich shows revenue per number of salesmen in city.
    F.e.
    In City_1 there are 4 salesmen and sum of their revenue is 10000,
    in City_2 there are 4 salesmen and sum of their revenue is 30000,
    In City_3 there are 6 salesmen and sum of their revenue is 60000.
    The report should shows:
    Number of salesmen,     Revenue
         4 salesmen ,                   40000
         6 salesmen ,                   60000
    There is no City and no salesmen dimensions in the report.
    The question is how to build formula for Number of salesmen.
    Thanks for replying.
    Regards.
    MG

    hiding report body is an issue, but it can be done some how.
    Tell me something
    do you want the report like below
    city       no of salesman      revenue
    city_1   4 salesman            10000
    city_2   5 salesman            30000
    then try this
    variable 1 : no of salesman  =  count(salesman) In city      (note:make sure you use IN keyword)
    variable 2 revenue by city  =  sum(revenue) in City      
    in your report pull
    city  variable1  variable2
    let me know if this works.
    Thanks,
    Karthik

  • HT1688 the Apple Maps app won't locate an address, the address is a medical center in gainesville, fl 4037 NW 86th Terrace 32606. i had to google map it in order to find the location... please update addresses on your Maps app... how often are the Maps up

    How often does Apple Maps update address locations?? there is an address in Gainesville, Fl it is a health facility as it was priority to locate, the address is 4037 NW 86th Terr, 32606. I had to use my google maps app... it then took me to the correct address and located it no problem. please update at least this address so people in need of health care don't go through the same thing I had to endure...

    The satellite imagery on Apple Maps shows that whole area as undeveloped woods.   Google shows a brand new building with the nearby streets.
    Use the "Report a Problem" button on the Maps to inform Apple of the required update.

  • Problem with "Building interactive maps with Flex" example

    I have been looking at the tutorial by Matt Sheehan Building interactive maps with Flex found at
    http://www.adobe.com/devnet/flex/articles/interactive_maps.edu.html
    I have downloaded  Flash Builder 4.6 trial version and followed the example. I have also copied the source code from the example and pasted that into the file mymodestmap.mxml.
    In both cases the application opens a new page in Google Chrome but does not display any map data.
    No errors or warnings are displayed when I run the code from Flash Builder.
    Although I have got plenty of experience of writing software, I am a total beginner when it comes to developing web applications!
    Any ideas as to what I am doing wrong, I have attached the source below.
    Cheers
    Steve
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx1="library://ns.adobe.com/flex/halo"
                                     minWidth="1024" minHeight="768" creationComplete="init()" viewSourceURL="srcview/index.html" xmlns:mx="library://ns.adobe.com/flex/mx">
              <fx:Script>
                        <![CDATA[
                                  import mx.core.UIComponent;
                                  import com.modestmaps.TweenMap;   
                                  import com.modestmaps.mapproviders.OpenStreetMapProvider;
                                  import com.modestmaps.geo.Location;
                                  import com.modestmaps.extras.ZoomSlider;
                                  import com.modestmaps.extras.HandCursor; 
                                  [Bindable]private var _map:TweenMap;       
                                  private var _mapUI:UIComponent;
                                  [Bindable]private var _initialLat:Number = 40.668903;
                                  [Bindable]private var _initialLong:Number = -111.680145;
                                  [Bindable]private var _initialZoom:Number = 6;
                                  private var _mouseWheelZoomCenter:Location;
                                  private var _mouseWheelZoom:int;     
                                  private function init():void
                                            _map = new TweenMap(mappanel.width, mappanel.height, true, new OpenStreetMapProvider());   
                                            _map.setCenterZoom(new Location(_initialLat, _initialLong), _initialZoom);
                                            mapCore();
                                  private function mapCore():void
                                            _map.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);   
                                            _mapUI = new UIComponent();
                                            _mapUI.addChild(_map);    
                                            var zoomslider:ZoomSlider = new ZoomSlider(_map);
                                            zoomslider.x = mappanel.width - zoomslider.width*2;
                                            zoomslider.y = 30;
                                            _mapUI.addChild(zoomslider);   
                                            var handcursor:HandCursor = new HandCursor(_map);
                                            _mapUI.addChild(handcursor);
                                            mappanel.addElement(_mapUI);   
                                  private function mouseWheelHandler(e:MouseEvent):void {
                                            if (e.delta < 0) {
                                                      _map.zoomOut();
                                            else if (e.delta > 0) {
                                                      _map.zoomIn();
                                            _mouseWheelZoomCenter = _map.getCenter();
                                            _mouseWheelZoom = _map.getZoom();
                        ]]>
              </fx:Script>
              <s:BorderContainer id="mappanel" width="100%" height="97%"/>
    </s:Application>

    Technically, it's Javascript, not Java :) TOTALLY different beasts. I wish they'd never named it Javascript, it's ambiguous. So anyway, on to the point of the whole thing...
    If you want quotes in your values, you'll need to write a function to replace " with \", and pass the values through it. So instead of javascript:passBack('#ENAME#','#JOB#','#SAL#'); you would have javascript:passBack(addslashes('#ENAME#'),addslashes('#JOB#'),addslashes('#SAL#'));. That would mean that ABC"DEF"GH would be passed to the function as ABC\"DEF\"GH and your quotes would stay intact. Search around on the internet for more specifics as to how to pass double quotes in javascript by using backslashes.
    ~Jer

Maybe you are looking for