Skip to Content
imageimage

Most of the JCO classes like JCO.Function, JCO.Table, JCO.ParameterList, JCO.Record and JCO.Structure supports writeHTML(String) and writeXML(String) method.

writeHTML(String filename) -> method takes the file name as an input parameter and writes the dump of the corresponding object into a file in the form of HTML document.

writeXML(String filename) -> method takes the file name as an input parameter and writes the dump of the corresponding object into a file in the form of XML document.

This can serve as a very easy tracing mechanism while making a RFC call using JCo API to verify whether everything went as expected or not.

Java Code Snippet:

The following were the dump files created as a result of the code.

HTML Dump:

image

XML Dump:

image

Similar dump files can also be created for other JCO Objects like Table, ParameterList, Structure etc by calling their corresponding writeHTML(String) or writeXML(String) function.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Pran Bhas
    also jco.setAbapDebug(true) just before execution will launch the function module in sapgui and you can debug all the way through (from java to SAP)
    (0) 
  2. Gaurav Gandhi
    Hi Tarun,

    Nice to see the blog.
    I have one question here. I would appreciate if you answer my query. (since your area of intrest include opens source and ur blog is abt RFC Connection)
    I would like to know, Is there a way by which i can connect to SAP r/3 (to bapi’s rfc etc etc) by any open source standard means(not through any SAP propriety means bcos i dont want to spenf on anything more other than r/3 installation..) and get the data and show it to a user? Is there some way by the bapi’s or rfc’s can we made as web services etc?
    Hope you understand my question?

    Regards
    Gaurav

    (0) 
    1. Gregor Wolf
      Hello Gaurav,

      starting with SAP Basis aka SAP Web AS 6.20 you can call all BAPI’s and RFC Enabled Function Modules as a Web Service. So if you have SAP R/3 4.70 and higher just go on.

      Regards
      Gregor

      (0) 
      1. Gaurav Gandhi
        Hi Gregor,

        Can you provide me with some more details as to how to achieve this?
        How can i expose the rfc’s as web services and then i hope it will be possible for me to access that web service through Java and show the data.

        Regards
        Gaurav Gandhi

        (0) 

Leave a Reply