2009 Sep 02 4:37 PM
Hello Gurus,
I have a pdf file data in an internal table. How do I find the total bytecount of the data in the internal table. I am declaraing the pdf internal table as follows:
DATA: table_pdf TYPE table of tline.
Please help.
Regards,
Jainam.
2009 Sep 02 4:56 PM
You may need to use
DESCRIBE FIELD TEXT LENGTH LEN in byte mode.
This returns the length of the field in bytes
and also check
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3145358411d1829f0000e829fbfe/content.htm
a®
2009 Sep 02 4:56 PM
You may need to use
DESCRIBE FIELD TEXT LENGTH LEN in byte mode.
This returns the length of the field in bytes
and also check
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3145358411d1829f0000e829fbfe/content.htm
a®
2009 Sep 02 5:13 PM
Well I tried to do following, I get differnet length of pdf file in v_pdf_bytecount and calculated actually. The byte count done programatically doesn't match v_pdf_bytecount.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spoolid
no_dialog = ' '
IMPORTING
pdf_bytecount = v_pdf_bytecount
TABLES
pdf = it_pdf[].
data: len type i,
v_len type i.
loop at it_pdf into wa_pdf.
DESCRIBE FIELD wa_pdf LENGTH len IN BYTE mode.
v_len = len + v_len.
endloop.
2009 Sep 02 5:19 PM
Hi,
When the FM CONVERT_ABAPSPOOLJOB_2_PDF returns the pdf byte count why would you want to again calculate it based on the internal table?
Regards,
Vikranth
2009 Sep 02 5:25 PM
Thats a complete different story because I cannot pass the length of pdf file to custom function module since changes to custom function module export parameters will require a long approval process in our company...
2009 Sep 02 5:51 PM
if it's just politics, just use EXPORT TO MEMORY ID and IMPORT FROM MEMORY ID