SAP GWY_GET_NO_REG_PROGRAMS Function Module for









GWY_GET_NO_REG_PROGRAMS is a standard gwy get no reg programs 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 get no reg programs FM, simply by entering the name GWY_GET_NO_REG_PROGRAMS 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_GET_NO_REG_PROGRAMS 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_GET_NO_REG_PROGRAMS'"
EXPORTING
* GWHOST = "Gateway host name
* GWSERV = "Gateway service name
TPNAME = "Name of the regisered program
* DISCONNECT = "Terminate connection

IMPORTING
NOREG_TOTAL = "Total number of registrations
NOREG_INIT = "Number of registrations in status INIT
NOREG_WAITING = "Number of registrations in status WAITING
NOREG_RUNNING = "Number of registrations in status RUNNING

EXCEPTIONS
GWY_UNKNOWN_OPCODE = 1 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_GET_NO_REG_PROGRAMS

GWHOST - Gateway host name

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

GWSERV - Gateway service name

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

TPNAME - Name of the regisered program

Data type: GWY_SYSTEM-TPNAME
Optional: No
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)

EXPORTING Parameters details for GWY_GET_NO_REG_PROGRAMS

NOREG_TOTAL - Total number of registrations

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

NOREG_INIT - Number of registrations in status INIT

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

NOREG_WAITING - Number of registrations in status WAITING

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

NOREG_RUNNING - Number of registrations in status RUNNING

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

EXCEPTIONS details

GWY_UNKNOWN_OPCODE - Unknown Opcode

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

GWY_COMMUNICATION_FAILURE - Communication error

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

GWY_GET_TAB_FAILED - TAB could not be read

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

GWY_NEWLINE_FAILED - Internal table could not be extended

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

GWY_TABLEN_TOO_SHORT - Internal table too small

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

GWY_GET_OPCODE_FAILED - OPCODE could not be read

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

GWY_GET_GWHOST_FAILED - GWHOST could not be read

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

GWY_GET_GWSERV_FAILED - GWSERV could not be read

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

GWY_MONITOR_DISABLED -

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

Copy and paste ABAP code example for GWY_GET_NO_REG_PROGRAMS 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_gwhost  TYPE GWY_STRUCT-GWHOST, "   
lv_noreg_total  TYPE GWY_STRUCT-NOREG, "   
lv_gwy_unknown_opcode  TYPE GWY_STRUCT, "   
lv_gwserv  TYPE GWY_STRUCT-GWSERV, "   
lv_noreg_init  TYPE GWY_STRUCT-NOREG, "   
lv_gwy_communication_failure  TYPE GWY_STRUCT, "   
lv_tpname  TYPE GWY_SYSTEM-TPNAME, "   
lv_noreg_waiting  TYPE GWY_STRUCT-NOREG, "   
lv_gwy_get_tab_failed  TYPE GWY_STRUCT, "   
lv_disconnect  TYPE GWY_STRUCT-FLAG, "   
lv_noreg_running  TYPE GWY_STRUCT-NOREG, "   
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_GET_NO_REG_PROGRAMS'  "
    EXPORTING
         GWHOST = lv_gwhost
         GWSERV = lv_gwserv
         TPNAME = lv_tpname
         DISCONNECT = lv_disconnect
    IMPORTING
         NOREG_TOTAL = lv_noreg_total
         NOREG_INIT = lv_noreg_init
         NOREG_WAITING = lv_noreg_waiting
         NOREG_RUNNING = lv_noreg_running
    EXCEPTIONS
        GWY_UNKNOWN_OPCODE = 1
        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_GET_NO_REG_PROGRAMS




ABAP code using 7.40 inline data declarations to call FM GWY_GET_NO_REG_PROGRAMS

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 NOREG FROM GWY_STRUCT INTO @DATA(ld_noreg_total).
 
 
"SELECT single GWSERV FROM GWY_STRUCT INTO @DATA(ld_gwserv).
 
"SELECT single NOREG FROM GWY_STRUCT INTO @DATA(ld_noreg_init).
 
 
"SELECT single TPNAME FROM GWY_SYSTEM INTO @DATA(ld_tpname).
 
"SELECT single NOREG FROM GWY_STRUCT INTO @DATA(ld_noreg_waiting).
 
 
"SELECT single FLAG FROM GWY_STRUCT INTO @DATA(ld_disconnect).
 
"SELECT single NOREG FROM GWY_STRUCT INTO @DATA(ld_noreg_running).
 
 
 
 
 
 
 


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!