SAP FC_BUNIT_CREATE Function Module for
FC_BUNIT_CREATE is a standard fc bunit create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fc bunit create FM, simply by entering the name FC_BUNIT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCP2
Program Name: SAPLFCP2
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FC_BUNIT_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 'FC_BUNIT_CREATE'".
EXPORTING
E_DIMEN = "
E_RVERS = "
E_RYEAR = "
E_PERID = "
E_RLDNR = "
* E_CONTP = "
* E_FLAG = 'X' "
IMPORTING
I_ACTION = "
TABLES
* IT_PRCTR_COCD = "
T_TF167 = "
T_TF168 = "
T_TF169 = "
T_TFIN010 = "
T_TF160_DEL = "
T_TF161_DEL = "
T_TF162_DEL = "
T_TF164_DEL = "
* T_TF165_DEL = "
* T_TF166_DEL = "
* IT_GSBER_RCOMP = "
T_TF167_DEL = "
T_TF168_DEL = "
T_TF169_DEL = "
T_TFIN010_DEL = "
T_BUNIT_ORGUNS = "
* IT_RCOMP = "
T_TF160 = "
T_TF161 = "
T_TF162 = "
T_TF164 = "
* T_TF165 = "
* T_TF166 = "
IMPORTING Parameters details for FC_BUNIT_CREATE
E_DIMEN -
Data type: FC_DIMENOptional: No
Call by Reference: No ( called with pass by value option)
E_RVERS -
Data type: FC_RVERSOptional: No
Call by Reference: No ( called with pass by value option)
E_RYEAR -
Data type: FC_RYEAROptional: No
Call by Reference: No ( called with pass by value option)
E_PERID -
Data type: FC_PERIDOptional: No
Call by Reference: No ( called with pass by value option)
E_RLDNR -
Data type: FC_RLDNROptional: No
Call by Reference: No ( called with pass by value option)
E_CONTP -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
E_FLAG -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FC_BUNIT_CREATE
I_ACTION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FC_BUNIT_CREATE
IT_PRCTR_COCD -
Data type: FCINPCA001Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TF167 -
Data type: FC01_T_TF167Optional: No
Call by Reference: No ( called with pass by value option)
T_TF168 -
Data type: FC01_T_TF168Optional: No
Call by Reference: No ( called with pass by value option)
T_TF169 -
Data type: FC01_T_TF169Optional: No
Call by Reference: No ( called with pass by value option)
T_TFIN010 -
Data type: FC01_T_TFIN010Optional: No
Call by Reference: No ( called with pass by value option)
T_TF160_DEL -
Data type: TF160Optional: No
Call by Reference: No ( called with pass by value option)
T_TF161_DEL -
Data type: TF161Optional: No
Call by Reference: No ( called with pass by value option)
T_TF162_DEL -
Data type: TF162Optional: No
Call by Reference: No ( called with pass by value option)
T_TF164_DEL -
Data type: TF164Optional: No
Call by Reference: No ( called with pass by value option)
T_TF165_DEL -
Data type: TF165Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TF166_DEL -
Data type: TF166Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_GSBER_RCOMP -
Data type: FCINBA001Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TF167_DEL -
Data type: TF167Optional: No
Call by Reference: No ( called with pass by value option)
T_TF168_DEL -
Data type: TF168Optional: No
Call by Reference: No ( called with pass by value option)
T_TF169_DEL -
Data type: TF169Optional: No
Call by Reference: No ( called with pass by value option)
T_TFIN010_DEL -
Data type: TFIN010Optional: No
Call by Reference: No ( called with pass by value option)
T_BUNIT_ORGUNS -
Data type: FCIN_T_ORGUNOptional: No
Call by Reference: No ( called with pass by value option)
IT_RCOMP -
Data type: T880Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TF160 -
Data type: FC01_T_TF160Optional: No
Call by Reference: No ( called with pass by value option)
T_TF161 -
Data type: FC01_T_TF161Optional: No
Call by Reference: No ( called with pass by value option)
T_TF162 -
Data type: FC01_T_TF162Optional: No
Call by Reference: No ( called with pass by value option)
T_TF164 -
Data type: FC01_T_TF164Optional: No
Call by Reference: No ( called with pass by value option)
T_TF165 -
Data type: FC01_T_TF165Optional: Yes
Call by Reference: No ( called with pass by value option)
T_TF166 -
Data type: FC01_T_TF166Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FC_BUNIT_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_e_dimen | TYPE FC_DIMEN, " | |||
| lv_i_action | TYPE FC_DIMEN, " | |||
| lt_it_prctr_cocd | TYPE STANDARD TABLE OF FCINPCA001, " | |||
| lt_t_tf167 | TYPE STANDARD TABLE OF FC01_T_TF167, " | |||
| lt_t_tf168 | TYPE STANDARD TABLE OF FC01_T_TF168, " | |||
| lt_t_tf169 | TYPE STANDARD TABLE OF FC01_T_TF169, " | |||
| lt_t_tfin010 | TYPE STANDARD TABLE OF FC01_T_TFIN010, " | |||
| lt_t_tf160_del | TYPE STANDARD TABLE OF TF160, " | |||
| lt_t_tf161_del | TYPE STANDARD TABLE OF TF161, " | |||
| lt_t_tf162_del | TYPE STANDARD TABLE OF TF162, " | |||
| lt_t_tf164_del | TYPE STANDARD TABLE OF TF164, " | |||
| lt_t_tf165_del | TYPE STANDARD TABLE OF TF165, " | |||
| lt_t_tf166_del | TYPE STANDARD TABLE OF TF166, " | |||
| lv_e_rvers | TYPE FC_RVERS, " | |||
| lt_it_gsber_rcomp | TYPE STANDARD TABLE OF FCINBA001, " | |||
| lt_t_tf167_del | TYPE STANDARD TABLE OF TF167, " | |||
| lt_t_tf168_del | TYPE STANDARD TABLE OF TF168, " | |||
| lt_t_tf169_del | TYPE STANDARD TABLE OF TF169, " | |||
| lt_t_tfin010_del | TYPE STANDARD TABLE OF TFIN010, " | |||
| lt_t_bunit_orguns | TYPE STANDARD TABLE OF FCIN_T_ORGUN, " | |||
| lv_e_ryear | TYPE FC_RYEAR, " | |||
| lt_it_rcomp | TYPE STANDARD TABLE OF T880, " | |||
| lv_e_perid | TYPE FC_PERID, " | |||
| lt_t_tf160 | TYPE STANDARD TABLE OF FC01_T_TF160, " | |||
| lv_e_rldnr | TYPE FC_RLDNR, " | |||
| lt_t_tf161 | TYPE STANDARD TABLE OF FC01_T_TF161, " | |||
| lv_e_contp | TYPE FC01_T_TF161, " | |||
| lt_t_tf162 | TYPE STANDARD TABLE OF FC01_T_TF162, " | |||
| lv_e_flag | TYPE FC01_T_TF162, " 'X' | |||
| lt_t_tf164 | TYPE STANDARD TABLE OF FC01_T_TF164, " | |||
| lt_t_tf165 | TYPE STANDARD TABLE OF FC01_T_TF165, " | |||
| lt_t_tf166 | TYPE STANDARD TABLE OF FC01_T_TF166. " |
|   CALL FUNCTION 'FC_BUNIT_CREATE' " |
| EXPORTING | ||
| E_DIMEN | = lv_e_dimen | |
| E_RVERS | = lv_e_rvers | |
| E_RYEAR | = lv_e_ryear | |
| E_PERID | = lv_e_perid | |
| E_RLDNR | = lv_e_rldnr | |
| E_CONTP | = lv_e_contp | |
| E_FLAG | = lv_e_flag | |
| IMPORTING | ||
| I_ACTION | = lv_i_action | |
| TABLES | ||
| IT_PRCTR_COCD | = lt_it_prctr_cocd | |
| T_TF167 | = lt_t_tf167 | |
| T_TF168 | = lt_t_tf168 | |
| T_TF169 | = lt_t_tf169 | |
| T_TFIN010 | = lt_t_tfin010 | |
| T_TF160_DEL | = lt_t_tf160_del | |
| T_TF161_DEL | = lt_t_tf161_del | |
| T_TF162_DEL | = lt_t_tf162_del | |
| T_TF164_DEL | = lt_t_tf164_del | |
| T_TF165_DEL | = lt_t_tf165_del | |
| T_TF166_DEL | = lt_t_tf166_del | |
| IT_GSBER_RCOMP | = lt_it_gsber_rcomp | |
| T_TF167_DEL | = lt_t_tf167_del | |
| T_TF168_DEL | = lt_t_tf168_del | |
| T_TF169_DEL | = lt_t_tf169_del | |
| T_TFIN010_DEL | = lt_t_tfin010_del | |
| T_BUNIT_ORGUNS | = lt_t_bunit_orguns | |
| IT_RCOMP | = lt_it_rcomp | |
| T_TF160 | = lt_t_tf160 | |
| T_TF161 | = lt_t_tf161 | |
| T_TF162 | = lt_t_tf162 | |
| T_TF164 | = lt_t_tf164 | |
| T_TF165 | = lt_t_tf165 | |
| T_TF166 | = lt_t_tf166 | |
| . " FC_BUNIT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM FC_BUNIT_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_e_flag) | = 'X'. | |||
Search for further information about these or an SAP related objects