SAP /BKC/RFC_INSERT_ANY_TABLE Function Module for C&T! - Copy of any table
/BKC/RFC_INSERT_ANY_TABLE is a standard /bkc/rfc insert any table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for C&T! - Copy of any table 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 /bkc/rfc insert any table FM, simply by entering the name /BKC/RFC_INSERT_ANY_TABLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: /BKC/SOL21
Program Name: /BKC/SAPLSOL21
Main Program: /BKC/SAPLSOL21
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /BKC/RFC_INSERT_ANY_TABLE 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 '/BKC/RFC_INSERT_ANY_TABLE'"C&T! - Copy of any table.
EXPORTING
TABNAME = "Table name
* P_USRMOD = "C&T! - Modifier for user exits
* P_TEST = "Background processing, program running in the background
* P_DIFF = "Background processing, program running in the background
* P_ALL = "Background processing, program running in the background
* P_PSAVE = "Background processing, program running in the background
* P_PEXIST = "Background processing, program running in the background
* IS_EXCEPTION = "Background processing, program running in the background
* STRUC_NAME = "Table name
* TABNAME_TARGET = "Table name
* COMPRESS = "Background processing, program running in the background
* CALLER_IS_UNICODE = "Background processing, program running in the background
* IF_VERSN = "Version of cluster data
* XBUFSIZE = "C&T! - Size of binary buffer
* XBUFNAME = "Table name
* P_USREX = "Background processing, program running in the background
IMPORTING
SAVED_LINES = "Internal tables, number of lines
EXISTING_LINES = "Internal tables, number of lines
PROTO_EXISTING_DATA = "
PROTO_NEW_DATA = "
TABLES
* ANY_TAB = "C&T! - Buffer for any table
* XBUFFER4096 = "C&T! - Binary buffer with 4096 byte
* XBUFFER8192 = "C&T! - Binary buffer with 8192 byte
* XBUFFER16384 = "C&T! - Binary buffer with 16384 byte
* CLUST_TAB_X = "C&T! - Cluster table - binary part
* STXL_X = "C&T! - STXL - binary part
* SYS_FEHLER = "C&T! - Interface structure for error messages
* XBUFFER32 = "C&T! - Binary buffer with 32 byte
* XBUFFER64 = "C&T! - Binary buffer with 64 byte
* XBUFFER128 = "C&T! - Binary buffer with 128 bytes
* XBUFFER256 = "C&T! - Binary buffer with 256 byte
* XBUFFER512 = "C&T! - Binary buffer with 512 byte
* XBUFFER1024 = "C&T! - Binary buffer with 1024 byte
* XBUFFER2048 = "C&T! - Binary buffer with 2048 byte
IMPORTING Parameters details for /BKC/RFC_INSERT_ANY_TABLE
TABNAME - Table name
Data type: TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
P_USRMOD - C&T! - Modifier for user exits
Data type: /BKC/S21_USREX_MODIFOptional: Yes
Call by Reference: No ( called with pass by value option)
P_TEST - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
P_DIFF - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ALL - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
P_PSAVE - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
P_PEXIST - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_EXCEPTION - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
STRUC_NAME - Table name
Data type: TABNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABNAME_TARGET - Table name
Data type: TABNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
COMPRESS - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
CALLER_IS_UNICODE - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_VERSN - Version of cluster data
Data type: PVRSNOptional: Yes
Call by Reference: No ( called with pass by value option)
XBUFSIZE - C&T! - Size of binary buffer
Data type: /BKC/S21_XBUFSIZEOptional: Yes
Call by Reference: No ( called with pass by value option)
XBUFNAME - Table name
Data type: TABNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
P_USREX - Background processing, program running in the background
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /BKC/RFC_INSERT_ANY_TABLE
SAVED_LINES - Internal tables, number of lines
Data type: SY-TFILLOptional: No
Call by Reference: No ( called with pass by value option)
EXISTING_LINES - Internal tables, number of lines
Data type: SY-TFILLOptional: No
Call by Reference: No ( called with pass by value option)
PROTO_EXISTING_DATA -
Data type: XSTRINGOptional: No
Call by Reference: No ( called with pass by value option)
PROTO_NEW_DATA -
Data type: XSTRINGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for /BKC/RFC_INSERT_ANY_TABLE
ANY_TAB - C&T! - Buffer for any table
Data type: /BKC/S21_ANY_TAB_PUFFEROptional: Yes
Call by Reference: Yes
XBUFFER4096 - C&T! - Binary buffer with 4096 byte
Data type: /BKC/S21_XBUF4096Optional: Yes
Call by Reference: Yes
XBUFFER8192 - C&T! - Binary buffer with 8192 byte
Data type: /BKC/S21_XBUF8192Optional: Yes
Call by Reference: Yes
XBUFFER16384 - C&T! - Binary buffer with 16384 byte
Data type: /BKC/S21_XBUF16384Optional: Yes
Call by Reference: Yes
CLUST_TAB_X - C&T! - Cluster table - binary part
Data type: /BKC/S21_PCL_XOptional: Yes
Call by Reference: Yes
STXL_X - C&T! - STXL - binary part
Data type: /BKC/S21_STXL_XOptional: Yes
Call by Reference: Yes
SYS_FEHLER - C&T! - Interface structure for error messages
Data type: /BKC/S21_SYSTEMFEHLEROptional: Yes
Call by Reference: Yes
XBUFFER32 - C&T! - Binary buffer with 32 byte
Data type: /BKC/S21_XBUF32Optional: Yes
Call by Reference: Yes
XBUFFER64 - C&T! - Binary buffer with 64 byte
Data type: /BKC/S21_XBUF64Optional: Yes
Call by Reference: Yes
XBUFFER128 - C&T! - Binary buffer with 128 bytes
Data type: /BKC/S21_XBUF128Optional: Yes
Call by Reference: Yes
XBUFFER256 - C&T! - Binary buffer with 256 byte
Data type: /BKC/S21_XBUF256Optional: Yes
Call by Reference: Yes
XBUFFER512 - C&T! - Binary buffer with 512 byte
Data type: /BKC/S21_XBUF512Optional: Yes
Call by Reference: Yes
XBUFFER1024 - C&T! - Binary buffer with 1024 byte
Data type: /BKC/S21_XBUF1024Optional: Yes
Call by Reference: Yes
XBUFFER2048 - C&T! - Binary buffer with 2048 byte
Data type: /BKC/S21_XBUF2048Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /BKC/RFC_INSERT_ANY_TABLE 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_any_tab | TYPE STANDARD TABLE OF /BKC/S21_ANY_TAB_PUFFER, " | |||
| lv_tabname | TYPE TABNAME, " | |||
| lv_saved_lines | TYPE SY-TFILL, " | |||
| lv_p_usrmod | TYPE /BKC/S21_USREX_MODIF, " | |||
| lt_xbuffer4096 | TYPE STANDARD TABLE OF /BKC/S21_XBUF4096, " | |||
| lv_p_test | TYPE SY-BATCH, " | |||
| lt_xbuffer8192 | TYPE STANDARD TABLE OF /BKC/S21_XBUF8192, " | |||
| lv_p_diff | TYPE SY-BATCH, " | |||
| lt_xbuffer16384 | TYPE STANDARD TABLE OF /BKC/S21_XBUF16384, " | |||
| lv_p_all | TYPE SY-BATCH, " | |||
| lt_clust_tab_x | TYPE STANDARD TABLE OF /BKC/S21_PCL_X, " | |||
| lt_stxl_x | TYPE STANDARD TABLE OF /BKC/S21_STXL_X, " | |||
| lv_p_psave | TYPE SY-BATCH, " | |||
| lv_p_pexist | TYPE SY-BATCH, " | |||
| lv_is_exception | TYPE SY-BATCH, " | |||
| lv_struc_name | TYPE TABNAME, " | |||
| lt_sys_fehler | TYPE STANDARD TABLE OF /BKC/S21_SYSTEMFEHLER, " | |||
| lv_existing_lines | TYPE SY-TFILL, " | |||
| lt_xbuffer32 | TYPE STANDARD TABLE OF /BKC/S21_XBUF32, " | |||
| lv_tabname_target | TYPE TABNAME, " | |||
| lv_proto_existing_data | TYPE XSTRING, " | |||
| lv_compress | TYPE SY-BATCH, " | |||
| lt_xbuffer64 | TYPE STANDARD TABLE OF /BKC/S21_XBUF64, " | |||
| lv_proto_new_data | TYPE XSTRING, " | |||
| lt_xbuffer128 | TYPE STANDARD TABLE OF /BKC/S21_XBUF128, " | |||
| lv_caller_is_unicode | TYPE SY-BATCH, " | |||
| lv_if_versn | TYPE PVRSN, " | |||
| lt_xbuffer256 | TYPE STANDARD TABLE OF /BKC/S21_XBUF256, " | |||
| lv_xbufsize | TYPE /BKC/S21_XBUFSIZE, " | |||
| lt_xbuffer512 | TYPE STANDARD TABLE OF /BKC/S21_XBUF512, " | |||
| lv_xbufname | TYPE TABNAME, " | |||
| lt_xbuffer1024 | TYPE STANDARD TABLE OF /BKC/S21_XBUF1024, " | |||
| lv_p_usrex | TYPE SY-BATCH, " | |||
| lt_xbuffer2048 | TYPE STANDARD TABLE OF /BKC/S21_XBUF2048. " |
|   CALL FUNCTION '/BKC/RFC_INSERT_ANY_TABLE' "C&T! - Copy of any table |
| EXPORTING | ||
| TABNAME | = lv_tabname | |
| P_USRMOD | = lv_p_usrmod | |
| P_TEST | = lv_p_test | |
| P_DIFF | = lv_p_diff | |
| P_ALL | = lv_p_all | |
| P_PSAVE | = lv_p_psave | |
| P_PEXIST | = lv_p_pexist | |
| IS_EXCEPTION | = lv_is_exception | |
| STRUC_NAME | = lv_struc_name | |
| TABNAME_TARGET | = lv_tabname_target | |
| COMPRESS | = lv_compress | |
| CALLER_IS_UNICODE | = lv_caller_is_unicode | |
| IF_VERSN | = lv_if_versn | |
| XBUFSIZE | = lv_xbufsize | |
| XBUFNAME | = lv_xbufname | |
| P_USREX | = lv_p_usrex | |
| IMPORTING | ||
| SAVED_LINES | = lv_saved_lines | |
| EXISTING_LINES | = lv_existing_lines | |
| PROTO_EXISTING_DATA | = lv_proto_existing_data | |
| PROTO_NEW_DATA | = lv_proto_new_data | |
| TABLES | ||
| ANY_TAB | = lt_any_tab | |
| XBUFFER4096 | = lt_xbuffer4096 | |
| XBUFFER8192 | = lt_xbuffer8192 | |
| XBUFFER16384 | = lt_xbuffer16384 | |
| CLUST_TAB_X | = lt_clust_tab_x | |
| STXL_X | = lt_stxl_x | |
| SYS_FEHLER | = lt_sys_fehler | |
| XBUFFER32 | = lt_xbuffer32 | |
| XBUFFER64 | = lt_xbuffer64 | |
| XBUFFER128 | = lt_xbuffer128 | |
| XBUFFER256 | = lt_xbuffer256 | |
| XBUFFER512 | = lt_xbuffer512 | |
| XBUFFER1024 | = lt_xbuffer1024 | |
| XBUFFER2048 | = lt_xbuffer2048 | |
| . " /BKC/RFC_INSERT_ANY_TABLE | ||
ABAP code using 7.40 inline data declarations to call FM /BKC/RFC_INSERT_ANY_TABLE
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 TFILL FROM SY INTO @DATA(ld_saved_lines). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_test). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_diff). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_all). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_psave). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_pexist). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_is_exception). | ||||
| "SELECT single TFILL FROM SY INTO @DATA(ld_existing_lines). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_compress). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_caller_is_unicode). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_p_usrex). | ||||
Search for further information about these or an SAP related objects