SAP TB_CREATE_NEW_ACTIVITY Function Module for Function Module to Add a New Transaction Type Foreign Exchange/Derivatives
TB_CREATE_NEW_ACTIVITY is a standard tb create new activity SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Function Module to Add a New Transaction Type Foreign Exchange/Derivatives 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 create new activity FM, simply by entering the name TB_CREATE_NEW_ACTIVITY into the relevant SAP transaction such as SE37 or SE38.
Function Group: TB43
Program Name: SAPLTB43
Main Program: SAPLTB43
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_CREATE_NEW_ACTIVITY 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_CREATE_NEW_ACTIVITY'"Function Module to Add a New Transaction Type Foreign Exchange/Derivatives.
EXPORTING
O_VTBFHA = "Alte Geschäftsdaten
O_VTBFHAZU = "Alte Vorgangsdaten
* O_VTIOF = "Alte Optionsdaten
* O_VTIFHA = "
* O_VTIFHAZU = "
ACTVT = "
IMPORTING
N_VTBFHA = "Neue Geschäftsdaten
UP_O_VTBFHAZU = "
N_VTBFHAZU = "Neue Vorgangsdaten
N_VTIOF = "Neue Optionsdaten
N_VTIFHA = "
N_VTIFHAZU = "
TABLES
O_VTBFHAPO = "Alte Bewegungsdaten
N_VTBFHAPO = "Neue Bewegungsdaten
* O_ZV = "
* N_ZV = "
* O_VTIFHAPO = "
* N_VTIFHAPO = "
* O_VTIFINKO = "
* N_VTIFINKO = "
EXCEPTIONS
NO_FURTHER_ACTIVITY = 1 NO_AUTHORITY = 2 CONFIRMATION_ERROR = 3
IMPORTING Parameters details for TB_CREATE_NEW_ACTIVITY
O_VTBFHA - Alte Geschäftsdaten
Data type: VTBFHAOptional: No
Call by Reference: No ( called with pass by value option)
O_VTBFHAZU - Alte Vorgangsdaten
Data type: VTBFHAZUOptional: No
Call by Reference: No ( called with pass by value option)
O_VTIOF - Alte Optionsdaten
Data type: VTIOFOptional: Yes
Call by Reference: No ( called with pass by value option)
O_VTIFHA -
Data type: VTIFHAOptional: Yes
Call by Reference: No ( called with pass by value option)
O_VTIFHAZU -
Data type: VTIFHAZUOptional: Yes
Call by Reference: No ( called with pass by value option)
ACTVT -
Data type: TACT-ACTVTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TB_CREATE_NEW_ACTIVITY
N_VTBFHA - Neue Geschäftsdaten
Data type: VTBFHAOptional: No
Call by Reference: No ( called with pass by value option)
UP_O_VTBFHAZU -
Data type: VTBFHAZUOptional: No
Call by Reference: No ( called with pass by value option)
N_VTBFHAZU - Neue Vorgangsdaten
Data type: VTBFHAZUOptional: No
Call by Reference: No ( called with pass by value option)
N_VTIOF - Neue Optionsdaten
Data type: VTIOFOptional: No
Call by Reference: No ( called with pass by value option)
N_VTIFHA -
Data type: VTIFHAOptional: No
Call by Reference: No ( called with pass by value option)
N_VTIFHAZU -
Data type: VTIFHAZUOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TB_CREATE_NEW_ACTIVITY
O_VTBFHAPO - Alte Bewegungsdaten
Data type: VTBFHAPOOptional: No
Call by Reference: No ( called with pass by value option)
N_VTBFHAPO - Neue Bewegungsdaten
Data type: VTBFHAPOOptional: No
Call by Reference: No ( called with pass by value option)
O_ZV -
Data type: VTBZVOptional: Yes
Call by Reference: No ( called with pass by value option)
N_ZV -
Data type: VTBZVOptional: Yes
Call by Reference: No ( called with pass by value option)
O_VTIFHAPO -
Data type: VTIFHAPOOptional: Yes
Call by Reference: No ( called with pass by value option)
N_VTIFHAPO -
Data type: VTIFHAPOOptional: Yes
Call by Reference: No ( called with pass by value option)
O_VTIFINKO -
Data type: VTIFINKOOptional: Yes
Call by Reference: No ( called with pass by value option)
N_VTIFINKO -
Data type: VTIFINKOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_FURTHER_ACTIVITY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONFIRMATION_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TB_CREATE_NEW_ACTIVITY 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_n_vtbfha | TYPE VTBFHA, " | |||
| lv_o_vtbfha | TYPE VTBFHA, " | |||
| lt_o_vtbfhapo | TYPE STANDARD TABLE OF VTBFHAPO, " | |||
| lv_no_further_activity | TYPE VTBFHAPO, " | |||
| lt_n_vtbfhapo | TYPE STANDARD TABLE OF VTBFHAPO, " | |||
| lv_o_vtbfhazu | TYPE VTBFHAZU, " | |||
| lv_no_authority | TYPE VTBFHAZU, " | |||
| lv_up_o_vtbfhazu | TYPE VTBFHAZU, " | |||
| lt_o_zv | TYPE STANDARD TABLE OF VTBZV, " | |||
| lv_o_vtiof | TYPE VTIOF, " | |||
| lv_n_vtbfhazu | TYPE VTBFHAZU, " | |||
| lv_confirmation_error | TYPE VTBFHAZU, " | |||
| lt_n_zv | TYPE STANDARD TABLE OF VTBZV, " | |||
| lv_n_vtiof | TYPE VTIOF, " | |||
| lv_o_vtifha | TYPE VTIFHA, " | |||
| lv_n_vtifha | TYPE VTIFHA, " | |||
| lt_o_vtifhapo | TYPE STANDARD TABLE OF VTIFHAPO, " | |||
| lv_o_vtifhazu | TYPE VTIFHAZU, " | |||
| lv_actvt | TYPE TACT-ACTVT, " | |||
| lt_n_vtifhapo | TYPE STANDARD TABLE OF VTIFHAPO, " | |||
| lv_n_vtifhazu | TYPE VTIFHAZU, " | |||
| lt_o_vtifinko | TYPE STANDARD TABLE OF VTIFINKO, " | |||
| lt_n_vtifinko | TYPE STANDARD TABLE OF VTIFINKO. " |
|   CALL FUNCTION 'TB_CREATE_NEW_ACTIVITY' "Function Module to Add a New Transaction Type Foreign Exchange/Derivatives |
| EXPORTING | ||
| O_VTBFHA | = lv_o_vtbfha | |
| O_VTBFHAZU | = lv_o_vtbfhazu | |
| O_VTIOF | = lv_o_vtiof | |
| O_VTIFHA | = lv_o_vtifha | |
| O_VTIFHAZU | = lv_o_vtifhazu | |
| ACTVT | = lv_actvt | |
| IMPORTING | ||
| N_VTBFHA | = lv_n_vtbfha | |
| UP_O_VTBFHAZU | = lv_up_o_vtbfhazu | |
| N_VTBFHAZU | = lv_n_vtbfhazu | |
| N_VTIOF | = lv_n_vtiof | |
| N_VTIFHA | = lv_n_vtifha | |
| N_VTIFHAZU | = lv_n_vtifhazu | |
| TABLES | ||
| O_VTBFHAPO | = lt_o_vtbfhapo | |
| N_VTBFHAPO | = lt_n_vtbfhapo | |
| O_ZV | = lt_o_zv | |
| N_ZV | = lt_n_zv | |
| O_VTIFHAPO | = lt_o_vtifhapo | |
| N_VTIFHAPO | = lt_n_vtifhapo | |
| O_VTIFINKO | = lt_o_vtifinko | |
| N_VTIFINKO | = lt_n_vtifinko | |
| EXCEPTIONS | ||
| NO_FURTHER_ACTIVITY = 1 | ||
| NO_AUTHORITY = 2 | ||
| CONFIRMATION_ERROR = 3 | ||
| . " TB_CREATE_NEW_ACTIVITY | ||
ABAP code using 7.40 inline data declarations to call FM TB_CREATE_NEW_ACTIVITY
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 ACTVT FROM TACT INTO @DATA(ld_actvt). | ||||
Search for further information about these or an SAP related objects