SAP Reports / Programs

SAP_DROP_TMPTABLES SAP ABAP Report - Removes temporary database objects







SAP_DROP_TMPTABLES is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter SAP_DROP_TMPTABLES into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT SAP_DROP_TMPTABLES. "Basic submit
SUBMIT SAP_DROP_TMPTABLES AND RETURN. "Return to original report after report execution complete
SUBMIT SAP_DROP_TMPTABLES VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: ALLVIEWS = Temporary Views (Type 03/07)
Selection Text: HIER = Temp. Hierarchy Table (02/08)
Selection Text: REPORTS = Generated (Temporary) Reports
Selection Text: SID = Temporary SID Tables (06)
Selection Text: TABLES = Temporary Tables (Type 01/0P)
Title: Removes temporary database objects
Text Symbol: 001 = This Report Deletes Temporary Objects
Text Symbol: 002 = If any objects are still in use, crucial processes may terminate
Text Symbol: 003 = See SAP Note 449891
Text Symbol: 004 = Caution
Text Symbol: 005 = The following objects need to be deleted:
Text Symbol: 040 = Table
Text Symbol: 050 = View
Text Symbol: 051 = View-Nametab
Text Symbol: 100 = Temporary hierarchy tables have been deleted successfully
Text Symbol: 101 = Temporary hierarchy tables deleted from BWA/HANA
Text Symbol: 110 = An error occurred when deleting the temporary hierarchy tables
Text Symbol: 111 = Error while deleting temporary hierarchy tables (BWA/HANA)
Text Symbol: 200 = Could not release name
Text Symbol: 210 = were deleted successfully.
Text Symbol: 220 = could not be deleted


INCLUDES used within this REPORT SAP_DROP_TMPTABLES

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

RSDDTMPTAB_CLEANUP CALL FUNCTION 'RSDDTMPTAB_CLEANUP' "NPK 1106393 EXPORTING i_nametype = rsd_c_id_tmp_tabl_sel.

RSDDTMPTAB_CLEANUP CALL FUNCTION 'RSDDTMPTAB_CLEANUP' "NPK 1106393 EXPORTING i_nametype = rsd_c_id_tmp_tabl_mat.

RSDDTMPTAB_CLEANUP CALL FUNCTION 'RSDDTMPTAB_CLEANUP' "NPK 1106393 EXPORTING i_nametype = rsd_c_id_tmp_tabl_tmp_idx.

RSDDTMPTAB_CLEANUP CALL FUNCTION 'RSDDTMPTAB_CLEANUP' "NPK 1106393 EXPORTING i_nametype = rsd_c_id_tmp_tabl_hier.

RSDDTMPTAB_CLEANUP CALL FUNCTION 'RSDDTMPTAB_CLEANUP' "NPK 1106393 EXPORTING i_nametype = rsd_c_id_tmp_tabl_sid.

RSDDTMPTAB_GET_NAMETYPE CALL FUNCTION 'RSDDTMPTAB_GET_NAMETYPE' EXPORTING i_tmpnm = i_prefix IMPORTING e_nametype = l_nametype.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

RSDDTMPTAB_RELEASE_NAME CALL FUNCTION 'RSDDTMPTAB_RELEASE_NAME' EXPORTING i_tmpnm = i_tablnm i_drop = i_drop_tmpnm EXCEPTIONS delete_error = 2 OTHERS = 3.

DD_NAMETAB_DELETE CALL FUNCTION 'DD_NAMETAB_DELETE' EXPORTING tabname = i_tablnm.

DD_TABL_DEL CALL FUNCTION 'DD_TABL_DEL' EXPORTING tabname = i_tablnm del_state = 'M' prid = 0.

RSDU_DROP_TABLE_OR_VIEW_DB2 CALL FUNCTION 'RSDU_DROP_TABLE_OR_VIEW_DB2' EXPORTING i_viewnm = i_tablnm EXCEPTIONS OTHERS = 8.

DB_DROP_TABLE CALL FUNCTION 'DB_DROP_TABLE' EXPORTING tabname = i_tablnm EXCEPTIONS table_not_dropped = 3 OTHERS = 4.

DB_GET_ALL_VIEWS CALL FUNCTION 'DB_GET_ALL_VIEWS' TABLES all_views = l_t_ddview[].

RSDDTMPTAB_RELEASE_NAME CALL FUNCTION 'RSDDTMPTAB_RELEASE_NAME' EXPORTING i_tmpnm = i_viewnm EXCEPTIONS delete_error = 2 OTHERS = 3.

DD_NAMETAB_DELETE CALL FUNCTION 'DD_NAMETAB_DELETE' EXPORTING tabname = i_viewnm IMPORTING subrc = l_subrc.

DB_DROP_VIEW CALL FUNCTION 'DB_DROP_VIEW' EXPORTING dbsys = sy-dbsys no_exec = ' ' prid = 0 viewname = i_viewnm db_check_flag = ' ' ignore_sql_error = 'X' IMPORTING subrc = l_subrc EXCEPTIONS program_not_generated = 1 program_not_written = 2 view_not_dropped = 3 OTHERS = 4.

RRBA_DAYS_TO_TIMESTAMP_ADD CALL FUNCTION 'RRBA_DAYS_TO_TIMESTAMP_ADD' EXPORTING i_days = -5 IMPORTING e_timestmp = l_timestmp.

DD_NAMETAB_DELETE CALL FUNCTION 'DD_NAMETAB_DELETE' EXPORTING tabname = -tabname.

DD_NAMETAB_DELETE





CALL FUNCTION 'DD_NAMETAB_DELETE' EXPORTING tabname = -tabname.

RSDU_GET_TABLES CALL FUNCTION 'RSDU_GET_TABLES' EXPORTING i_prefix = i_pattern IMPORTING e_t_tablnm = c_t_tablnm EXCEPTIONS OTHERS = 0.

TREX_EXT_INVAL_TEMP_INDEX_POOL CALL FUNCTION 'TREX_EXT_INVAL_TEMP_INDEX_POOL' EXPORTING i_rfc_destination = l_rfcdest i_pattern = l_pattern.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name SAP_DROP_TMPTABLES or its description.