SAP SAPBC_GLOBAL_CANCEL Function Module for









SAPBC_GLOBAL_CANCEL is a standard sapbc global cancel 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 sapbc global cancel FM, simply by entering the name SAPBC_GLOBAL_CANCEL into the relevant SAP transaction such as SE37 or SE38.

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



Function SAPBC_GLOBAL_CANCEL 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 'SAPBC_GLOBAL_CANCEL'"
EXPORTING
IV_CARRID = "Airline Carrier
IV_CONNID = "Connection Number
IV_FLDATE = "Date
IV_BOOKID = "Booking number
* IV_CUSTOMID = "Customer Number
* IV_TESTRUN = ' ' "Switch to Simulation Mode

EXCEPTIONS
FLIGHT_NOT_FOUND = 1 FLIGHT_LOCKED = 2 BOOKING_NOT_FOUND = 3 BOOKING_LOCKED = 4 ALREADY_CANCELLED = 5 UPDATE_SBOOK_REJECTED = 6 UPDATE_SFLIGHT_REJECTED = 7
.



IMPORTING Parameters details for SAPBC_GLOBAL_CANCEL

IV_CARRID - Airline Carrier

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

IV_CONNID - Connection Number

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

IV_FLDATE - Date

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

IV_BOOKID - Booking number

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

IV_CUSTOMID - Customer Number

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

IV_TESTRUN - Switch to Simulation Mode

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

EXCEPTIONS details

FLIGHT_NOT_FOUND -

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

FLIGHT_LOCKED -

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

BOOKING_NOT_FOUND -

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

BOOKING_LOCKED -

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

ALREADY_CANCELLED -

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

UPDATE_SBOOK_REJECTED -

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

UPDATE_SFLIGHT_REJECTED -

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

Copy and paste ABAP code example for SAPBC_GLOBAL_CANCEL 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_iv_carrid  TYPE SBOOK-CARRID, "   
lv_flight_not_found  TYPE SBOOK, "   
lv_iv_connid  TYPE SBOOK-CONNID, "   
lv_flight_locked  TYPE SBOOK, "   
lv_iv_fldate  TYPE SBOOK-FLDATE, "   
lv_booking_not_found  TYPE SBOOK, "   
lv_iv_bookid  TYPE SBOOK-BOOKID, "   
lv_booking_locked  TYPE SBOOK, "   
lv_iv_customid  TYPE SBOOK-CUSTOMID, "   
lv_already_cancelled  TYPE SBOOK, "   
lv_iv_testrun  TYPE TESTRUN, "   SPACE
lv_update_sbook_rejected  TYPE TESTRUN, "   
lv_update_sflight_rejected  TYPE TESTRUN. "   

  CALL FUNCTION 'SAPBC_GLOBAL_CANCEL'  "
    EXPORTING
         IV_CARRID = lv_iv_carrid
         IV_CONNID = lv_iv_connid
         IV_FLDATE = lv_iv_fldate
         IV_BOOKID = lv_iv_bookid
         IV_CUSTOMID = lv_iv_customid
         IV_TESTRUN = lv_iv_testrun
    EXCEPTIONS
        FLIGHT_NOT_FOUND = 1
        FLIGHT_LOCKED = 2
        BOOKING_NOT_FOUND = 3
        BOOKING_LOCKED = 4
        ALREADY_CANCELLED = 5
        UPDATE_SBOOK_REJECTED = 6
        UPDATE_SFLIGHT_REJECTED = 7
. " SAPBC_GLOBAL_CANCEL




ABAP code using 7.40 inline data declarations to call FM SAPBC_GLOBAL_CANCEL

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 CARRID FROM SBOOK INTO @DATA(ld_iv_carrid).
 
 
"SELECT single CONNID FROM SBOOK INTO @DATA(ld_iv_connid).
 
 
"SELECT single FLDATE FROM SBOOK INTO @DATA(ld_iv_fldate).
 
 
"SELECT single BOOKID FROM SBOOK INTO @DATA(ld_iv_bookid).
 
 
"SELECT single CUSTOMID FROM SBOOK INTO @DATA(ld_iv_customid).
 
 
DATA(ld_iv_testrun) = ' '.
 
 
 


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!