First of all, you must not read a PDF file into a STRING variable, but into a XSTRING variable. So you must use XSTRLEN( test->pdf ) which returns the number of bytes (divide by 1024 to have the number of KB). Refer to the ABAP documentation for the meaning of XSTRLEN.
↧