Hello

Sometimes you need delete Originals in DMS

following  ABAP program delete DMS Originals. ( Be careful )

Excel Structure must :

Document Number Document Type Document Part Document version
000000000000000200000012 DWG 000 00
000000000000000200000012 DWG 000

01

000000000000000200000013 DWG 000 01

Be careful Document Number must 25 character if Document number less than 25 set zero before number ( for example : 200000012 -> 000000000000000200000012)  

How Use :

Step 1:  after create program go t.code se38 execute .

Step 2 :Enter number row you want start program in excel in and end row

     Select Excel file ( by default C:Delete.xlsx)

( for example excel file have 20000 row and in first step you want delete 499 row , from row 2 and to row : 500 , next step you want delete 1000 row from row 501 and to row : 1501)

Step 3 : Run (f8)

sorry code is Spaghetti

 *&---------------------------------------------------------------------* *& Report  ZDMS_DELETE_ORIGINALS_TEST *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT  ZDMS_DELETE_ORIGINALS. "CONSTANTS: FILE_PATH LIKE RLGRAP-FILENAME VALUE C:delete.xlsx'.             "MAX_ROWS TYPE i VALUE 10000. TYPES:        BEGIN OF ST_DIR,          DOKAR TYPE DOKAR,          DOKNR TYPE DOKNR,          DOKVR TYPE DOKVR,          DOKTL TYPE DOKTL,        END OF ST_DIR. PARAMETERS BEG_ROW TYPE i DEFAULT 2. PARAMETERS END_ROW TYPE i DEFAULT 500. PARAMETERS FILEPATH LIKE RLGRAP-FILENAME DEFAULT 'c:Delete.xlsx'. DATA: it_documents TYPE TABLE OF st_dir,        wa_documents TYPE st_dir. DATA it_file_content TYPE TABLE OF ALSMEX_TABLINE WITH HEADER LINE. CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'    EXPORTING      FILENAME                      = FILEPATH      I_BEGIN_COL                   = 1      I_BEGIN_ROW                   = BEG_ROW      I_END_COL                     = 4      I_END_ROW                     = END_ROW   "15943    TABLES      INTERN                        = it_file_content * EXCEPTIONS *   INCONSISTENT_PARAMETERS       = 1 *   UPLOAD_OLE                    = 2 *   OTHERS                        = 3            . IF SY-SUBRC  0. * Implement suitable error handling here ENDIF. DATA: current_row TYPE i VALUE 1,        rowCount TYPE i. rowCount = LINES( it_file_content ). WHILE current_row 

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !