ABAP Mapping : Link to the repository

Hello,
I'm taking a look at PI Mapping with ABAP. In the documentation I find how I have to program the ABAP part, but I am missing the link with the messages defined in P.
I made a class 'ZA_CL_KCL_MAPPING' with interface IF_MAPPING in it.
I made the changes to the exchange profile, putting 'R3ABAP|ABAP-Class;R3XSLT|XSL (ABAP Engine)' in 'com.sap.aii.repository.mapping.additionaltypes'.
What is the step by step process to make my ABAP mapping really work ? Where do I put my missing link .
Thanks in advance.
Kris

Try giving this entry in Exchage Profile under  IntegrationBuilder>IntegrationBuilder.Repository>com.sap.aii.repository.mapping.additionaltypes
R3_ABAP|Abapclass;R3_XSLT|XSL (ABAP Engine)
Close IR and Reopen. Now in interface mapping you can select the ABAP Mapping Type. Then give your abap class name there exactly what you defined in SE38.
Activate and test using Test tab of Interface Mapping. Use some sample payload of Source XML which you should be knowing.
Note:- Message Mapping is not required.
Regards,
- Gujjeti.
Edited by: Praveen Gujjeti on Mar 23, 2009 7:35 PM

Similar Messages

  • Related Content links in the repository tables

    We have 150 FR reports and many of them are using Related Content links. I am trying to find the easiest way to view all the Reports that have Related Content links and which reports they are linking to. I was trying to see about writing a sql against the tables but need to know which tables to join and what fields to select.
    If anyone has a sql they have built to do similar selects or a feature in EPM that I am missing let me know.
    Thanks!
    Robert

    Indeed, we have the same issue with our Solaris 10 containers.
    None of the network interface are visible since we upgraded to Solaris 11.1.
    Highly likely that we will have to fallback to 11.0
    root%A-infmagt004[8] zoneadm -z udsr02 boot
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: net0 registered
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: dmz0 registered
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: vd155 registered
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: vd157 registered
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: vd153 registered
    Dec 7 09:55:41 gvas-infmagt004 mac: [ID 469746 kern.info] NOTICE: vd301 registered
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: net0
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: dmz0
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: vd155
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: vd157
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: vd153
    Dec 7 09:55:43 gvas-infmagt004 dlmgmtd[65]: [ID 183745 daemon.warning] Duplicate links in the repository: vd301
    root%A-infmagt004[4] zlogin udst02 ifconfig -a
    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000
    useless.

  • Abap mapping "How to" not available, can you send me the pdf?

    Hello,
    I need information about ABAP Mapping and all the posts about that kind of mapping have a link to the sdn guide "How to Use ABAP Mapping in Exchange Infrastructure 3.0" --> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    But that link is broken , is there any way that you can send me that file if you got it?

    Hi Marshal,
    Start with this...........
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    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
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping

  • Abap Mapping: error in accessing to DynamicConfiguration.

    Hi All,
    I have been trying to put a value into Dynamic Configuration repository with the following abap code.
    DATA: l_record TYPE MPP_DYNAMIC.
    l_record-namespace = 'http://name1/ca/result1'.
    l_record-name = 'FileName'.
    l_record-value = '/mydir/dir1/File01.xml'.
    CALL METHOD dynamic_configuration->add_record
      EXPORTING
        record = l_record.
    I receive the following dump.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Except.                CX_SY_REF_IS_INITIAL
    Date and Time          25.03.2009 11:06:10
    Short text
         Access using a 'ZERO' object reference is not possible.
    What happened?
         Error in the ABAP application program.
         The current ABAP program "Z_XI_MAPPING_TEST_03==========CP" had to be
          interrupted because it contains
         a statement that cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was n
          caught in
         procedure "IF_MAPPING~EXECUTE" "(METHOD)", nor was it propagated by a R
          clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         An attempt was made to access a component with a 'ZERO' object
         reference (points to 'nothing').
         An object reference must point to an object (an instance of a class)
         before it can be used to access a component.
         Either the reference has not yet been set or it was set to 'ZERO' using
         a CLEAR statement.
    I am executing my test outside PI, by launching the report Z_MAPPING_TEST as explained in a blog.
    In java evironment it is necessary to create an istance of a object for saving the value of the variable 'FileName' inside the Dynamic Configuration repository.
    I do not know if it is necessary to create (before) an istance of the Dynamic Configuration in abap mapping or if the method add_record do this.
    The meaning of my test is to get the name file from the Dynamic Configuration repository set in a previous step in a flow where the abap mapping will be launched.
    Any suggestion will be well appreciated.
    Many thanks in advance for your kind cooperation.
    Regard,
        Giovanni

    Hi,
    in your ABAP mapping code, instead of l_record-namespace = 'http://name1/ca/result1' use below:
    l_record-namespace = 'http://sap.com/xi/XI/System'.
    Then re-run your scenario.
    Regards,
    Rajeev Gupta

  • How To Guide on ABAP mapping (How to Use ABAP-Mapping in XI 3.0).

    Hi,
    I am looking for this document: How To Guide on ABAP mapping (How to Use ABAP-Mapping in XI 3.0), and not able to find it.
    Can anybody please point me the location, to look for, or post the document.
    Thanks,
    Namadev

    Hi Namadev Chillal  ,
    These r the links containing PDF docs which u r looking for:
    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
    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

  • Access MIME from ABAP Mapping for Attachment

    Hi,
    I am adding an attachment in ABAP Mapping and sending that message to Ariba System through HTTP Adapter channel.
    I am able to send the message successfully and also I can see the attachment in the PI RWB But I am not able to see any
    attachment in the Receiver's end along with the message.Ariba is able to receive the message successfully though.
    It looks like I need to change MIME Header a bit before sending the message.
    I check this link.
    XI Attachment and main document MIME sequence
    But Its about SOAP Adapter with PayloadSwap Bean. Since HTTP adapter is on ABAP we can not use the Module
    Tab of the channel.
    I need to know how can I use ABAP Mapping to access the MIME HEADER to change/ check Content Disposition and
    other properties.
    Thanks,
    Vijay
    Edited by: tech.info012 on Oct 12, 2010 6:33 PM

    When I tried the 2nd option It is giving me this error in response message. Do you have any idea what problem can cause this.
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive
    for message 4cb474bf-00c1-02af-e100-80000aa00d4b(INBOUND). Reason: java.lang.NullPointerException:
    </SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Thanks,
    Vijay

  • Testing ABAP mapping

    Hi,
            I have created one ABAP mapping class with the method IF_MAPPING~EXECUTE.I tried to test the mapping program in a report by passing  the source(XML document as a string).The call to the mapping method is done as follows:
    CALL METHOD CLASS1=>IF_MAPPING~EXECUTE
         EXPORTING
              source = sxml
            IMPORTING
               result = sxml1.
    When I try to activate the above call, I get an error message which says that You can only use class=>method  with static methods.This is happening in SAP WAS6.20.I understand that ABAP mapping can be tested in dynamic calls only in XI.
             So the only option left is to test the ABAP mapping in Integration repository Design -Interface mapping.When I include ABAP mapping class  in the interface mapping and run the whole scenario,I get error message in SXMB_MONI.
    Is there an easy way out to test the ABAP mapping than including it in the Interface mapping?If you have some ideas,please inform.
    Thanks in advance,
    S.Banukumar

    Hi Chris,
              Thanks a lot.I have corrected the name space as ns instead of ns0.I have  done the Design and Directory setting as suggested by you.Now I am getting the following error when I try to test my scenario in
    SXI_MAPPING_TEST.
      <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
      <ERROR href="#o97" />
      </asx:values>
    - <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
    - <cls:CX_XMS_SYSERR_MAPPING id="o97">
    - <CX_ROOT>
      <TEXTID>579DFEE1FC5AF24F9C83617A696DC539</TEXTID>
      <PREVIOUS />
      <KERNEL_ERRID />
    - <INTERNAL_SOURCE_POS>
      <PROGID>160</PROGID>
      <CONTID>650</CONTID>
      </INTERNAL_SOURCE_POS>
      </CX_ROOT>
      <CX_STATIC_CHECK />
    - <CX_XMS_SYSTEM_ERROR>
      <ID>APPLICATION_PROGRAM_ERROR</ID>
      <P1>$TMP.BOOKINGTOMSG</P1>
      <P2>R3_ABAP</P2>
      <P3>UNCAUGHT_EXCEPTION</P3>
      <P4 />
      <INFO />
      <CATEGORY />
    What could be possible reason for the exception?Do I need to give the name space for the ABAP mapping name when I include it in the Interface mapping?
    Thanks,
    S.Banukumar

  • Activating 'ABAP MAPPING'

    I'm trying to register ABAP MAPPING as a new additional mapping.
    I've done all that sap says in his 'How to ...' pdf document. The only thing i don't know how to do is the part what says ... 'Therefore, the additional mapping type name must be registered as RFC-Destination in the Integration Server, too.'.
    Where can i do this step?
    Thanks.

    You have to refresh the Cache and go to http://<host>:J2EEport/rep
    Click on Administration -> Repository -> Administration of Properties -> All Properties -> Check your parameter in the right window whether it populated the value you mentioned in the Exchange Profile. If you do not see that click on <b>Refresh</b> at the top of the window.
    Go to IR and Environment -> Clear SLD Data Cache and check whether the ABAP Mapping available in the IR.
    If it still does not appear, close the IR and relogin then it shows up.
    regards
    Shravan

  • How to get ABAP mapping option in Interface Mapping

    Hi
    experts
    How to get ABAP mapping option in Interface Mapping . i need to do abap mapping . i didnt find the option
    plz help me

    Hi,
    If u2018ABAP-classu2019 and u2018XSL(ABAP ENGINE)u2019 does not appear under the u2018Mapping Program Typeu2019 in Interface Mapping, one has to make an additional entry in the Exchange Profile. 
    Only a user with the J2EE security role (administrator) can make the following settings in the Exchange Profile.
    It is achieved in the following manner:
    1) Open http://<host>:<port>/exchangeProfile/index.html
    2)Choose IntegrationBuilder ->IntegrationBuilder.Repository -> com.sap.aii.repository.mapping.additionaltypes
    Add: R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine)
    To check whether the data has been successfully read from the exchange    profile:
    1- Open http://<host>:<port>/rep/support/admin/index.html
    2- Choose Administration of Properties -> All Properties
    3- If the value associated to parameter com.sap.aii.repository.mapping.additionaltypes is not visible, press REFRESH button
    After doing above check in IR, if still don't find the option for ABAP mapping then refresh the cache.
    Award points if useful.

  • XI 7.0 ABAP-Mapping in Design Builder (Interface Mapping)

    Hi,
    in XI 3.0 there was the possibility to specify a ABAP-Mapping-Class in the Interface Mapping. In XI 7.0 the
    entry ABAP-Mapping is somehow missing in the drop-down-Box, there is a Message-Mapping, JAVA-Mapping and XSLT-Mapping but no ABAP-Mapping :-(.
    Did this move somewhere else or are ABAP-Mapping's not possible anymore ??
    Best Regards,
    Frank Marx

    Frank,
    You need to activate ABAP and XSLT mapping.
    Check this blog for the same,
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Regards,
    Bhavesh

  • Dynamic configuration in integration process using abap mapping

    Hi everybody,
    i have the following scenario:
    file adapter -> integration process -> file adapter
    The integration process uses an ABAP mapping and sets the filename in dynamic configuration as follows:
    *-- Set Parameter
        clear ls_dyn_record.
        ls_dyn_record-name      = gc_dyn_config_name.
        ls_dyn_record-namespace = gc_dyn_config_ns.
        ls_dyn_record-value     = <new_file_name>
    *-- Write configuration
        ir_dyn_config->add_record( ls_dyn_record ).
    But now the new filename is not reflected in the file adapter (receiver). In the integration monitor (SXMB_MONI) i still find the old filename.
    Whats wrong?
    Elko

    The ABAP mapping is more complex, setting filename in Dyn. Conf. is just one step in mapping.
    If I check the Workflow protocol of the Integration Process, I find the following in the Trace of the ABAP-Mapping:
    The filename has been set to 3233340.SWNF00HW.P10I. The Suffix P10I has been added in the ABAP mapping.
    When I check the subsequent message in SXMB_MONI I find:
    The added suffix is missing in the filename !!
    Elko

  • Multi-Message-split with ABAP mapping and adapter specific attributes

    Hi all,
    With <b>ABAP-Mapping I split 1 message to n messages</b>.
    So many files are generated in <b>file-Adapter</b>.
    Everything fine.
    But now I want the file names different using adapter specific attributes.
    It is not possible to use variable substitution and write the file name in payload because of receiver restrictions.
    I tried this with following similar coding in ABAP-Mapping:
    data: lt_records TYPE MPP_DYNAMIC_TAB.
          Loop.
          l_file_name = "payload-Inbound"-information
          ls_record-namespace = 'http://sap.com/xi/XI/System/File'.
          ls_record-name = 'FileName'.
          ls_record-value = l_file_name.  "l_file_name comes from inbound-payload
          append ls_record to lt_records.
         Endloop.
      CALL METHOD dynamic_configuration->set_all_records
        EXPORTING
          records = lt_records.
    If I start the interface I see in the monitoring the dynamic configuration with many entries for file-name in the the SOAP-Header mapping of the request message (following extract):
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Mapping der Request-Message
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPAADDRESS.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPABROKERROLE.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACOMPANYSEGMENT.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACUSTOMERROLE.XML</SAP:Record>
    The result is that <b>all files have the same file name</b> (last entry in dynamic configuration).
    Is it possible to write the adapter specific configuration in ABAP-mapping <u>for every single result message</u>??
    Thank you for your help,
    Florian

    Hi Florian,
    I've a different idea...I dont think its a "right solution" but just another work around..it involves a BPM...
    In your ABAP mapping..set the dynamic config with as many variables as number of different messages...i.e. use the variables like 'FileName1', 'FileName2'...'FileName6' instead of 'FileName'. But use the same namespace 'http://sap.com/xi/XI/System/File'
    Call the above mapping in a BPM and capture the individual messages and set the attribute 'FileName' from the values of 'FileName1' to 'FileName6' accordingly using Message Mapping and then send the message using the 'Send' step.
    before you try this, try using the variable names 'FileName1' ...'FileName6' in the receiver adapters...enable the ASMS. <b>I know we need to select which variables from the dynamic config to be used by the adapter by specifically selecting 'FileName', 'Directory' etc...but just give it a try and see if it works..</b>
    Or..instead of using a BPM..you can combine Henrique's idea...use Adapter module to set the value for 'FileName' from variables 'FileName1'...'FileName6' accordingly.
    hope I'm clear..lemme know if you have any questions..
    cheers
    praveen

  • 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...

  • ABAP Mapping Prerequistes

    Hi All,
    In case of IR,while specifying mapping program in interface mapping we get option for message mapping,java mapping and XSLT mapping.
    But if I want to use ABAP mapping what are the prerequisites for it?
    Please guide me.

    Hi,
    ABAP mapping is not available by Default and should be activated.
    take a look at this blog on doing the same,
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Regards,
    Bhavesh

  • Unicode in ABAP-Mapping (u00E9 becomes u00C3u00A9)

    Hello all,
    I implemented this guide to create a flatfile from an IDoc. It works fine, but some characters are not mapped correctly: an "é" for example becomes "é" and an "ú" becomes "ú". Is this a Unicode problem or something? If yes, how can I use Unicode in ABAP mapping?
    As the XML-IDoc is transfered correctly to XI the problem is not in communication channels... it's in the ABAP mapping.
    Best regards,
    David

    Hi David,
    As michal said the problem needs to be isolated whether it is at the mapping level or at the file adapter level.
    In case it the file adapter then you can mention the encoding standard and if its at the abap mapping the your objects should be unicode enabled.
    Regards
    joel

Maybe you are looking for

  • N97 and Gmai app

    I have downloaded the new software for my N97 through Nokia Ovi Suite and now my gmail app won't work anymore. I have uninstalled the gmail app and installed it again but no go. How fo fix it? Grtz, Diane

  • Deleting the iTunes folder...

    Hi, forums. I do not need iTunes. I will never need iTunes. I have absolutely no use for it, and it is merely taking up valuable space on my hard drive. So I uninstalled it; I found a website with a step-by-step process to completely uninstall it, an

  • PO Deletion in APO

    Dear All, Could someone please guide me regarding how to delete the PO created by TLB in APO which has not yet got CIFFed to R/3. Is there a BAPI for the same(DeleteMultiple) - or some other alternate way? regards Sudhir

  • Groups and Auxs - confused Newbie

    Can someone please explain the difference between a group and a bus. Case: I want to group my drum tracks to a group to apply automation etc. If I create the group in the mixer, select each drum track and say t's art of the groupdo I still need to ap

  • Why do my music files show as MPEG 4 in Itunes

    Why do my music files show as MPEG 4 in Itunes