Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select option by using button.

former_member225134
Participant
0 Likes
623

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 ????

3 REPLIES 3
Read only

former_member201275
Active Contributor
0 Likes
554

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?

Read only

alisson_fragozo
Explorer
0 Likes
554

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.

Read only

Former Member
0 Likes
554

This message was moderated.