‎2011 Dec 19 2:13 PM
Hi,
I need to put some data on a pdf coming from an internal table.
Can you give me the object method from if_fp_pdf_object to do it ? Is it set_data ?
Thanks in advance.
‎2011 Dec 20 5:53 AM
Hi,
You can put internal table data into PDF by using the following FM in sequence.
1.) "CONVERT_OTF" -
Put Format = "PDF"
2.) "SX_TABLE_LINE_WIDTH_CHANGE"
After that if you want to mail this pdf as an attachment in email, you can use this FM "SO_NEW_DOCUMENT_ATT_SEND_API1".
Kindly reward with points if it is helpful for you.
Thanks and Regards,
Virendra Kedia
‎2011 Dec 20 8:13 AM
Hello,
Thanks for your answer.
But i want to know if there is a method to do it.
This is a part of my code :
TRY.
*Create pdf object.
l_pdfobj = l_fp->create_pdf_object( ).
*Set template.
l_pdfobj->set_template( xftfile = l_xftref
fillable = p_int ).
Set data
l_pdfobj->set_data( formdata = t_opnot_ef ).
*Tell PDF object to create PDF.
l_pdfobj->set_task_renderpdf( dynamic = p_dyn ).
*Execute, call ADS.
l_pdfobj->execute( ).
*Get result.
l_pdfobj->get_pdf( IMPORTING pdfdata = l_pdfresult ).
CATCH cx_fp_runtime_internal
cx_fp_runtime_system
cx_fp_runtime_usage INTO l_fpex.
l_error = l_fpex->get_errmsg( ).
MESSAGE l_error TYPE 'E'.
ENDTRY.
PERFORM download_file USING l_pdfresult p_pdf.
I just want to know which method i can use for object l_pdfobj to put data from an internal table.
Thanks.
‎2011 Dec 20 8:59 AM
Hi u can use 'Convert_OTF'. I have not seen any method for the same even when i did my dynpro object also we were using the same FM as no methods were available. I am not pretty sure on the methods availability though.