Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PDF String

Former Member
0 Likes
876

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.

3 REPLIES 3
Read only

Former Member
0 Likes
695

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>

Read only

0 Likes
695

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.

Read only

0 Likes
695

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