SAP RSDDTMPTAB_GET_NEW_NAME Function Module for Request (and Lock) Unused, Temporary Name for Table or View
RSDDTMPTAB_GET_NEW_NAME is a standard rsddtmptab get new name SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Request (and Lock) Unused, Temporary Name for Table or View 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 rsddtmptab get new name FM, simply by entering the name RSDDTMPTAB_GET_NEW_NAME into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSDDTMPTAB
Program Name: SAPLRSDDTMPTAB
Main Program: SAPLRSDDTMPTAB
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RSDDTMPTAB_GET_NEW_NAME 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 'RSDDTMPTAB_GET_NEW_NAME'"Request (and Lock) Unused, Temporary Name for Table or View.
EXPORTING
* I_NAMETYPE = RSD_C_ID_TMP_TABL_SEL "'
* I_CONNECTION = 'R/3*' "Logical Name for a Database Connection
* I_NEW_ALLOWED = RS_C_TRUE "Name of Object That Does Not Yet Exist Is Permitted
* I_ONLY_NEW = RS_C_FALSE "For SAP_GENERATE_TMPTABLES Only
IMPORTING
E_TMPNM = "Free Temporary Name
E_OVERFLOW = "Overflow occured
E_CNT = "Table Number
E_FREE = "Was the Table already released?
EXCEPTIONS
INSERT_ERROR = 1 WRONG_NAMETYPE = 2 COUNTER_OVERFLOW = 3 LOCK_ERROR = 4 INTERNAL_ERROR = 5 INSTALLATION_ERROR = 6 NO_EXISTING = 7
IMPORTING Parameters details for RSDDTMPTAB_GET_NEW_NAME
I_NAMETYPE - '
Data type: CHAR2Default: RSD_C_ID_TMP_TABL_SEL
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CONNECTION - Logical Name for a Database Connection
Data type: DBCON_NAMEDefault: 'R/3*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NEW_ALLOWED - Name of Object That Does Not Yet Exist Is Permitted
Data type: RS_BOOLDefault: RS_C_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLY_NEW - For SAP_GENERATE_TMPTABLES Only
Data type: RS_BOOLDefault: RS_C_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RSDDTMPTAB_GET_NEW_NAME
E_TMPNM - Free Temporary Name
Data type: TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
E_OVERFLOW - Overflow occured
Data type: RS_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
E_CNT - Table Number
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
E_FREE - Was the Table already released?
Data type: RS_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INSERT_ERROR - Error Upon Attempt to Insert a Record
Data type:Optional: No
Call by Reference: Yes
WRONG_NAMETYPE - Table Type Not Permitted
Data type:Optional: No
Call by Reference: Yes
COUNTER_OVERFLOW - Namespace Is Fully Occupied
Data type:Optional: No
Call by Reference: Yes
LOCK_ERROR - Error while locking the table
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: Yes
INSTALLATION_ERROR - Error During Installation
Data type:Optional: No
Call by Reference: Yes
NO_EXISTING - No More Free Objects Exist
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RSDDTMPTAB_GET_NEW_NAME 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_tmpnm | TYPE TABNAME, " | |||
| lv_i_nametype | TYPE CHAR2, " RSD_C_ID_TMP_TABL_SEL | |||
| lv_insert_error | TYPE CHAR2, " | |||
| lv_e_overflow | TYPE RS_BOOL, " | |||
| lv_i_connection | TYPE DBCON_NAME, " 'R/3*' | |||
| lv_wrong_nametype | TYPE DBCON_NAME, " | |||
| lv_e_cnt | TYPE I, " | |||
| lv_i_new_allowed | TYPE RS_BOOL, " RS_C_TRUE | |||
| lv_counter_overflow | TYPE RS_BOOL, " | |||
| lv_e_free | TYPE RS_BOOL, " | |||
| lv_i_only_new | TYPE RS_BOOL, " RS_C_FALSE | |||
| lv_lock_error | TYPE RS_BOOL, " | |||
| lv_internal_error | TYPE RS_BOOL, " | |||
| lv_installation_error | TYPE RS_BOOL, " | |||
| lv_no_existing | TYPE RS_BOOL. " |
|   CALL FUNCTION 'RSDDTMPTAB_GET_NEW_NAME' "Request (and Lock) Unused, Temporary Name for Table or View |
| EXPORTING | ||
| I_NAMETYPE | = lv_i_nametype | |
| I_CONNECTION | = lv_i_connection | |
| I_NEW_ALLOWED | = lv_i_new_allowed | |
| I_ONLY_NEW | = lv_i_only_new | |
| IMPORTING | ||
| E_TMPNM | = lv_e_tmpnm | |
| E_OVERFLOW | = lv_e_overflow | |
| E_CNT | = lv_e_cnt | |
| E_FREE | = lv_e_free | |
| EXCEPTIONS | ||
| INSERT_ERROR = 1 | ||
| WRONG_NAMETYPE = 2 | ||
| COUNTER_OVERFLOW = 3 | ||
| LOCK_ERROR = 4 | ||
| INTERNAL_ERROR = 5 | ||
| INSTALLATION_ERROR = 6 | ||
| NO_EXISTING = 7 | ||
| . " RSDDTMPTAB_GET_NEW_NAME | ||
ABAP code using 7.40 inline data declarations to call FM RSDDTMPTAB_GET_NEW_NAME
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_nametype) | = RSD_C_ID_TMP_TABL_SEL. | |||
| DATA(ld_i_connection) | = 'R/3*'. | |||
| DATA(ld_i_new_allowed) | = RS_C_TRUE. | |||
| DATA(ld_i_only_new) | = RS_C_FALSE. | |||
Search for further information about these or an SAP related objects