SAP SE16N_CREATE_SELECTION Function Module for
SE16N_CREATE_SELECTION is a standard se16n create selection 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 se16n create selection FM, simply by entering the name SE16N_CREATE_SELECTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: SE16N
Program Name: SAPLSE16N
Main Program: SAPLSE16N
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SE16N_CREATE_SELECTION 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 'SE16N_CREATE_SELECTION'".
EXPORTING
* I_TAB = "
* I_DBCON = "
* I_MAX_LINES = 9999999 "
* I_EXEC_STATEMENT = ' ' "
* I_COUNT_NAME = "
* I_ONLY_EXECUTE = ' ' "
IMPORTING
E_DBCNT = "
CHANGING
* ET_WHERE = "
* ET_GROUP_BY = "
* ET_ORDER_BY = "
* ET_SUM_UP = "
* ET_SELECT = "
* ET_RESULT = "
TABLES
* IT_SEL = "
* IT_GROUP_BY_FIELDS = "
* IT_ORDER_BY_FIELDS = "
* IT_SUM_UP_FIELDS = "
* IT_AGGREGATE_FIELDS = "
IMPORTING Parameters details for SE16N_CREATE_SELECTION
I_TAB -
Data type: SE16N_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DBCON -
Data type: DBCON_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MAX_LINES -
Data type: SY-TABIXDefault: 9999999
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_EXEC_STATEMENT -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_COUNT_NAME -
Data type: FIELDNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLY_EXECUTE -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SE16N_CREATE_SELECTION
E_DBCNT -
Data type: SY-DBCNTOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for SE16N_CREATE_SELECTION
ET_WHERE -
Data type: SE16N_WHERE_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_GROUP_BY -
Data type: SE16N_WHERE_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_ORDER_BY -
Data type: SE16N_WHERE_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_SUM_UP -
Data type: SE16N_WHERE_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_SELECT -
Data type: SE16N_WHERE_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_RESULT -
Data type: TABLEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SE16N_CREATE_SELECTION
IT_SEL -
Data type: SE16N_SELTABOptional: Yes
Call by Reference: Yes
IT_GROUP_BY_FIELDS -
Data type: SE16N_OUTPUTOptional: Yes
Call by Reference: Yes
IT_ORDER_BY_FIELDS -
Data type: SE16N_OUTPUTOptional: Yes
Call by Reference: Yes
IT_SUM_UP_FIELDS -
Data type: SE16N_OUTPUTOptional: Yes
Call by Reference: Yes
IT_AGGREGATE_FIELDS -
Data type: SE16N_SELTABOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for SE16N_CREATE_SELECTION 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_tab | TYPE SE16N_TAB, " | |||
| lt_it_sel | TYPE STANDARD TABLE OF SE16N_SELTAB, " | |||
| lv_e_dbcnt | TYPE SY-DBCNT, " | |||
| lv_et_where | TYPE SE16N_WHERE_TYPE, " | |||
| lv_i_dbcon | TYPE DBCON_NAME, " | |||
| lv_et_group_by | TYPE SE16N_WHERE_TYPE, " | |||
| lt_it_group_by_fields | TYPE STANDARD TABLE OF SE16N_OUTPUT, " | |||
| lv_et_order_by | TYPE SE16N_WHERE_TYPE, " | |||
| lv_i_max_lines | TYPE SY-TABIX, " 9999999 | |||
| lt_it_order_by_fields | TYPE STANDARD TABLE OF SE16N_OUTPUT, " | |||
| lv_et_sum_up | TYPE SE16N_WHERE_TYPE, " | |||
| lt_it_sum_up_fields | TYPE STANDARD TABLE OF SE16N_OUTPUT, " | |||
| lv_i_exec_statement | TYPE CHAR1, " SPACE | |||
| lv_et_select | TYPE SE16N_WHERE_TYPE, " | |||
| lv_i_count_name | TYPE FIELDNAME, " | |||
| lt_it_aggregate_fields | TYPE STANDARD TABLE OF SE16N_SELTAB, " | |||
| lv_et_result | TYPE TABLE, " | |||
| lv_i_only_execute | TYPE CHAR1. " SPACE |
|   CALL FUNCTION 'SE16N_CREATE_SELECTION' " |
| EXPORTING | ||
| I_TAB | = lv_i_tab | |
| I_DBCON | = lv_i_dbcon | |
| I_MAX_LINES | = lv_i_max_lines | |
| I_EXEC_STATEMENT | = lv_i_exec_statement | |
| I_COUNT_NAME | = lv_i_count_name | |
| I_ONLY_EXECUTE | = lv_i_only_execute | |
| IMPORTING | ||
| E_DBCNT | = lv_e_dbcnt | |
| CHANGING | ||
| ET_WHERE | = lv_et_where | |
| ET_GROUP_BY | = lv_et_group_by | |
| ET_ORDER_BY | = lv_et_order_by | |
| ET_SUM_UP | = lv_et_sum_up | |
| ET_SELECT | = lv_et_select | |
| ET_RESULT | = lv_et_result | |
| TABLES | ||
| IT_SEL | = lt_it_sel | |
| IT_GROUP_BY_FIELDS | = lt_it_group_by_fields | |
| IT_ORDER_BY_FIELDS | = lt_it_order_by_fields | |
| IT_SUM_UP_FIELDS | = lt_it_sum_up_fields | |
| IT_AGGREGATE_FIELDS | = lt_it_aggregate_fields | |
| . " SE16N_CREATE_SELECTION | ||
ABAP code using 7.40 inline data declarations to call FM SE16N_CREATE_SELECTION
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 DBCNT FROM SY INTO @DATA(ld_e_dbcnt). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_i_max_lines). | ||||
| DATA(ld_i_max_lines) | = 9999999. | |||
| DATA(ld_i_exec_statement) | = ' '. | |||
| DATA(ld_i_only_execute) | = ' '. | |||
Search for further information about these or an SAP related objects