Jeżeli dobrze rozumiem to część programu służąca do odnalezienia poprawnego adresu xmla jest już napisana
Kod: Zaznacz cały
*&--------------------------------------------------------------------*
*& Form retrieve_xml_file_name
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->CC_XML_ADDRtext
*---------------------------------------------------------------------*
FORM retrieve_xml_file_name
CHANGING cc_xml_address.
* Retrieve XML File name from NBP site
DATA: lc_status_code(10) TYPE c,
lc_status_text(10) TYPE c,
li_response_entity_body_length TYPE i,
lt_response_entity_body(60000) TYPE c OCCURS 0 WITH HEADER LINE,
lt_response_headers(256) TYPE c OCCURS 0 WITH HEADER LINE.
DATA: li_position TYPE i.
CALL FUNCTION 'HTTP_GET'
EXPORTING
absolute_uri = 'http://195.149.95.21/Kursy/KursyA.html'
proxy = ''
BLANKSTOCRLF = 'Y'
IMPORTING
status_code = lc_status_code
status_text = lc_status_text
response_entity_body_length = li_response_entity_body_length
TABLES
response_entity_body = lt_response_entity_body
response_headers = lt_response_headers
EXCEPTIONS
connect_failed = 1
timeout = 2
internal_error = 3
tcpip_error = 4
data_error = 5
system_failure = 6
communication_failure = 7
OTHERS = 8.
gc_sy_subrc = sy-subrc.
CASE gc_sy_subrc.
WHEN 1.
gc_error = 'connect_failed'.
WHEN 2.
gc_error = 'timeout'.
WHEN 3.
gc_error = 'internal_error'.
WHEN 4.
gc_error = 'tcpip_error'.
WHEN 5.
gc_error = 'data_error'.
WHEN 6.
gc_error = 'system_failure'.
WHEN 7.
gc_error = 'communication_failure'.
WHEN 8.
gc_error = 'others'.
ENDCASE.
IF gc_sy_subrc IS INITIAL.
READ TABLE lt_response_entity_body INDEX 1.
SEARCH lt_response_entity_body FOR 'tabela w formacie .XML'.