Mapping Question orders -- cxml

We have the following scenario where we are mapping from ORDERS05 to cXML - everything is fine to get different ship to locations on different PO line items for all suppliers but two - for these two suppliers it has to be like this :
If a PO document is created like so ...
Ship-To Address One in the header.
Ship-To Address Two in line item 1.
Ship-To Address Three in line item 2.
Ship-To Address Two in line item 3.
The requirement is that these suppliers both require, in this example, TWO PO's:
one with line items 1 and 3 going to Ship-To Address Two,
and the other for line item 2 going to Ship-To Address Three.
Any help with this would be greatly appreciated!
SAA

Thank you very much .. here is the format of the source and target ..
In the target - the logic is based on a particular supplier number in the EDI_DC40 record - if true then ..
for E1EDK01_POSNR ( this is the line item number)
there will be a ship to address - this is made up of ( street num, street, city etc..)
these are the segments that make up the address ..
E1EDKA1_NAME1
E1EDKA1_STRAS
E1EDKA1_ORT01
E1EDKA1_PSTLZ
E1EDKA1_LAND1
Here is the structure of the IDOC ( simple terms )
IDOC
   |------EDI_DC40
               |------E1EDK_01 ( this is where we find the po line item number )
               |------E1EDKA1 ( this is where we find the Address )
On the target side it is a cXML po document and and if the above supplier is "x" then I want to gather all PO line items that have the same ship to address and create seperate messages
i.e..  if the IDOC has 13 line items that have 4 different ship to address between them - the result would be 4 cXML documents

Similar Messages

  • ODI-1228: ORA-22950: cannot ORDER objects without MAP or ORDER method

    Simple interface between two schemas in the same oracle database (10g)
    I am trying to copy one table and do one simple lookup (in a table located in 3rd schema on the same database)
    Integration task fails on
    ODI-1228: Task messagexml_document (Integration) fails on the target ORACLE connection S2_P1.
    Caused By: java.sql.SQLException: ORA-22950: cannot ORDER objects without MAP or ORDER method
    Can anybody tell me, what I am doing wrong? Code that generate this error is just a simple INSERT with SELECT and sub SELECT with JOIN?
    I just can't find anything about this error.
    I'm stuck :-(

    I discovered that one of my fields is an XMLType field and is a part of comparison ODI do when it tries to do incremental update. The error message here is just a message from db that it can't compare XMLType fields to each other.
    Is there any way to learn ODI to not to compare by XMLType field?

  • ORA-22950: cannot Order Objects without MAP or ORDER method (line 15)

    Hi
    I have created a function
    create type att_con.ind_field_value as object (s_owner varchar2(50), s_table varchar2(50), s_field varchar2(50));
    create type att_con.ind_field_value_table as table of att_con.ind_field_value;
    create or replace function fn_find_field_entries
    (s_entry IN varchar2)
    return ind_field_value_table
    IS
    found_count integer;
    t_return ind_field_value_table := ind_field_value_table();
    begin
    for cur in (select owner, table_name, column_name
    from all_tab_columns
    where owner 'SYS'
    and owner 'SYSTEM')
    loop
    execute immediate
    'select count(' || cur.column_name || ') from ' || cur.owner || '.' || cur.table_name || ' where ' || cur.column_name || ' = ' || s_entry
    into found_count;
    if found_count 0 then
    t_return.extend;
    t_return(t_return.last) := (cur.owner, cur.table_name, cur.column_name);
    end if;
    end loop;
    return t_return;
    end;
    and i am getting the above error when i try and run it with
    select * from table(att_con.fn_find_field_entries('NDUNNE'))
    anyone know what this error might mean?
    thanks in advance

    22950, 00000, "cannot ORDER objects without MAP or ORDER method"
    // *Cause:  an object type must have a MAP or ORDER method defined for
    //          all comparisons other than equality and inequality comparisons.
    // *Action: Define a MAP or ORDER method for the object type
    //

  • CRMXIF_REL_SAVE_M01 - Mapping Question

    Hello All,
    I have a mapping question, hope some one can answer my question. Please see the link first and the see my question
    http://www.flickr.com/photos/8764045@N06/4265246260/sizes/o/
    I'm mapping the CRM IDOC to the JDBC Call. I have small problem here. All the target fields are Mandatory 1..1 .
    I will explain with an example:
    I have field from source E102BUS_EI_STRUC_TEL_DATA/COUNTRY mapped to target field.
    I used Map With Default so that even if the values are not there frm the source the target field will be mapped with blank.
    But the problem is the parent node for E102BUS_EI_STRUC_TEL_DATA is E102BUS_EI_BUPA_TELEPHONE is 0.999999 , so sometimes that segment is not coming. In this case Map with Default won't work. Map with Default willl work only if the Parent node is present.
    If you ask me to do Exists node function on E102BUS_EI_BUPA_TELEPHONE and then apply Map with Default, then even this won't work.
    Apologize if I confused you guys. Please let me know if you need more clarification.
    Thanks!
    Raj.

    Hi Raj,
    Try to do a mapping like this
    E102BUS_EI_STRUC_TEL_DATA(context E102S_EI_BUPA_TELEPHONE_CON)--mapwithdefault-->then
    E102BUS_EI_BUPA_TELEPHONE-->exists------------------------------------------------------------------>if---->splitbyValue
    let us say this output (the output of splitbyvalue) as 'VALUE'
    VALUE-----------------------------------------------> then
    VALUE|-->count--->greater----------------------->if----->targetField                            
          Constant(0)---->              Constant(blank)-->else
    Regards
    Suraj

  • A top difficulty mapping question

    Hello
    dose anyone can give solution for this mapping question?
    soruce :
    <header>header</header>
    <item>
         <A>a1</A>
         <B>b1</B>
         <C>c1</C>
    </item>
    <item>
         <A>a2</A>
         <B>b2</B>
         <C>c2</C>
    </item>
    <item>
         <A>a3</A>
         <B>b3</B>
         <C>c3</C>
    </item>
    target:
    <header>header</header>
    <item>
         <A>a1,a2,a3  .....</A>
         <B>b1,b2,b3  .....</B>
         <C>c1,c2,c3  .....</C>
    </item>
    The numbers of item is not fixed,it is unbounded.
    so the target line length is not fixed at design time
    welcome any hits,
    Thanks !!
    BR,
    Jeffrey

    Hi,
    Use cache parameter as Context.
    public void add_element(String[] a,ResultList result,Container container)
      //write your code here
    String c = "";
    int i;
    for(i= 0 ; i < a.length; i++)
             c = c + a<i> ;
             if(i != (a.length-1))
                  c = c + ",";
    result.addValue(c);
    A(src)-->removecontext->UDF--->A(tgt)
    B(src)--->removecontext->UDF--->B(tgt)
    C(src)--->removecontext->UDF--->C(tgt)

  • ABAP Mapping Questions

    Hi,
    I am trying to get my head around ABAP mappings and have a few questions.
    In the below code sample which I find in every example and blog it talks about specific steps -
    *initialize iXML, * create iXML factory object, * create streamfactory object, * create input stream object, * initialize the input xml document, * parse the input xml document
    In these steps the code is always exactly the same so my question is are these just standard steps that are implemented every single time an abap mapping is used and hence only standard lines that never have to be changed or will they be different depending on the mapping.
    I am trying to work out where I will begin my coding.
    So would somebody be so kind as to give me a brief explanation of the above mentioned steps.
    Thank you
    METHOD if_mapping~execute.
    * initialize iXML
      TYPE-POOLS: ixml.
      CLASS cl_ixml DEFINITION LOAD.
    * create iXML factory object
      DATA: ixmlfactory TYPE REF TO if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    * create streamfactory object
      DATA: streamfactory TYPE REF TO
      if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    * create input stream object
      DATA: istream TYPE REF TO if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    * initialize the input xml document
      DATA: idocument TYPE REF TO if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    * parse the input xml document
      DATA: iparser TYPE REF TO if_ixml_parser.
      iparser = ixmlfactory->create_parser(
      stream_factory = streamfactory
      istream = istream
      document = idocument ).
      iparser->parse( ).

    Hi,
         The above lines you mentioned deal with initialization of the iXML parser for parsing through the XML payload, so they would remain the same for all mapping where you are parsing the input payload.
    The coding for you specific mapping will begin after this, something like :
    * Implements the DOM generating interface to the parser
      iparser->parse( ).
      emp_node_collection = idocument->get_elements_by_tag_name_ns( name = 'Order' ).
      emp_node_length = emp_node_collection->get_length( ).
      emp_node_iterator = emp_node_collection->create_iterator( ).
    where you start reading the xml node values.
    Hope this helps.
    Regards

  • EDI Mapping to ORDERS IDOC - urgent

    Hi All,
    My scenario is creation of sales orders in R/3 using inbound EDI messages.
    Source is the Seeburger external definition(ORDERSV9)(Copied object into my name space) and the target message is the orders IDOC(R/3)(imported).
    my question is: we have many segments and the feilds in the target message(IDOC). how will in know which feilds from source message are mapped to the correct feild in correct segment of the target message.
    Please clarify as I'm stuck in Mapping?
    Cheers,
    Smith

    Hi Liang,
    I know the structure, feilds and the data in the feilds of the EDI structure. I just need to know to which target feilds in IDOC the respective source feilds are mapped to?
    In target IDOC structure we have nearly 100 feilds and i'm not sure which feilds are to be mapped to create a sales order in R/3.
    Fucntional consultants couldnt help much and are not completely aware where the data is posted in the sales order from the feilds in the idoc structure.
    I'm waiting for any EDI experts to respond. Will see
    Cheers,
    Smith

  • 1-1 mapping question

    I am trying to post the question in a different way. My previous post on the related subject can be found at Re: 1-1 mapping
    Two entities, Parent and Child, where a Parent has a Child (privately owned) or zero Child.
    In object model, Parent has an attribute child; Child does not have a parent attribute.
    Two tables, Parent and Child, with constraint where a child record cannot exist without its parent record (i.e. Child table has a foreign key to the Parent table).
    Class Parent and Child are mapped to table Parent and Child respectively.
    How do we define the 1-1 mapping in the Mapping Workbench so that Parent and Child can be inserted into the tables in one unif of work?
    Any comment or help would be greatly appreciated.
    Haiwei

    You can't do this as you described. You must have and map a relationship from child to parent in order to be able to map the 1-1 from parent to child (since your foreign key is in the child table).
    - Don

  • XI mapping question

    Hello,
    I have a situation that I need to run Z-BAPI function before starting mapping in XI. Let me explain scenario with more information.
    1. I need to update a order in the SAP. The order may or may not exists in the SAP.
    2. We have a Z-BAPI function that checks if Order exists in the SAP.
    3. The mapping shall takes place upon sucessfully finding the Order in the SAP. Incase no Order found, mapping should not be done.
    4. The sender sends multiple orders at same time and incase if an order was not in SAP, Mapping should not takes place and move on to next order.
    Now my question is what/how exactly I need to do to avaoid mapping incase an Order has not found and move on to next order in the queue.
    Please let me know.
    Thank you,
    Balaji

    Balaji,
    Just for understanding....
    You are interested in generating outputs only for Order exist  in R/3 system..right?
    I mean do not want to generate XI output in case order do not exist but at the same time it will generate output for remaining orders which exist in the R/3 system..right?
    If so...mean you are not interested whether it runs mapping or not..
    In this case using graphical mapping you can check if order exist in R/3 system( In UDF you can call your ZBAPI to check ) and base on the output of your function module you can decide whether to generate header node or not...
    Let me know if you need more details.
    Nilesh

  • Mapping question using @OneToOne @PrimaryKeyJoinColumn

    I am trying to create a simple web application to maintain a ContractAssignment table.
    Created an EJB from this table with @Id of contractNumber.
    public class ContractAssignment .....
    @Id
    @Column(name = "CONTRACT_NUMBER",
    nullable = false,updatable=false)
    private String contractNumber;
    @OneToOne @PrimaryKeyJoinColumn
    private Contract contractInfo;
    I need contract info that exists in multiple tables so I created a view called Contract.
    Created an EJB for this view with @Id of contractNumber.
    public class Contract ......
    @Id
    @Column(name="CONTRACT_NUMBER", nullable = false,updatable=false)
    private String contractNumber;
    I will only be maintaining the ContractAssignment EJB.
    The Contract EJB will NOT be maintained by this app.
    It will only be used to obtain valid contract numbers that can be used in ContractAssignment maintenance.
    It will also be used to display contract information when maintaining the ContractAssignment.
    Is this the right way to map the relationship?
    Another question. I've created a search page to look up ContractAssignments.
    For some reason, the SQL generated is joining the table to itself.
    Not sure if this is because of incorrect mapping (described above).
    SQL that was generated:
    SELECT t0.CONTRACT_NUMBER, t0.DESCRIPTION, t0.CONTRACT_START_DATE, t0.IMS_STATUS
    FROM CONTRACT_ASSIGNMENT t0,
    CONTRACT_ASSIGNMENT t1
    WHERE (CONTRACT_NUMBER = ?)
         bind => [1234]
    from the following OQL:
    select o from ContractUserAssignment o where ocontractNumber like :contractNumber
    What is causing the incorrect join?
    Thank you for any help.

    All - Thanks much.. Here is my requirement that is no solved by regular mapping
    <Root>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
      </Recordset>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
    </Recordset>
    <Root>
    As you see above, each recordset has order transaction. One Root message can contain multiple of these. So, when I map to the IDOC, I want to filter out any ord_type <> XX.
    If I use regular graphical map, it only looks at first recordset and accepts all or rejects all.
    I need to use UDF. In the UDF, what comes in as input ? Resultset is output -correct ? Now how do I usse graphical mapping with UDF to generate the correct target info

  • Key mapping question. (for mobile phones with PC-like keyboard)

    For phones with mini keyboard (one button per one character, like a PC keyboard).
    I'm trying to implement a form with few text boxes. The goal is to let user type the message like they're using a PC keyboard (unlike in traditional phones, where you need to press the 'numpad two' button three times in order to type the character 'C')
    I've successfully implemented this functionality. But it's an ugly implementation because I use a switch-cases for each and EVERY keycodes.
    Forexample:
    char inputChar;
    switch(keyCode)
    case 97: input = 'A' break;
    case 98: input = 'B' break;
    // go on until every keys are covered, including the lower case letters. T_T
    buffer.append(inputChar);
    Yes I know that my programming skill is real crap >_<, so I try google for some good implementation method. But I always found only the detail about the traditional numpad implementations.
    Ok, my real question is, can this keyboard implementation be done in a better way? The code should be able to look more beautiful than this, right?
    Thank you. =)

    I still don't get the problem here?
    A textbox in a form will work just fine with those mini keyboards. You don't need to do anything for it..
    Otherwise, this code can obviously be done better, a simple array where you just lookup your keycode will be much simpler and faster for instance.

  • Many-to-many mapping question

    Hi,
    I'm working with two classes Car and Customer. The Car class has a Vector of Customers and the Customer class has a Vector of Car. Both are related by a many to many mapping.
    I have noticed that I have to set one of the vector to read only to avoid the error message "More than one writable many-to-many mapping can not use the same relation table" in the mapping workbench.
    I can understand that but is there a way to work around, I mean to be able to add a car to a customer and add a customer to a car with the both vectors?
    Is there something to do with the cache?
    I use Vector for the collection or Map class, have I to do otherwise?

    Hello Vladislav, I understand your first question in this thread, but I'm not sure I follow the rest, so let me respond to your first post:
    "I have noticed that I have to set one of the vector to read only to avoid the error message "More than one writable many-to-many mapping can not use the same relation table" in the mapping workbench.
    I can understand that but is there a way to work around, I mean to be able to add a car to a customer and add a customer to a car with the both vectors?"
    The issue here is that with a Many to Many mapping the mapping is responsible for writing to the association table. So, you have a "CAR_CUST" association table. Imagine you add a Car "101" to a customer "501" and the requisite customer "501" to that car "101" in your object model. Then the association table should only be updated once, with an entry of "101, 501". But since the M-M is mapped in both directions, you need to tell TopLink which of these to consider as the "master" when updating the database.
    If you didn't make one of the M-M mappings "read only", then TopLink would insert "101, 501" twice in the association table, and then at a later date you would see that the customer 501 had two 101 cars!
    We do have a feature that allows for TopLink to maintain bidirectional relationships such that if you add or remove a target from one relationship, TopLink will automatically add/remove it from the opposite direction. In my opinion this is lazy programming! A good Java developer should insist on keeping his model up to date on his own. This feature was added because it's part of the EJB spec, not necessarily because it's a good idea ;)
    - Don
    Is there something to do with the cache?
    I use Vector for the collection or Map class, have I to do otherwise?

  • Multi mapping question using user defined function

    Hi,
    I have a message with multiple occuring nodes (i.e. one message with multiple orders (header + detail)) that I need to map to a idoc. I need to filter out of the source based on order type (in header) from creating an idoc.. How do I do it using user defined function + message mappping ?
    mad

    All - Thanks much.. Here is my requirement that is no solved by regular mapping
    <Root>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
      </Recordset>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
    </Recordset>
    <Root>
    As you see above, each recordset has order transaction. One Root message can contain multiple of these. So, when I map to the IDOC, I want to filter out any ord_type <> XX.
    If I use regular graphical map, it only looks at first recordset and accepts all or rejects all.
    I need to use UDF. In the UDF, what comes in as input ? Resultset is output -correct ? Now how do I usse graphical mapping with UDF to generate the correct target info

  • Mapping question

    Hello,
    I have a rather simple question regarding a mapping.
    Lets say my input message is as following:
    <mes1>
       <seg1>
          <name1>Peter</name1>
          <street1>HighCrt</street1>
       </seg1>
       <seg2>
          <name2>Vlad</name2>
          <sub2>Trickst</sub2>
       </seg2>
       <seg2>
          <name2>Rinaldo</name2>
          <sub2>fiave</sub2>
       </seg2>
    </mes1>
    My output should be:
    <out>
       <put>
          <name>Peter</name>
          <name>Vlad</name>
          <name>Rinaldo</name>
       </put>
    </out>
    So my output field "name" should created in case I have a "name1" field in the source message and additionally it should be created for every "seg2" element that is present in the source message and it should be filled with the value of "name2".
    How can I in the mapping trigger that the "name" element of the output message will be generated for each of the two described elements of the source message?
    Best Regards,
    Peter

    Hi,
    Could be possible using user defined function.
    Create a user defined Function with  cache = context
    public void createNodeName(String[] a,String[] b,ResultList result,Container container){
    if ( a.length > 0 )
      result.addValue ( a[0] ) ;
    for ( int i = 0; i < b.length; i++ )
         result.addValue ( b<i> );
    in Mapping use
    1. name1 as first argument
    2. name2 with removeContext as second argument

  • Mapping Problem ORDERS Idoc to Edifact

    Hi,
    I have a mapping problem with the IDOC ORDERS:
    I get the IDOC with several E1EDP01. Each E1EDP01 has several E1EDPT1, where i want only the first one (which I get over the TDID value). Each E1EDPT1 has min. 1 E1EDPT2.
    Now I have to map each field TDLINE from first two E1EDPT2 of the first E1EDPT1 to the Edifact fields /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008 (from the first E1EDPT2) and, if a second E1EDPT2 exists in /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008_2.
    I use following UDF:
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    else
    result.addValue(ResultList.SUPPRESS);
    Unfortunatly, I think becaus of the context problems (not every E1EDPT1 has two E1EDPT2), it's not working. Could somebody help me with this problem?
    Thanks in advance
    Dominic

    Dear Dominic ,
    I had same problem when I was trying to do the same thing for FTX segment.
    Your UDF is fine but you don't need else condition.
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    for C_C273 assigned contant value and
    D_7008 assigned TDLINE but change the context to E1EDPT1
    and for D_7008_2
    TDLINE(context to E1EDPT1 )
                                                      ====>UDF====>D_7008_2
    Contant(=1)
    It should work becasue my map is working fine. If not let me know error message.
    Thanks
    Shubhankar

Maybe you are looking for

  • V IMP : Report for Cash Customer Bill wise details

    Hi ABAP Gurus, Any body is having the report on Cash Customer Bill wise Details (with invoice details) ? Input criteria - Company Code, Plant, Cash Customer Name(customer Name given while creating cash customer) & Date Range(Document date). I am usin

  • .pdf files won't open on iPad 3

    I have an iPad 3 and .pdf files were opening off of websites fine. I have since downloaded an app called "on cloud". Now, when I try to open the same .pdf files from the same sites I get a message that says Adobe cannot open file because it is not a

  • What is this space and how do I get rid of it?

    I usually create a template for my sites with the standard DW CSS templates and then alter them as needed. I always seem to have this space between the header and main content divs, and unless I do a negative margin on the main content div, I can nev

  • ISE application server not running

    Hi Team, My ISE appliance application server not running, even reboot still the same, any reason? ISE-3315-K9        Displaying ISE application status ....  ISE Database listener is running, PID: 6270 ISE Database is running, number of processes: 17

  • Mountain Lion isn't downloading, why?

    The icon comes up in faded in my dock but it's clearly crashed and just says "waiting" for 3 hours now, after I spent 20 on the app.