‎2007 Jul 10 7:56 AM
Hi All,
<u>my requirement:-</u>
we have one smartform for invoice. we need to extract the data from smartform and we need to produce a pdf string of that data,so that they will pass that string to other technology i think like webshop. But we are using one fm called <b>convert_off</b> to convert the data from otf format to pdf format.
That means they extracted the smartform data in otf format and transferred it into pdf format by using that fm <b>(convert_off)</b>.But the FM wants a pdf string not a pdf file.so is there fm to convert otf data in to a pdf string.
Please update me if any one has idea about this requirement.
Regards,
raghu.
‎2007 Jul 10 8:20 AM
Hi,
I have not used Convert_otf.. but i see that there exporting parameter bin_file of type xstring.. that means it exports file as a xstring..
anyways,
If you have pdf in form of internal table then you can loop thorough the tab and get the pdf string...
sample code (incomplete but should give you idea):
data: ls_xfiledata TYPE xstring,
lv_filelength TYPE i,
FIELD-SYMBOLS: <ls_xfiledata> TYPE file_table.
LOOP AT lt_file_tab ASSIGNING <ls_xfiledata>.
CONCATENATE ls_xfiledata <ls_xfiledata> INTO ls_xfiledata IN BYTE MODE.
ENDLOOP.
ls_xfiledata = ls_xfiledata(lv_filelength). 'this is important otherwise file you get is corrupted...lv_filelenght is filled beforehand...
Regards,
Abhijit
<a href="/people/mark.finnern/blog/2004/08/10/spread-the-love the love</a>
‎2007 Jul 18 6:34 AM
Hi Abhijit,
Thanks for the answer. but still the problem persists. Can you please tell me in detail about this.
And one more thing if we open that pdf file with notepad (ie in txt format) ,we are getting the required string what we want. so is there any FM to convert that pdf data to pdf string.
i hope you understand the problem.
‎2007 Jul 19 7:36 AM
Hi raghu,
Could you give me details as exactly which FM you are using for getting 'pdf data' ?..which data you are passing to it?
Regards,
Abhijit