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

function module which reads the file size

Former Member
0 Likes
5,446

Hello,

I am looking for a function module which reads the size of the input file. I mean it should indicate if the file is empty or not.

Thanks,

Mridu.

5 REPLIES 5
Read only

Former Member
0 Likes
2,318

Hi,

Use the function FILE_GET_SIZE of CL_GUI_FRONTEND_SERVICES class.

Hope this helps.

~ Ramanath.

Read only

Former Member
0 Likes
2,318

Hi,

use the function module GUI_UPLOAD.the importing parameter FILELENGTH will give u the number of bytes transferred. if it gives zero then u can say that the file is empty.

rgds,

bharat.

Read only

Former Member
0 Likes
2,318

Try this one....

FM EPS_GET_FILE_ATTRIBUTES

Thanks,

Anon

Read only

Former Member
0 Likes
2,318

Hi

use this FM

call method cl_gui_frontend_services=>file_open_dialog

exporting

initial_directory = ws_f0001_pcpath

changing

file_table = i_file

rc = ws_f0001_rc.

Read only

Former Member
0 Likes
2,318

Hai,

You can use this function module for find the file size.

'GUI_GET_FILE_INFO'

IMPORT

FNAME- file path. (C:\tst.txt)

EXPORT

FILE_SIZE = output

Dont forget for give Points.

Thanks & Regards,

Durai.V