Little abap mapping sample

Hi everyone.
I'm a two years old abap programmer and i would like to understand how abap mapping works.
I've read a sap document with a code sample but i don't understand it very well.
I've defined a message type containing 2 fields, name and age. This structure has cardinality of 1..unbounded.
I want to make and abap mapping and have one outbound estructure containing the result of the 'collect' instruction' in abap. the output structure is the same as the input one.
Thanks for the help.

inigo,
I have seen many of your posts and you did not assign  points to the folks who answered.
I request you to reward the people who have replied to your posts. IF you consider that the replies have helped u , assign
2 points -- helpful
6 points -- very helpful
10 points -- problem solved..
If u are not able to see the assign point s button refer to this thread...
Unable to award points
People in the forum spend their valuable time answering questions. It is courtesy to do so.
regards
Shravan

Similar Messages

  • ABAP MAPPING SAMPLE SOURCE

    Hi,
    I have to make abap mapping like bellow it.
    Sender
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Legacy_Msg xmlns:ns0="http://test/xi/test001">
         <item>
              <A>TEST1</A>
              <B>TEST2</B>
         </item>
         <item>
              <A>TEST2</A>
              <B>TEST3</B>
         </item>
    </ns0:Legacy_Msg>
    Receiver
    <?xml version="1.0" ?>
    <MsgOut>
         <item>
              <C>TEST1</C>
              <D>TEST2</D>
         </item>
         <item>
              <C>TEST2</C>
              <D>TEST3</D>
         </item>
    </MsgOut>
    I want to get result like over.
    I don't know how to code abap mapping.
    Please help me.
    Thanks.

    check "How to Use ABAP Mapping in XI 3.0" in this
    http://www.erpgenie.com/sap/netweaver/xi/howto.htm

  • XSLT samples for XML- ABAP mapping

    Hi all,
    Does anyone have a XSLT samples for XML->ABAP mapping ?
    regards

    first create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
    <b>XSLT code</b>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:output indent="yes"/>
      <xsl:template match="NewDataSet">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="Table">
                <OUTTAB1>
                  <AIRPORTCODE>
                    <xsl:value-of select="AirportCode"/>
                  </AIRPORTCODE>
                  <CITYOFAIRPORTNAME>
                    <xsl:value-of select="CityOrAirportName"/>
                  </CITYOFAIRPORTNAME>
                  <COUNTRY>
                    <xsl:value-of select="Country"/>
                  </COUNTRY>
                  <COUNTRYABBRIVATION>
                    <xsl:value-of select="CountryAbbrviation"/>
                  </COUNTRYABBRIVATION>
                  <COUNTRYCODE>
                    <xsl:value-of select="CountryCode"/>
                  </COUNTRYCODE>
                  <GMTOFFSET>
                    <xsl:value-of select="GMTOffset"/>
                  </GMTOFFSET>
                  <RUNWAYLENGTHFEET>
                    <xsl:value-of select="RunwayLengthFeet"/>
                  </RUNWAYLENGTHFEET>
                  <RUNWAYELEVATIONFEET>
                    <xsl:value-of select="RunwayElevationFeet"/>
                  </RUNWAYELEVATIONFEET>
                  <LATITUDEDEGREE>
                    <xsl:value-of select="LatitudeDegree"/>
                  </LATITUDEDEGREE>
                  <LATITUDEMINUTE>
                    <xsl:value-of select="LatitudeMinute"/>
                  </LATITUDEMINUTE>
                  <LATITUDESECOND>
                    <xsl:value-of select="LatitudeSecond"/>
                  </LATITUDESECOND>
                  <LATITUDENPEERS>
                    <xsl:value-of select="LatitudeNpeerS"/>
                  </LATITUDENPEERS>
                  <LONGITUDEDEGREE>
                    <xsl:value-of select="LongitudeDegree"/>
                  </LONGITUDEDEGREE>
                  <LONGITUDEMINUTE>
                    <xsl:value-of select="LongitudeMinute"/>
                  </LONGITUDEMINUTE>
                  <LONGITUDESECONDS>
                    <xsl:value-of select="LongitudeSeconds"/>
                  </LONGITUDESECONDS>
                  <LONGITUDEEPERW>
                    <xsl:value-of select="LongitudeEperW"/>
                  </LONGITUDEEPERW>
                </OUTTAB1>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:stylesheet>
    <b>just create a type 1 program and paste the below given code.</b>
    report y_consume_webservice .
    data: wf_user type string .
    data: wf_password type string .
    types: begin of outtab1 ,
       airportcode(6)  ,
       cityofairportname(50),
       country(30)  ,
       countryabbrivation(10),
       countrycode(6)  ,
       gmtoffset(10)  ,
       runwaylengthfeet(15),
       runwayelevationfeet(15),
       latitudedegree(10)  ,
       latitudeminute(10)  ,
       latitudesecond(10)  ,
       latitudenpeers(10)  ,
       longitudedegree(10)  ,
       longitudeminute(10)  ,
       longitudeseconds(10)  ,
       longitudeeperw(10) ,
       end of outtab1 .
    data: outtab type  table of outtab1.
    data: wf_o like line of outtab .
    data: g_okcode like sy-ucomm .
    data: my_container   type ref to cl_gui_custom_container .
    data: g_dock type ref to cl_gui_docking_container .
    data: mygrid type ref to cl_gui_alv_grid .
    data: wf_field_cat type lvc_t_fcat .
    data: wf_field_cat_wa like line of wf_field_cat ,
          wf_is_layout type lvc_s_layo .
    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_fld_cat_wa like line of wf_fld_cat .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    data: xslt_err type ref to cx_xslt_exception .
    constants:
    * encoding for download of XML files
    encoding     type string value 'utf-8' .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: uri2(132) type c lower case .
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default 'proxy.xxx.com' ,
                p_port(4) default '80'.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
    clear wf_string .
    concatenate
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '<soap:Body>'
    '<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
    '<country>' uri2 '</country>'
    '</GetAirportInformationByCountry>'
    '</soap:Body>'
    '</soap:Envelope>'
    into wf_string .
    clear :rlength , txlen .
    rlength = strlen( wf_string ) .
    move: rlength to txlen .
    clear: wf_proxy, wf_port .
    move: p_proxy to wf_proxy ,
          p_port to wf_port .
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Length'
        value = txlen.
    call method http_client->request->set_header_field
      exporting
        name  = 'SOAPAction'
        value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
    call method http_client->request->set_cdata
      exporting
        data   = wf_string
        offset = 0
        length = rlength.
    call method http_client->send
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2.
    call method http_client->receive
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    clear wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).
    replace all occurrences of
        '<' in wf_string1 with '<' .
    replace all occurrences of
    '>' in wf_string1 with '>' .
    replace all occurrences of
    'xmlns=' in wf_string1 with 'xmlns:xsl=' .
    try .
        call transformation (`Y_TEST`)
                source xml wf_string1
                result     outtab = outtab.
      catch cx_xslt_exception into xslt_err.
        data: s type string.
        s = xslt_err->get_text( ).
        write: ': ', s.
        stop.
    endtry .
    break-point .
    Try this and give me your feedback.
    Regards
    Raja

  • Dynamic configuration in ABAP Mapping

    Dear All,
    I have requirement to use the filename's name in the mapping to the target message.
    e.g: Filename is Victor.303, i need to take this 303 and map it to the target message.
    I understand i can get that value using dynamic configuration in Adapter-Specific Attributes.
    But all the samples are using Java code used in UDF.
    How to do the same in ABAP Mapping?
    I tried:
       record =  dynamic_configuration->get_record( namespace = 'http://sap.com/xi/XI/System/File'
                                                        name = 'FileName').
    But record-value return blank.
    Best Regards,
    Victor.

    Dear Prateek,
    I changed my code with:
      DATA: record TYPE mpp_dynamic.
      CALL METHOD dynamic_configuration->get_record
        EXPORTING
          namespace = 'http://sap.com/xi/XI/System/File'
          name      = 'FileName'
        RECEIVING
          record    = record.
    but record-value still return as blank.
    I have doubt in this, do i need to populate the FileName in the dynamic configuration (in the graphical mapping) first before i can get the value in the ABAP mapping? or System should filled it and i just can use it directly in the ABAP mapping?
    How we know what is the available name and namespace in that dynamic configuration-->get record??
    (e.g: my case is FileName, and in the link that you gave is ERROR.)
    Any link for this?
    Best Regards,
    Victor.

  • Any website for XSLT AND ABAP mapping

    Hi XI experts,
    I am looking for any good website/Material for XSLT and ABAP Mapping with examples.
    So experts if you any one of you have any clue , i would appreciate it , if you post the info here .
    Regds,
    Ram.

    Hi,
    For XSLT mapping, please try to create msg types for sender and recv, import these two into XML Mapforces (This is a software which enables us to do mapping this you can download from altova mapforce site) , do mapping in that mapforce , late click on XSLT icon , one XSLT file will be c reated that file , prepare zip and late come to xi , import under imported archieves,do Interface mapping by selecting the XSLT mapping option, select imported archieve..
    See below examples..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    http://www.troobloo.com/tech/xslt.toc.shtml
    http://www.w3schools.com/xsl/
    http://www.w3.org/TR/xslt
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic%20xslt%20mapping%20in%20sap%20xi%2c%20part%20i.pdf
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    Required XSLT Mapping tips!
    Regards
    Chilla..

  • How to replace the root tag in ABAP Mapping

    how to replace the root tag with the certain string in ABAP Mapping
    just like
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
         <name>Lawrence</name>
    </root>
    into
    <?xml version="1.0" encoding="UTF-8"?>
    <myRootElement>
         <name>Lawrence</name>
    </myRootElement>
    i don't want to implement it in message mapping
    please give me the sample code
    thanks in advance

    Use below code
    odocument = ixmlfactory->create_document( ).
    msgtype = odocument->create_simple_element(
    name = 'myRootElement'
    parent = odocument ).
    Thanks
    Praveen

  • ABAP Mapping  and Message Mapping

    Hello
    I want to do the followig mapping
    File - > IDOC
    field1  ->field_idoc1
    field2  ->field_idoc2
    field3  ->field_idoc3
    field4  -> (based on an dictionary table in the R/3)
    For the first 3 fields I will use message-mapping.
    For field4 I heard about ABAP Mapping. Select with the value of field4 in an ABAP Table and response the new value to the mapping back.
    Would both mappings in one Interface-Mapping work?
    Regards
    Christoph

    Christoph, There was an article previously available in articles section, now i dont find the link.
    I have given a sample code below. You can find lot of sample JCO code provided along with the JCO library that can be downloaded from service.sap.com.
    JCO.Repository mRepository;
    JCO.Client mConnection = JCO.createClient(
                   sapClient,
                   userName,
                   password,
                   language,
                   hostName,
                   systemNumber );
    // connect to SAP
    mConnection.connect();
    // create repository
    mRepository = new JCO.Repository( "sample", mConnection );
    // Create function
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate("Z_TEST");
    function = ft.getFunction();
    // Obtain parameter list for function
    JCO.ParameterList input = function.getImportParameterList();
    // Pass function parameters
    input.setValue( param1_value , "P_PARM1");
    input.setValue( param2_value , "P_PARM2");
    JCO.ParameterList tabInput = function.getTableParameterList();
    JCO.Table inputTable = tabInput.getTable("T_PARM3");
    inputTable.appendRow();
    inputTable.setValue("test" , "IDOC");
    mConnection.execute( function );
    String ret = function.getExportParameterList().getString( "P_GEN_NUM" );
    mConnection.disconnect();
    return ret ;
    Regds
    Saravana

  • Java Mapping/UDF/ABAP mapping to capture payload

    Hi,
    could you please provide me Java mapping code samples (or UDF code) to save payloads of a message based on Message ID
    i have a synchronous scenario where i have payloads in sxmb_moni for request and response with different message IDs. So pelase let me know how to save those request and response payloads to a file.
    it would be great if you provide the stpes to implement and java code samples....if it is possible with ABAP mapping also please let me know te steps.
    Best Regards....SARAN

    Try with this code
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.IRepository;
    import com.sap.mw.jco.JCO;
    public class PayloadExtractor {
        // The MySAP.com system we gonna be using
        static final String SID = "SID";
        // The repository we will be using
       IRepository repository;
        JCO.Field msgkeyField;
        public PayloadExtractor() {
            try {
                System.out.println("*** Creating the Pool... ***");
                JCO.addClientPool(SID, 10, "001", "user", "pwd", "EN", "host", "00");
                repository = JCO.createRepository("RecoverRepository", SID);
            } catch (JCO.Exception ex) {
                System.out.println("RecoverXI Caught an exception: \n" + ex);
        // Retrieves and prints information about the remote system
        public void getPayload() {
            // A messageID from your XI/PI
            String key = "48CD01EB3D27021BE1008000C0A8477D";
            final String pipelineID = "CENTRAL";
            byte[] msgkey = key.getBytes();
            try {
                IFunctionTemplate ftemplate = repository.getFunctionTemplate("SXMB_READ_MESSAGE_VERSION_RAW");
                if (ftemplate != null) {
                    System.out.println("*** Creating client and function... ***");
                    JCO.Function function = ftemplate.getFunction();
                    JCO.Client client = JCO.getClient(SID);
                    JCO.Structure struct = function.getImportParameterList().getStructure("MESSAGEKEY");
                    struct.setValue(key, "MSGID");
                    struct.setValue(pipelineID, "PID");
                    // SELECTION must be like this!
                    function.getImportParameterList().getField("SELECTION").setValue("2");
                    // This is the msg version number, where 000 is the first (Inbound); the last can be caught from the function output (see below).
                    // Setting this strongly depends on what you want to get: basically before or after the mapping...
                    function.getImportParameterList().getField("VERSION_REQUEST").setValue("000");
                    System.out.println("*** Calling... ***");
                    client.execute(function);
                    JCO.Table tb = function.getExportParameterList().getTable("MESSAGEPAYLOAD");
                    if (tb.getNumRows() > 0) {
                        // There could be multiple payloads (even if usually it's only one)
                        do {
                            String plstr = new String(tb.getField("PAYLOAD").getByteArray());
                            System.out.println(
                                "*** Payload found *** " + tb.getField("NAME").getString() + " *** BEGIN ***");
                            System.out.println(
                                "Message Last Version: "
                                    + function.getExportParameterList().getField("MAXVERSION").getString());
                            System.out.println(plstr);
                            System.out.println(
                                "*** Payload found *** " + tb.getField("NAME").getString() + " ***  END  ***");
                        } while (tb.nextRow());
                    } else {
                        System.out.println("*** No payload found! ***");
                    // Release the client into the pool
                    JCO.releaseClient(client);
                } else {
                    System.out.println("Function SXMB_READ_MESSAGE_VERSION_RAW not found in backend system.");
            } catch (Exception ex) {
                System.out.println("Caught an exception: \n" + ex);
        protected void cleanUp() {
            System.out.println("*** Cleaning... ***");
            JCO.removeClientPool(SID);
        public static void main(String[] argv) {
            PayloadExtractor e = new PayloadExtractor();
            e.getPayload();
            e.cleanUp();
    -Madhu

  • ABAP Mapping doubt

    Hi.
    I'm trying to do an abap mapping. I've read weblogs from Robert Eijpe. The samples contained in the weblog worked fine but i have a doubt.
    ABAP class had a parameter called SOURCE. This parameter contains the XML but i think is contained in only one line. In the sample weblog, the XML is contained in an internal table.
    Question is ... how can i transform this SOURCE of 1 line into an internal table?
    Thanks.

    Hi Inigo,
    Please look at this..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    Hope it helps you!
    cheers,
    Prashanth

  • 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

  • Mapping Issue ( ABAP Mapping ).... Help me out..

    hi masters.
    i want some help from ur side.
    i just jumped to XI domain..
    and got object of abap mapping..
    can u hep me.. out..
    the steps.. required for mapping..
    i went through some materials..
    still
    do u hv any idea..
    to clear my doubts..
    as
    suppose
             input idoc--
                            segment 1
                            segment 2
                                        segment 2.1
                                        segment 2.2
                                                     segment 2.2.1
                                                     segment 2.2.2
                            segment 3
    i wnat .....
                 a file having record of each  segment with its segment name
                 using   ABAP code..
    10xxxxxxxxxxxx   In advance
    Thanks & Rdegards.
    Someswar.

    Hi Keith,
    Look at these..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • 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

  • ABAP MAPPING:Help needed

    Hi Friends,
    I have a scenario where I need to pick up  Idocs out of a packet of Idocs .The Idocs will be picked by checking for a certain condition for the Idoc Segement and of all the Idocs the Idocs which satisfy a particular condition should only be output and for this I have been asked to achieve this using ABAP Mapping.So any info in this regard would be of great help for me.
    Packet of Idocs----
    >  Idocs satisfying the cond.
      (sender)*********(Check for a condition)*****(Receiver)
    Please do provide with me a sample coding if possible.Please take up this with some priority.
    Thanks & Regards,
    Pradeep.

    Hi All,
    The output from the ABAP class needs to be transformed into a different message using Graphical Mapping .
    Please provide me some inputs for creating this ABAP mapping.
    Thanks & Regards,
    Pradeep.

  • How to write a log using abap mapping

    Hi all.
    in PI 7.1 environment I need to use abap mapping and I wish to write some XML data into a table that I created for logging the data.
    I know that using the abap mapping I can parse an XML file. My question is how to write this table defining a specific method, if it is necessary.
    Any help or suggestion is well appreciated.
    Many thanks in advance for your kind cooperation.
    Regards,
      Giovanni

    hi,
    >> My question is how to write this table defining a specific method, if it is necessary.
    just like to normal table (insert statement)
    parse XML and get the data you need and just insert into the DB table
    there are many tutorials showing how to parse xml file inside abap mapping
    so just do a little search on sdn
    Regards,
    Michal Krawczyk

  • Has any one ever met this kind of ABAP-mapping problem ??

    Dear all,
    our scenario is:     
    (remote)MQ(ssl connection)->(local)MQ-(jms)>XI---(proxy)>ECC
    I met a very strange question during mapping which we use  abap mapping inside xi.
    the message come out from the abap mapping step.after the abap-mapping, the generated target message still has the source message concatenated with. it occurs only when all servers integrated together, but not occurs when we mannully put the source msg at local MQ (means this way, it works all right).
    even during error case, it still can go through all the remaining steps of IE, and the out bound jms adapter then goes into the
    target SAP ECC system, but of cause at the final step, it will reach u2018CX_ST_GROUP_MISSING_CASEu2019 error (this is because the message is not a valid xml file, and abap proxy can not consume it...
    sample file after abap mapping:
    <?xml version="1.0" encoding="utf-8"?>
    <ns:MT_MQIVMessage xmlns:ns="urn:ianes:mqiv">
         <MQIVMessage>
         <MQIVPayload> ..data..</MQIVPayload>
         </MQIVMessage>
    </ns:MT_MQIVMessage>
    <?xml version="1.0"?>
    <ns:MT_K2 xmlns:ns="urn:ianes:prp:ipsc">
         <header> .header.</header>
         <data>..data...</data>
    </ns:MT_K2>

    Dear expert,
    after detail analysis, i found the 1st place that the soap header was wrongly set...
    in call adater setp...
    <SAP:Sender>
      <SAP:Service>BS_PRP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:ext:ips">MI_MQIV_outb</SAP:Interface>
      </SAP:Sender>
      <SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>BS_SAP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K3</SAP:Interface>
      </SAP:Receiver>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
      </SAP:Main>
    you can see the k5  was wrong set to k3
    correct soap header should be this
    <SAP:Sender>
      <SAP:Service>BS_PRP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:ext:ips">MI_MQIV_outb</SAP:Interface>
      </SAP:Sender>
    - <SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>BS_SAP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
    - <SAP:Mapping notRequired="M">
      <SAP:ObjectId>RXmJZiHCMPynqzPehi20YQ==</SAP:ObjectId>
      <SAP:SWCV>z+4XcK+qEduCcMP2oNwEVQ==</SAP:SWCV>
      <SAP:SP>-1</SAP:SP>
      </SAP:Mapping>
      </SAP:Receiver>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
      </SAP:Main>
    i guess this is the root of error, does any one give some hints on this ?
    Thanks
    Wu

Maybe you are looking for

  • Safari quits unexpectedly...Can't access any websites

    Safari program quits immediately after opening and gives the following error log.  Based on previous posts I'm assuming there's something in my library that needs to be deleted, but I can't decipher the code to figure out what it is!  Any & all help

  • Error connecting to COM port

    Hi everybody! I have create the application use Labview 2009. My application connect to COM port. It is very good on my computer that installed Labview 2009. When I create Installer, I add NI Measurement & Automation Explorer 4.6 in Addtional Install

  • What Happened to Automatic Brightness

    Where is the iPod touch 5th generation's automatic screen brightness feature in the menues? Just to reiterate I know the 4th generation could change the screen brightness that was a good help when the ambient area's light changes then the iPod isn't

  • Can i organize files stored on icloud

    This may be the wrong place to post this question, but... Is it possible to organize documents stored in iCloud in folders Thanks

  • No dock icon for app made with Automator

    No section on here for Automator? I've made an app with Automator. It runs OK and has the same icon as Automator when saved to the Applications folder but when I run it, no icon appears in the dock. Is that normal or have I missed something? There's