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

forms

Former Member
0 Likes
328

hi,

I have the scenario like this. I have to convert the form(script or smartform) into pdf format and then that pdf format is to be stored in the application server.

Using the standard program 'RSTXPDFT4', one can convert the form into pdf format. But afterwards how to proceed to save it in the application server.Please help.

Rgds,

khadeer.

1 ACCEPTED SOLUTION
Read only

former_member195383
Active Contributor
0 Likes
309

u can convert the otf data to pdf in the following way...Here wa_job_output_info u can get from the smartformcalling Function module

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

archive_index = wa_arc_idx

IMPORTING

bin_filesize = wf_numbytes

TABLES

otf = wa_job_output_info-otfdata

doctab_archive = tb_doctab_archive

lines = tb_lines

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

OTHERS = 3.

then use the tb_lines as given below..

OPEN DATASET wf_filename FOR OUTPUT IN BINARY MODE.

find an unique name for wf_filename.u can hard code the same.

IF sy-subrc EQ 0.

LOOP AT tb_lines.

TRANSFER tb_lines-tdformat TO wf_filename.

TRANSFER tb_lines-tdline TO wf_filename.

ENDLOOP.

ELSE.

wf_error = 'X'.

ENDIF.

CLOSE DATASET wf_filename.

IF sy-subrc NE 0.

wf_error = 'X'.

ENDIF.

1 REPLY 1
Read only

former_member195383
Active Contributor
0 Likes
310

u can convert the otf data to pdf in the following way...Here wa_job_output_info u can get from the smartformcalling Function module

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

archive_index = wa_arc_idx

IMPORTING

bin_filesize = wf_numbytes

TABLES

otf = wa_job_output_info-otfdata

doctab_archive = tb_doctab_archive

lines = tb_lines

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

OTHERS = 3.

then use the tb_lines as given below..

OPEN DATASET wf_filename FOR OUTPUT IN BINARY MODE.

find an unique name for wf_filename.u can hard code the same.

IF sy-subrc EQ 0.

LOOP AT tb_lines.

TRANSFER tb_lines-tdformat TO wf_filename.

TRANSFER tb_lines-tdline TO wf_filename.

ENDLOOP.

ELSE.

wf_error = 'X'.

ENDIF.

CLOSE DATASET wf_filename.

IF sy-subrc NE 0.

wf_error = 'X'.

ENDIF.