SAP K_TRANSFER_BDC_WITH_VARNR Function Module for Batch Input to Actual Postings: Reposting Costs with Screen Variant
K_TRANSFER_BDC_WITH_VARNR is a standard k transfer bdc with varnr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Batch Input to Actual Postings: Reposting Costs with Screen Variant 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 k transfer bdc with varnr FM, simply by entering the name K_TRANSFER_BDC_WITH_VARNR into the relevant SAP transaction such as SE37 or SE38.
Function Group: KIBI
Program Name: SAPLKIBI
Main Program:
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function K_TRANSFER_BDC_WITH_VARNR 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 'K_TRANSFER_BDC_WITH_VARNR'"Batch Input to Actual Postings: Reposting Costs with Screen Variant.
EXPORTING
* I_CLIENT = SY-MANDT "
* I_HOLDDATE = ' ' "Lock Folder Until Given Date
* I_KEEP = ' ' "Indicator for Halting Downloaded Folders
* I_MAPNAME = 'BATCHMAP' "Session Name
* I_ONLINE = ' ' "Indicator for Online Use (Values: Space, A, E, N)
* I_USER = SY-UNAME "User Name
TABLES
I_RKIBI1B = "Internal Table for Data Transfer (Ddic: RKIBI1)
EXCEPTIONS
ERROR_IN_CALL_TRANSACTION = 1 NO_ENTRIES_IN_TABLE = 2 WRONG_ONLINE_PARAMETER = 3 WRONG_VARNR = 4 WRONG_KOKRS = 5
IMPORTING Parameters details for K_TRANSFER_BDC_WITH_VARNR
I_CLIENT -
Data type: APQI-MANDANTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_HOLDDATE - Lock Folder Until Given Date
Data type: APQI-STARTDATEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_KEEP - Indicator for Halting Downloaded Folders
Data type: APQI-QERASEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MAPNAME - Session Name
Data type: APQI-GROUPIDDefault: 'BATCHMAP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLINE - Indicator for Online Use (Values: Space, A, E, N)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_USER - User Name
Data type: APQI-USERIDDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for K_TRANSFER_BDC_WITH_VARNR
I_RKIBI1B - Internal Table for Data Transfer (Ddic: RKIBI1)
Data type: RKIBI1BOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_IN_CALL_TRANSACTION - Error During Online Updates
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRIES_IN_TABLE - Transferred Table Has No Entries
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_ONLINE_PARAMETER - Incorrect Transfer Value in ONLINE Parameters
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_VARNR - Incorrect Screen Variant
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_KOKRS - Incorrect Controlling Area
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for K_TRANSFER_BDC_WITH_VARNR 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_client | TYPE APQI-MANDANT, " SY-MANDT | |||
| lt_i_rkibi1b | TYPE STANDARD TABLE OF RKIBI1B, " | |||
| lv_error_in_call_transaction | TYPE RKIBI1B, " | |||
| lv_i_holddate | TYPE APQI-STARTDATE, " SPACE | |||
| lv_no_entries_in_table | TYPE APQI, " | |||
| lv_i_keep | TYPE APQI-QERASE, " SPACE | |||
| lv_wrong_online_parameter | TYPE APQI, " | |||
| lv_i_mapname | TYPE APQI-GROUPID, " 'BATCHMAP' | |||
| lv_wrong_varnr | TYPE APQI, " | |||
| lv_i_online | TYPE APQI, " ' ' | |||
| lv_wrong_kokrs | TYPE APQI, " | |||
| lv_i_user | TYPE APQI-USERID. " SY-UNAME |
|   CALL FUNCTION 'K_TRANSFER_BDC_WITH_VARNR' "Batch Input to Actual Postings: Reposting Costs with Screen Variant |
| EXPORTING | ||
| I_CLIENT | = lv_i_client | |
| I_HOLDDATE | = lv_i_holddate | |
| I_KEEP | = lv_i_keep | |
| I_MAPNAME | = lv_i_mapname | |
| I_ONLINE | = lv_i_online | |
| I_USER | = lv_i_user | |
| TABLES | ||
| I_RKIBI1B | = lt_i_rkibi1b | |
| EXCEPTIONS | ||
| ERROR_IN_CALL_TRANSACTION = 1 | ||
| NO_ENTRIES_IN_TABLE = 2 | ||
| WRONG_ONLINE_PARAMETER = 3 | ||
| WRONG_VARNR = 4 | ||
| WRONG_KOKRS = 5 | ||
| . " K_TRANSFER_BDC_WITH_VARNR | ||
ABAP code using 7.40 inline data declarations to call FM K_TRANSFER_BDC_WITH_VARNR
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 MANDANT FROM APQI INTO @DATA(ld_i_client). | ||||
| DATA(ld_i_client) | = SY-MANDT. | |||
| "SELECT single STARTDATE FROM APQI INTO @DATA(ld_i_holddate). | ||||
| DATA(ld_i_holddate) | = ' '. | |||
| "SELECT single QERASE FROM APQI INTO @DATA(ld_i_keep). | ||||
| DATA(ld_i_keep) | = ' '. | |||
| "SELECT single GROUPID FROM APQI INTO @DATA(ld_i_mapname). | ||||
| DATA(ld_i_mapname) | = 'BATCHMAP'. | |||
| DATA(ld_i_online) | = ' '. | |||
| "SELECT single USERID FROM APQI INTO @DATA(ld_i_user). | ||||
| DATA(ld_i_user) | = SY-UNAME. | |||
Search for further information about these or an SAP related objects