SAP CALL_FB08 Function Module for
CALL_FB08 is a standard call fb08 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 call fb08 FM, simply by entering the name CALL_FB08 into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCHK
Program Name: SAPLFCHK
Main Program: SAPLFCHK
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CALL_FB08 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 'CALL_FB08'".
EXPORTING
I_BUKRS = "Company code
* I_UPDATE = 'A' "Update parameter for call transaction
* I_MODE = 'N' "Mode parameter for call transaction
* I_NO_AUTH = ' ' "
* I_BLDAT = "
* I_VATDATE = "
I_BELNR = "Document number
I_GJAHR = "Fiscal year
* I_BVORG = ' ' "Cross-comp.code trans.
I_STGRD = "Reason for Reversal
* I_VOIDR = "Void reason code
* I_BUDAT = "Reverse posting date
* I_MONAT = "Reverse posting period
* I_XSIMU = ' ' "Indicator: Simulated reversal
IMPORTING
E_BUDAT = "Reverse posting date (if I_BUDAT is blank)
E_MONAT = "
E_XSOFO = "Reversal can be made immediately (without FBRA)
EXCEPTIONS
NOT_POSSIBLE = 1
IMPORTING Parameters details for CALL_FB08
I_BUKRS - Company code
Data type: BKPF-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_UPDATE - Update parameter for call transaction
Data type:Default: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MODE - Mode parameter for call transaction
Data type:Default: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_AUTH -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BLDAT -
Data type: BKPF-BLDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_VATDATE -
Data type: BKPF-VATDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BELNR - Document number
Data type: BKPF-BELNROptional: No
Call by Reference: No ( called with pass by value option)
I_GJAHR - Fiscal year
Data type: BKPF-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_BVORG - Cross-comp.code trans.
Data type: BKPF-BVORGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_STGRD - Reason for Reversal
Data type: BKPF-STGRDOptional: No
Call by Reference: No ( called with pass by value option)
I_VOIDR - Void reason code
Data type: PAYR-VOIDROptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUDAT - Reverse posting date
Data type: BKPF-BUDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MONAT - Reverse posting period
Data type: BKPF-MONATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_XSIMU - Indicator: Simulated reversal
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CALL_FB08
E_BUDAT - Reverse posting date (if I_BUDAT is blank)
Data type: BKPF-BUDATOptional: No
Call by Reference: No ( called with pass by value option)
E_MONAT -
Data type: BKPF-MONATOptional: No
Call by Reference: No ( called with pass by value option)
E_XSOFO - Reversal can be made immediately (without FBRA)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_POSSIBLE - Reversal is not possible (even after FBRA)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CALL_FB08 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_e_budat | TYPE BKPF-BUDAT, " | |||
lv_i_bukrs | TYPE BKPF-BUKRS, " | |||
lv_not_possible | TYPE BKPF, " | |||
lv_i_update | TYPE BKPF, " 'A' | |||
lv_i_mode | TYPE BKPF, " 'N' | |||
lv_i_no_auth | TYPE BKPF, " SPACE | |||
lv_i_bldat | TYPE BKPF-BLDAT, " | |||
lv_i_vatdate | TYPE BKPF-VATDATE, " | |||
lv_e_monat | TYPE BKPF-MONAT, " | |||
lv_i_belnr | TYPE BKPF-BELNR, " | |||
lv_e_xsofo | TYPE BKPF, " | |||
lv_i_gjahr | TYPE BKPF-GJAHR, " | |||
lv_i_bvorg | TYPE BKPF-BVORG, " SPACE | |||
lv_i_stgrd | TYPE BKPF-STGRD, " | |||
lv_i_voidr | TYPE PAYR-VOIDR, " | |||
lv_i_budat | TYPE BKPF-BUDAT, " | |||
lv_i_monat | TYPE BKPF-MONAT, " | |||
lv_i_xsimu | TYPE BKPF. " SPACE |
  CALL FUNCTION 'CALL_FB08' " |
EXPORTING | ||
I_BUKRS | = lv_i_bukrs | |
I_UPDATE | = lv_i_update | |
I_MODE | = lv_i_mode | |
I_NO_AUTH | = lv_i_no_auth | |
I_BLDAT | = lv_i_bldat | |
I_VATDATE | = lv_i_vatdate | |
I_BELNR | = lv_i_belnr | |
I_GJAHR | = lv_i_gjahr | |
I_BVORG | = lv_i_bvorg | |
I_STGRD | = lv_i_stgrd | |
I_VOIDR | = lv_i_voidr | |
I_BUDAT | = lv_i_budat | |
I_MONAT | = lv_i_monat | |
I_XSIMU | = lv_i_xsimu | |
IMPORTING | ||
E_BUDAT | = lv_e_budat | |
E_MONAT | = lv_e_monat | |
E_XSOFO | = lv_e_xsofo | |
EXCEPTIONS | ||
NOT_POSSIBLE = 1 | ||
. " CALL_FB08 |
ABAP code using 7.40 inline data declarations to call FM CALL_FB08
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 BUDAT FROM BKPF INTO @DATA(ld_e_budat). | ||||
"SELECT single BUKRS FROM BKPF INTO @DATA(ld_i_bukrs). | ||||
DATA(ld_i_update) | = 'A'. | |||
DATA(ld_i_mode) | = 'N'. | |||
DATA(ld_i_no_auth) | = ' '. | |||
"SELECT single BLDAT FROM BKPF INTO @DATA(ld_i_bldat). | ||||
"SELECT single VATDATE FROM BKPF INTO @DATA(ld_i_vatdate). | ||||
"SELECT single MONAT FROM BKPF INTO @DATA(ld_e_monat). | ||||
"SELECT single BELNR FROM BKPF INTO @DATA(ld_i_belnr). | ||||
"SELECT single GJAHR FROM BKPF INTO @DATA(ld_i_gjahr). | ||||
"SELECT single BVORG FROM BKPF INTO @DATA(ld_i_bvorg). | ||||
DATA(ld_i_bvorg) | = ' '. | |||
"SELECT single STGRD FROM BKPF INTO @DATA(ld_i_stgrd). | ||||
"SELECT single VOIDR FROM PAYR INTO @DATA(ld_i_voidr). | ||||
"SELECT single BUDAT FROM BKPF INTO @DATA(ld_i_budat). | ||||
"SELECT single MONAT FROM BKPF INTO @DATA(ld_i_monat). | ||||
DATA(ld_i_xsimu) | = ' '. | |||
Search for further information about these or an SAP related objects