08-26-2014 10:46 AM
Hi,
In table maintenance screen i added one button in application toolbar ,while clickig that new button i want to display
one selection screen within that it wants to ask choose file(upload data from excel sheet).
while clicking that button,i want to show like that.
File path... ______________________(F4 option)..After select excel file from system..It updates the data in the table
maintenance generator..
Can any one suggest ????
08-26-2014 1:59 PM
You can have a look at one of the sap demo programs, for example: BCALV_FULLSCREEN_DEMO. This has a button "local File" which when you click on ask you for file format, and once you select this you get a popup for the filepath.
Maybe you can cut and paste this code?
08-26-2014 2:29 PM
Hi Anitha,
You can put a button in table maintenance wich uploads data to table.
Custom butom: http://zevolving.com/2008/09/add-custom-button-on-maintianence-view-sm30/
When button pressed, call the functions.
CALL FUNCTION 'F4_FILENAME' "get the file path
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ' '
IMPORTING
file_name = P_FILE.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
After, you work with ITAB, populating the fields of table.
09-12-2014 1:40 PM