SAP GWY_CANCEL_REG_PROGRAMS Function Module for









GWY_CANCEL_REG_PROGRAMS is a standard gwy cancel 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 cancel reg programs FM, simply by entering the name GWY_CANCEL_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_CANCEL_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_CANCEL_REG_PROGRAMS'"
EXPORTING
TP = "
* GWHOST = "
* GWSERV = "
* DISCONNECT = "Terminate connection

IMPORTING
TOTAL = "
CANCELED = "

EXCEPTIONS
GWY_UNKNOWN_OPCODE = 1 GWY_GET_OPCODE_FAILED = 2 GWY_GET_TP_FAILED = 3 GWY_COMMUNICATION_FAILURE = 4 GWY_MONITOR_DISABLED = 5 GWY_NOT_AUTHORIZED = 6
.



IMPORTING Parameters details for GWY_CANCEL_REG_PROGRAMS

TP -

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

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)

EXPORTING Parameters details for GWY_CANCEL_REG_PROGRAMS

TOTAL -

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

CANCELED -

Data type: GWY_STRUCT-NOREG
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_GET_OPCODE_FAILED -

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

GWY_GET_TP_FAILED -

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_MONITOR_DISABLED -

Data type:
Optional: No
Call by Reference: Yes

GWY_NOT_AUTHORIZED - No Authorization

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GWY_CANCEL_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_tp  TYPE GWY_SYSTEM-TPNAME, "   
lv_total  TYPE GWY_STRUCT-NOREG, "   
lv_gwy_unknown_opcode  TYPE GWY_STRUCT, "   
lv_gwhost  TYPE GWY_STRUCT-GWHOST, "   
lv_canceled  TYPE GWY_STRUCT-NOREG, "   
lv_gwy_get_opcode_failed  TYPE GWY_STRUCT, "   
lv_gwserv  TYPE GWY_STRUCT-GWSERV, "   
lv_gwy_get_tp_failed  TYPE GWY_STRUCT, "   
lv_disconnect  TYPE GWY_STRUCT-FLAG, "   
lv_gwy_communication_failure  TYPE GWY_STRUCT, "   
lv_gwy_monitor_disabled  TYPE GWY_STRUCT, "   
lv_gwy_not_authorized  TYPE GWY_STRUCT. "   

  CALL FUNCTION 'GWY_CANCEL_REG_PROGRAMS'  "
    EXPORTING
         TP = lv_tp
         GWHOST = lv_gwhost
         GWSERV = lv_gwserv
         DISCONNECT = lv_disconnect
    IMPORTING
         TOTAL = lv_total
         CANCELED = lv_canceled
    EXCEPTIONS
        GWY_UNKNOWN_OPCODE = 1
        GWY_GET_OPCODE_FAILED = 2
        GWY_GET_TP_FAILED = 3
        GWY_COMMUNICATION_FAILURE = 4
        GWY_MONITOR_DISABLED = 5
        GWY_NOT_AUTHORIZED = 6
. " GWY_CANCEL_REG_PROGRAMS




ABAP code using 7.40 inline data declarations to call FM GWY_CANCEL_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 TPNAME FROM GWY_SYSTEM INTO @DATA(ld_tp).
 
"SELECT single NOREG FROM GWY_STRUCT INTO @DATA(ld_total).
 
 
"SELECT single GWHOST FROM GWY_STRUCT INTO @DATA(ld_gwhost).
 
"SELECT single NOREG FROM GWY_STRUCT INTO @DATA(ld_canceled).
 
 
"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!