SAP KBPB_DOCUMENT_SHOW_AND_PROC Function Module for
KBPB_DOCUMENT_SHOW_AND_PROC is a standard kbpb document show and proc 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 kbpb document show and proc FM, simply by entering the name KBPB_DOCUMENT_SHOW_AND_PROC into the relevant SAP transaction such as SE37 or SE38.
Function Group: KBPB
Program Name: SAPLKBPB
Main Program: SAPLKBPB
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function KBPB_DOCUMENT_SHOW_AND_PROC 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 'KBPB_DOCUMENT_SHOW_AND_PROC'".
EXPORTING
I_BELNR = "
I_FCODE = "
* I_WORKFLOW = ' ' "
IMPORTING
E_APP_RCODE = "
E_REASON = "Reason for decision for workflow
E_TRIGGER = "Final decision indicator
E_BPDK_BELNR = "
TABLES
* T_SELECT = "
EXCEPTIONS
DOCUMENT_NOT_FOUND = 1 DOCUMENT_LOCKED = 2 CANCEL_METHOD = 3 NO_AUTHORITY = 4
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLKBPB_001 Validation of Entry Document Line Items
EXIT_SAPLKBPB_002 Validation of Entry Document Document Header
EXIT_SAPLKBPB_003 User Exit for Budget Posting Time
EXIT_SAPLKBPB_004 Fill Customer-Specific Fields in Popup KBPB 190 from BPDK
EXIT_SAPLKBPB_005 Get Customer-Specific Fields from BPDK of Popup KBPB 190
IMPORTING Parameters details for KBPB_DOCUMENT_SHOW_AND_PROC
I_BELNR -
Data type: BPDK-BELNROptional: No
Call by Reference: No ( called with pass by value option)
I_FCODE -
Data type: BPIN-FCODEOptional: No
Call by Reference: No ( called with pass by value option)
I_WORKFLOW -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for KBPB_DOCUMENT_SHOW_AND_PROC
E_APP_RCODE -
Data type: TRWF_STRUC-APP_RCODEOptional: No
Call by Reference: No ( called with pass by value option)
E_REASON - Reason for decision for workflow
Data type: KBLK-FMREASONOptional: No
Call by Reference: No ( called with pass by value option)
E_TRIGGER - Final decision indicator
Data type: TREASONS-WFTRIGGEROptional: No
Call by Reference: No ( called with pass by value option)
E_BPDK_BELNR -
Data type: BPDK-BELNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for KBPB_DOCUMENT_SHOW_AND_PROC
T_SELECT -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DOCUMENT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOCUMENT_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANCEL_METHOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for KBPB_DOCUMENT_SHOW_AND_PROC 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_i_belnr | TYPE BPDK-BELNR, " | |||
| lt_t_select | TYPE STANDARD TABLE OF BPDK, " | |||
| lv_e_app_rcode | TYPE TRWF_STRUC-APP_RCODE, " | |||
| lv_document_not_found | TYPE TRWF_STRUC, " | |||
| lv_i_fcode | TYPE BPIN-FCODE, " | |||
| lv_e_reason | TYPE KBLK-FMREASON, " | |||
| lv_document_locked | TYPE KBLK, " | |||
| lv_e_trigger | TYPE TREASONS-WFTRIGGER, " | |||
| lv_i_workflow | TYPE TREASONS, " SPACE | |||
| lv_cancel_method | TYPE TREASONS, " | |||
| lv_e_bpdk_belnr | TYPE BPDK-BELNR, " | |||
| lv_no_authority | TYPE BPDK. " |
|   CALL FUNCTION 'KBPB_DOCUMENT_SHOW_AND_PROC' " |
| EXPORTING | ||
| I_BELNR | = lv_i_belnr | |
| I_FCODE | = lv_i_fcode | |
| I_WORKFLOW | = lv_i_workflow | |
| IMPORTING | ||
| E_APP_RCODE | = lv_e_app_rcode | |
| E_REASON | = lv_e_reason | |
| E_TRIGGER | = lv_e_trigger | |
| E_BPDK_BELNR | = lv_e_bpdk_belnr | |
| TABLES | ||
| T_SELECT | = lt_t_select | |
| EXCEPTIONS | ||
| DOCUMENT_NOT_FOUND = 1 | ||
| DOCUMENT_LOCKED = 2 | ||
| CANCEL_METHOD = 3 | ||
| NO_AUTHORITY = 4 | ||
| . " KBPB_DOCUMENT_SHOW_AND_PROC | ||
ABAP code using 7.40 inline data declarations to call FM KBPB_DOCUMENT_SHOW_AND_PROC
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 BELNR FROM BPDK INTO @DATA(ld_i_belnr). | ||||
| "SELECT single APP_RCODE FROM TRWF_STRUC INTO @DATA(ld_e_app_rcode). | ||||
| "SELECT single FCODE FROM BPIN INTO @DATA(ld_i_fcode). | ||||
| "SELECT single FMREASON FROM KBLK INTO @DATA(ld_e_reason). | ||||
| "SELECT single WFTRIGGER FROM TREASONS INTO @DATA(ld_e_trigger). | ||||
| DATA(ld_i_workflow) | = ' '. | |||
| "SELECT single BELNR FROM BPDK INTO @DATA(ld_e_bpdk_belnr). | ||||
Search for further information about these or an SAP related objects