Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to find the size of file which is in application server...

Hi team

i want to find the size of the file which is in application server?

is there any FM to find the size of the file?

Example:-->

p_file = '\tmp\source.txt'.

OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 0.

?----find the size of the file which is open ?

Thanks in Advance.

Regards.

Puneet

Former Member
Former Member replied

Hi Puneet, Try this way.

REPORT ztest_program.
DATA filesize TYPE epsf-epsfilsiz.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
  EXPORTING
    file_name = 'llbdbase.dat'
    dir_name  = '/tmp/'
  IMPORTING
    file_size = filesize.
WRITE: 'File size' , filesize.
Thanks Venkat.O

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question