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

GUI_UPLOAD formats

Former Member
0 Likes
994

Hi,

GUI_UPLOAD function only works when the ASC file contains character (.) as a decimal separator. On the other hand, date format has to be aaaammdd.

I have to upload a file that contains (,) as a decimal separator and the date format is dd/mm/aaaa. Is it possible using GUI_UPLOAD function? With UPLOAD function it works, but it has become obsolete.

Thanks in advance,

Ricard.

Hi,

GUI_UPLOAD function only works when the ASC file contains character (.) as a decimal separator. On the other hand, date format has to be aaaammdd.

I have to upload a file that contains (,) as a decimal separator and the date format is dd/mm/aaaa. Is it possible using GUI_UPLOAD function? With UPLOAD function it works, but it has become obsolete.

Thanks in advance,

Ricard.

2 REPLIES 2
Read only

Former Member
0 Likes
853

GUI_UPLOAD will take the date according to the user settings defined in your USER SETTINGS. You have to pass value 'X' to this import parameter DAT_MODE of GUI_UPLOAD.

Read only

roberto_vacca2
Active Contributor
0 Likes
853

I don't know if you're working in background mode but you can try this method

...you can change extension as you like BIN, ASC, TXT, XLS, Etc...

  • Call dialog to navigate to file

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

default_extension = '.xlsx'

file_filter = '*.xlsx'

initial_directory = 'C:\'

CHANGING

file_table = t_files <= WILL CONTAIN YOUR DATA to ELABORATE AS YOU WANT

rc = v_rcode

user_action = v_action

EXCEPTIONS

file_open_dialog_failed = 1

cntl_error = 2

error_no_gui = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE e208(00) WITH 'FILE_OPEN_DIALOG'.

ENDIF.