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

create PDF with SmartForm

Former Member
0 Likes
585

Hello everyone,

I want to create a PDF with smartform , but in design of smartform appears a problem.

in Form interface a internal table is defined: "print_info"

in Global definiton a structure is defined:"line"

this structure include:"SHORTN ; DESCR ; STATUS ; PRIORITY ; ACLOSEDAT ; ACLOSETIM ; ACTDUR"

in "table->Data->LOOP" "Loop at print_info into line".

then create table->cell->text, in Text write :"&LINE-SHORTN&" ...............

But result:

tasknam descr Status Priority

&LINE-SHORTN& &LINE-DESCR& &LINE-STATUS& &LINE-PRIORITY&

I'm sure that, the structure "line" includes data.

why the data isn't display ?

thanks in advance

regards

Yaning

4 REPLIES 4
Read only

Former Member
0 Likes
539

Hi,

Check this for smartform to PDF

http://www.sap4.com/wiki/index.php/Genera_PDF_a_partir_de_Smartforms

Regards

vijay

Read only

0 Likes
539

hello,

My problem is in Design of smartform. How can i access application data and print table.

thx

regards

Yaning

Read only

Former Member
0 Likes
539

Hi Yaning,

please check the below code it may helpful for u

Hi!

All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:

s_control_parameters-no_dialog = 'X'.

s_control_parameters-getotf = 'X'.

CALL FUNCTION v_func_name "call your smartform

EXPORTING

output_options = s_output_options

control_parameters = s_control_parameters

IMPORTING

job_output_info = s_job_output_info

call function 'CONVERT_OTF_2_PDF'

tables

otf = s_job_output_info-otfdata

lines = t_pdf

and if u need more u can check below links also

Check the below links..

VISIT THIS LINK

PLZ REWARD POINTS IF IT HELPS YOU

Regards,

Naveen

Read only

0 Likes
539

hello Naveen,

thx for your answer.

But PDF file i have got.

PDF as following:

.......................

tasknam descr Status Priority

&LINE-SHORTN& &LINE-DESCR& &LINE-STATUS& &LINE-PRIORITY&

&LINE-SHORTN& &LINE-DESCR& &LINE-STATUS& &LINE-PRIORITY&

......................

actually the application datas are not displayed .

i want to get:

.........................

tasknam descr Status Priority

task1 createPDF Planned high

task2 print Finished high

.....................

i guess the problem in Design time of Smartform.

can you give me some tips?

regards

Yaning