SAP HTTP_POST_FILES Function Module for HTTP Post Files
HTTP_POST_FILES is a standard http post files SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for HTTP Post Files processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for http post files FM, simply by entering the name HTTP_POST_FILES into the relevant SAP transaction such as SE37 or SE38.
Function Group: SFTP
Program Name: SAPLSFTP
Main Program: SAPLSFTP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HTTP_POST_FILES pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'HTTP_POST_FILES'"HTTP Post Files.
EXPORTING
ABSOLUTE_URI = "
* RFC_DESTINATION = "RFC Destination
* PROXY = "
* PROXY_USER = "
* PROXY_PASSWORD = "
* USER = "
* PASSWORD = "
* COMPONENT_PATH = "
* COMPONENT_PREFIX = "
IMPORTING
STATUS_CODE = "
STATUS_TEXT = "Text for status code
TABLES
* RESPONSE_ENTITY_BODY = "
* RESPONSE_HEADERS = "
* REQUEST_HEADERS = "
COMPONENTS = "Table of components
EXCEPTIONS
CONNECT_FAILED = 1 TIMEOUT = 2 INTERNAL_ERROR = 3 COMPONENT_ERROR = 4 TCPIP_ERROR = 5 SYSTEM_FAILURE = 6 COMMUNICATION_FAILURE = 7
IMPORTING Parameters details for HTTP_POST_FILES
ABSOLUTE_URI -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
RFC_DESTINATION - RFC Destination
Data type: RFCDES-RFCDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
PROXY -
Data type: THTTP-PROXYOptional: Yes
Call by Reference: No ( called with pass by value option)
PROXY_USER -
Data type: THTTP-PUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
PROXY_PASSWORD -
Data type: THTTP-PPASSWORDOptional: Yes
Call by Reference: No ( called with pass by value option)
USER -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
PASSWORD -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
COMPONENT_PATH -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
COMPONENT_PREFIX -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HTTP_POST_FILES
STATUS_CODE -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
STATUS_TEXT - Text for status code
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HTTP_POST_FILES
RESPONSE_ENTITY_BODY -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
RESPONSE_HEADERS -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
REQUEST_HEADERS -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
COMPONENTS - Table of components
Data type: HTTP_COMPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CONNECT_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TIMEOUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COMPONENT_ERROR - Component was not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TCPIP_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_FAILURE -
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_FAILURE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HTTP_POST_FILES Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_status_code | TYPE C, " | |||
| lv_absolute_uri | TYPE C, " | |||
| lv_connect_failed | TYPE C, " | |||
| lt_response_entity_body | TYPE STANDARD TABLE OF C, " | |||
| lv_timeout | TYPE C, " | |||
| lv_status_text | TYPE C, " | |||
| lv_rfc_destination | TYPE RFCDES-RFCDEST, " | |||
| lt_response_headers | TYPE STANDARD TABLE OF RFCDES, " | |||
| lv_proxy | TYPE THTTP-PROXY, " | |||
| lv_internal_error | TYPE THTTP, " | |||
| lt_request_headers | TYPE STANDARD TABLE OF THTTP, " | |||
| lt_components | TYPE STANDARD TABLE OF HTTP_COMP, " | |||
| lv_proxy_user | TYPE THTTP-PUSER, " | |||
| lv_component_error | TYPE THTTP, " | |||
| lv_tcpip_error | TYPE THTTP, " | |||
| lv_proxy_password | TYPE THTTP-PPASSWORD, " | |||
| lv_user | TYPE C, " | |||
| lv_system_failure | TYPE C, " | |||
| lv_password | TYPE C, " | |||
| lv_communication_failure | TYPE C, " | |||
| lv_component_path | TYPE C, " | |||
| lv_component_prefix | TYPE C. " |
|   CALL FUNCTION 'HTTP_POST_FILES' "HTTP Post Files |
| EXPORTING | ||
| ABSOLUTE_URI | = lv_absolute_uri | |
| RFC_DESTINATION | = lv_rfc_destination | |
| PROXY | = lv_proxy | |
| PROXY_USER | = lv_proxy_user | |
| PROXY_PASSWORD | = lv_proxy_password | |
| USER | = lv_user | |
| PASSWORD | = lv_password | |
| COMPONENT_PATH | = lv_component_path | |
| COMPONENT_PREFIX | = lv_component_prefix | |
| IMPORTING | ||
| STATUS_CODE | = lv_status_code | |
| STATUS_TEXT | = lv_status_text | |
| TABLES | ||
| RESPONSE_ENTITY_BODY | = lt_response_entity_body | |
| RESPONSE_HEADERS | = lt_response_headers | |
| REQUEST_HEADERS | = lt_request_headers | |
| COMPONENTS | = lt_components | |
| EXCEPTIONS | ||
| CONNECT_FAILED = 1 | ||
| TIMEOUT = 2 | ||
| INTERNAL_ERROR = 3 | ||
| COMPONENT_ERROR = 4 | ||
| TCPIP_ERROR = 5 | ||
| SYSTEM_FAILURE = 6 | ||
| COMMUNICATION_FAILURE = 7 | ||
| . " HTTP_POST_FILES | ||
ABAP code using 7.40 inline data declarations to call FM HTTP_POST_FILES
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfc_destination). | ||||
| "SELECT single PROXY FROM THTTP INTO @DATA(ld_proxy). | ||||
| "SELECT single PUSER FROM THTTP INTO @DATA(ld_proxy_user). | ||||
| "SELECT single PPASSWORD FROM THTTP INTO @DATA(ld_proxy_password). | ||||
Search for further information about these or an SAP related objects