Hello Anil.
Sometimes i use this program to upload data into tabel.
Use table VTVBAR
*&---------------------------------------------------------------------* *& Report Z_EXP_IMP_TABLE *& *&---------------------------------------------------------------------* REPORT z_exp_imp_table MESSAGE-ID z171. DATA: vr TYPE REF TO data, vrl TYPE REF TO data. PARAMETERS: d_export RADIOBUTTON GROUP r1, d_import RADIOBUTTON GROUP r1. PARAMETERS: tabnam(16) MATCHCODE OBJECT dd_dbtb_16. PARAMETERS: filename LIKE rlgrap-filename DEFAULT 'C:\TABLE.TXT', filtyp(10) DEFAULT 'DAT' OBLIGATORY, usl(60), delz AS CHECKBOX. DATA: filen TYPE string. FIELD-SYMBOLS: <wa>, <p> TYPE STANDARD TABLE. TABLES: dd02l. START-OF-SELECTION. AUTHORITY-CHECK OBJECT 'S_TABU_DIS' ID 'DICBERCLS' FIELD 'XXXX' ID 'ACTVT' FIELD '02'. IF sy-subrc <> 0. LEAVE PROGRAM. ENDIF. CLEAR dd02l. SELECT SINGLE * FROM dd02l WHERE tabname = tabnam. filen = filename. IF NOT dd02l-tabname IS INITIAL. CREATE DATA vr TYPE STANDARD TABLE OF (tabnam). ASSIGN vr->* TO <p>. IF d_export = 'X'. PERFORM export. ELSE. PERFORM import. ENDIF. ELSE. WRITE:/ 'Wrong table name'. ENDIF. *&--------------------------------------------------------------------* *& Form EXPORT *&--------------------------------------------------------------------* * text *---------------------------------------------------------------------* FORM export. CLEAR <p>. REFRESH <p>. SELECT * FROM (tabnam) APPENDING TABLE <p> WHERE (usl). CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING filename = filen filetype = filtyp codepage = '1504' TABLES data_tab = <p> EXCEPTIONS OTHERS = 1. IF sy-subrc = 0. WRITE:/ 'Upload success into table ',filename. ELSE. WRITE:/ 'Upload error'. ENDIF. ENDFORM. "EXPORT *&--------------------------------------------------------------------* *& Form IMPORT *&--------------------------------------------------------------------* * text *---------------------------------------------------------------------* FORM import. CLEAR <p>. REFRESH <p>. CALL FUNCTION 'WS_UPLOAD' EXPORTING filename = filename filetype = 'DAT' TABLES data_tab = <p> EXCEPTIONS OTHERS = 1. IF sy-subrc = 0. IF delz = 'X'. DELETE FROM (tabnam). ENDIF. LOOP AT <p> ASSIGNING <wa>. INSERT (tabnam) FROM <wa>. ENDLOOP. COMMIT WORK AND WAIT. WRITE:/ 'Upload success from local file'. ELSE. WRITE:/ 'Upload error'. ENDIF. ENDFORM. "IMPORT
You have possiblity to export data into file, change data you need, then upload data with full reset of table data.