SAP GCFB_EVENT_HANDLER Function Module for GBC: Event Processing for Equipment Created









GCFB_EVENT_HANDLER is a standard gcfb event handler SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for GBC: Event Processing for Equipment Created 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 gcfb event handler FM, simply by entering the name GCFB_EVENT_HANDLER into the relevant SAP transaction such as SE37 or SE38.

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



Function GCFB_EVENT_HANDLER 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 'GCFB_EVENT_HANDLER'"GBC: Event Processing for Equipment Created
EXPORTING
EVENT = "Name of Event
RECTYPE = "Type of Event Receiver, Here: Task ID
OBJTYPE = "Type of triggering object
OBJKEY = "Key of Triggering Object
* EXCEPTIONS_ALLOWED = ' ' "Indicator Showing Whether FM Can Raise Exceptions

IMPORTING
REC_ID = "Key of Receiving Object

TABLES
EVENT_CONTAINER = "Event container

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for GCFB_EVENT_HANDLER

EVENT - Name of Event

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

RECTYPE - Type of Event Receiver, Here: Task ID

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

OBJTYPE - Type of triggering object

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

OBJKEY - Key of Triggering Object

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

EXCEPTIONS_ALLOWED - Indicator Showing Whether FM Can Raise Exceptions

Data type: SWEFLAGS-EXC_OK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GCFB_EVENT_HANDLER

REC_ID - Key of Receiving Object

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

TABLES Parameters details for GCFB_EVENT_HANDLER

EVENT_CONTAINER - Event container

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

EXCEPTIONS details

ERROR - Error in Recipient

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GCFB_EVENT_HANDLER 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_error  TYPE STRING, "   
lv_event  TYPE SWETYPECOU-EVENT, "   
lv_rec_id  TYPE SWELOG-RECID, "   
lt_event_container  TYPE STANDARD TABLE OF SWCONT, "   
lv_rectype  TYPE SWETYPECOU-RECTYPE, "   
lv_objtype  TYPE SWETYPECOU-OBJTYPE, "   
lv_objkey  TYPE SWEINSTCOU-OBJKEY, "   
lv_exceptions_allowed  TYPE SWEFLAGS-EXC_OK. "   SPACE

  CALL FUNCTION 'GCFB_EVENT_HANDLER'  "GBC: Event Processing for Equipment Created
    EXPORTING
         EVENT = lv_event
         RECTYPE = lv_rectype
         OBJTYPE = lv_objtype
         OBJKEY = lv_objkey
         EXCEPTIONS_ALLOWED = lv_exceptions_allowed
    IMPORTING
         REC_ID = lv_rec_id
    TABLES
         EVENT_CONTAINER = lt_event_container
    EXCEPTIONS
        ERROR = 1
. " GCFB_EVENT_HANDLER




ABAP code using 7.40 inline data declarations to call FM GCFB_EVENT_HANDLER

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 EVENT FROM SWETYPECOU INTO @DATA(ld_event).
 
"SELECT single RECID FROM SWELOG INTO @DATA(ld_rec_id).
 
 
"SELECT single RECTYPE FROM SWETYPECOU INTO @DATA(ld_rectype).
 
"SELECT single OBJTYPE FROM SWETYPECOU INTO @DATA(ld_objtype).
 
"SELECT single OBJKEY FROM SWEINSTCOU INTO @DATA(ld_objkey).
 
"SELECT single EXC_OK FROM SWEFLAGS INTO @DATA(ld_exceptions_allowed).
DATA(ld_exceptions_allowed) = ' '.
 


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!