SAP READ_WS_LOG Function Module for Read WebSocket Log









READ_WS_LOG is a standard read ws log SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read WebSocket Log 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 read ws log FM, simply by entering the name READ_WS_LOG into the relevant SAP transaction such as SE37 or SE38.

Function Group: SAPC_WS_LOG
Program Name: SAPLSAPC_WS_LOG
Main Program: SAPLSAPC_WS_LOG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function READ_WS_LOG 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 'READ_WS_LOG'"Read WebSocket Log
EXPORTING
* TIMESTAMP_FROM = "System Time Stamp (default value is 00:00:00 of current day)
* TIMESTAMP_TO = "System Time Stamp (default value is 23:59:59 of current day)
* COLLECT_FROM_ALL_APPL_SERVERS = ABAP_TRUE "Collect TCP log files from all active application servers
* SAME_CLIENT = ABAP_TRUE "Read TCP log data from the same client
* APPLICATION_ID_LIST = "List of APC Application ID or Caller Program
* PEER_ADDRESS_LIST = "IP Address and Port Number for Peer communication Partner
* DESTINATION_ADDRESS_LIST = "Host/IP Address or Route String to partner and port number
* SEARCH_PATTERN = "Search Pattern based on Regular Expression

IMPORTING
RESULTS = "Output of WS Log
ERROR_PROTOCOL = "Error Protocol for WS Log
.



IMPORTING Parameters details for READ_WS_LOG

TIMESTAMP_FROM - System Time Stamp (default value is 00:00:00 of current day)

Data type: ABAP_CHANNELS_TIMESTAMP
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIMESTAMP_TO - System Time Stamp (default value is 23:59:59 of current day)

Data type: ABAP_CHANNELS_TIMESTAMP
Optional: Yes
Call by Reference: No ( called with pass by value option)

COLLECT_FROM_ALL_APPL_SERVERS - Collect TCP log files from all active application servers

Data type: BOOLEAN
Default: ABAP_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SAME_CLIENT - Read TCP log data from the same client

Data type: BOOLEAN
Default: ABAP_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)

APPLICATION_ID_LIST - List of APC Application ID or Caller Program

Data type: AC_APPLICATION_ID_TAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

PEER_ADDRESS_LIST - IP Address and Port Number for Peer communication Partner

Data type: ABAP_CHANNELS_PEER_IP_PORT_TAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

DESTINATION_ADDRESS_LIST - Host/IP Address or Route String to partner and port number

Data type: ABAP_CHANNELS_DEST_ADDRESS_TAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEARCH_PATTERN - Search Pattern based on Regular Expression

Data type: STRING
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for READ_WS_LOG

RESULTS - Output of WS Log

Data type: APC_LOG_OUTPUT_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_PROTOCOL - Error Protocol for WS Log

Data type: ERROR_PROTOCOL_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for READ_WS_LOG 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_results  TYPE APC_LOG_OUTPUT_TAB, "   
lv_timestamp_from  TYPE ABAP_CHANNELS_TIMESTAMP, "   
lv_timestamp_to  TYPE ABAP_CHANNELS_TIMESTAMP, "   
lv_error_protocol  TYPE ERROR_PROTOCOL_TAB, "   
lv_collect_from_all_appl_servers  TYPE BOOLEAN, "   ABAP_TRUE
lv_same_client  TYPE BOOLEAN, "   ABAP_TRUE
lv_application_id_list  TYPE AC_APPLICATION_ID_TAB, "   
lv_peer_address_list  TYPE ABAP_CHANNELS_PEER_IP_PORT_TAB, "   
lv_destination_address_list  TYPE ABAP_CHANNELS_DEST_ADDRESS_TAB, "   
lv_search_pattern  TYPE STRING. "   

  CALL FUNCTION 'READ_WS_LOG'  "Read WebSocket Log
    EXPORTING
         TIMESTAMP_FROM = lv_timestamp_from
         TIMESTAMP_TO = lv_timestamp_to
         COLLECT_FROM_ALL_APPL_SERVERS = lv_collect_from_all_appl_servers
         SAME_CLIENT = lv_same_client
         APPLICATION_ID_LIST = lv_application_id_list
         PEER_ADDRESS_LIST = lv_peer_address_list
         DESTINATION_ADDRESS_LIST = lv_destination_address_list
         SEARCH_PATTERN = lv_search_pattern
    IMPORTING
         RESULTS = lv_results
         ERROR_PROTOCOL = lv_error_protocol
. " READ_WS_LOG




ABAP code using 7.40 inline data declarations to call FM READ_WS_LOG

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_collect_from_all_appl_servers) = ABAP_TRUE.
 
DATA(ld_same_client) = ABAP_TRUE.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!