SAP CBP_SOP_BATCH_EXIT Function Module for SOP Planning Table Exit for CBP Planning
CBP_SOP_BATCH_EXIT is a standard cbp sop batch exit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SOP Planning Table Exit for CBP Planning 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 cbp sop batch exit FM, simply by entering the name CBP_SOP_BATCH_EXIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CBP_SOP
Program Name: SAPLCBP_SOP
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CBP_SOP_BATCH_EXIT 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 'CBP_SOP_BATCH_EXIT'"SOP Planning Table Exit for CBP Planning.
EXPORTING
I_VRSIO = "Currently planned version
I_SOPROF = "
I_RMCP2 = "
I_JOBNR = "
TABLES
T_COLS = "Current column layout of matrix
T_SXYZ_SPMON = "
T_SXYZ_SPBUP = "
T_SAV_QUAD = "
T_PLOBJ_TAB = "
T_TAB = "Current values in planning matrix
T_LINES = "Current line layout of matrix
* T_TAB_LB0 = "Output attributes for matrix elements
* T_TAB_S093 = "
* T_TAB_FIX_SUM = "Column totals of fixed members
* T_TAB_FIX_CEL = "Fixed cells
T_SXYZ_SPTAG = "
T_SXYZ_SPWOC = "
EXCEPTIONS
AUTHORITY_FAILURE = 1 LOCK_FAILURE = 2
IMPORTING Parameters details for CBP_SOP_BATCH_EXIT
I_VRSIO - Currently planned version
Data type: RMCP2-VRSIOOptional: No
Call by Reference: No ( called with pass by value option)
I_SOPROF -
Data type: TCBP_SOPROFOptional: No
Call by Reference: No ( called with pass by value option)
I_RMCP2 -
Data type: RMCP2Optional: No
Call by Reference: No ( called with pass by value option)
I_JOBNR -
Data type: LISPL-JOBNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CBP_SOP_BATCH_EXIT
T_COLS - Current column layout of matrix
Data type: SCBP_PGCOLSOptional: No
Call by Reference: No ( called with pass by value option)
T_SXYZ_SPMON -
Data type: SCBP_SXYZ_SPMONOptional: No
Call by Reference: No ( called with pass by value option)
T_SXYZ_SPBUP -
Data type: SCBP_SXYZ_SPBUPOptional: No
Call by Reference: No ( called with pass by value option)
T_SAV_QUAD -
Data type: MCP6_SQOptional: No
Call by Reference: No ( called with pass by value option)
T_PLOBJ_TAB -
Data type: SCBP_PLOBJ_TABOptional: No
Call by Reference: No ( called with pass by value option)
T_TAB - Current values in planning matrix
Data type: MXSOPOptional: No
Call by Reference: No ( called with pass by value option)
T_LINES - Current line layout of matrix
Data type: MCP6_LIOptional: No
Call by Reference: No ( called with pass by value option)
T_TAB_LB0 - Output attributes for matrix elements
Data type: SCBP_LB0Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TAB_S093 -
Data type: S093Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TAB_FIX_SUM - Column totals of fixed members
Data type: MXSOPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_TAB_FIX_CEL - Fixed cells
Data type: MXSOPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_SXYZ_SPTAG -
Data type: SCBP_SXYZ_SPTAGOptional: No
Call by Reference: No ( called with pass by value option)
T_SXYZ_SPWOC -
Data type: SCBP_SXYZ_SPWOCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
AUTHORITY_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCK_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CBP_SOP_BATCH_EXIT 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: | ||||
| lt_t_cols | TYPE STANDARD TABLE OF SCBP_PGCOLS, " | |||
| lv_i_vrsio | TYPE RMCP2-VRSIO, " | |||
| lv_authority_failure | TYPE RMCP2, " | |||
| lt_t_sxyz_spmon | TYPE STANDARD TABLE OF SCBP_SXYZ_SPMON, " | |||
| lt_t_sxyz_spbup | TYPE STANDARD TABLE OF SCBP_SXYZ_SPBUP, " | |||
| lt_t_sav_quad | TYPE STANDARD TABLE OF MCP6_SQ, " | |||
| lt_t_plobj_tab | TYPE STANDARD TABLE OF SCBP_PLOBJ_TAB, " | |||
| lt_t_tab | TYPE STANDARD TABLE OF MXSOP, " | |||
| lv_i_soprof | TYPE TCBP_SOPROF, " | |||
| lv_lock_failure | TYPE TCBP_SOPROF, " | |||
| lv_i_rmcp2 | TYPE RMCP2, " | |||
| lt_t_lines | TYPE STANDARD TABLE OF MCP6_LI, " | |||
| lv_i_jobnr | TYPE LISPL-JOBNR, " | |||
| lt_t_tab_lb0 | TYPE STANDARD TABLE OF SCBP_LB0, " | |||
| lt_t_tab_s093 | TYPE STANDARD TABLE OF S093, " | |||
| lt_t_tab_fix_sum | TYPE STANDARD TABLE OF MXSOP, " | |||
| lt_t_tab_fix_cel | TYPE STANDARD TABLE OF MXSOP, " | |||
| lt_t_sxyz_sptag | TYPE STANDARD TABLE OF SCBP_SXYZ_SPTAG, " | |||
| lt_t_sxyz_spwoc | TYPE STANDARD TABLE OF SCBP_SXYZ_SPWOC. " |
|   CALL FUNCTION 'CBP_SOP_BATCH_EXIT' "SOP Planning Table Exit for CBP Planning |
| EXPORTING | ||
| I_VRSIO | = lv_i_vrsio | |
| I_SOPROF | = lv_i_soprof | |
| I_RMCP2 | = lv_i_rmcp2 | |
| I_JOBNR | = lv_i_jobnr | |
| TABLES | ||
| T_COLS | = lt_t_cols | |
| T_SXYZ_SPMON | = lt_t_sxyz_spmon | |
| T_SXYZ_SPBUP | = lt_t_sxyz_spbup | |
| T_SAV_QUAD | = lt_t_sav_quad | |
| T_PLOBJ_TAB | = lt_t_plobj_tab | |
| T_TAB | = lt_t_tab | |
| T_LINES | = lt_t_lines | |
| T_TAB_LB0 | = lt_t_tab_lb0 | |
| T_TAB_S093 | = lt_t_tab_s093 | |
| T_TAB_FIX_SUM | = lt_t_tab_fix_sum | |
| T_TAB_FIX_CEL | = lt_t_tab_fix_cel | |
| T_SXYZ_SPTAG | = lt_t_sxyz_sptag | |
| T_SXYZ_SPWOC | = lt_t_sxyz_spwoc | |
| EXCEPTIONS | ||
| AUTHORITY_FAILURE = 1 | ||
| LOCK_FAILURE = 2 | ||
| . " CBP_SOP_BATCH_EXIT | ||
ABAP code using 7.40 inline data declarations to call FM CBP_SOP_BATCH_EXIT
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 VRSIO FROM RMCP2 INTO @DATA(ld_i_vrsio). | ||||
| "SELECT single JOBNR FROM LISPL INTO @DATA(ld_i_jobnr). | ||||
Search for further information about these or an SAP related objects