Calling abap method in xslt mapping?

Hi
I need to call abap method in my xslt mapping , i tried with
<sap:external-call >and <sap:external-function> .
But it is giving short dump error.
Can anybody give me proper syntax..
thanks
Prasad

Hello,
Please see the code below.
This is how u call
  <sap:external-function class="ZTEST_CLASS" kind="class" method="GETRECORDCOUNT" name="ns0:GetRecordCount">
    <sap:argument param="XXXX" type="string"/>
    <sap:argument param="YYYY" type="string"/>
    <sap:result param="ZZZZ" type="string"/>
  </sap:external-function>
  <xsl:template match="/">
    <xsl:param name="Counter">
*And this is how u call below...
<xsl:value-of select="ns0:GetRecordCount(A,B)"/>
</xsl:template>
</xsl:transform>
Regards,

Similar Messages

  • External methods in xslt mapping

    can we call external JAVA and ABAP methods in XSLT mapping ? 
    thanks
    kumar

    Kumar,
    Yes you can, please refer the below webelogs.
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Best regards,
    raj.

  • How to call Java method from XSLT??

    Hi All,
    Jdev 11.1.1.3.0
    I have a requirement to implement that, I have to call Java method from XSLT. Could anyone please suggest to implement that??
    Thanks,
    Santosh M E

    As pointed by others, you must expose your method as a custom function, registering with JDeveloper (for development time) as well as with SOA Suite (for runtime).
    In the link below you will find a simple step by step example:
    https://blogs.oracle.com/reynolds/entry/building_your_own_path
    Regards,
    Luis F. Heckler

  • ABAP , JAVA And XSLT Mapping Doc's

    Hi,
    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.
    Regards
    Kiran.B

    Hi
    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm (Java mapping)
    XSLT mapping:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Regards,
    Kumar.
    Reward points if helpful!!

  • ***Calling Java finctions in XSLT MApping

    Hi All,
    How to  call java mapping functions in XSLT.I have created Value mapping function in java,want to call the same through XSLT.
    could you provide me  general XSLT prdefined functions with explanations that may be used commonly.
    Thanks,
    Srinivasa

    Hi Srinivas,
    Please see these blogs:
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/kulwinder.grewal/blog/2009/08/21/xslt-runtime-value-mapping-from-integration-directory-using-xivmserviceclass
    /people/kulwinder.grewal/blog/2009/08/21/java-runtime-value-mapping-from-integration-directory-using-xivmserviceclass
    Regards,
    ---Satish

  • Calling ABAP methods in Web-dynpro for ABAP

    Hi
    Can any one tell me how we can call any method which is defined in ABAP.
    eg.
    CALL METHOD ref_edit_chg->get_text_as_stream.
    This is the method i want to call in the first view.
    on the button action Process.
    Please reply at the earliest.
    Ragards,
    Rahul

    Hi Rahul,
    You can use WebServices, please have a look at below links,
    Re: The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
    BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    Regards,
    Nitin

  • Calling ABAP method from JCo

    Hi All,
    I need to invoke a static method of an ABAP class from JCo. Is this possible? I am new to JCo. Any help in this regard is highly appreciated.
    Thanks,
    Praneeth

    Hello Praneeth,
    i'm not sure about calling ABAP class method from JCo directly, but there is a possibility to call function module from SAP R3. And the shortest way to do so is described in Re: Accessing SAP backend from j2ee without entrprise portal thread, answered by me.
    I guess there is no problem to call an class method from an function module.
    Please consider rewording points if helpfull.
    regards,
    mz

  • Calling Java class in XSLT mapping

    Hi,
    how can we call a java class in XSLT mapping..
    thanks
    guna

    This is a good one too:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Found this one helpfull too
    http://www.cafeconleche.org/books/xmljava/chapters/ch17s03.html
    Christof

  • Call abap method in a javaScript Function

    Hi all,
    I want call a abap method via a javaScript function in a view of a bsp application.
    Does someone know how it works?
    regards Alex

    Hi,
    You can either change the location of the page to a target URL usinng "document.location.href = 'targeturl'. So targeturl is the fully qualified url necessary to call the method.
    Or you can take a look at XMLHttpRequest object (http://www.w3.org/TR/XMLHttpRequest/) which can create requests to a given URL. You can parse and use the data returned by the target url.
    Hope it helps,
    Regards.
    Ozcan.

  • Notable to call java method from xslt

    Hi All,
    We are not able to call java methods that return org.w3c.dom.NodeList.
    All other methods invocation are working fine but process errors out when we try to call a method that returns org.w3c.dom.NodeList.
    Any help is highly appiciated.
    Vigni

    As pointed by others, you must expose your method as a custom function, registering with JDeveloper (for development time) as well as with SOA Suite (for runtime).
    In the link below you will find a simple step by step example:
    https://blogs.oracle.com/reynolds/entry/building_your_own_path
    Regards,
    Luis F. Heckler

  • Error in Muenchian method in XSLT mapping using sapxmltoolkit.jar

    Hi,
    The following example produces a different result in SAP from that of Altova, Microsoft providers. It is a resonably complex Muenchian transformation that I have reduced this to the core issue:
    Have tried with SP14 but same result on every delivered version of sapxmltoolit.jar
    I am trying to extract a unique set of locationCodes to assemble an IDOC for each locationCode - breaking out the relevant order lines.
    <b>My question is twofold:</b>
    a) is the behaviour of sapxmltoolkit errannt to the spec?
    b) is there another way to produce this list or work around?
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" version="1.0" indent="yes"/>
      <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
      <xsl:template name="buildIdoc" match="ORDER">
        <ORDERS05>
          <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
            <xsl:sort select="locationCode" data-type="number"/>
            <xsl:comment><xsl:value-of select="locationCode"/> Location Code</xsl:comment>
            <xsl:comment><xsl:value-of select="../lineNo"/> Line Number</xsl:comment>
            <IDOC BEGIN="1"></IDOC>
          </xsl:for-each>
        </ORDERS05>
      </xsl:template>
    </xsl:stylesheet>
    <b>Sample input document:</b>
    ?xml version="1.0"?>
    <ORDER loops-id="ORDER">
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>1</lineNo>
        <productCode>9990007454</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>6</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <unDefData></unDefData>
        <segmentCount>0</segmentCount>
      </PRODQNTY>
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>2</lineNo>
        <productCode>1864503696</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>4</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
      </PRODQNTY>
    </ORDER>
    <b>Expected Output:</b> - from Altova - 1 record per locationCode
    <?xml version="1.0" encoding="UTF-8"?>
    <ORDERS05>
         <!--001 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--004 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--005 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--006 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--007 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--009 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--021 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--082 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
    </ORDERS05>
    <b>Output from sapxmltoolkit.jar</b> - 1 record per locationCode per PRODQNTY line so I get a non unique set of locationCodes: (every location twice in this example - and with 16 order lines, every location 16 times and 128 IDOCs (instead of 8 IDOCs).
    <?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <!--001 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--001 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
    </ORDERS05>

    A bit more heartache & trials and I solved it
    The key defition is unstable in XSLT the way I defined it
    Simple change to the XSLT: remove the PRODQNTY node reference from the match attribute:
    <b>incorrect key:</b>
    <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
    <b>correct key:</b>
    <xsl:key name="partner-ids" match="LOCNQNTY" use="locationCode"/>
    And the "group-by or Muenchian method" loop statement:
    <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
    Hopes this helps someone else....
    Regds Doug.

  • Call Abap FM from XI mapping to insert lines to abap table

    Hi All,
    I'm trying to insert data from an XML file into a Z table during mapping in XI. I have an ABAP function module that takes in parameters and inserts into the corresponding fileds of the Z-table.
    How do I make use of this ABAP Function module in a user defined function in XI mapping.
    Any tips would be really helpful.
    Thanks
    Karthik

    Hi Karthik,
    have a look in this document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4fbe7b8e-0a01-0010-b69b-b7e717378f22
    In the document look at: "Step 3 – Coding User-Defined Java Function in Message Mapping".
    This should solve your problem.
    Regards Mario

  • How to call external java functions in XSLT Mapping Programs

    Hi All,
    I am unable to call java programs in XSLT MAPPING.
    I tried by following the blog...but getting error :
    XSLT Mapping With JAVA Enhancement ( For Beginners)
    I need some input from you all.
    Waiting For quick reply.
    Rgds Somu.

    i wrote the code...
    and getting error in interface mapping..
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:MyLib="java:datetime.DateandTime">
         <xsl:template match="/">
              <Order DocType="OrderCreate" Version="2.0.2">
                   <Header>
                        <RequestingDocumentIdentifier>
                             <DocumentIdentifier>
                                  <xsl:value-of select="concat('IDOC',//EDI_DC40/DOCNUM)"/>
                             </DocumentIdentifier>
                        </RequestingDocumentIdentifier>
                        <RequestingDocumentDateTime>
                             <DateTime DateTimeQualifier="On">
                                            <xsl:if test="function-available('MyLib:getDateValue')">
                       <xsl:value-of select="MyLib:getDateValue()"/>                   
      </xsl:if>
                                        </DateTime>
                        </RequestingDocumentDateTime>
                        <From>
                             <PartnerInformation>
                                   <PartnerName>BASF SA</PartnerName>
                                    <PartnerIdentifier Agency="AssignedByBASF">
                                     <xsl:value-of select="//E1EDK14[QUALF='014']/ORGID"/>
                                    </PartnerIdentifier>
                             </PartnerInformation>
                        </From>
                        <To>
                        <PartnerInformation>
                             <PartnerName>BASF CORP CHEM DIV</PartnerName>
                             <PartnerIdentifier Agency="D-U-N-S">001307032</PartnerIdentifier>
                        </PartnerInformation>
                   </To>
                   </Header>
              </Order>
         </xsl:template>
    </xsl:stylesheet>

  • Call ABAP RFC From mapping

    HI Guys,
    I have a requirement to call ABAP RFC from Message Mapping.
    Can any one pls share the document links or ideas with me.
    Thanks,
    MS

    Hi
    u can use RFC LoopUp
    if PI 7.0 / 3.0 -- need to write the UDF to execute
    link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231
    if PI 7.1 then u have functionality in MM itself to do so
    rgds
    srini

  • How to call ABAP function module/ class method through web service?

    Hi Colleagues,
    I need to write an iphone version of current ABAP program. I want to call ABAP method and function module through my iphone so that I can re-use the ABAP APIs.So I choose web service. Can you give me any details information about how to do that?
    Thank you very much

    Hi,
    you need to create webservice out of FM. goto SE80 and follow the webservice creation wizard. Finally use webservice url for calling FM (remote enabled) from your iPhone.
    Regards,
    Gourav

Maybe you are looking for