SAP TB_FI_DOCUMENTS_CREATE Function Module for Generate Posting Documents for Transferred Flows for a Transaction
TB_FI_DOCUMENTS_CREATE is a standard tb fi documents create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generate Posting Documents for Transferred Flows for a Transaction 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 tb fi documents create FM, simply by entering the name TB_FI_DOCUMENTS_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: TB32
Program Name: SAPLTB32
Main Program: SAPLTB32
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_FI_DOCUMENTS_CREATE 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 'TB_FI_DOCUMENTS_CREATE'"Generate Posting Documents for Transferred Flows for a Transaction.
EXPORTING
CHART_OF_ACCOUNTS = "Chart of Accounts
CONTROL_DATA = "Control Data
DEAL = "Transaction
LOCAL_CURRENCY = "Local Currency
* IREF_BADI_TAX = "BAdi-Interface Steuern
* IREF_BADI_STATREP = "BAdI-Interface Meldewesen
IMPORTING
ERROR_RC = "Return Value, Return Value after ABAP Statements
TABLES
ACTIVITIES = "Vorgänge zu den Bewegungen - eingehend
FLOWS = "Bewegungen - eingehend
MESSAGES = "Fehlernachrichten - ausgehend
POSTING_DETAILS = "Buchungsschemata (TABIX-Ref. auf FLOWS) - ausg.
* POSTING_LOG = "Treasury: Log Structure for Posting Interface (TBB1)
EXCEPTIONS
ERROR_ACTIVITIES = 1 ERROR_FLOWS = 2
IMPORTING Parameters details for TB_FI_DOCUMENTS_CREATE
CHART_OF_ACCOUNTS - Chart of Accounts
Data type: T001-KTOPLOptional: No
Call by Reference: No ( called with pass by value option)
CONTROL_DATA - Control Data
Data type: VTBPOSTINGOptional: No
Call by Reference: No ( called with pass by value option)
DEAL - Transaction
Data type: VTBFHAOptional: No
Call by Reference: No ( called with pass by value option)
LOCAL_CURRENCY - Local Currency
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
IREF_BADI_TAX - BAdi-Interface Steuern
Data type: IF_EX_FTR_TAX_POSTING_TROptional: Yes
Call by Reference: No ( called with pass by value option)
IREF_BADI_STATREP - BAdI-Interface Meldewesen
Data type: IF_EX_FTR_TRACA_STATREPORTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TB_FI_DOCUMENTS_CREATE
ERROR_RC - Return Value, Return Value after ABAP Statements
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TB_FI_DOCUMENTS_CREATE
ACTIVITIES - Vorgänge zu den Bewegungen - eingehend
Data type: VTBFHAZUOptional: No
Call by Reference: No ( called with pass by value option)
FLOWS - Bewegungen - eingehend
Data type: VTBFHAPOOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGES - Fehlernachrichten - ausgehend
Data type: VTBMSGPOSTOptional: No
Call by Reference: No ( called with pass by value option)
POSTING_DETAILS - Buchungsschemata (TABIX-Ref. auf FLOWS) - ausg.
Data type: IKOFIOptional: No
Call by Reference: No ( called with pass by value option)
POSTING_LOG - Treasury: Log Structure for Posting Interface (TBB1)
Data type: VTB_POSTING_LOGOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ERROR_ACTIVITIES - Mindestens ein Vorgang zu einer Bwg. fehlt
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_FLOWS - Mindestens eine Bwg. gehört nicht zum Geschäft
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TB_FI_DOCUMENTS_CREATE 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_error_rc | TYPE SY-SUBRC, " | |||
| lt_activities | TYPE STANDARD TABLE OF VTBFHAZU, " | |||
| lv_error_activities | TYPE VTBFHAZU, " | |||
| lv_chart_of_accounts | TYPE T001-KTOPL, " | |||
| lt_flows | TYPE STANDARD TABLE OF VTBFHAPO, " | |||
| lv_error_flows | TYPE VTBFHAPO, " | |||
| lv_control_data | TYPE VTBPOSTING, " | |||
| lv_deal | TYPE VTBFHA, " | |||
| lt_messages | TYPE STANDARD TABLE OF VTBMSGPOST, " | |||
| lv_local_currency | TYPE T001-WAERS, " | |||
| lt_posting_details | TYPE STANDARD TABLE OF IKOFI, " | |||
| lt_posting_log | TYPE STANDARD TABLE OF VTB_POSTING_LOG, " | |||
| lv_iref_badi_tax | TYPE IF_EX_FTR_TAX_POSTING_TR, " | |||
| lv_iref_badi_statrep | TYPE IF_EX_FTR_TRACA_STATREPORT. " |
|   CALL FUNCTION 'TB_FI_DOCUMENTS_CREATE' "Generate Posting Documents for Transferred Flows for a Transaction |
| EXPORTING | ||
| CHART_OF_ACCOUNTS | = lv_chart_of_accounts | |
| CONTROL_DATA | = lv_control_data | |
| DEAL | = lv_deal | |
| LOCAL_CURRENCY | = lv_local_currency | |
| IREF_BADI_TAX | = lv_iref_badi_tax | |
| IREF_BADI_STATREP | = lv_iref_badi_statrep | |
| IMPORTING | ||
| ERROR_RC | = lv_error_rc | |
| TABLES | ||
| ACTIVITIES | = lt_activities | |
| FLOWS | = lt_flows | |
| MESSAGES | = lt_messages | |
| POSTING_DETAILS | = lt_posting_details | |
| POSTING_LOG | = lt_posting_log | |
| EXCEPTIONS | ||
| ERROR_ACTIVITIES = 1 | ||
| ERROR_FLOWS = 2 | ||
| . " TB_FI_DOCUMENTS_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM TB_FI_DOCUMENTS_CREATE
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 SUBRC FROM SY INTO @DATA(ld_error_rc). | ||||
| "SELECT single KTOPL FROM T001 INTO @DATA(ld_chart_of_accounts). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_local_currency). | ||||
Search for further information about these or an SAP related objects