SAP TB_API_CONDITION_CREATE Function Module for API: Create Condition with Reference









TB_API_CONDITION_CREATE is a standard tb api condition 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 API: Create Condition with Reference 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 api condition create FM, simply by entering the name TB_API_CONDITION_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: TB12
Program Name: SAPLTB12
Main Program: SAPLTB12
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TB_API_CONDITION_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_API_CONDITION_CREATE'"API: Create Condition with Reference
EXPORTING
I_RANTYP = "Application
* I_T_COND_SINGLE_DATES = "Condition: Single Dates
* I_FLG_USE_INPUT_FIELDS = ' ' "Zu übernehmende Felder berücksichtigen
* I_T_INPUT_FIELD = "Zu übernehmende Felder aus I_COND
* I_T_FIELD_MAP = "Abbildung von Feldern Schnittstelle nach Intern
I_SGSART = "Product Type
I_SFHAART = "Transaction Type
I_T_EFINKO = "Conditions for Detailed Processing (Table)
* I_LATEST_START_DATE = '99991231' "Last Permitted Validity Date
I_T_GRKOND = "Control Information for Processing Conditions
I_BAPI_KEY = "Key which Identifies a Condition in the BAPI
I_COND = "Condition: Structure
* I_T_COND_FORMULA_VARIABLES = "Condition: Form Components

IMPORTING
E_T_EFINKO = "Conditions for Detailed Processing (Table)
E_BAPI_KEY = "Key which Identifies a Condition in the BAPI
.



IMPORTING Parameters details for TB_API_CONDITION_CREATE

I_RANTYP - Application

Data type: RANTYP
Optional: No
Call by Reference: Yes

I_T_COND_SINGLE_DATES - Condition: Single Dates

Data type: VTS_TAB_COND_SINGLE_DATES
Optional: Yes
Call by Reference: Yes

I_FLG_USE_INPUT_FIELDS - Zu übernehmende Felder berücksichtigen

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_T_INPUT_FIELD - Zu übernehmende Felder aus I_COND

Data type: FTRBA_TAB_FIELDS
Optional: Yes
Call by Reference: Yes

I_T_FIELD_MAP - Abbildung von Feldern Schnittstelle nach Intern

Data type: FTRBA_TAB_BAPI_FIELDS
Optional: Yes
Call by Reference: Yes

I_SGSART - Product Type

Data type: VVSART
Optional: No
Call by Reference: Yes

I_SFHAART - Transaction Type

Data type: TB_SFHAART
Optional: No
Call by Reference: Yes

I_T_EFINKO - Conditions for Detailed Processing (Table)

Data type: VTB_T_EFINKO
Optional: No
Call by Reference: Yes

I_LATEST_START_DATE - Last Permitted Validity Date

Data type: DGUEL_KP
Default: '99991231'
Optional: Yes
Call by Reference: Yes

I_T_GRKOND - Control Information for Processing Conditions

Data type: VTB_T_GRKOND
Optional: No
Call by Reference: Yes

I_BAPI_KEY - Key which Identifies a Condition in the BAPI

Data type: TB_BAPI_COND_KEY
Optional: No
Call by Reference: Yes

I_COND - Condition: Structure

Data type: VTS_COND
Optional: No
Call by Reference: Yes

I_T_COND_FORMULA_VARIABLES - Condition: Form Components

Data type: VTS_TAB_COND_FORMULA_VARIABLES
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for TB_API_CONDITION_CREATE

E_T_EFINKO - Conditions for Detailed Processing (Table)

Data type: VTB_T_EFINKO
Optional: No
Call by Reference: Yes

E_BAPI_KEY - Key which Identifies a Condition in the BAPI

Data type: TB_BAPI_COND_KEY
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TB_API_CONDITION_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_i_rantyp  TYPE RANTYP, "   
lv_e_t_efinko  TYPE VTB_T_EFINKO, "   
lv_i_t_cond_single_dates  TYPE VTS_TAB_COND_SINGLE_DATES, "   
lv_i_flg_use_input_fields  TYPE BOOLEAN, "   SPACE
lv_i_t_input_field  TYPE FTRBA_TAB_FIELDS, "   
lv_i_t_field_map  TYPE FTRBA_TAB_BAPI_FIELDS, "   
lv_i_sgsart  TYPE VVSART, "   
lv_e_bapi_key  TYPE TB_BAPI_COND_KEY, "   
lv_i_sfhaart  TYPE TB_SFHAART, "   
lv_i_t_efinko  TYPE VTB_T_EFINKO, "   
lv_i_latest_start_date  TYPE DGUEL_KP, "   '99991231'
lv_i_t_grkond  TYPE VTB_T_GRKOND, "   
lv_i_bapi_key  TYPE TB_BAPI_COND_KEY, "   
lv_i_cond  TYPE VTS_COND, "   
lv_i_t_cond_formula_variables  TYPE VTS_TAB_COND_FORMULA_VARIABLES. "   

  CALL FUNCTION 'TB_API_CONDITION_CREATE'  "API: Create Condition with Reference
    EXPORTING
         I_RANTYP = lv_i_rantyp
         I_T_COND_SINGLE_DATES = lv_i_t_cond_single_dates
         I_FLG_USE_INPUT_FIELDS = lv_i_flg_use_input_fields
         I_T_INPUT_FIELD = lv_i_t_input_field
         I_T_FIELD_MAP = lv_i_t_field_map
         I_SGSART = lv_i_sgsart
         I_SFHAART = lv_i_sfhaart
         I_T_EFINKO = lv_i_t_efinko
         I_LATEST_START_DATE = lv_i_latest_start_date
         I_T_GRKOND = lv_i_t_grkond
         I_BAPI_KEY = lv_i_bapi_key
         I_COND = lv_i_cond
         I_T_COND_FORMULA_VARIABLES = lv_i_t_cond_formula_variables
    IMPORTING
         E_T_EFINKO = lv_e_t_efinko
         E_BAPI_KEY = lv_e_bapi_key
. " TB_API_CONDITION_CREATE




ABAP code using 7.40 inline data declarations to call FM TB_API_CONDITION_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.

 
 
 
DATA(ld_i_flg_use_input_fields) = ' '.
 
 
 
 
 
 
 
DATA(ld_i_latest_start_date) = '99991231'.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!