SAP API_BW_GEN_DATASOURCE Function Module for Generate DataSource for Limit Manager
API_BW_GEN_DATASOURCE is a standard api bw gen datasource 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 DataSource for Limit Manager 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 api bw gen datasource FM, simply by entering the name API_BW_GEN_DATASOURCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: TBL_BW
Program Name: SAPLTBL_BW
Main Program: SAPLTBL_BW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function API_BW_GEN_DATASOURCE 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 'API_BW_GEN_DATASOURCE'"Generate DataSource for Limit Manager.
EXPORTING
* I_DATASOURCE = "DataSource for Extraction
I_DATASOURCE_TEXT = "Short Description
* I_EXTRACT_STRUC_NAME = "Extraction Structure
I_EXTRACT_FUNC_NAME = "Name of Function Module
I_FLG_GEN_EXTRACT_STRUC = "Checkbox
* I_FLG_REGEN_EXTRACT_STRUC = CON_TRUE "Checkbox
I_FLG_GEN_DATASOURCE = "Checkbox
* I_FLG_REGEN_DATASOURCE = CON_TRUE "Checkbox
I_EXTR_KIND = "S: Single Transaction Level; L: Limit Level
TABLES
* I_TAB_DD03P = "Structure
EXCEPTIONS
FUNCTION_MODULE_NOT_GENERATED = 1 GENERATION_FAILED = 2 EXTRACT_STRUCT_NOT_GENERATED = 3 DATASOURCE_NOT_EXISTING = 4
IMPORTING Parameters details for API_BW_GEN_DATASOURCE
I_DATASOURCE - DataSource for Extraction
Data type: DTE_REP_BW_DATASOURCEOptional: Yes
Call by Reference: Yes
I_DATASOURCE_TEXT - Short Description
Data type: RSTXTSHOptional: No
Call by Reference: Yes
I_EXTRACT_STRUC_NAME - Extraction Structure
Data type: DTE_REP_BW_EXTR_STRUCOptional: Yes
Call by Reference: Yes
I_EXTRACT_FUNC_NAME - Name of Function Module
Data type: RS38L-NAMEOptional: No
Call by Reference: Yes
I_FLG_GEN_EXTRACT_STRUC - Checkbox
Data type: XFELDOptional: No
Call by Reference: Yes
I_FLG_REGEN_EXTRACT_STRUC - Checkbox
Data type: XFELDDefault: CON_TRUE
Optional: Yes
Call by Reference: Yes
I_FLG_GEN_DATASOURCE - Checkbox
Data type: XFELDOptional: No
Call by Reference: Yes
I_FLG_REGEN_DATASOURCE - Checkbox
Data type: XFELDDefault: CON_TRUE
Optional: Yes
Call by Reference: Yes
I_EXTR_KIND - S: Single Transaction Level; L: Limit Level
Data type: COptional: No
Call by Reference: Yes
TABLES Parameters details for API_BW_GEN_DATASOURCE
I_TAB_DD03P - Structure
Data type: DD03POptional: Yes
Call by Reference: Yes
EXCEPTIONS details
FUNCTION_MODULE_NOT_GENERATED - Extraction Module Was Not Generated
Data type:Optional: No
Call by Reference: Yes
GENERATION_FAILED - Failure to Generate
Data type:Optional: No
Call by Reference: Yes
EXTRACT_STRUCT_NOT_GENERATED - Extraction Structure Could Not Be Generated
Data type:Optional: No
Call by Reference: Yes
DATASOURCE_NOT_EXISTING - DataSource Did Not Exist to Date
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for API_BW_GEN_DATASOURCE 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: | ||||
| lt_i_tab_dd03p | TYPE STANDARD TABLE OF DD03P, " | |||
| lv_i_datasource | TYPE DTE_REP_BW_DATASOURCE, " | |||
| lv_function_module_not_generated | TYPE DTE_REP_BW_DATASOURCE, " | |||
| lv_generation_failed | TYPE DTE_REP_BW_DATASOURCE, " | |||
| lv_i_datasource_text | TYPE RSTXTSH, " | |||
| lv_i_extract_struc_name | TYPE DTE_REP_BW_EXTR_STRUC, " | |||
| lv_extract_struct_not_generated | TYPE DTE_REP_BW_EXTR_STRUC, " | |||
| lv_i_extract_func_name | TYPE RS38L-NAME, " | |||
| lv_datasource_not_existing | TYPE RS38L, " | |||
| lv_i_flg_gen_extract_struc | TYPE XFELD, " | |||
| lv_i_flg_regen_extract_struc | TYPE XFELD, " CON_TRUE | |||
| lv_i_flg_gen_datasource | TYPE XFELD, " | |||
| lv_i_flg_regen_datasource | TYPE XFELD, " CON_TRUE | |||
| lv_i_extr_kind | TYPE C. " |
|   CALL FUNCTION 'API_BW_GEN_DATASOURCE' "Generate DataSource for Limit Manager |
| EXPORTING | ||
| I_DATASOURCE | = lv_i_datasource | |
| I_DATASOURCE_TEXT | = lv_i_datasource_text | |
| I_EXTRACT_STRUC_NAME | = lv_i_extract_struc_name | |
| I_EXTRACT_FUNC_NAME | = lv_i_extract_func_name | |
| I_FLG_GEN_EXTRACT_STRUC | = lv_i_flg_gen_extract_struc | |
| I_FLG_REGEN_EXTRACT_STRUC | = lv_i_flg_regen_extract_struc | |
| I_FLG_GEN_DATASOURCE | = lv_i_flg_gen_datasource | |
| I_FLG_REGEN_DATASOURCE | = lv_i_flg_regen_datasource | |
| I_EXTR_KIND | = lv_i_extr_kind | |
| TABLES | ||
| I_TAB_DD03P | = lt_i_tab_dd03p | |
| EXCEPTIONS | ||
| FUNCTION_MODULE_NOT_GENERATED = 1 | ||
| GENERATION_FAILED = 2 | ||
| EXTRACT_STRUCT_NOT_GENERATED = 3 | ||
| DATASOURCE_NOT_EXISTING = 4 | ||
| . " API_BW_GEN_DATASOURCE | ||
ABAP code using 7.40 inline data declarations to call FM API_BW_GEN_DATASOURCE
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 NAME FROM RS38L INTO @DATA(ld_i_extract_func_name). | ||||
| DATA(ld_i_flg_regen_extract_struc) | = CON_TRUE. | |||
| DATA(ld_i_flg_regen_datasource) | = CON_TRUE. | |||
Search for further information about these or an SAP related objects