Problem in msg mapping

Hi all,
   I have 3 fields (Emp_no,Name,Salary)...i am sorting those values based upon  Emp_no.  Now the problem is only the emp_no is getting sorted and the remaining things are coming as it is.
Source Structure=Target Structure
Mt_src
  Employee
     emp_no
     name
     salary
Mapping:(mine)
Mt_src---->Mt_tgt
Employee--->Employee
emp_no>removecontext>sort>splitbyvalue(eachvalue)>emp_no
name-->name
salary-->salary
Regards
Arivarasu S

HI,
Practically records r sorted based on the mandatory and unique filelds. But if in ur scenario that couldnt happen, then check if that node exists using "exists" function and then only proceed fot the sorting
Currently the Queue of emp_no is not matching with the other fields,
Use the node function mapWithDefault to align all the queues
Refer
Problem in sorting the records
As the functions sort and sortByKey only sort the elements within the same context, we have to use the function removeContexts before sort. After sort we have to restore the original contexts. We do this with the node function splitByValue
/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13
Thanks
Swarup
Edited by: Swarup Sawant on Jun 23, 2008 11:50 AM

Similar Messages

  • Diff b/w msg mapping and interface mapping

    hi
      i have some doubt's:
       1. diff b/w msg mapping and interface mapping
       2. What is product in SLD? usually who creates the product,technical,business system??
    thx in advance..

    hI Smartsoft General User  ,
    The following r excellent websites on mapping which differentiate msg mapping and interface mapping in detail:
    Excellent PDF Document on Mapping
    http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
    Mapping Development with the ABAP Workbench
    http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm
    ABAP Mappings
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
    how to create a flat file out of an IDoc-XML by means of an ABAP mapping program and the J2EE File Adapter.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    How to Use ABAP Mapping in XI 3.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    These r excellent websites in SLD:
    How To…Handle the SLD for SAP XI
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e76e511-0d01-0010-5c9d-9f768d644808
    How To…Handle Caches in SAP XI 3.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301290
    http://www.sap-press.de/download/dateien/751/sap_press_exchange_infra_engl.pdf
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • Problem in message mapping index.

    HI All,
    I am doing idoc to file scenario.
    I have a problem in message mapping.
    Issue is,
    pallet1
      palletheader(here i used counter to increment the value)
      palletline(here i used INDEX to increment the value)
            pallet linenumber1(it should be 1)
            pallet linenumber2(it should be 2)
    so on       )
    so on
    pallet2
      palletheader
      palletline
            pallet linenumber1(here again it should be 1)
            pallet linenumber2(here again it should be 2)
    so on              )
    so on
    In INDEX we have option called reset index in that we have two radio buttons
    one is "reset index to intial value with each new context"
    and next one is "donot reset index to intiak value"
    if i use the first radio button which is working fine in only one pallet and more pallet lines but not more than one pallet.
    If i use the second radio buttton which is working fine in more than one pallet but not satisfying the more pallet lines in one pallet.
    Can you please help me on the issue

    my requirement is like this.
    IF DELVRY05/IDOC/E1EDL20/E1EDL24/POSNR equals to /DELVRY05/IDOC/E1EDL20/E1EDL37/E1EDL44/EXIDV
    then map to 'pallet line' .
    I tried to keep posnr context as E1EDL20 and also IDOC level.
    And at the same way to EXIDV too.
    pallet(1 to unbounded)
       pallet header(1 to 1)
       pallet lines(1 to 1)
            in sub level  pallet line(1 to unbounded) (here i applied the index logic)
    The out put should be pallet line 1,2,3,----- so on
    In the second pallet the pallet lines should be again 1,2,3,4-------so on .
    But when i try to apply thsi logic,
    I am getting only one pallet line instead of two.
    second is not comming .
    please help on this i am facing this problem for the long time back.
    if i solve then i can complete my scenario.

  • URGENT:Problem in a mapping with 8 tables in JOIN and using the DEDUP op.

    I have an urgent problem with a mapping: I must load data from 8 source tables (joined togheter) in a target table.
    Some data from 1 of the 8 tables have to be deduplicated, so I created a sort of staging table where I inserted the "cleaned" data, I mean, the deduplicated ones.
    I made it to make all the process faster.
    Then, I joined the 8 tabled, writing the join conditions in the operator properties, and connected the outputs into the fields of the target table.
    But..it does not work because this kind of mapping create a cartesian product.
    Then, I tried again with another mapping builted up in this way: after the joiner operator, I used the Match-Merge Operator and I load all data into a staging table exactly alike the target one, except for the PK (because it is a sequence). Then, I load the data from this staging table into the target one, and, of course, I connect to the target table also the sequence (the primary key). The first loading works fine (and load all the data as I expected).
    For the next loadings,I scheduled a pre-mapping process that truncate the staging table and re-load the new data.
    But..it does not work. I mean, It doesn't update the data previously loaded (or inser the new ones), but only insert the data, not considering the PK.
    So, my questions are as follow:
    1) Why loading the data directly from the joiner operator into the fact table doesn't work? Why does it generate a cartesian product??
    2) The "escamotage" to use the Match-Merge operator is correct? I have to admit that I didn't understand very well the behaviour of this operator...
    3) And, most of all, HOW CAN I LOAD MY DATA? I cannot find a way out....

    First of all, thanks for the answer!
    Yes, I inserted the proper join condition and in fact I saw that when WB generates the script it considers my join but, instead of using the fields in a single select statement, it builts up many sub-selects. Furthermore, it seems as it doesn't evaluate properly the fields coming from the source tables where I inserted the deduplicated data...I mean, the problems seems not to be the join condition, but the data not correctly deduplicated..

  • IPhone 3GS - "LOCATION PINNING" PROBLEM ON THE MAP

    Hi everyone. I'm currently using an iPhone 3GS running on IOS4 and unfortunately facing "location pinning problem" on the map. Even though, "location services" feature is on and also "active" for photos, I quite often need to reboot my device right after I took a picture(s) in order to see the "location pin(s)" on the map.
    But sometimes I don't need to do so, because it somehow captures the place the picture's taken and puts a pin on the map right away.
    Do you have any ideas about where that problem might be stemming from? Appreciate your help on this issue. Thx a lot in advance...

    so did you happen to resolve that "pinpointing" issue?

  • Why I can't open google maps on Safari? Everything have been working normally with my computer. But this problem with google maps I can't fix

    Why I can't open google maps on Safari? Everything have been working normally with my computer. But this problem with google maps I can't fix

    Do you have an example? I develop Google maps for Web pages and haven't had problem with Safari and its extensions, only FF which I took out all the addons and plug-ins, but it wouldn't surprise if the Google map code doesn't display the map or information for the map or doesn't work with newer versions of Safari.

  • Help me please : Serious problems with collection-mapping, list-mapping and map-mappi

    Hi everybody;
    I have serious problems with list-mapping, collection-mapping and map-mapping.
    Acording to specifications and requirements in a system I am working on it is needed to
    get a "list" of values or an indivudual value.I am working with ORACLE 9i Database,
    ORACLE 9i AS and ORACLE 9i JDEVELOPER.
    I tried to map a master-detail relationship in an entity-bean, using list-mapping.
    And this was very useful in order to get a "list" of details, ...but, when I wanted
    to get a single value I have some problems with persistence, something about "saving a state"
    despite I just want to get the value of a single detail.
    I decided to change it to map-mapping and the problem related with a single detail
    worked successfully, but I can get access to the whole bunch of details.
    May anyone of you help me with that?
    I am very confused I do not know what to do.
    Have any of you a solution for that problem?
    Thank you very much.

    Have you tried a restore in iTunes?

  • Problems with Parameter Mapping

    Hi All,
    I have problems with parameter-mapping. For me its a black box, sometimes it works sometimes not.
    Lots of times my mappings doesnt work, and I dont know the reason.
    For example: I want to map my Execution-CO to the Display-CO. For that I map the in the affected Action.
    But it doesnt work, although I do have the same Context Structures, because its the same CO. The technical Name is also the same.
    What could it be?
    Thanks for answering me
    Bye Steve

    Hi Andre,
    sorry for my late answer, but I'm writing my diploma thesis and wasnt at work since wednesday and so I dont have a access to our GP-System.
    Hope I understood you right.
    The Use Case of parameter mapping is that Users of further steps has the possibility to see the Input of previous steps.
    When I dont map the parameter inside one action, it isnt possible. I tried it out with the SAP example "Time-off-process". I took the CO "Create Request" and add it in one Action (as Display &  Execution). When I understand you right mapping inside an action is not necessary, to see the Inputs from further Actions --> But this way I cannot see the Inputs.  
    The mapping of my application works before I changed it.
    I know never touch a running system, but It was necessary, we need a new Input and Output Parameter.
    Cause I have 20 parameter the mapping was very time-consuming, to map every single parameter. I read a method to reduce the time: Adding a structure requires only mapping of the two structures. But now the Mapping doesnt work.
    Hope you can help me
    Bye Steve

  • I have problems with google maps at IPhoto. It recognizes the place, but gives not the map.

    I have problems with google maps at IPhoto. It recognizes the place, but gives not the map. It gets grey. You do not even see the world in black and white. What is the problem and what can I do?

    in the iPhoto preferences is look up places set to automatically?
    LN

  • Litlle problem with nokia maps for 5800 xm

    hi evryone,
    i have a problem with nokia maps for my 5800 xpressmusi which is i cant find my acces point when itry to GO ONLINE
    please help thank you

    Hi,
    When you switch on your device for the first time, the access points may be configured automatically based on the service provider information in your SIM card. Otherwise contact your operator or service provider to receive the access point settings if you cannot find it..

  • Problem with message mapping ...

    Hello,
    I have problem with message mapping. I implemented SOAP-to-RFC scenario. The source message is of type http://sntcz.cz/xmlns/holidays:MT_Holiday, the target message of type urn:sap-com:document:sap:rfc:functions:Z_GET_SUPERIOR. But some error is still generated in Request Message Mapping step:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Z_GET_SUPERIOR/USR. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:403) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at .....
    This is XSD definition of source message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sntcz.cz/xmlns/holidays" targetNamespace="http://sntcz.cz/xmlns/holidays">
    <xsd:element name="MT_Holiday" type="DT_Holiday" />
    <xsd:complexType name="DT_Holiday">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    030495e1742f11dd963600301875333b
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="SinceDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba049b067aa11dd8be6eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a067aa11dda311eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a167aa11dd9b4eeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a267aa11ddc352eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a367aa11ddc33aeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a467aa11dda8cfeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UserId" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a567aa11dd9698eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    This is XSD definition of target message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    <xsd:element name="Z_GET_SUPERIOR">
    <xsd:complexType>
    <xsd:all>
    <xsd:element name="USR" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    It's strange that if I use Message Mapping Test it works fine. But in pipeline not.
    Do you have any idea where could be the problem?
    Thank you in advance!
    Best regard,
    Zbynek

    Hi,
    To know the correct error Take the Inbound Payload from MONI and Test it in Mapping Test TAB. then u will come to know the exact error.
    Procedure to take the Payload
    goto MONI-Double click on MessageInbound Message ( CENTRAL ) --Payloads ---Double click on MainDocument ( application/xml ) -Just Right Click on the second window-View Source
    then now Copy this and paste it in Mapping Test and Execute.
    REgards
    Seshagiri

  • When using two Msg Mapping - will performance decrease?

    Hi,
      Our scenario is File->XI->MultiIDoc.Can i use two Msg Mapping to create 2 idoc from one flat file rather than doing XSLT or JAVA Mapping.
      Will it reduce the performance?

    Udo, From what i understand , the background code that gets generated when we do GUI mappings is in Java. So there should not be much of a difference b/w the Java mappings we do and the Java code that is created when doing GUI mappings rite!! Let know of ur thoughts
    May be its a call we have to make b/w the Java code we write and the Java code SAP tool writes
    -Saravana

  • On a mac, I have lost the Scaler on Google map. I think that it is Firefox problem because the map scaler is present with Safari. Thank You

    On a mac, I have lost the map scaler on Google map. I think that it is Firefox problem because the map scaler is present with Safari, so it seems that it is not a Google map problem. Thank You

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Problem with reverse mapping

    Hi!
    I am having a problem with reverse mapping. Here's what I do (copying the
    generated files to a correct directory omitted):
    % rd-schemagen -properties jdo.properties -file schema.xml
    % rd-reversemappingtool -properties jdo.properties -package testi
    schema.xml
    % javac -d build/classes src/testi/*.java
    % rd-importtool -properties jdo.properties src/testi/testi.mapping
    Here's a part of the output:
    <clip>
    2958 INFO [main] jdbc.Schema - Found existing table "Kirja" for schema
    "null".
    3002 INFO [main] jdbc.Schema - Found existing table "Kustantaja" for
    schema "n
    ull".
    3047 INFO [main] jdbc.SQL - [C: 5948361; T: 15336018]close
    3125 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]open:
    jdbc:mysql://localh
    ost/kirjakauppa (root)
    3129 INFO [main] jdbc.Schema - Found existing table "Kirjailija" for
    schema "n
    ull".
    3140 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]close
    3187 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]open:
    jdbc:mysql://localh
    ost/kirjakauppa (root)
    3193 INFO [main] jdbc.Schema - Found existing table "Kirjoittaja" for
    schema "
    null".
    3225 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]close
    Exception in thread "main" javax.jdo.JDOFatalInternalException:
    java.lang.Illega
    lArgumentException: You are attempting to link to a primary key column in
    table "Kirja" in a foreign key that is already linked to primary key
    columns in table "Kirjailija".
    NestedThrowables:
    java.lang.IllegalArgumentException: You are attempting to link to a primary
    key column in table "Kirja" in a foreign key that is already linked to
    primary key c
    olumns in table "Kirjailija".
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
    ppings.java:160)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
    appingRepository.java:279)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
    MappingRepository.java:147)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
    appingRepository.java:158)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
    mportTool.java:126)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
    gs(ImportTool.java:57)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
    ol.java:408)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
    ool.java:385)
    NestedThrowablesStackTrace:
    java.lang.IllegalArgumentException: You are attempting to link to a primary
    key column in table "Kirja" in a foreign key that is already linked to
    primary key c
    olumns in table "Kirjailija".
    at
    com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey.join(ForeignKey.j
    ava:238)
    at
    com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateFore
    ignKeys(SchemaGenerator.java:625)
    at
    com.solarmetric.rd.kodo.impl.jdbc.schema.DynamicSchemaFactory.findTab
    le(DynamicSchemaFactory.java:111)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.map.BaseClassMapping.fromMappi
    ngInfo(BaseClassMapping.java:113)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
    ppings.java:144)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
    appingRepository.java:279)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
    MappingRepository.java:147)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
    appingRepository.java:158)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
    mportTool.java:126)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
    gs(ImportTool.java:57)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
    ol.java:408)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
    ool.java:385)
    </clip>
    Here's what MySQLCC gives for creation statement of the tables:
    <clip>
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Asiakas'
    # CREATE TABLE `Asiakas` (
    `Asiakas_id` int(11) NOT NULL auto_increment,
    `Nimi1` varchar(50) default NULL,
    `Nimi2` varchar(50) default NULL,
    `KatuOsoite` varchar(50) default NULL,
    `Postiosoite` varchar(50) default NULL,
    `Email` varchar(50) default NULL,
    `Puhelin` varchar(50) default NULL,
    `Fax` varchar(50) default NULL,
    `Salasana` varchar(50) default NULL,
    `ExtranetTunnus` varchar(50) default NULL,
    PRIMARY KEY (`Asiakas_id`),
    KEY `Asiakas_id` (`Asiakas_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Kirja'
    # CREATE TABLE `Kirja` (
    `Kirja_id` int(11) NOT NULL auto_increment,
    `Kustantaja_id` int(11) default NULL,
    `Nimi` varchar(60) default NULL,
    `Nimi2` varchar(60) default NULL,
    `ISBN` varchar(50) default NULL,
    `Kieli` varchar(50) default NULL,
    `Kansi_URL` varchar(50) default NULL,
    `Sisalto_URL` varchar(50) default NULL,
    `Tukkuhinta` decimal(10,2) default NULL,
    `Kuluttajahinta` decimal(10,2) default NULL,
    `Varastokpl` int(11) default NULL,
    PRIMARY KEY (`Kirja_id`),
    KEY `Kirja_id` (`Kirja_id`),
    KEY `Kustantaja_id` (`Kustantaja_id`),
    FOREIGN KEY (`Kustantaja_id`) REFERENCES `kirjakauppa.Kustantaja`
    (`Kustantaja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Kirjailija'
    # CREATE TABLE `Kirjailija` (
    `Kirjailija_id` int(11) NOT NULL auto_increment,
    `Sukunimi` varchar(50) default NULL,
    `Etunimi` varchar(50) default NULL,
    `Maa` varchar(50) default NULL,
    `Kirjailija_URL` varchar(50) default NULL,
    PRIMARY KEY (`Kirjailija_id`),
    KEY `Kirjailija_id` (`Kirjailija_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Kirjoittaja'
    # CREATE TABLE `Kirjoittaja` (
    `Kirjoittaja_id` int(11) NOT NULL auto_increment,
    `Kirjailija_id` int(11) NOT NULL default '0',
    `Kirja_id` int(11) NOT NULL default '0',
    PRIMARY KEY (`Kirjoittaja_id`),
    KEY `Kirjailija_id` (`Kirjailija_id`),
    KEY `Kirja_id` (`Kirja_id`),
    FOREIGN KEY (`Kirjailija_id`) REFERENCES `kirjakauppa.Kirjailija`
    (`Kirjailija_id`),
    FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Koodi'
    # CREATE TABLE `Koodi` (
    `Koodi_id` int(11) NOT NULL auto_increment,
    `Koodi` varchar(50) default NULL,
    `Tyyppi` varchar(50) default NULL,
    `Arvo` varchar(50) default NULL,
    PRIMARY KEY (`Koodi_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Kustantaja'
    # CREATE TABLE `Kustantaja` (
    `Kustantaja_id` int(11) NOT NULL auto_increment,
    `Nimi` varchar(80) default NULL,
    `Maa` varchar(50) default NULL,
    `Kustantaja_URL` varchar(50) default NULL,
    `KirjaLkm` int(11) default NULL,
    PRIMARY KEY (`Kustantaja_id`),
    KEY `Kustantaja_id` (`Kustantaja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Luokittelu'
    # CREATE TABLE `Luokittelu` (
    `Luokittelu_id` int(11) NOT NULL auto_increment,
    `Luokka_id` int(11) NOT NULL default '0',
    `Kirja_id` int(11) NOT NULL default '0',
    PRIMARY KEY (`Luokittelu_id`),
    KEY `Luokka_id` (`Luokka_id`),
    KEY `Kirja_id` (`Kirja_id`),
    FOREIGN KEY (`Luokka_id`) REFERENCES `kirjakauppa.Luokka` (`Luokka_id`),
    FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Luokka'
    # CREATE TABLE `Luokka` (
    `Luokka_id` int(11) NOT NULL auto_increment,
    `Luokka` varchar(50) default NULL,
    PRIMARY KEY (`Luokka_id`),
    KEY `Luokka_id` (`Luokka_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Myyja'
    # CREATE TABLE `Myyja` (
    `Myyja_id` int(11) NOT NULL auto_increment,
    `Myyja` varchar(50) default NULL,
    `Myyja_URL` varchar(50) default NULL,
    PRIMARY KEY (`Myyja_id`),
    KEY `Myyja_id` (`Myyja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Tilaus'
    # CREATE TABLE `Tilaus` (
    `Tilaus_id` int(11) NOT NULL auto_increment,
    `Asiakas_id` int(11) NOT NULL default '0',
    `Myyja_id` int(11) default NULL,
    `TilausPvm` timestamp(14) NOT NULL,
    `EnsimmToimitusPvm` timestamp(14) NOT NULL,
    `ViimToimitusPvm` timestamp(14) NOT NULL,
    `Tila` int(11) NOT NULL default '0',
    `Mk` decimal(10,2) default NULL,
    PRIMARY KEY (`Tilaus_id`),
    KEY `Asiakas_id` (`Asiakas_id`),
    KEY `Myyja_id` (`Myyja_id`),
    KEY `Tilaus_id` (`Tilaus_id`),
    FOREIGN KEY (`Asiakas_id`) REFERENCES `kirjakauppa.Asiakas`
    (`Asiakas_id`),
    FOREIGN KEY (`Myyja_id`) REFERENCES `kirjakauppa.Myyja` (`Myyja_id`)
    ) TYPE=InnoDB;
    # Host: localhost
    # Database: kirjakauppa
    # Table: 'Tilausrivi'
    # CREATE TABLE `Tilausrivi` (
    `TilausRivi_id` int(11) NOT NULL auto_increment,
    `Tilaus_id` int(11) NOT NULL default '0',
    `Kirja_id` int(11) NOT NULL default '0',
    `TilausLkm` int(11) default NULL,
    `Ahinta` decimal(10,2) default NULL,
    `Alepros` float default NULL,
    `Mk` decimal(10,2) default NULL,
    `ToimitettuLkm` int(11) default NULL,
    `ToimitusPvm` timestamp(14) NOT NULL,
    `ViimToimitusPvm` timestamp(14) NOT NULL,
    `Tila` int(11) NOT NULL default '0',
    PRIMARY KEY (`TilausRivi_id`),
    KEY `Tilaus_id` (`Tilaus_id`),
    KEY `Kirja_id` (`Kirja_id`),
    FOREIGN KEY (`Tilaus_id`) REFERENCES `kirjakauppa.Tilaus` (`Tilaus_id`),
    FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
    ) TYPE=InnoDB;
    </clip>
    I can find the original creation script if it is necessary.
    My guess was that I need to define the foreign keys myself into the
    generated schema.xml This is stated in the manual. However, this did not
    help, although it changed the stack trace a little (it complains about
    different classes than before):
    <clip>
    Exception in thread "main" javax.jdo.JDOFatalInternalException:
    java.lang.IllegalArgumentException: You are attempting to link to a primary
    key column in table "Myyja" in a foreign key that is already linked to
    primary key columns in table "Asiakas".
    NestedThrowables:
    java.lang.IllegalArgumentException: You are attempting to link to a primary
    key column in table "Myyja" in a foreign key that is already linked to
    primary key columns in table "Asiakas".
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createFieldMapping(Mappings.java:208)
    </clip>
    I don't think I fully understand the error message, what exactly is wrong
    here? How can I fix it?
    Here's a sample of the changes I made to schema.xml:
    - added the name - attribute to schema (it was missing)
    <schema name="kirjakauppa">
    - added the foreign key elements according to the table creation statements
    given above
    <fk name="Kustantaja_id" to-table="Kustantaja" column="Kustantaja_id"/>
         etc...
    -Antti

    On Mon, 16 Jun 2003 17:55:35 -0500, Abe White <[email protected]>
    wrote:
    It seems the last three options are being ignored - I still get a
    mapping
    file with schema names in front of tables (e.g. kirjakauppa.Asiakas, not
    Asiakas),That, unfortunately, is impossible to turn off. The -useSchemaName
    option controls whether the schema name is included as part of the
    generated class name; it doesn't affect the mapping data that is
    generated. What problems does including the schema name in the mapping
    data cause?
    rd-importtool -properties jdo.properties gensrc/testi/testi.mapping0 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/home/akaranta/work/kurssit/jdo/Harjoituskoodi/kirjakauppa/gensrc/testi/testi.mapping".
    Exception in thread "main"
    com.solarmetric.rd.kodo.meta.JDOMetaDataNotFoundException: No JDO metadata
    was found for type "class testi.Asiakas".
    FailedObject:class testi.Asiakas
    at
    com.solarmetric.rd.kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.java:126)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:184)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:197)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(ImportTool.java:128)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:60)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
    This exception goes away if I edit the schema name out of the mapping
    file from all classes.
    separate classes are being generated for join tables with
    primary keysDo these join tables have an extra primary key column? TheYes, they do. Ok, now I know where the problem is.
    -primaryKeyOnJoin flag tells Kodo to ignore a join table with a primary
    key on the join columns. But Kodo can't handle join tables with extra
    column(s) just for a primary key identifier. This isn't a limitation of
    the reverse mapping tool, it's a limitation of Kodo. Kodo wouldn't know
    what to insert in those extra primary key column(s) when adding membersWhy not? If it can handle single numeric pk columns when making the
    generated classes use data store identity, it has to generate something to
    those columns. I can't see why this is different.
    That is simply out of curiosity - the next thing fixed my problem:
    to the join table. Of course, if the primary key is an auto-increment or
    something where Kodo can ignore it for inserts, you can just remove the
    <column> elements and the <pk> element from your .schema file and the
    reverse mapping tool will map it as a join table appropriately.It is auto-increment, so I did this and it worked. Thanks.
    , and application id is used for all classes.Are your primary keys on single, numeric columns? Kodo uses Java longsYes (int in MySQL), so that should not be a problem. They are also auto-
    incremented. This seems to be the only real problem remaining with this
    schema.
    -Antti

  • Funny problem with the mapping

    Dear All,
    I am facing with a funny problem with the mapping.
    I am working on a scenario in which Invoice IDOC created in R/3 will be posted to XI and then in XI, mapping are done to create an XML file out of that IDOC.
    In the Idoc, there is a segment E1EDKA1 which is getting created multiple times for different partners alongwith their details. The fields in E1EDKA1 segment are: PARVW,PARTN LIFNR etc.
    In the output I just want LIFNR number where PARVW = RE or RS.
    I have done the required mapping and when I am testing the mapping its giving me the required results correctly but when I make this scenario live then in real-time, the output XML file has no value for LIFNR.
    Can anybody guide me out why is it happening tht during mapping testing its giving the correct result but at real time the mapping is returing no value.
    Warm Regards,
    N.Jain

    Hi Nishant,
    Are you sure the test data which you are using while testing the mapping in IR and the one which comes when you test real time is the same?
    The data which comes real time. Copy the source payload and then test in mapping. See if you get the right data which you expect. If you do then theres some problem.
    Now also go to the same message and in trace you can find out the GUID of the mapping program which is used.
    Go to RWB - Last button..not sure what the name is .. something similar to Cache.. Find your mapping program and see if the GUID Matches. If the GUID matches then it is okay.
    Also try to do the following..
    Reactive the MM/IM.
    Go to ID. Make some dummy change in Interface determination and then activate it.
    Check the cache notification to make sure if the cache is updated.
    If the above doesnt help you let us know.
    Regards,
    Sumit

Maybe you are looking for

  • Nokia mobile VPN Client - split tunneling

    Hi I'm trying to get Nokia mobile CPN Client working with split tunneling on a Cisco firewall. I have full access to all on my internal lan's when I make the VPN tunnel, so tunnel is up and working. But I do not have access to anything in the interne

  • Hooking Zen V Plus up to sound system

    Hey there, I briefly went through your FAQ and couldn't find anything related to what I want to do. Though I am sure someone has already asked this question. So sorry in advance... I have a party coming up and I want to hook my 2GB Zen V Plus up to m

  • Dead iPOD mini (1st gen.)

    Okay, so I read the posts before me to see if anyone had the same problem I have but no one seems to. When I turn on my iPOD, the apple logo stays there for about 10 seconds and then switches to another screen. The screen has a picture of an iPOD wit

  • How i can execute the sql query in java code

    I already have sql query in jave plateform i need to execute this code how i can do that. i have unix env and with oracle database. should i just run this query in my sqlplus. this file has extention .java. thanks

  • Get parent control size in pixels

    Hi experts How can I retrieve parent control size in pixels? Thanks an advice. Edited by: Artem Zyuzko on Nov 24, 2011 3:11 PM