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

Function SN_GENERAL_CREATE_TABLE 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 'SN_GENERAL_CREATE_TABLE'".
EXPORTING
IV_ORIG_SYSTEM = "
IV_ORIG_CLIENT = "
IV_TABNAME = "
IMPORTING
ER_TABLE = "
ER_STRUCT = "
EXCEPTIONS
NO_SN_META_ARCHIVE = 1 READ_FROM_SN_META_FAILS = 2 TABLE_NOT_IN_DDIC = 3 NO_INSTRUCTURE_DEFINED = 4 NOT_IN_INFOSTRUCTURE = 5
IMPORTING Parameters details for SN_GENERAL_CREATE_TABLE
IV_ORIG_SYSTEM -
Data type: ORIG_SYSIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_ORIG_CLIENT -
Data type: ORIG_MANDTOptional: No
Call by Reference: No ( called with pass by value option)
IV_TABNAME -
Data type: TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SN_GENERAL_CREATE_TABLE
ER_TABLE -
Data type: DATAOptional: No
Call by Reference: Yes
ER_STRUCT -
Data type: DATAOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_SN_META_ARCHIVE -
Data type:Optional: No
Call by Reference: Yes
READ_FROM_SN_META_FAILS -
Data type:Optional: No
Call by Reference: Yes
TABLE_NOT_IN_DDIC -
Data type:Optional: No
Call by Reference: Yes
NO_INSTRUCTURE_DEFINED -
Data type:Optional: No
Call by Reference: Yes
NOT_IN_INFOSTRUCTURE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SN_GENERAL_CREATE_TABLE 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_er_table | TYPE DATA, " | |||
| lv_iv_orig_system | TYPE ORIG_SYSID, " | |||
| lv_no_sn_meta_archive | TYPE ORIG_SYSID, " | |||
| lv_er_struct | TYPE DATA, " | |||
| lv_iv_orig_client | TYPE ORIG_MANDT, " | |||
| lv_read_from_sn_meta_fails | TYPE ORIG_MANDT, " | |||
| lv_iv_tabname | TYPE TABNAME, " | |||
| lv_table_not_in_ddic | TYPE TABNAME, " | |||
| lv_no_instructure_defined | TYPE TABNAME, " | |||
| lv_not_in_infostructure | TYPE TABNAME. " |
|   CALL FUNCTION 'SN_GENERAL_CREATE_TABLE' " |
| EXPORTING | ||
| IV_ORIG_SYSTEM | = lv_iv_orig_system | |
| IV_ORIG_CLIENT | = lv_iv_orig_client | |
| IV_TABNAME | = lv_iv_tabname | |
| IMPORTING | ||
| ER_TABLE | = lv_er_table | |
| ER_STRUCT | = lv_er_struct | |
| EXCEPTIONS | ||
| NO_SN_META_ARCHIVE = 1 | ||
| READ_FROM_SN_META_FAILS = 2 | ||
| TABLE_NOT_IN_DDIC = 3 | ||
| NO_INSTRUCTURE_DEFINED = 4 | ||
| NOT_IN_INFOSTRUCTURE = 5 | ||
| . " SN_GENERAL_CREATE_TABLE | ||
ABAP code using 7.40 inline data declarations to call FM SN_GENERAL_CREATE_TABLE
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.Search for further information about these or an SAP related objects