SAP Function Modules

UPWB_SEND_REQUEST SAP Function module - Send HTTP Request







UPWB_SEND_REQUEST is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name UPWB_SEND_REQUEST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: UPWB_COMPONENT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM UPWB_SEND_REQUEST - UPWB SEND REQUEST





CALL FUNCTION 'UPWB_SEND_REQUEST' "Send HTTP Request
* EXPORTING
*   i_client_type = ' '         " c             ' '(default)...internal, 'R'...RFC, 'H'...HTTP
*   i_uri =                     " string        URI (overloads IT_HEADER)
*   i_method =                  " string        Method (overloads IT_HEADER)
*   it_header =                 " tihttpnvp     HTTP Framework (iHTTP) Table Name/Value Pairs
*   it_fields =                 " tihttpnvp     HTTP Framework (iHTTP) Table Name/Value Pairs
  IMPORTING
    er_client =                 " if_http_client  HTTP Client Abstraction
  EXCEPTIONS
    HTTP_FAILURE = 1            "               Error during send/receive/close
    CREATE_FAILED = 2           "               Client creation failed
    .  "  UPWB_SEND_REQUEST

ABAP code example for Function Module UPWB_SEND_REQUEST





The ABAP code below is a full code listing to execute function module UPWB_SEND_REQUEST including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_er_client  TYPE IF_HTTP_CLIENT .

DATA(ld_i_client_type) = 'Check type of data required'.
DATA(ld_i_uri) = 'Check type of data required'.
DATA(ld_i_method) = 'Check type of data required'.
DATA(ld_it_header) = 'Check type of data required'.
DATA(ld_it_fields) = 'Check type of data required'. . CALL FUNCTION 'UPWB_SEND_REQUEST' * EXPORTING * i_client_type = ld_i_client_type * i_uri = ld_i_uri * i_method = ld_i_method * it_header = ld_it_header * it_fields = ld_it_fields IMPORTING er_client = ld_er_client EXCEPTIONS HTTP_FAILURE = 1 CREATE_FAILED = 2 . " UPWB_SEND_REQUEST
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_er_client  TYPE IF_HTTP_CLIENT ,
ld_i_client_type  TYPE C ,
ld_i_uri  TYPE STRING ,
ld_i_method  TYPE STRING ,
ld_it_header  TYPE TIHTTPNVP ,
ld_it_fields  TYPE TIHTTPNVP .

ld_i_client_type = 'Check type of data required'.
ld_i_uri = 'Check type of data required'.
ld_i_method = 'Check type of data required'.
ld_it_header = 'Check type of data required'.
ld_it_fields = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name UPWB_SEND_REQUEST or its description.