Skip to Content
author's profile photo Former Member
Former Member

Reading XML Webservice

Hello to All,

Could you please tell me How can I read XML Webservice ?

(I mean, I want to access (http://www.tcmb.gov.tr/kurlar/200909/01092009.xml)

Thank You

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 04, 2009 at 05:23 PM

    On SAPFans, you asked about rendering the XML in a useable format and I gave you an answer on how to do that using transformations. You did not ask about consuming the service itself. Is this your requirement? If so, read the help files on web services and post any questions you might have - the help files are VERY clear on how to work with web services.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Brad Bohn

      Good Morning Brad,

      My aim is to read a xml website ...

      (When I say xml website, I want to say like http://www.tcmb.gov.tr/kurlar/200909/09092009.xml website.)

      So, in my code, I am using call function HTTP_GET. (Maybe this is problem, I do not know ...)

      Anyway, I am copying my code and and XSLT File here ...

      Is it clear ?

      Would you please try in your system ?

      Thank You

      *&---------------------------------------------------------------------*
      *& Report  ZTMP_DOVIZ_KURLARI_TCMB_XML                                 *
      *&                                                                     *
      *&---------------------------------------------------------------------*
      *&                                                                     *
      *&                                                                     *
      *&---------------------------------------------------------------------*
      REPORT  zfi_doviz_kurlari_tcmb_xml.
      
      *----------------------------------------------------------------------*
      *                             T A B L E S                              *
      *----------------------------------------------------------------------*
      TABLES: tcurr.
      
      TYPE-POOLS abap.
      
      
      *----------------------------------------------------------------------*
      *                    I N T E R N A L  T A B L E S                      *
      *----------------------------------------------------------------------*
      TYPES: BEGIN OF text,
             line(2048),
             END OF text.
      DATA: zbody   TYPE TABLE OF text WITH HEADER LINE,
            zheader TYPE TABLE OF text WITH HEADER LINE.
      
      
      TYPES: BEGIN OF myrec,
              begda   TYPE char10,
              endda   TYPE char10,
              bplan   TYPE char4,
              camnt   TYPE char3,
             END OF myrec,
             myrec_table TYPE STANDARD TABLE OF myrec.
      TYPES: BEGIN OF myrec_life,
              begda   TYPE char10,
              endda   TYPE char10,
              bplan   TYPE char4,
              ercst   TYPE char3,
             END OF myrec_life,
             myrec_table_life TYPE STANDARD TABLE OF myrec_life.
      
      * This is the structure for the data from the XML file
      * Dependents
      
      TYPES:
            BEGIN OF ts_person,
              unit            TYPE char10,
              isim            TYPE char50,
              currencyname    TYPE char50,
              forexbuying     TYPE char10,
              forexselling    TYPE char10,
              banknotebuying  TYPE char10,
              banknoteselling TYPE char10,
              crossrateusd    TYPE char10,
              crossrateother  TYPE char1,
            END OF ts_person.
      
      * Table for the XML content
      DATA: gt_itab       TYPE STANDARD TABLE OF char2048.
      
      * Table and work ares for the data from the XML file
      DATA: gt_person     TYPE STANDARD TABLE OF ts_person,
            gs_person     TYPE ts_person,
            gt_tpi        TYPE char1,
            gt_ftyp       TYPE char1,
            w_myrec       TYPE myrec,
            w_myrec_life  TYPE myrec_life.
      
      * Result table that contains references
      * of the internal tables to be filled
      DATA: gt_result_xml TYPE abap_trans_resbind_tab,
            gs_result_xml TYPE abap_trans_resbind.
      
      * For error handling
      DATA: gs_rif_ex     TYPE REF TO cx_root,
            gs_var_text   TYPE string.
      
      
      *----------------------------------------------------------------------*
      *                           V A R I A B L E S                          *
      *----------------------------------------------------------------------*
      DATA: BEGIN OF data_tab OCCURS 20,
            line(255),
      END OF data_tab.
      
      *DATA: BEGIN OF itcur OCCURS 0,
      *        kurst LIKE tcurr-kurst,
      *        fcurr LIKE tcurr-fcurr,
      *        ukurs LIKE tcurr-ukurs,
      *END OF itcur.
      
      DATA: url(256) TYPE c.
      DATA: pemailadr(256) TYPE c.
      
      DATA: ztarih LIKE sy-datum.
      
      
      *----------------------------------------------------------------------*
      *                  S E L E C T I O N   S C R E E N                     *
      *----------------------------------------------------------------------*
      PARAMETERS: gtarih LIKE sy-datum DEFAULT sy-datum.
      *{   DELETE         GDPK900559                                        1
      *\parameters: zproxy like  thttp-proxy default '192.168.0.12:800' .
      *}   DELETE
      *{   INSERT         GDPK900559                                        2
      PARAMETERS: zproxy LIKE  thttp-proxy DEFAULT '' .
      *}   INSERT
      SELECT-OPTIONS: zuser FOR sy-uname DEFAULT sy-uname.
      *PARAMETERS: zemail AS CHECKBOX DEFAULT 'X'.
      *PARAMETERS: zkaydet AS CHECKBOX DEFAULT 'X'.
      
      
      *----------------------------------------------------------------------*
      *                  P R O G R A M    S T A R T                          *
      *----------------------------------------------------------------------*
      START-OF-SELECTION.
      
        IF gtarih IS INITIAL.
          ztarih = sy-datum.
        ELSE.
          ztarih = gtarih.
        ENDIF.
      
      
        break tanjul.
      

      Edited by: tanjulise on Sep 10, 2009 8:56 AM

      Edited by: tanjulise on Sep 10, 2009 9:00 AM

      Edited by: tanjulise on Sep 10, 2009 9:13 AM

      You have a mail ...

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.