SAP GWY_READ_SECURITY Function Module for









GWY_READ_SECURITY is a standard gwy read security 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 gwy read security FM, simply by entering the name GWY_READ_SECURITY into the relevant SAP transaction such as SE37 or SE38.

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



Function GWY_READ_SECURITY 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 'GWY_READ_SECURITY'"
EXPORTING
* GWHOST = "
* GWSERV = "
* DISCONNECT = "Terminate connection

TABLES
EXSEC = "

EXCEPTIONS
GWY_UNKNOWN_OPCODE = 1 GWY_NOT_AUTHORIZED = 10 GWY_COMMUNICATION_FAILURE = 2 GWY_GET_TAB_FAILED = 3 GWY_NEWLINE_FAILED = 4 GWY_TABLEN_TOO_SHORT = 5 GWY_GET_OPCODE_FAILED = 6 GWY_GET_GWHOST_FAILED = 7 GWY_GET_GWSERV_FAILED = 8 GWY_MONITOR_DISABLED = 9
.



IMPORTING Parameters details for GWY_READ_SECURITY

GWHOST -

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

GWSERV -

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

DISCONNECT - Terminate connection

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

TABLES Parameters details for GWY_READ_SECURITY

EXSEC -

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

EXCEPTIONS details

GWY_UNKNOWN_OPCODE - Unknown OP code

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

GWY_NOT_AUTHORIZED -

Data type:
Optional: No
Call by Reference: Yes

GWY_COMMUNICATION_FAILURE - Communication Error

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

GWY_GET_TAB_FAILED -

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

GWY_NEWLINE_FAILED -

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

GWY_TABLEN_TOO_SHORT -

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

GWY_GET_OPCODE_FAILED -

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

GWY_GET_GWHOST_FAILED -

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

GWY_GET_GWSERV_FAILED -

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

GWY_MONITOR_DISABLED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GWY_READ_SECURITY 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:
lt_exsec  TYPE STANDARD TABLE OF GWY_EXSEC, "   
lv_gwhost  TYPE GWY_STRUCT-GWHOST, "   
lv_gwy_unknown_opcode  TYPE GWY_STRUCT, "   
lv_gwy_not_authorized  TYPE GWY_STRUCT, "   
lv_gwserv  TYPE GWY_STRUCT-GWSERV, "   
lv_gwy_communication_failure  TYPE GWY_STRUCT, "   
lv_disconnect  TYPE GWY_STRUCT-FLAG, "   
lv_gwy_get_tab_failed  TYPE GWY_STRUCT, "   
lv_gwy_newline_failed  TYPE GWY_STRUCT, "   
lv_gwy_tablen_too_short  TYPE GWY_STRUCT, "   
lv_gwy_get_opcode_failed  TYPE GWY_STRUCT, "   
lv_gwy_get_gwhost_failed  TYPE GWY_STRUCT, "   
lv_gwy_get_gwserv_failed  TYPE GWY_STRUCT, "   
lv_gwy_monitor_disabled  TYPE GWY_STRUCT. "   

  CALL FUNCTION 'GWY_READ_SECURITY'  "
    EXPORTING
         GWHOST = lv_gwhost
         GWSERV = lv_gwserv
         DISCONNECT = lv_disconnect
    TABLES
         EXSEC = lt_exsec
    EXCEPTIONS
        GWY_UNKNOWN_OPCODE = 1
        GWY_NOT_AUTHORIZED = 10
        GWY_COMMUNICATION_FAILURE = 2
        GWY_GET_TAB_FAILED = 3
        GWY_NEWLINE_FAILED = 4
        GWY_TABLEN_TOO_SHORT = 5
        GWY_GET_OPCODE_FAILED = 6
        GWY_GET_GWHOST_FAILED = 7
        GWY_GET_GWSERV_FAILED = 8
        GWY_MONITOR_DISABLED = 9
. " GWY_READ_SECURITY




ABAP code using 7.40 inline data declarations to call FM GWY_READ_SECURITY

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 GWHOST FROM GWY_STRUCT INTO @DATA(ld_gwhost).
 
 
 
"SELECT single GWSERV FROM GWY_STRUCT INTO @DATA(ld_gwserv).
 
 
"SELECT single FLAG FROM GWY_STRUCT INTO @DATA(ld_disconnect).
 
 
 
 
 
 
 
 


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!