ABAP Mapping: ostream with multiple sibling tags (ixml_document_fragment ?)

Hallo,
during ABAP Mapping I have the following problem:
I want to return a message to XI Java stack in the following format:
<?xml version="1.0"?><ns0:MT_FILE_PAXAR_INB xmlns:ns0="http://logimoda.com/ns_paxar">
<Recordset>
[... child tags which values are retrieved from fields of each record of an internal table]
</Recordset>
</ns0:MT_FILE_PAXAR_INB>
I want n <Recordset>, one for each record of the internal table "t_etichette", which is populated by:
CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
Now, i'm not able to append n sibling <Recordset>, only one is appended to parent <ns0:MT_FILE_PAXAR_INB>.
I guess the solution is ixml_document_fragment or using someway an iteration, but I don't know how...
Any suggestion?
Thanks all in advance:)
PS below my current source code:
METHOD if_mapping~execute .
1.0 Def. Data Types - Start **********************************
  DATA:
        wa_t_richieste  TYPE          zppst_input_etichette_pezzo,
        t_richieste     TYPE TABLE OF zppst_input_etichette_pezzo,
        wa_t_etichette  TYPE          zppst_output_etichette_pezzo,
        t_etichette     TYPE TABLE OF zppst_output_etichette_pezzo,
        wa_t_logelab    TYPE          zppst_esito_etichette_pezzo,
        t_logelab       TYPE TABLE OF zppst_esito_etichette_pezzo.
1.1 Def. Data Types - End   **********************************
initialize iXML
  TYPE-POOLS: ixml.
  CLASS cl_ixml DEFINITION LOAD.
create main factory
  DATA: ixmlfactory TYPE REF TO if_ixml.
  ixmlfactory = cl_ixml=>create( ).
create stream factory
  DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
  streamfactory = ixmlfactory->create_stream_factory( ).
create input stream
  DATA: istream TYPE REF TO if_ixml_istream.
  istream = streamfactory->create_istream_xstring( source ).
  DATA: val_nodo  TYPE string,
        nome_nodo TYPE string,
        nome_el   TYPE string
  DATA: ta_data TYPE STANDARD TABLE OF ztabxml,
        wa_data TYPE ztabxml.
parse input document =================================================
initialize input document
  DATA: idocument TYPE REF TO if_ixml_document.
  idocument = ixmlfactory->create_document( ).
parse input document
  DATA: iparser TYPE REF TO if_ixml_parser.
  iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                        istream = istream
                                        document = idocument ).
  iparser->parse( ).
  DATA: element  TYPE REF TO if_ixml_element.
  DATA: articolo TYPE REF TO if_ixml_element.
  DATA: collo    TYPE REF TO if_ixml_element.
  DATA: l_trace  TYPE string.
  DATA: child    TYPE REF TO if_ixml_node.
  DATA: nr_art   TYPE REF TO if_ixml_node_collection.
  DATA: dest    TYPE rfcdest,
        wa_cust TYPE zxi_cust,
        mandt   TYPE sy-mandt.
  SELECT SINGLE * FROM zxi_cust INTO wa_cust
         WHERE parname1 = 'RFC_DEST'
           AND parname2 = 'R/3'.
  dest  = wa_cust-parvalue1.
  mandt = dest+7(3).
1.2 Mapping XML -> items      ************************************
  CLEAR    nome_nodo.
  CLEAR    child.
  CLEAR    ciclo.
  element = idocument->find_from_path_ns(
                                 path    =
'/RIGA'
                             default_uri = '' ).
  nome_el = element->get_name( ).
  ciclo = 'true'.
  WHILE ciclo = 'true'.
Mandante
    MOVE mandt TO wa_t_richieste-mandt.
    IF nome_el = 'RIGA'.
      child = element->get_first_child( ).
      WHILE child IS BOUND.
        nome_nodo = child->get_name( ).
        val_nodo  = child->get_value( ).
        CASE nome_nodo.
          WHEN 'COD_MSGEXPORT'.
Identificativo da Logimoda
            MOVE val_nodo TO wa_t_richieste-zcodeidoc.
          WHEN 'C0001'.
Commessa
            MOVE val_nodo TO wa_t_richieste-j_3acomord.
        ENDCASE.
        child = child->get_next( ).
      ENDWHILE.
      APPEND wa_t_richieste TO t_richieste.
      CLEAR: wa_t_richieste.
      element ?= element->get_next( ).
      IF NOT element IS BOUND.
        EXIT.
      ENDIF.
      nome_el = element->get_name( ).
    ELSE.
      ciclo = 'false'.
    ENDIF.
  ENDWHILE.
1.3 call RFC     ************************************************
  DATA: return TYPE sy-subrc.
  DATA: t_return TYPE TABLE OF bapiret2.
  DATA: st_return TYPE bapiret2.
  DATA: mess_exc TYPE string.
  DATA: t_error_text TYPE string.
  CLEAR: return.
  CLEAR: t_return.
  REFRESH: t_return.
  CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
    DESTINATION
    dest
   EXPORTING
TO DO: Y or N ??
     fl_alv       = ' '
    TABLES
      t_richieste  = t_richieste
      t_etichette  = t_etichette
      t_logelab    = t_logelab
    EXCEPTIONS
      no_richieste = 1
      no_etichette = 2
      no_plant     = 3
      OTHERS       = 4.
  IF ( ( sy-subrc <> 0 )      AND
       ( dest <> 'MZ1CLNT400' )
    DATA subrc TYPE sy-subrc.
    CASE subrc.
      WHEN 1.
       LOOP AT t_logelab INTO st_logelab WHERE type EQ 'E'.
        CONCATENATE 'ABAP MAPPING ERROR: '
                     'NO_RICHIESTE'
                     INTO mess_exc.
        trace->trace( level = '1'
                      message = mess_exc ).
        RAISE EXCEPTION TYPE cx_mapping_fault
              EXPORTING error_code = '90'
                        error_text = 'NO_RICHIESTE'.
       ENDLOOP.
      WHEN 2.
      WHEN 3.
      WHEN OTHERS.
    ENDCASE.
  ENDIF.
1.4 build up output document *****************************************
  DATA: ret_value TYPE i.
  DATA: uri       TYPE string.
  uri = 'http://logimoda.com/ns_paxar'.
create output document
  DATA: odocument TYPE REF TO if_ixml_document.
  odocument = ixmlfactory->create_document( ).
Test - Start ***********
DATA: root_ns TYPE REF TO if_ixml_namespace_decl.
root_ns = odocument->create_namespace_decl(
      name   = 'ns0'
      prefix = 'ns0'
      uri    =  uri ).
ret_value = odocument->set_namespace_prefix(
prefix = 'ns0'
ret_value = odocument->set_namespace_uri(
uri = 'ns0'
root = odocument->create_element_ns(
name   = 'ns0'
prefix = 'ns0'
uri    = 'http://logimoda.com/ns_paxar'
Test - End   ***********
create root XML tag
  DATA: root TYPE REF TO if_ixml_element.
  root = odocument->create_simple_element_ns(
     name   = 'MT_FILE_PAXAR_INB'
     prefix = 'ns0'
     uri    = uri
    value = temp
     parent = odocument ).
  DATA: ns_xml_attr TYPE REF TO if_ixml_attribute.
  ns_xml_attr = odocument->create_attribute_ns(
  name   = 'ns0'
  prefix = 'xmlns'
  uri    = 'http://logimoda.com/ns_paxar'
  ret_value = ns_xml_attr->set_value( uri ).
  ret_value = root->set_attribute_node_ns(
   new_attr = ns_xml_attr
create recordset tag (<= see ref. in FTP Comm. Channel)
  DATA: recordset TYPE REF TO if_ixml_element.
recordset = odocument->create_simple_element(
    name = 'Recordset'
    value = temp
    parent = root ).
Test - Start ***********
  DATA: doc_fragm TYPE REF TO if_ixml_document_fragment.
  doc_fragm = odocument->create_document_fragment( ).
create recordset tag (<= see ref. in FTP Comm. Channel)
  recordset = odocument->create_simple_element(
     name = 'Recordset'
    value = temp
     parent = doc_fragm ).
  DATA: ref_child TYPE REF TO if_ixml_node.
  ret_value = root->insert_child(
  new_child = doc_fragm
  ref_child = ref_child
DATA: recordset_array TYPE REF TO if_ixml_node_collection.
recordset_array->append_item(recordset_el).
Test - End   ***********
XI Inbound Message: MT_FILE_PAXAR_INB
  DATA: zcodeidoc       TYPE REF TO if_ixml_element.
  DATA: j_3acomord      TYPE REF TO if_ixml_element.
  DATA: werks           TYPE REF TO if_ixml_element.
  DATA: trilog_yseason  TYPE REF TO if_ixml_element.
  DATA: temp TYPE string.
  LOOP AT t_etichette INTO wa_t_etichette.
HERE IS THE PROBLEM, HOW TO DO IT ?
    ret_value = root->insert_child(
     new_child = recordset
     ref_child = recordset
    CLEAR temp.
    MOVE wa_t_etichette-zcodeidoc TO temp.
    zcodeidoc  = odocument->create_simple_element(
    name = 'ZCODEIDOC'
     value = temp
    parent = recordset ).
    CLEAR temp.
    MOVE wa_t_etichette-j_3acomord TO temp.
    j_3acomord  = odocument->create_simple_element(
       name = 'j_3acomord'
     value = temp
       parent = recordset ).
    CLEAR temp.
    MOVE wa_t_etichette-werks TO temp.
    werks  = odocument->create_simple_element(
     name = 'WERKS'
     value = temp
     parent = recordset ).
    CLEAR temp.
   MOVE wa_t_etichette-trilog_yseason TO temp.
    trilog_yseason  = odocument->create_simple_element(
       name = 'trilog_yseason'
     value = temp
       parent = recordset ).
    CLEAR wa_t_etichette.
  ENDLOOP.
render document ======================================================
create output stream
  DATA: ostream TYPE REF TO if_ixml_ostream.
  ostream = streamfactory->create_ostream_xstring( result ).
create renderer
  DATA: renderer TYPE REF TO if_ixml_renderer.
  DATA irc TYPE i.
  renderer = ixmlfactory->create_renderer( ostream = ostream
  document = odocument ).
  irc = renderer->render( ).
1.4 for debug ********************************************************
Uploading Files and Manipulating their Content
(SAP Library - Business Server Pages)
http://help.sap.com/saphelp_nw2004s/helpdata/en/ba/78d3c747b24546ab1c1499a054d8a5/content.htm
  DATA: conv_out TYPE REF TO cl_abap_conv_out_ce.
  conv_out = cl_abap_conv_out_ce=>create(
           encoding = 'UTF-8'
           endian = 'L' ).
conversion string => xstring *********************************
conv->convert( EXPORTING data = out
                IMPORTING buffer = result ).
conversion xstring => string *********************************
  DATA: outxml TYPE string.
  DATA: conv_in   TYPE REF TO cl_abap_conv_in_ce.
  conv_in = cl_abap_conv_in_ce=>create( input = result ).
  conv_in->read( IMPORTING data = outxml ).
store file txt on PC for test purpose - Start          ********
  DATA: dataset_str_xml  TYPE string,
        debug_allowed(1) TYPE c,
        l_xml_size       TYPE i.
    dataset_str_xml = '/usr/sap/XIT/ZXI_PARAX_TEST_XML.xml'.
    OPEN DATASET dataset_str_xml FOR OUTPUT
         IN TEXT MODE ENCODING DEFAULT.
    TRANSFER outxml TO dataset_str_xml.
    CLOSE DATASET dataset_str_xml.
store file txt on PC for test purpose - End            ********
ENDMETHOD.

create recordset tag (<= see ref. in FTP Comm. Channel)
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = doc_fragm ).
this object must be created inside your loop...

Similar Messages

  • Using Content Query webpart for specific Document library with multiple managed metadata - Document with multiple metadata tags not showing up

    Hi,
    I am having an issue where when I insert a Content Query webpart into a page, and filter to managed metadata, all the right documents show up except one document that happens to have two metadata tags attached to it.  The content query webpart is set
    to only look through a specific document library.  I'm not sure what I am doing wrong.
    Here is the one document with two metadata tags:
    Below is the Content Query:

    Hi,
    As I understand, you did not get the results with multiple metadata tags through Content Query web part in SharePoint 2013.
    Check things below:
    1. Check if you have set the item limit more than the display items in Presentation section of the web part. If the item number more than item limit, the rest items will not show.
    2. Check if the item you cannot find uses the content type you have set in the content type section of content query web part.
    When you edit the properties of the item, you will see the content type the item is using.
    Best regards
    Sara Fan
    TechNet Community Support

  • Proxy - ABAP mapping - file with content conversion

    Scenario goes from ECC (proxy) to XI then I do ABAP mapping.  I have tested the ABAP mapping with SXI_mapping_test transaction.  My ABAP mapping puts the payload back into XML and then the data goes to a file adapter where I also use content conversion.  If I do not do the content conversion the data comes out correct in XML.  When I change to content conversion I get 20 blank lines.  Is it possible to do content conversion from ABAP mapping?
    Any help would be greatly appreciated.
    Thanks
    Skip Ford

    Hi,
    Have you checked whether the blank lines you got in the XML files are from the blank nodes or elements which you created in ABAP mapping?
    If it is, then just create your elements or nodes whenever there are corresponding values in your ABAP mapping.
    e.g.
    If  l_sender_service is NOT initial.
      elementsender = odocument->create_simple_element(
                                   name = 'SenderService'
                                   value = l_sender_service
                                   parent = msgtype ).
    endif.
    Regards,
    Lim...

  • [ABAP Mapping] Only with ABAP-Objects?

    Hi,
    found <a href="http://https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383">this how-to</a> that describes an ABAP mapping in SAP XI.
    Is ABAP mapping only possible with ABAP Objects? Do I have to use
    the StreamFactory class? Is there an alternative way to do such a mapping?
    Does anyone have another example for ABAP mapping?
    Thanks
    chris

    Hi Christian,
    usually you need that only for special cases. It is not so easy...
    You can find a simple example at my weblog <a href="/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs Performance of Mapping Programs</a>. The same mapping is over there with other mapping kinds; as you see, ABAP seems to be most complex, he, he. One or two days, and you get it
    frohes Basteln,
    Udo

  • ORA-01461 Error when mapping table with multiple varchar2(4000) fields

    (Note: I think this was an earlier problem, supposed fixed in 11.0, but we are experiencing in 11.7)
    If I map an Oracle 9i table with multiple varchar2(4000) columns, targeting another Oracle 9i database, I get the ORA-01461 error (Can't bind a LONG value only for insert into a LONG).
    I have tried changing the target columns to varchar2(1000), as suggested as a workaround in earlier versions, all to no avail.
    I can have just one varchar2(4000) map correctly and execute flawlessly - the problem occurs when I add a second one.
    I have tried making the target column a LONG, but that does not solve the problem.
    Then, I made the target database SQL Server, and it had no problem at all, so the issue seems to be Oracle-related.

    Hi Jon,
    Thanks for the feedback. I'm unable to reproduce the problem you describe at the moment - if I try to migrate a TEXT(5), OMWB creates a VARCHAR(5) and the data migrates correctly!! However, I note from you description that even though the problematic source column datatype is TEXT(5), you mention that there are actually 20 lines of text in this field (and not 5 variable length characters as the definition might suggest).
    Having read through some of the MySQL reference guide I note that, in certain circumstances, MySQL actually changes the column datatype specified either at table creation time or when interfacing with other databases ( ref 14.2.5.1 Silent Column Specification Changes and 12.7 Using Column Types from Other Database Engines in the MySQL reference guide). Since your TEXT(5) actually contains 20 lines of text, MySQL (database or JDBC driver .... or both) may be trying to automatically map the specified datatype of the column to a datatype more appropriate to storing 20 lines of text.... that is, to a LONG value in this case. Then, when Oracle is presented with this LONG value to store in a VARCHAR(5) field, it throws the ORA-01461 error. I need to investigate this further, but this may be the case - its the first time I've see this problem encountered.
    To workaround this, you could change the datatype of the column to a LONG from within the Oracle Model before migrating. Any application code that accesses this column and expects a TEXT(5) value may need to be adjusted to cope with a LONG value. Is this a viable workaround for you?
    I will investigate further and notiofy you of any details I uncover. We will need to track this issue for possible inclusion in future development plans.
    I hope this helps,
    Regards,
    Tom.

  • Mapping Runtime with multiple gateway registration

    I need a help about increase mapping performance.
    I have add new Java server on new server(I mean HW).
    I wonder if ABAP(I mean RFC Gateway with JCo) can recognize this "New" Java server.
    I reference following...
    http://help.sap.com/saphelp_nw04/helpdata/en/1c/ba295ee20fcd41b6804f1bc602de68/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/sap exchange infrastructure tuning guide xi 3.0.pdf
    -->See section "Mapping Runtime"
    I have a following XI3.0 system.
    EOne central Instance(ABAP and Java) on one server(HW).
      Java have one J2EE Dispatcher and one Server.
    EOne dialog Instance(ABAP and Java) on one server(HW)
      Java have one J2EE Dispatcher and one Server.
    So "Java" have two Server processes on each hardware.
    You know when mapping, ABAP connect to Java with JCo.
    In ABAP side, I defined as AI_RUNTIME_JCO_SERVER(SM59).
    In Java side, I defined as AI_RUNTIME_XI1(visual admin)
    They have set same "Program ID" and test connection well.
    Now I add new Java server node.
    I can see "New" Java server tree in visual administrator.
    Can I defined RFC Destination "AI_RUNTIME_XI1" to this New one? (This is same destination.)
    Tunning Guide said, "load distribution by multiple gateway registration".
    What's mean?? I have only one Gayteway(I mean AI_RUNTIME_JCOSERVER)...
    Help.sap.com said, "The RFC Engine service can register under one name to one particular gateway. To register to another gateway, another name has to be used. ".
    What's mean?? Can XI ABAP Gateway recognize "another name"?
    I confuse a bit...
    regards,

    Hi All,
    In addition to the above, if mapping is tested within ESR there is no issue. The problem is happening only during runtime.
    BTW, When we applied the note 1838921 we upgraded the Adapter Framework from SP09 to SP12.
    Could this be an issue?
    Regards,
    Sudheer

  • Loading an XML with multiple nested tags

    I've got some problems dealing with loading a nested tags XML file.
    Let's suppose I have such a very simple myxml.xml file:
    <ROWDATA>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
       </ROW>
    <ROW>
      <EMPNO>7902</EMPNO>
      <ENAME>FORD</ENAME>
    </ROW>
    </ROWDATA>
    I can create the following table:
    create table EMP
    empno NUMBER(4) not null,
    ename VARCHAR2(10),
    and then inserting the XML file in this way:
    insert into EMP
        (empno, ename)
      select extractvalue (column_value, '/ROW/EMPNO'),
          extractvalue (column_value, '/ROW/ENAME'),
      from   table
               (xmlsequence
              (extract
               (xmltype
                 (bfilename ('MY_DIR', 'myxml.xml'),
                   nls_charset_id ('AL32UTF8')),
                 '/ROWDATA/ROW')))
    so as to get inserted two rows into my table:
    EMPNO   ENAME
    7369         SMITH
    7902         FORD
    Now, and this is my question, let's suppose I have such a “more difficult” XML:
    <ROWDATA>
    <ROW>
      <COMPANY>
        <EMPNO>7369</EMPNO>
        <ENAME>SMITH</ENAME>
        <EMPNO>1111</EMPNO>
        <ENAME>TAYLOR</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
       <EMPNO>7902</EMPNO>
       <ENAME>FORD</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
      </COMPANY>
    </ROW>
    </ROWDATA>
    In this case it seems to me things look harder 'cause for every row that I should insert into my table, I don't know how many “empno” and “ename” I'll find for each /ROW/COMPANY and so how could I define a table since the number of empno and ename columns are “unknown”?
    According to you, in that case should I load the whole XML file in an unique XMLType column and than “managing” its content by using EXTRACT and EXTRACTVALUE built-in funcions? But this looks a very difficult job.
    My Oracle version is 10gR2 Express Edition
    Thanks in advance!

    Here's a possible solution using a single pass through the XML data :
    with sample_data as (
      select xmltype(
        '<ROWDATA>
        <ROW>
          <COMPANY>
            <EMPNO>7369</EMPNO>
            <ENAME>SMITH</ENAME>
            <EMPNO>1111</EMPNO>
            <ENAME>TAYLOR</ENAME>
          </COMPANY>
        </ROW>
        <ROW>
          <COMPANY>
           <EMPNO>7902</EMPNO>
           <ENAME>FORD</ENAME>
          </COMPANY>
        </ROW> 
      </ROWDATA>'
      ) doc
      from dual
    select min(case when node_name = 'EMPNO' then node_value end) as empno
         , min(case when node_name = 'ENAME' then node_value end) as ename
    from (
      select trunc((rownum-1)/2) as rn
           , extractvalue(value(x), '.') as node_value
           , value(x).getrootelement() as node_name
      from sample_data t
         , table(
             xmlsequence(extract(t.doc, '/ROWDATA/ROW/COMPANY/*'))
           ) x
    group by rn ;
    I would be cautious with this approach though, as I'm not sure the ROWNUM projection is entirely deterministic.
    As Jason said, it's probably safer to first apply a transformation in order to get a more friendly format.
    For example :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="COMPANY">
        <xsl:apply-templates select="EMPNO"/>
      </xsl:template>
      <xsl:template match="EMPNO">
        <EMP>
          <xsl:copy-of select="."/>
          <xsl:copy-of select="following-sibling::ENAME[1]"/>
        </EMP>
      </xsl:template>
    </xsl:stylesheet>

  • Http to Abap Proxy communication with multiple queues generation in Recevr

    Dear SDNs,
    I need some help in the following scenario, appreciate your suggestions and help .
    I am receiving the messages from sender to PI on http posting, from PI  I am sending the message to SAP system using receiver xi communication channel ( receiver is abap proxy).
    Sender will send the messages in QOS=EOIO, QUEueID=XXXt_100 etc  parameters, when large volumes cases, it is getting delayed to process it using a single queue.
    We are thinking to dynamically  generate multiple queues in PI and send the same queue ids to receiver SAP system to process all the messages quickly in SAP System also.
    Help /Clarifications needed:
    1. XI receiver communication channel in  pi  does not provide any options to generate dynamic queue id based on payload content (using dynamic configuration) and sent it to SAP.
    2. Module Tab in receiver communication channel also got disabled to add  custom adapter modules, can we add custome adapter module on xi receiver channel to generate dynamic queue id ?
    Really appreciate your immediate help and suggestions.
    Thanks.
    Suraj.

    Dear Praveen,
    Thanks lot for the immediate reply, we need to use EOIO, as the messages need to be processed in the same order we send and receive, there is no flexibility in QOS=EOIO, Appreciate if there is any other thoughts?
    Thanks In Advance.
    Suraj.

  • Mapping problem with Multiple destination values

    Hi,
    I recently started to work on SAP MDM as a beginner. I am posting this message to get some help to solve the problems that I encountered as I run the SAP.
    For example, we can sub-categorize a 'Product' as Food>ProcessedFood>Frozen Food>Pizzas'. However, notice that there exist the sameNode name under the 'Commodity' as following two categories show.
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    The Node name, 'Pizzas', under two different categories has fewattributes such as A, B, C, and D. When I tried mapping these attributes at Map Field/Values Tab under the import manager, I ended up getting warning messages due to the overlapping.
    The message says "One or more of the source values were mapped to multiplz destination values. Some of the mapped destination values may need to be unmapped before performing the import."
    Does anyone have an idea to solve this overlapping problem?
    I will really appreciate your answer.
    Edited by: coolpsy on Jun 8, 2010 4:27 AM
    Edited by: coolpsy on Jun 8, 2010 7:55 AM

    Hi,
    As per my understanding, there are two categories as shown by you
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    and you want to link Attributes with specific correct Category say Product not with Commodity. So in order to avoid overlapping, try using option Split Hierarchy. For more details Please refer below Article: refer page 11-15/20
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/308c62a2-5faa-2a10-fda6-fa4aa7169734?quicklink=index&overridelayout=true
    Also refer, http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090d0bd-1da7-2a10-468f-bdd17badb396?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8090941f-a5a7-2a10-3ba6-b4af5ec6d97b?quicklink=index&overridelayout=true
    Just check and revert with Result if it helps..
    Regards,
    Mandeep Saini

  • MDM ABAP API: Query with Multiple Parameters

    I would like to query MDM repository passing multiple parameters. I used the following code, however, it didn't work.
    If I pass only one parameter, it works fine.
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    * Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

    Hi,
    I see you are not clearing your local structure "ls_query".  This could be reason of problem,  try this and let us know the result:
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

  • Multi-mapping scenario with multiple receivers

    Hello all,
    I have an interface using multi-mapping to generate to different files types from one source; works great.
    JDBC --> XI --> (1) XML (2) CSV
    I now need to have the XML file go to one receiver and the CSV file needs to go to a second receiver.  I've looked at the blog:
    /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
    This blog shows how to configure dynamic receiver determination based on the source data.  In my case the output files are identical (as far as mapping), the only difference is the output format.  Has any one seen a "How to" document or blog more in line to my scenario?
    Regards,
    Jose

    Hi,
    You can also do this way
    You can define as many number of Business system you need. Say for eg you need to send XML to one BS and CSV to another BS.
    Instead of doing Extended interface determination... Goto to Receiver Determination and when you are adding the Receiver service you have the option to add one more Service... There you give both the Business Service and hence you will have two inbound interface and you can different interface mapping and so on..
    Regards,
    Prakash

  • ABAP Outbound Proxy with multiple entries

    I have message type as follows.
    MT_Proxy_Matmas_out  -- DT_Proxy_Matmas_out
    Matnr         1..unbounded
       Material_Num   1..1
       Material_Dec    1..1
    Message Inrerface: MI_proxy_Matmas_out.
    Generated Proxy has following objects.
    1. Class     ZMCO_MI_PROXY_MATMAS_OUT     Proxy Class (generated)
    2. Structure     ZMDT_PROXY_MATMAS_OUT     Proxy Structure (generated)
    3. Structure     ZMDT_PROXY_MATMAS_OUT_MATNR     Proxy Structure (generated)
    4. Structure     ZMMT_PROXY_MATMAS_OUT     Proxy Structure (generated)
    5. Table Type     ZMDT_PROXY_MATMAS_OUT_MATN_TAB     Proxy Table Type (generated)
    Report Program ZB_Matnr_xport.
    DATA: prxy TYPE REF TO ZMCO_MI_PROXY_MATMAS_OUT.
    DATA: i_data_records TYPE TABLE OF ZMDT_PROXY_MATMAS_OUT.
    DATA: wa_data_records TYPE ZMDT_PROXY_MATMAS_OUT.
    DATA: it type ZMMT_PROXY_MATMAS_OUT.
    CREATE OBJECT prxy.
    Loop at itab
    MOVE_Corresponding ......to XXXXXXXXXXXXXX // we tried several option with no success here in this Loop  //
    EndLoop
    CALL METHOD prxy->execute_asynchronous
          EXPORTING
            output = it.
         commit work
      CATCH cx_ai_system_fault .
        DATA fault TYPE REF TO cx_ai_system_fault .
        CREATE OBJECT fault.
        WRITE :/ fault->errortext.
    As you can see from above template I want move all the records of Internal table to Message Type structure before calling Proxy, CALL METHOD proxy->.........
    Can someone provide me sample code how to achive this. We are on WEB AS 620.
    Thanks a lot.
    ST

    suppose your table is it_datatable  of type  ZMDT_PROXY_MATMAS_OUT_MATN_TAB which contains matnr, description.  Then try the following
    data : l_var type ZMMT_PROXY_MATMAS_OUT.
    l_var-MT_Proxy_Matmas_out-Matnr 1[ ] = it_datatable[ ].
    then
    CALL METHOD prxy->execute_asynchronous
    EXPORTING
    output = l_var.
    commit work

  • Please Help with multiple video tag editing

    I have about 650 music videos that I would like to have show up under the music video tab in my ipod and would like to know if there are any apps out there thay will allow me to change all the videos to Music Videos so they all dont show as Movies under iTunes and my iPod without having to right click and get info than change to music video - I think this option not already being included in Itunes for iPod videos is extremely stupid - anyone who can help me out and shed some light on a faster way please feel free to tell me and If there is a way in itunes to do this please let me know as I cant seem to find one
    And all Apple care says is maybe in the future we will look into to implementing this feature or something like it if we see fit and makes sense as we like to make our software as user friendly as possible
    Thanx
    Black Ipod Video 60gb
      Windows XP Pro  

    bump this up
    As I think this is a very good question and it should deff be looked into I mean cmon this is crazy there is no good reason that you should have to edit them 1 by 1
    Black 80gb Gen 5.5 Video as of Today

  • XML output with multiple tags in one line

    I have not done much XML exporting with SQL. Previously I had just been ending my SQL queries with
    FOR XML RAW ('Company'), ROOT ('Companies'), ELEMENTS;
    and it formatted my query nicely in an XML output. That put every column name as a tag and the cell data within the tag.
    However, now the criteria has changed on me. I need to create a tag with multiple sub tags in it.
    Example: <Location Floor="10" Suite="512" DoorType="Metal">
    But I'll still need other tags to be normal in the XML output such as
    <Address>123 Fake St</Address>
    <City>Springfield</City>
    <Location Floor="10" Suite="512" DoorType="Metal">
    Is there any way to get this XML mixed in the output like above?
    Thank you for any help. 

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • Abap mapping code

    Hi friends
    I am new to Abap mapping PLZ can any one helpme on abap mapping code
    with Source structure and target structure
    Message was edited by:
            Viswanadh Vadde

    Hi !!
    refer the below links
    BAP Mapping is used whenever you explicitly need to build your output XML structure . Its entirely depends on your call which approach you want to adopt i.e. JAVA mapping or ABAP mapping as in both the cases you need to explicitly build the output structure . ABAP Mapping however creates a DOM tree in the memory . Therefore it can be a performance issue whenever your source structure is complex . In case you need an idea of how to go about ABAP mapping here is a link which you can refer
    http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
    Also ABAP mappings have the handicap that they are separated from usual development in Repository. Additional there is more (ABAP, DOM) experience required as for example for XSLT or graphical mapping (my point of view). So they are used for special reasons like access to ABAP stack (transparent tables!).
    Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    Comparing Performance of Mapping Programs
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    ABAP Mapping Blogs
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    How to Use ABAP Mapping
    https://wwwn.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    Some more
    ABAP Mapping
    I suggest you also go through these links to know more on ABAP Mapping:
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    This document will help you to create ABAP Mapping.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    why Abap Mapping and how to acheive it
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    <b>Pls reward if useful</b>

Maybe you are looking for

  • Satellite P200-1B6: Sound Driver update fails and HD-DVD Player doesn't work

    I have just bought a Satellite P200-1B6 laptop and spent the day installing the updates recommended by the TEMPO program. One of these was a Sound Driver update from RealTek but on running this it fails about 80% of the way through with an error: 'In

  • Mandatory Face detection in iphoto, MetaData, iCloud

    When will I be able to I turn off Face recognition in iPhoto? Apple needs to change Faces recognition in iPhoto from manditory to optional. I want to believe that Apple is an ally in protecting thier customer's metadata. Given the National Security A

  • Windows 7 UAC

    To get round the Vista UAC 'trust message' I codeSigned my application which worked fine but in windows 7 it now displays the 'Do you want to allow the following program to make changes to this computer?' message. Does anyone know how I can get rid o

  • Export Data Sources DEV Transport to Acceptance

    Hi Friends I am having a Export Data Source 80VELEXT created in Development System. When I transport that Datasource to Acceptance. It is not getting activated. I checked in RSLOGSYSMAP Table. I do not see the DB4CLNT120 --AB4CLNT110 Check mark. Is i

  • English please

    Just spent half a day downloading CS6 Master Collection. A selection of languages are offered at the instal stage. Non of them English. Now what?