cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

File Size on Candidate Profile in e-Recruting (on Portal)

Former Member
0 Likes
301

Hi Guru's,

I got a requirement i.e to limit file size when candidate tryinh to Upload document.

Went through many threads........please go through my requirement and help me.....

I got a badi HRRCF00_DOC_UPLOAD.

I'm sucessfull in getting File types and No.of Files, but couldn't get File Size using method CHECK_ATTACH_FILE_SIZE......

I'm using Class 'cl_gui_frontend_services' and method 'file_get_size', but getting sy-subrc as 4 i.e. 'not_supported_by_gui'........

I'm passing CONTENT ( xstring parameter ) to my custom filed ( declared as string as 'file_get_size' parameter file name is string ) and passing that to method  'file_get_siz'........

So GURU's plz suggest me a way to derive the file size.....

Just to mention :   Even in method CHECK_ATTACH_FILE_TYPE, I'm using FM 'SKWF_MIMETYPE_OF_FILE_GET' with destination to get file type......without destination it dosen't work.

Regards

Sai

Accepted Solutions (1)

Accepted Solutions (1)

Ramprabhu_Sukum
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

Please try this code.

l_size      = xstrlen( ls_atta_hex-content ).

Where ls_atta_hex-content is the content in XSTRING. All the best !!

Regards,

Ram

Former Member
0 Likes

Data: lv_size type i.

lv_size = XSTRLEN( content ).

*Bigger than 4 MB?

if lv_size > '4194304'.

  is_out_of_range = 'X'.

  endif.

Ramprabhu_Sukum
Product and Topic Expert
Product and Topic Expert
0 Likes

Why you want to check the file size?

Former Member
0 Likes

Hi,

Normally at our implementation, we check the file size to control the file size, if the file size is bigger than say 2MB, we wont allow the file to be uploaded.

Regards

Ridzuan

Answers (0)