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

Similar Messages

  • Xslt sample for entities to keyboard character

    We need the xslt sample for entities replacement text. For instance I have to convert the entities ‘&lpar;’  to keyboard character ‘(’.

    Hi,
    Here's a very simple one... If the param1 matches with any value in the input it will return true...
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:param name="param1"/>
      <xsl:template match="/">
      <xsl:value-of select=".//*/text() = $param1"/>
      </xsl:template>
    </xsl:stylesheet>
    Cheers,
    Vlad

  • XSLT transformation for XML to ABAP internal table

    Hi, can anyone please tell me how it should be the xslt tranformation to conver this xml
    <Embargos_ARBA_DOC>
         <ns:Embargos_ARBA_MT
              xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>50000002124</CUIT>
                   <MONTO>0000013794090</MONTO>
                   <RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>55000001456</CUIT>
                   <MONTO>0000001144410</MONTO>
                   <RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
         </ns:Embargos_ARBA_MT>
    </Embargos_ARBA_DOC>
    to this abap Table....
      DATA: BEGIN OF i_embargos_arba_doc occurs 0,
              fecha TYPE d,
              cuit TYPE char11,
              monto TYPE char13,
              razon_social(120),
            END OF i_embargos_arba_mt.
    so i can transform it with this sentence
          CALL TRANSFORMATION ('embargos_transformation')
            SOURCE XML source
            RESULT Embargos_ARBA_DOC = embargos.
    pls i need help because i am unable to create this xslt transformation...
    I will give the highest rewards points to the one who can help me.
    thanks!
    mariano

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • BI Admin Tool and XSLT transformation for XML data source - How it works ?

    Hello,
    There is a possibility to import data from XML data source using BI Admin Tool.
    In the import window we can point XSLT file. What is the purpose of that XSLT field?
    Why I am asking ?
    I thought it is smth like XSLT processor, but simply it doesnt work.
    What I did:
    - I pointed XML data source file
    - I pointed XSLT transformation file
    - Click OK, and still get the message that the XML file structure is not supported
    After that I transformed that XML file with some desktop XSLT processor using the same XSLT file, and I tried to connect that file directly using BI Admin tool.Then it works. So it means that the transformation is ok.
    So basically one question comes to my mind in that situation:
    What is the purpose of XSLT field in BI Admin Tool when it comes to XML data source ?
    (it doesnt look like XSLT processor)
    Greetings
    /Michal

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • Abap mapping for content conditions routing in a flat-flat scenario

    Dear Experts.
    I have a flat-flat file scenario. Based on the content of the input file, I need to route data to the receiver.The source flat file will have several IDOC details.
    Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "XYZ" and FIELD2 of the same IDOC = "PQR", then this  IDOC's details has to be passed to the receiver.
    I have tried to implement the above condition at interface determination in graphical mapping.
    In the graphical mapping,  the problem is:
    Assuming there are 3 idocs in the input file.
    FIELD1 of IDOC[1] = 'XYZ' and FIELD2 of IDOC[1] = 'PQR'
    FIELD1 of IDOC[2] = 'LMN' and FIELD2 of IDOC[2] = 'RST'
    FIELD1 of IDOC[3] = 'ABC' and FIELD2 of IDOC[3] = 'DEF' .
    Now, if none of the IDOCs in the input file satisfy my requirement,the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is getting called.
    And I need to check this condition IDOC wise. Both the conditions has to be satisfied in the same IDOC.
    The question is very similar to the one posted by SHOBHA HB. (Topic:Receiver determination(or Interface determination) and conditional routing )
    but, due to complexities in the graphical mapping,  we have decided to go for the ABAP mapping instead.
    Kindly help, by mentioning the steps I should follow for this interface, the logic basically. I already have paths to some basic ABAP mapping documents from SDN, so, kindly refrain from posting general URLS for definition or history of ABAP mapping.
    IF you could guide me on this interface, It would be really helpful.
    regards,
    giri raj

    Hi,
    /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
    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: 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: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    An ad-on
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    Regards

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

  • Hi , friends pls explain abap mapping and message mapping

    1) pls explain abap mapping and message mapping
       send me screen shorts also.

    Hi
    Mapping Techniques
    XI provides 3 standard ways of interface mapping between source and target.
    Graphical mapping
    Java Mapping
    XSLT Mapping
    Two more additional mapping types can be activated in XI by making changes to the exchange profile. Those two mappings are
    ABAP mapping
    XSLT mapping with ABAP Extensions
    Graphical Mapping
    Graphical mapping is a common approach followed by everyone for generating desired target structure. It involves simple drag-n-drop to correlate respective nodes (fields) from source and target structure. It hardly involves coding. (Exception - User defined functions). But sometimes with graphical mapping it is difficult to produce required output. For example ... text/html output, namespace change, sorting or grouping of records etc.
    ABAP Mapping
    A person comfortable with Object Oriented ABAP can go for ABAP mapping instead.
    Java Mapping
    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.
    XSLT Mapping
    One can also think of Java mapping as another option but it is a bit complex and required knowledge of Java. In such cases, XSLT mapping can be the best approach to meet the requirements.
    A few example cases in which an XSLT mapping can be used:-
    When the required output is other than XML like Text, Html or XHTML (html displayed as XML)
    When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
    When data is to be filtered based on certain fields (considering File as source)
    When data is to be sorted based on certain field (considering File as source)
    When data is to be grouped based on certain field (considering File as source)\
    Advantages of using XSLT mapping
    XSLT program itself defines its own target structure.
    XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    File content conversion at receiver side can be avoided in case of text or html output.
    Multiple occurrences of node within tree (source XML) can be handled easily.
    XSLT can be used in combination with graphical mapping.
    Multi-mapping is also possible using xslt.
    XSLT can be used with ABAP and JAVA Extensions.
    Disadvantages of using XSLT mapping
    Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    XSLT mapping requires more memory than mapping classes generated in Java.
    XSLT program become lengthier as source structure fields grows in numbers.
    XSLT program sometimes become complex to meet desired functionality.
    Some XSL functions are dependent on version of browser.
    Different types of Mappings
    MAPPING SUPPORTED BY XI
    Message Mapping -> Graphical Design and testing environment. Default Provided By XI. Queue based modelling allow handling or large documents. Extensible via user defined functions
    XSLT Mapping - > Based on openstandard, Portable across application platform, Extensible using user defined functions kewl but disadvantage is Memory overload while handling large documents.
    SAX -> Simple Api For XML. -> Allows you to parse through a XML document. Doesn't consume any memory. But the message can be parsed only once from top to bottom. It Has evolved by contributions made by group of ppl itz a open architecture.
    DOM -> Document Object Model -> Itz designed by W3C. Consumes Memory as the message will be loaded. Allows parsing of document in both way top down and bottom up.
    Send me your email id.Shall send you very good docs for both ABAP Mapping and message mapping.
    Thanks

  • 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

  • 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

  • How to test ABAP Mapping

    Hi,
    In the Interface Mapping there is an option to test the
    map. But it is not for the ABAP Mapping.
    How can we test ABAP Mapping ?
    rgds,
    RM

    Hi Ruby
    What kind of scenario are you working on, IDOC to file, file to IDoc or what.
    Depending on the scenario you have created, enter all the details such as Sender Service, Receiver Service etc in the transaction SXI_MAPPING_TEST (in your XI box).
    The next step is for you to enter your source XML file, if it is a file to IDoc scenario enter your source xml file. If it is a IDOC to file scenario, then enter the XML payload.
    And once you execute it you will be able to test your mapping and see if it successful or not.
    cheers
    Sameer

  • ABAP Mapping in PI 7.1

    Hi
    I am looking for the ABAP mapping scenario, Can anyone send me the link
    Thanks
    PR

    Hi PR,
    I don't think there are many examples on ABAP mapping for 7.1, but there is hardly any difference from previous versions. So, search for an example based on 7.0.
    If you face any problem, you can come back to the forum anytime
    regards,
    Neetesh

  • 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

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

  • 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

  • Java Mapping, XSLT Mapping, ABAP Mapping

    Hi Experts,
                     Could any one explain what is the main features of the following Mapping. How to pick the mapping?
    Java Mapping - When to use and what is the advantage.
    ABAP Mapping - When to use and what is the advantage.
    XSLT Mapping - When to use and what is the advantage.
    Graphical Mapping - When to use and what is the advantage.
    cheers,
    Sunee

    There are 4 types of mapping in XI
    1. Graphical Mapping
    2. XSLT Mapping
    3. JAVA Mapping
    4. ABAP Mapping
    When to use Message mapping
    1 When the logic for your mapping is simple and straight forward, you can use
    Advantages of message mapping
    1)Easy to use.
    2) has GUI drag and drop.
    3) used for simple mapping cases
    4) it does not involve any complex logic
    Disadvantages of message mapping
    1)has limitation in terms of complex hierarchy
    When to use Java mapping
    1) Java mapping are used when graphical mapping cannot help you.
    Advantages of Java Mapping
    1)you can use Java APIs and Classes in it.
    2) file look up or a DB lookup is possible
    3) DOM is easier to use with lots of classes to help you create nodes and elements.
    Disadvantages of Java mapping
    1)SAX parser is not easy to develop
    2)DOM parser is intensive
    3) Java knowledge is required
    4) bit complexer
    XSLT Mapping - When to use
    1)When the required output is other than XML like Text, Html or XHTML (html displayed as XML )
    2)When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
    3)When data is to be filtered based on certain fields (considering File as source)
    4)When data is to be sorted based on certain field (considering File as source)
    5)When data is to be grouped based on certain field (considering File as source)
    Advantages of using XSLT mapping
    1)XSLT program itself defines its own target structure.
    2)XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    3)XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    4)File content conversion at receiver side can be avoided in case of text or html output.
    5)Multiple occurrences of node within tree (source XML) can be handled easily.
    6)XSLT can be used in combination with graphical mapping.
    7)Multi-mapping is also possible using xslt.
    8)XSLT can be used with ABAP and JAVA Extensions
    Disadvantages of using XSLT mapping
    1)Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    2)Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    3)XSLT mapping requires more memory than mapping classes generated in Java.
    4)XSLT program become lengthier as source structure fields grows in numbers.
    5)XSLT program sometimes become complex to meet desired functionality.
    6)Some XSL functions are dependent on version of browser.
    Advantages of Abap Mapping
    1) A person comfortable with OOABAP can go for ABAP mapping instead.
    Disadvantages of Abap Mapping
    1) Abap knowledge is required
    2) bit compexer
    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
    Check this blog on Mapping:
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Also, check this thread for more info,
    Different types of Mapping in XI

Maybe you are looking for

  • I just lost all songs on my Ipod, but my Itunes still has everything

    I plugged my Ipod into the computer today, usual as always, just to import over a few new CD's, but then I get this pop-up. "Songs on the iPod "Scott's iPod" cannot be synced because all of the playlists selected for syncing no longer exist" Confused

  • Why won't my Macbook Pro charge?

    All of a sudden, my Macbook Pro won't charge. I believe it has something to do with the charger, it no longer charges when my Macbook is off, and rarely when it is on, even! Sometimes it will start charging but only if the computer-connecting end is

  • Writing Disc Error: why won't my iMac burn CDs

    I have a early 2010 iMac intel running on OS X Mountain Lion and as of late I have not been able to burn cds from my iTunes. I continuoosly get an error message: "Burn failed becuase of medium write error", I have tried different brands of CD-R's all

  • X-Fi center channel distort

    I think there is something wrong with my x-fi's center channel. It sounds like the sound is like underwater and it gets louder and quieter randomly. I tried with my speaker and headphone so it's the X-Fi I believe. Anyone else have this problem? I'm

  • Getting WLS host url and port number

    Hello Experts, I need to forward an authenticated request to JAAS LoginModule. How can I get wls host name and port numbe in the LoginModule? Thank you in advance, Thanks for reading my post