REPORT z_blog_01.
DATA: t_request_header TYPE TABLE OF sbcheader WITH HEADER LINE,
t_response_header TYPE TABLE OF sbcheader WITH HEADER LINE.
PARAMETERS : p_uri(100) LOWER CASE,
p_filep TYPE rlgrap-filename default 'c:\temp\file_downloaded.txt'.
CALL FUNCTION 'HTTP_GET_FILE'
EXPORTING
absolute_uri = p_uri
rfc_destination = 'SAPHTTP'
document_path = p_filep
TABLES
request_headers = t_request_header
response_headers = t_response_header
EXCEPTIONS
connect_failed = 1
timeout = 2
internal_error = 3
document_error = 4
tcpip_error = 5
system_failure = 6
communication_failure = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Have you ever tried to download a File from Internet to your SAP SERVER or workstation? Take a look at this code!
miércoles, 6 de abril de 2011
ABAP: Download a file from internet to SAP
Alguna vez intentaste bajar un archivo de internet a tu workstation desde SAP? Es fácil, solo tenemos que seguir un par de pasos y ejecutar una función:
Suscribirse a:
Entradas (Atom)