10-23-2006 6:44 PM
Hi all,
can anyone tell under what class this method comes and how to find this.
iam getting this error
"P_FILE" is not type-compatible with formal parameter "FILE_NAME".
I have declared my p_file as
parameters : p_file like rlgrap-filename.
CALL METHOD cl_gui_frontend_services=>file_get_size
EXPORTING
file_name = p_file
IMPORTING
file_size = size.
10-23-2006 6:48 PM
parameters : p_file like rlgrap-filename.
data: TheFile type string. "<-- add this
Now move into a STRING data type.
move p_file to TheFile.
CALL METHOD cl_gui_frontend_services=>file_get_size
EXPORTING
file_name = TheFile " <---- Note change
IMPORTING
file_size = size.
10-23-2006 6:51 PM
Hi Preeti,
<b>CALL METHOD cl_gui_frontend_services=>file_get_size</b>
<b>cl_gui_frontend_services</b> - is the name of class &
<b>file_get_size</b> - is the name of method in class
Here <i>file_get_size</i> is method class i.e it an be used directly without creating any instance of class i.e directly by referring to the class name hence the class..
To get proper type for file name goto SE24 type the name of class cl_gui_frontend_services and place cursor on the above method name then click on the parameter button on top..from here you get the exact typ for file_name
Hope this helps you..
Enjoy SAP.
Pankaj Singh