Regarding ABAP Mapping

Hi everyone,
            Would anyone let me know the complete steps for configuring ABAP Mapping.
Regards,
Varun Reddy.K

Hi,
Inorder to configure an ABAP mapping do the follwoing steps.
1) Goto SE24 tcode and createa custom object e.g. 'Z_TEST_ABAP_MAPPING''
2) Use the standard interface IF_MAPPING in your object.
3) Now write your piece of code in the method IF_MAPPING~EXECUTE .
METHOD IF_MAPPING~EXECUTE.
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 ).
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( ).
get message content of tag <BookingCode>
  DATA: INCODE TYPE REF TO IF_IXML_NODE_COLLECTION.
  INCODE = IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME( 'BookingCode' ).
get XI header data (here: "Sender Service")
  DATA: L_SENDER_SERVICE TYPE STRING.
  L_SENDER_SERVICE = PARAM->GET( IF_MAPPING_PARAM=>SENDER_SERVICE ).
add trace (appears in message monitoring)
  DATA: L_TRACE TYPE STRING.
  CONCATENATE 'Sender Service = ' L_SENDER_SERVICE INTO L_TRACE.
  TRACE->TRACE( LEVEL = '1'
  MESSAGE = L_TRACE ).
build up output document =============================================
create output document
  DATA: ODOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
  ODOCUMENT = IXMLFACTORY->CREATE_DOCUMENT( ).
create element 'SenderService' and add it to the document
  DATA: MSGTYPE TYPE REF TO IF_IXML_ELEMENT.
  MSGTYPE = ODOCUMENT->CREATE_SIMPLE_ELEMENT(
  NAME = 'MsgOut'
  PARENT = ODOCUMENT ).
create element 'SenderService' and add it to the output document
  DATA: ELEMENTSENDER TYPE REF TO IF_IXML_ELEMENT.
  ELEMENTSENDER = ODOCUMENT->CREATE_SIMPLE_ELEMENT(
  NAME = 'SenderService'
  VALUE = L_SENDER_SERVICE
  PARENT = MSGTYPE ).
add node to the output document
  DATA: OUTCODE TYPE REF TO IF_IXML_NODE.
  OUTCODE = INCODE->GET_ITEM( INDEX = 0 ).
  DATA IRC TYPE I.
  IRC = MSGTYPE->APPEND_CHILD( OUTCODE ).
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.
  RENDERER = IXMLFACTORY->CREATE_RENDERER( OSTREAM = OSTREAM
  DOCUMENT = ODOCUMENT ).
  IRC = RENDERER->RENDER( ).
ENDMETHOD.
Now Add additional mapping types in your Exchange Profile:
com.sap.aii.repository.mapping.additionaltypes
Create a new Interface Mapping
• Select Mapping Type Abap-class
• Enter the name of the ABAP-OO class
Rest of the mapping proceedure remains the same..
Reward points if found useful
Regds,
Sandeep

Similar Messages

  • Regarding Java mapping and ABAP Mapping

    Hello,
         If I suppose to do Java mapping or ABAP mapping, Is there any pre requisite to perform these two mappings?
    If exist what they are?
    How to perform them?
    Thank you

    Hello jyotsna,
    Java mapping can be used when you have complex mapping structures.
    We can do most of the times for our requirements through Graphical mapping.
    When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.
    Message mapping internally generates DOM parser.
    Java Mapping in XI
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rnd_rankvalue#
    SAP Network Blog: Implementing a Java Mapping in SAP PI
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    Java Mapping (SAP Library - Partner Connectivity Kit)
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    SAP Network Blog: XI Java Mapping Helper (DOM)
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    SAP Network Blog: Testing and Debugging Java Mapping
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    Binary Conversion in XI - Java Mapping - Code Gallery - Wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping
    SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    ABAP mappings run on ABAP Stack and are developed in the ABAP workbench of the Integration Server.
    You normally do not need to use the ABAP mappings and is preferable for someone with ABAP programming background. I should say JAVA functions would suffice any complex scenarios.
    refer step by step guides for ABAP Mapping
    ABAP Mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=abap+mapping&adv=false&sortby=cm_rnd_rankvalue#
    How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    SAP Network Blog: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    SAP Network Blog: How to call XI ABAP Mapping via RFC
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    SAP Network Blog: XI: ABAP mapping logs - more standard = better visibility
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    SAP Network Blog: Dynamically sending a mail to the PO creator using XSLT- ABAP Mapping
    /people/rahul.nawale2/blog/2006/11/01/dynamically-sending-a-mail-to-the-po-creator-using-xslt-abap-mapping
    You need to provide the name of your mapping program maually , you see it is an input box.
    just provide the name of abap mapping program it will work.
    and one more thing you cannot test abap mapping program in integration builer you need to test in abap only.
    use tcode: SXI_MAPPING_TEST for testing abap mapping
    Thanks,
    Satya
    Reward points if it is useful..

  • Acces dynamic configuration variable (e.g. filename) in ABAP mapping class

    Hi experts
    I am searching for a possibility to acces a dynamic configuration variable (DCV) in an ABAP mapping class. Since I could not find a solution in SDN and other sources, I hope somebody in this forum can help me.
    What I already found is the following code which can be used to set a DCV, but what I would be interested in is how to read a DCV.
    Any help is appreciated.
    Markus
    METHOD if_mapping~execute.
    DATA l_record type mpp_dynamic.
    * copy payload
    result = source.
    * add an adapter specific attribute
    l_record-namespace = 'http://sap.com/xi/XI/System/File'.
    l_record-name = 'FileName'.
    l_record-value = 'test.xml'.
    dynamic_configuration->add_record( l_record ).
    ENDMETHOD.

    Hi Markus,
    you can find everything in my blogs
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    Regards,
    michal

  • IDOC-XI-FILE Scenario: Error in ABAP Mapping

    Dear All,
    I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
    structure to a flat file and vice versa in XI 3.0".
    I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
    <SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
    Please help me out in resolving this error.
    Regards,
    N.Jain

    HI,
       Log saying that, u have problem in the mapping program.
      i.e Z_ABAP_MAPPING_PACKING_LIST
       the problem is due declaration of data.
       i hope that, you have some methods.
       those are declared under intialization section in mapping program.
      please use start of selection before the method.
    other wise, it will come under intilization section.
    warm regards
    mahesh.

  • How to convert xml file into internal table in ABAP Mapping.

    Hi All,
    I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">
      <BookingCode>2KY34R</BookingCode>
    - <Passenger>
      <Name>SARVESH</Name>
      <Address>THANE</Address>
      </Passenger>
    - <Passenger>
      <Name>RAJESH</Name>
      <Address>POWAI</Address>
      </Passenger>
    - <Passenger>
      <Name>CARRON</Name>
      <Address>JUHU</Address>
      </Passenger>
    - <Flight>
      <Date>03/03/07</Date>
      <AirlineID>UA</AirlineID>
      <FlightNumber>125</FlightNumber>
      <From>LAS</From>
      <To>SFO</To>
      </Flight>
      </ns0:MTO_ABAP_MAPPING>
    AT the receiver side I wnat to concatenate the NAME & ADDRESS.
    I tried Robert Eijpe's weblog (/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach)
    but couldnt succeed to convert the xml file into internal table perfectly.
    Can anybody help on this. 
    Thanks in advance!!
    Sarvesh

    Hi Sarvesh,
    The pdf has details of ABAP mapping. The example given almost matches the xml file you want to be converted.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
    Just in case you have not seen this
    regards
    Vijaya

  • Issue in ABAP Mapping

    Hi All
    I am using ABAP mapping.
    After getting children of the root node, i create an iterator by the following statements:
    node_collection = root_node->get_children( ).
    node_iterator = node_collection->create_iterator( ).
    Now, In a loop, i want to get all the children in sequence. So, in the loop i am writing this statement:
    child = node_iterator->get_next( ).
    For the first iteration in the loop, 'child' gets the first child. But, for the second iteration, the 'child' value is becoming NULL.
    Am i doing anything wrong? How can i fix this?
    Thanks
    Chandra

    Hi Chandra,
    you should first check the existence of the node in something like:
    lo_xml_iterator = lo_xml_node_coll->create_iterator( ).
    lo_xml_node = lo_xml_iterator->get_next( ).
    while not lo_xml_node is initial.
      lo_xml_node = lo_xml_iterator->get_next( ).
    endwhile.
    Regards,
    Sergio

  • ABAP MAPPING PROGRAM TRANSPORTATION ISSUE

    Hi Experts,
    Our issue is as following:
    Already one ABAP mapping program is there in our DEV and in QA also.
    Now we have changes the code according to some requirement.
    Now we need to reflect the same in QA also.
    For that I have certain doubts.
    1) after releasing the request number in R/3, will it effect there in integration builder of the QA?
    2) Is there any need to do in ADMINISTRATION to reflect the same?
    Please revert urgenly.
    Regards
    sreeni

    hi barry,
    thanks a lot . we have released it into integration it is working fine.
    thanks once again and i wll reward points also.
    I think you can tell my one more doubt is as:
    I have one new ABAP mapping program which is not used till now in any interface mapping in ID of XI.
    now want use this my integration builder ID in as mapping program.
    in this case is any requirement to enable the same in Integration ADMINISTRATION tab.
    plz clarify me.
    regards
    sreeni

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • ABAP mapping split messages and dynamic filename

    Hello,
    i have set up a IDOC to file scenario where the IDOC is split into several files, which works fine. In addition to this it is required to set a dynamic filename out of the ABAP mapping for each file. If only one file is created this works already as well but how do you set the dynamic configuration when the messages are split?
    Regards,
    Andreas
    Edited by: Andreas on Feb 26, 2009 9:09 AM

    you cannot do dynamic configuration for message splits. The below is from SAP help.
    Adapter-Specific Attributes and Multi-Mappings
    In multi-mappings, there are multiple message headers with adapter-specific attributes. The mapping API can only access one message header. This has the following consequences depending on whether there are multiple source or target messages:
    u25CF     1:n Transformation
    If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. This means that you can only create one header for all adapter-specific attributes, and not individual headers.
    u25CF     n:1 Transformation
    This variant is only possible for multi-mappings in integration processes. If there is more than one source message, read-access to the adapter-specific attributes of the various message headers is not possible at runtime.
    u25CF     m:n Transformation
    All afore-mentioned restrictions apply here. Developers can at most write the same adapter-specific attributes for all target messages to the header, without read-access to the attributes of the source messages. m:n transformations are only supported within integration processes.
    What i will suggest is to use BPM to have the message split i.e 1:N mapping and then after that have another mapping 1-1 to have the dynamic configuration

  • 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

  • Abap mapping and variable substitution in File adapter

    Hi experts!!.
    I am new in abap mapping, but I can do one abap mapping succesfully, but my problem is:
    I need to do a variable substitution in my file receiver adapter:
    Target directory = %cliente&/out
    File Name Scheme = TC%Fecha%.EFI
    ¿Using abap mapping is this possible? How I can do it?.
    Please is very urgent.
    Thanks in advance, and best regarts.

    Yes you can,.
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    will become
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “Directory”);
    In the receive file adapter all you would need to do is select Adapter Specifc Attributes --> File Name and Directory and givce some dummy values for the filename and directroy. In the runtime values will be taken from the SOAP header which you set in the mapping.
    Regards
    Bhavesh

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

  • 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

  • Graphical Mapping Vs XSLT mapping Vs Java Mapping Vs ABAP Mapping

    Hi Experts,
              I have a question regarding different message mapping options available in XI namely
    Graphical Mapping
    XSLT mapping
    Java Mapping
    ABAP Mapping
    Q1: Which amoung the above mappings is the best and why?
    Q2: On what cases Graphical, XSLT, Java and ABAP Mapping should be used?
    Q3: Is it true that graphical and XSLT mappings are converted into Java class internally?
    Kindly help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi,
    There is no hard and fast rule for using the mapping techniques.
    Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve mult hiearchical mapping requirement. and context handling.
    Java and XSLT mapping are used when graphical mapping cannot help you.
    When the choice is between Java And XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks.  XSLT can lead to a bad perfrormance if the Source XML is huge.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    XSLT Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    Also, check this thread for more info,
    Different types of Mapping in XI
    Am not sure about XSLT , but , yes graphical mapping is converted into java classes internally and these classes use SAX parsing as well.
    Regards,
    Bhavesh

Maybe you are looking for

  • Migo problem

    hi i am using ecc 6.0.. while doing migo... i get an error..the posting period is only possible in 10/2007 and 9/2007 for company code xxxx...i have tries mmpv to no use... mmrv  ob52  ob29...cannot find a solution.pls help

  • Advantages of using higher version of catalog Database.

    Hi Gurus, Wanted to know what are the advantages of using higher version of catalog database. for ex: my target database is 10.2.0.4 and catalog database is 11.2.0.1

  • Transferring 3-party ebooks to laptop

    After my laptop was stolen, I bought a new MacBook Pro. I am syncing my iPad with my new laptop. iTunes wants to wipe all my content on the iPad and start new. However, I have some 3-party books I purchased outside of iTunes that I don't want to lose

  • I keep getting something called error 50 when I am trying to buy some music

    I need help regarding somethibg called error 50. I is stoping me buying music from itunes

  • How can I make Adobe Bridge faster?

    I really need to organize my files and goodies I have been collecting these past 10 years.  So I need to use Bridge to easily view .psd and .eps thumbnails.  But Bridge is running SO slow!  It takes a few seconds for every click.  I disabled my cloud