SAP HTTP_WRITE_SC Function Module for
HTTP_WRITE_SC is a standard http write sc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 write sc FM, simply by entering the name HTTP_WRITE_SC into the relevant SAP transaction such as SE37 or SE38.
Function Group: SHTTP
Program Name: SAPLSHTTP
Main Program: SAPLSHTTP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HTTP_WRITE_SC 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_WRITE_SC'".
EXPORTING
* MODE = '1' "
* PROXY_SERVICE = "Gateway Service
* PROXY_USERNAME = "
* PROXY_PASSWORD = "
* PROTOCOL = 1 "
* PATCH = "Patch
* TIMEOUT = 0 "
* X509_FILENAME = ' ' "Local file for upload/download
* TRACE = 0 "Trace settings
* SEND_AND_CLOSE = "
* SEND_DISTRIBUTED_TRACING = ' ' "
* STATEFUL = "
* ASSERTION_CLIENT = "
* ASSERTION_SYSTEM_ID = "
* DO_NO_SHOW_CCERT = "
* KEEP_CONTEXT = "
C_MSG = "
* NAME = "
* DESTINATION_NAME = "
* HOST = "Name of target host
* SERVICE = "Gateway Service
* PROXY_HOST = "Name of target host
IMPORTING
ECODE = "Return Value, Return Value After ABAP Statements
EMESSAGE = "
IMPORTING Parameters details for HTTP_WRITE_SC
MODE -
Data type: CDefault: '1'
Optional: Yes
Call by Reference: Yes
PROXY_SERVICE - Gateway Service
Data type: RFCGWSERVOptional: Yes
Call by Reference: Yes
PROXY_USERNAME -
Data type: STRINGOptional: Yes
Call by Reference: Yes
PROXY_PASSWORD -
Data type: STRINGOptional: Yes
Call by Reference: Yes
PROTOCOL -
Data type: IDefault: 1
Optional: Yes
Call by Reference: Yes
PATCH - Patch
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
TIMEOUT -
Data type: IOptional: Yes
Call by Reference: Yes
X509_FILENAME - Local file for upload/download
Data type: LOCALFILEDefault: ' '
Optional: Yes
Call by Reference: Yes
TRACE - Trace settings
Data type: IOptional: Yes
Call by Reference: Yes
SEND_AND_CLOSE -
Data type: COptional: Yes
Call by Reference: Yes
SEND_DISTRIBUTED_TRACING -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: Yes
STATEFUL -
Data type: IOptional: Yes
Call by Reference: Yes
ASSERTION_CLIENT -
Data type: SYMANDTOptional: Yes
Call by Reference: Yes
ASSERTION_SYSTEM_ID -
Data type: SYSYSIDOptional: Yes
Call by Reference: Yes
DO_NO_SHOW_CCERT -
Data type: COptional: Yes
Call by Reference: Yes
KEEP_CONTEXT -
Data type: STRINGOptional: Yes
Call by Reference: Yes
C_MSG -
Data type: %_C_POINTEROptional: No
Call by Reference: Yes
NAME -
Data type: STRINGOptional: Yes
Call by Reference: Yes
DESTINATION_NAME -
Data type: COptional: Yes
Call by Reference: Yes
HOST - Name of target host
Data type: RFCHOSTOptional: Yes
Call by Reference: Yes
SERVICE - Gateway Service
Data type: RFCGWSERVOptional: Yes
Call by Reference: Yes
PROXY_HOST - Name of target host
Data type: RFCHOSTOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for HTTP_WRITE_SC
ECODE - Return Value, Return Value After ABAP Statements
Data type: SYSUBRCOptional: No
Call by Reference: Yes
EMESSAGE -
Data type: STRINGOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for HTTP_WRITE_SC 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_mode | TYPE C, " '1' | |||
| lv_ecode | TYPE SYSUBRC, " | |||
| lv_proxy_service | TYPE RFCGWSERV, " | |||
| lv_proxy_username | TYPE STRING, " | |||
| lv_proxy_password | TYPE STRING, " | |||
| lv_protocol | TYPE I, " 1 | |||
| lv_patch | TYPE I, " | |||
| lv_timeout | TYPE I, " 0 | |||
| lv_x509_filename | TYPE LOCALFILE, " ' ' | |||
| lv_trace | TYPE I, " 0 | |||
| lv_send_and_close | TYPE C, " | |||
| lv_send_distributed_tracing | TYPE C, " ' ' | |||
| lv_emessage | TYPE STRING, " | |||
| lv_stateful | TYPE I, " | |||
| lv_assertion_client | TYPE SYMANDT, " | |||
| lv_assertion_system_id | TYPE SYSYSID, " | |||
| lv_do_no_show_ccert | TYPE C, " | |||
| lv_keep_context | TYPE STRING, " | |||
| lv_c_msg | TYPE %_C_POINTER, " | |||
| lv_name | TYPE STRING, " | |||
| lv_destination_name | TYPE C, " | |||
| lv_host | TYPE RFCHOST, " | |||
| lv_service | TYPE RFCGWSERV, " | |||
| lv_proxy_host | TYPE RFCHOST. " |
|   CALL FUNCTION 'HTTP_WRITE_SC' " |
| EXPORTING | ||
| MODE | = lv_mode | |
| PROXY_SERVICE | = lv_proxy_service | |
| PROXY_USERNAME | = lv_proxy_username | |
| PROXY_PASSWORD | = lv_proxy_password | |
| PROTOCOL | = lv_protocol | |
| PATCH | = lv_patch | |
| TIMEOUT | = lv_timeout | |
| X509_FILENAME | = lv_x509_filename | |
| TRACE | = lv_trace | |
| SEND_AND_CLOSE | = lv_send_and_close | |
| SEND_DISTRIBUTED_TRACING | = lv_send_distributed_tracing | |
| STATEFUL | = lv_stateful | |
| ASSERTION_CLIENT | = lv_assertion_client | |
| ASSERTION_SYSTEM_ID | = lv_assertion_system_id | |
| DO_NO_SHOW_CCERT | = lv_do_no_show_ccert | |
| KEEP_CONTEXT | = lv_keep_context | |
| C_MSG | = lv_c_msg | |
| NAME | = lv_name | |
| DESTINATION_NAME | = lv_destination_name | |
| HOST | = lv_host | |
| SERVICE | = lv_service | |
| PROXY_HOST | = lv_proxy_host | |
| IMPORTING | ||
| ECODE | = lv_ecode | |
| EMESSAGE | = lv_emessage | |
| . " HTTP_WRITE_SC | ||
ABAP code using 7.40 inline data declarations to call FM HTTP_WRITE_SC
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.| DATA(ld_mode) | = '1'. | |||
| DATA(ld_protocol) | = 1. | |||
| DATA(ld_x509_filename) | = ' '. | |||
| DATA(ld_send_distributed_tracing) | = ' '. | |||
Search for further information about these or an SAP related objects