SAP SAPBC_GLOBAL_BOOK Function Module for









SAPBC_GLOBAL_BOOK is a standard sapbc global book 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 book FM, simply by entering the name SAPBC_GLOBAL_BOOK 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_BOOK 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_BOOK'"
EXPORTING
IV_CARRID = "Airline Carrier
* IV_LUGGWEIGHT = '17.12' "Weight of Luggage
* IV_WUNIT = 'KG' "
* IV_RESERVE_ONLY = ' ' "Reservation flag
* IV_PASSNAME = "Name of the Passenger
* IV_PASSFORM = "Title for Workbench training data model BC_Travel
* IV_PASSBIRTH = "Date of Birth of a Passenger
* IV_TESTRUN = ' ' "Switch to Simulation Mode
IV_CONNID = "Connection Number
IV_FLDATE = "Date
IV_CUSTOMER = "Customer Number
* IV_EXT_CUSTOMER = ' ' "External customer
* IV_AGENCY = "Travel agency
* IV_COUNTER = "Sales counter
* IV_CLASS = 'Y' "Flight Class
* IV_SMOKER = ' ' "Smoker

IMPORTING
EV_CUSTOMER_NAME = "Customer Name
EV_BOOKID = "Booking number
EV_PRICE = "Price of booking in local currency of airline
EV_TAX = "Flight tax
EV_CURRENCY = "Local currency of airline

EXCEPTIONS
INVALID_CUSTOMER = 1 INSERT_SBOOK_REJECTED = 10 UPDATE_SFLIGHT_REJECTED = 11 INVALID_CLASS = 12 AGENCY_AND_COUNTER = 2 INVALID_TRAVEL_AGENCY = 3 INVALID_COUNTER = 4 NEITHER_AGENCY_NOR_COUNTER = 5 FLIGHT_NOT_FOUND = 6 FLIGHT_LOCKED = 7 FLIGHT_BOOKED_OUT = 8 NO_BOOKID_AVAILABLE = 9
.



IMPORTING Parameters details for SAPBC_GLOBAL_BOOK

IV_CARRID - Airline Carrier

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

IV_LUGGWEIGHT - Weight of Luggage

Data type: SBOOK-LUGGWEIGHT
Default: '17.12'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_WUNIT -

Data type: SBOOK-WUNIT
Default: 'KG'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_RESERVE_ONLY - Reservation flag

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

IV_PASSNAME - Name of the Passenger

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

IV_PASSFORM - Title for Workbench training data model BC_Travel

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

IV_PASSBIRTH - Date of Birth of a Passenger

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

IV_TESTRUN - Switch to Simulation Mode

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

IV_CONNID - Connection Number

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

IV_FLDATE - Date

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

IV_CUSTOMER - Customer Number

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

IV_EXT_CUSTOMER - External customer

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

IV_AGENCY - Travel agency

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

IV_COUNTER - Sales counter

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

IV_CLASS - Flight Class

Data type: SBOOK-CLASS
Default: 'Y'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SMOKER - Smoker

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

EXPORTING Parameters details for SAPBC_GLOBAL_BOOK

EV_CUSTOMER_NAME - Customer Name

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

EV_BOOKID - Booking number

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

EV_PRICE - Price of booking in local currency of airline

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

EV_TAX - Flight tax

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

EV_CURRENCY - Local currency of airline

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

EXCEPTIONS details

INVALID_CUSTOMER -

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

INSERT_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)

INVALID_CLASS -

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

AGENCY_AND_COUNTER -

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

INVALID_TRAVEL_AGENCY -

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

INVALID_COUNTER -

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

NEITHER_AGENCY_NOR_COUNTER -

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

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)

FLIGHT_BOOKED_OUT -

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

NO_BOOKID_AVAILABLE -

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

Copy and paste ABAP code example for SAPBC_GLOBAL_BOOK 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 SFLIGHT-CARRID, "   
lv_ev_customer_name  TYPE SCUSTOM-NAME, "   
lv_invalid_customer  TYPE SCUSTOM, "   
lv_iv_luggweight  TYPE SBOOK-LUGGWEIGHT, "   '17,12'
lv_insert_sbook_rejected  TYPE SBOOK, "   
lv_iv_wunit  TYPE SBOOK-WUNIT, "   'KG'
lv_update_sflight_rejected  TYPE SBOOK, "   
lv_invalid_class  TYPE SBOOK, "   
lv_iv_reserve_only  TYPE SBOOK-RESERVED, "   SPACE
lv_iv_passname  TYPE SBOOK-PASSNAME, "   
lv_iv_passform  TYPE SBOOK-PASSFORM, "   
lv_iv_passbirth  TYPE SBOOK-PASSBIRTH, "   
lv_iv_testrun  TYPE SFL_AUX-TESTRUN, "   SPACE
lv_ev_bookid  TYPE SBOOK-BOOKID, "   
lv_iv_connid  TYPE SFLIGHT-CONNID, "   
lv_agency_and_counter  TYPE SFLIGHT, "   
lv_ev_price  TYPE SBOOK-LOCCURAM, "   
lv_iv_fldate  TYPE SFLIGHT-FLDATE, "   
lv_invalid_travel_agency  TYPE SFLIGHT, "   
lv_ev_tax  TYPE SFLTRIP-TRIPTAX, "   
lv_iv_customer  TYPE SCUSTOM-ID, "   
lv_invalid_counter  TYPE SCUSTOM, "   
lv_ev_currency  TYPE SBOOK-LOCCURKEY, "   
lv_iv_ext_customer  TYPE SFL_AUX-EXT_CUST, "   SPACE
lv_neither_agency_nor_counter  TYPE SFL_AUX, "   
lv_iv_agency  TYPE STRAVELAG-AGENCYNUM, "   
lv_flight_not_found  TYPE STRAVELAG, "   
lv_iv_counter  TYPE SCOUNTER-COUNTNUM, "   
lv_flight_locked  TYPE SCOUNTER, "   
lv_iv_class  TYPE SBOOK-CLASS, "   'Y'
lv_flight_booked_out  TYPE SBOOK, "   
lv_iv_smoker  TYPE SBOOK-SMOKER, "   SPACE
lv_no_bookid_available  TYPE SBOOK. "   

  CALL FUNCTION 'SAPBC_GLOBAL_BOOK'  "
    EXPORTING
         IV_CARRID = lv_iv_carrid
         IV_LUGGWEIGHT = lv_iv_luggweight
         IV_WUNIT = lv_iv_wunit
         IV_RESERVE_ONLY = lv_iv_reserve_only
         IV_PASSNAME = lv_iv_passname
         IV_PASSFORM = lv_iv_passform
         IV_PASSBIRTH = lv_iv_passbirth
         IV_TESTRUN = lv_iv_testrun
         IV_CONNID = lv_iv_connid
         IV_FLDATE = lv_iv_fldate
         IV_CUSTOMER = lv_iv_customer
         IV_EXT_CUSTOMER = lv_iv_ext_customer
         IV_AGENCY = lv_iv_agency
         IV_COUNTER = lv_iv_counter
         IV_CLASS = lv_iv_class
         IV_SMOKER = lv_iv_smoker
    IMPORTING
         EV_CUSTOMER_NAME = lv_ev_customer_name
         EV_BOOKID = lv_ev_bookid
         EV_PRICE = lv_ev_price
         EV_TAX = lv_ev_tax
         EV_CURRENCY = lv_ev_currency
    EXCEPTIONS
        INVALID_CUSTOMER = 1
        INSERT_SBOOK_REJECTED = 10
        UPDATE_SFLIGHT_REJECTED = 11
        INVALID_CLASS = 12
        AGENCY_AND_COUNTER = 2
        INVALID_TRAVEL_AGENCY = 3
        INVALID_COUNTER = 4
        NEITHER_AGENCY_NOR_COUNTER = 5
        FLIGHT_NOT_FOUND = 6
        FLIGHT_LOCKED = 7
        FLIGHT_BOOKED_OUT = 8
        NO_BOOKID_AVAILABLE = 9
. " SAPBC_GLOBAL_BOOK




ABAP code using 7.40 inline data declarations to call FM SAPBC_GLOBAL_BOOK

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 SFLIGHT INTO @DATA(ld_iv_carrid).
 
"SELECT single NAME FROM SCUSTOM INTO @DATA(ld_ev_customer_name).
 
 
"SELECT single LUGGWEIGHT FROM SBOOK INTO @DATA(ld_iv_luggweight).
DATA(ld_iv_luggweight) = '17.12'.
 
 
"SELECT single WUNIT FROM SBOOK INTO @DATA(ld_iv_wunit).
DATA(ld_iv_wunit) = 'KG'.
 
 
 
"SELECT single RESERVED FROM SBOOK INTO @DATA(ld_iv_reserve_only).
DATA(ld_iv_reserve_only) = ' '.
 
"SELECT single PASSNAME FROM SBOOK INTO @DATA(ld_iv_passname).
 
"SELECT single PASSFORM FROM SBOOK INTO @DATA(ld_iv_passform).
 
"SELECT single PASSBIRTH FROM SBOOK INTO @DATA(ld_iv_passbirth).
 
"SELECT single TESTRUN FROM SFL_AUX INTO @DATA(ld_iv_testrun).
DATA(ld_iv_testrun) = ' '.
 
"SELECT single BOOKID FROM SBOOK INTO @DATA(ld_ev_bookid).
 
"SELECT single CONNID FROM SFLIGHT INTO @DATA(ld_iv_connid).
 
 
"SELECT single LOCCURAM FROM SBOOK INTO @DATA(ld_ev_price).
 
"SELECT single FLDATE FROM SFLIGHT INTO @DATA(ld_iv_fldate).
 
 
"SELECT single TRIPTAX FROM SFLTRIP INTO @DATA(ld_ev_tax).
 
"SELECT single ID FROM SCUSTOM INTO @DATA(ld_iv_customer).
 
 
"SELECT single LOCCURKEY FROM SBOOK INTO @DATA(ld_ev_currency).
 
"SELECT single EXT_CUST FROM SFL_AUX INTO @DATA(ld_iv_ext_customer).
DATA(ld_iv_ext_customer) = ' '.
 
 
"SELECT single AGENCYNUM FROM STRAVELAG INTO @DATA(ld_iv_agency).
 
 
"SELECT single COUNTNUM FROM SCOUNTER INTO @DATA(ld_iv_counter).
 
 
"SELECT single CLASS FROM SBOOK INTO @DATA(ld_iv_class).
DATA(ld_iv_class) = 'Y'.
 
 
"SELECT single SMOKER FROM SBOOK INTO @DATA(ld_iv_smoker).
DATA(ld_iv_smoker) = ' '.
 
 


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!