2016 Apr 18 11:20 AM
HI experts,
I have a requirement to check the size of pdf attachments which I am sending via mail in sap. I am using cl_bcs to generate the mail. The pdf attachments are coming from application server.
I need to restrict attaching of pdf's to mail if the size exceeds 10 MB. Checking file size in app.server is not recommended.
Please advise. need urgent help.
thanks
shadab
2016 Apr 18 11:36 AM
Use FM 'IWB_KXF_CALC_FILESIZE'. Pass internal table and it will return you file size in byte.
Or,
DESCRIBE TABLE itab LINES l_lines.
doc_size = l_lines*255.
2016 Apr 19 12:18 PM
Hi,
I have attachment data in binary format in my internal table , and the FM mentioned by you expects the importing table in char format. Any ideas on how the conversion can be done ? any FM..?
thanks
shadab
2016 Apr 19 12:34 PM
2016 Apr 18 11:39 AM
HI,
Use FM : IWB_KXF_CALC_FILESIZE
here you need to pass our converted internal table
thanks!!
2016 Apr 19 1:05 PM
How exactly are you working with that PDF binary data?
You should know its exact size while you are attaching it to mail.
BCS method add_attachment - parameter i_attachment_size.