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

File transfer

Former Member
0 Likes
595

I want to download a file that is saved in an application server to my local server. I cannot us e Download function to save the file as my output is oin file format and not table format.

Can any one suggest me, how to convert the file into an internal table or is there any way to transfer the file from application server to local server.

4 REPLIES 4
Read only

Former Member
0 Likes
576

please check this updated information:

You can use the Function module ALSM_EXCEL_TO_INTERNAL_TABLE to read the Excel file into the internal table of type alsmex_tabline.

From this internal table you can fill the target internal table.

TYPES:

BEGIN OF ty_upload,

field1 TYPE c length 12,

field2 TYPE c length 12,

field3 TYPE c length 12,

END OF ty_upload.

DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH DEFAULT KEY.

DATA wa_upload TYPE ty_upload.

DATA itab TYPE STANDARD TABLE OF alsmex_tabline WITH DEFAULT KEY.

FIELD-SYMBOLS: <wa> type alsmex_tabline.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

filename = filename

i_begin_col = 1

i_begin_row = 1

i_end_col = 3

i_end_row = 65535

TABLES

intern = itab.

LOOP AT itab ASSIGNING <wa>.

CASE <wa>-col.

WHEN '0001'.

wa_upload-field1 = <wa>-value.

WHEN '0002'.

wa_upload-field2 = <wa>-value.

WHEN '0003'.

wa_upload-field3 = <wa>-value.

ENDCASE.

APPEND wa_upload TO it_upload.

CLEAR wa_upload.

ENDLOOP.

Edited by: Abap-fresher on Jan 31, 2008 11:00 AM

Read only

Former Member
0 Likes
576

HI

Checkout T-code CG3Y & CG3Z might be helpful to you

Reward if helpful

Thanks and Regards

Chaitanya

Read only

Former Member
0 Likes
576

Harsad,

See the below simple code ...

DATA FNAME(60) VALUE 'myfile'.

DATA: FNAME(12) VALUE 'abcdefghijkl',

TEXT2(50),

LENG TYPE I.

OPEN DATASET FNAME FOR INPUT IN TEXT

MODE.

DO.

READ DATASET FNAME INTO TEXT2 LENGTH

LENG.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

WRITE: / SY-SUBRC, TEXT2, LENG.

ENDDO.

CLOSE DATASET FNAME.

Don't forget to reward if useful...

Read only

Former Member
0 Likes
576

hai ,

plz Refer to the Function Module

Just Run The following FModule In SE37

C13z_app_to_front_end.

Then Give respective File Paths