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

Uploading XLS file from Application Server

Former Member
0 Likes
587

Hi,

I am using Open Dataset, Read Dataset etc to Upload XLS file from Applicaton Server. I am just getting junk values in the inernal table. Even if we see the XLS file from AL11, we are seeing junk values only.

But the BASIS Team says, the file is present properly in the Application Server.

Can you please let me know how to upload XLS file from Application Server to my Internal Table.

Is there any FM to do this. There are some FM to move file from Presentation Server to Internal Table, but I want to move it from Application Server.

Thanks and Regards,

Ishaq.

4 REPLIES 4
Read only

Former Member
0 Likes
529

Hi,

You can use The Finction Module

ALSM_EXCEL_TO_INTERNAL_TABLE.

Regards,

Sujit

Read only

Former Member
0 Likes
529

hi,

Chk the link

Regards.

Edited by: Iyswarya Godi on Jul 1, 2008 2:10 PM

Read only

sachin_mathapati
Contributor
0 Likes
529

Hi Ishaq,

Compare this Code with your Code....

IF file_type = 'BIN'.

OPEN DATASET wf_filename FOR INPUT IN BINARY MODE.

ELSE.

OPEN DATASET wf_filename FOR INPUT IN TEXT MODE.

ENDIF.

IF sy-subrc NE 0.

MESSAGE i000(su) WITH text-t02.

LEAVE LIST-PROCESSING.

ENDIF.

DO.

CLEAR : wf_row.

READ DATASET wf_filename INTO wf_row.

IF sy-subrc NE 0.

IF wa_file-file_delimiter EQ 'TAB'.

  • Tab delimited File

SPLIT wf_row AT co_tab INTO TABLE tb_data.

LOOP AT tb_fieldcat INTO wa_fieldcat.

ASSIGN COMPONENT wa_fieldcat-fieldname

OF STRUCTURE <dyn_wa> TO <fs>.

CLEAR wa_data.

READ TABLE tb_data INTO wa_data INDEX sy-tabix.

<fs> = wa_data-data.

ENDLOOP.

ELSEIF wa_file-file_delimiter EQ ';'.

  • ; delimited File

SPLIT wf_row AT ';' INTO TABLE tb_data.

LOOP AT tb_fieldcat INTO wa_fieldcat.

ASSIGN COMPONENT wa_fieldcat-fieldname

OF STRUCTURE <dyn_wa> TO <fs>.

CLEAR wa_data.

READ TABLE tb_data INTO wa_data INDEX sy-tabix.

<fs> = wa_data-data.

ENDLOOP.

ELSEIF wa_file-file_delimiter EQ 'ND'.

  • ND - No delimiter (Continuous)

<dyn_wa> = wf_row.

ELSE.

MESSAGE i000(su) WITH text-t01.

LEAVE LIST-PROCESSING.

ENDIF.

Read only

0 Likes
528

How do I know the File Type.