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

Fetching OTF data required for Convert_OTF for SAPScript versus Samrtform.

Former Member
0 Likes
1,668

Hi,

When using a CONVERT_OTF for converting Smartform output we pass the <b>importing parameter job_output_info-otfdata</b> of function module CALL FUNCTION v_form_name

to <b>Tables parameter OTF</b> of function module CONVERT_OTF odule. We do this because the <b>job_output_info-otfdata</b> contains the otf data.

But when when we are using the same function module CONVERT_OTF for SAPScript, where do we get the otf data from ?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,250

You get is from the CLOSE_FORM function call.

Regards,

RIch Heilman

You get is from the CLOSE_FORM function call.

Regards,

RIch Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,251

You get is from the CLOSE_FORM function call.

Regards,

RIch Heilman

Read only

0 Likes
1,250

For example, you set the flag in the OPEN_FORM call, then get the OTF from the CLOSE_FORM.




form  get_otf_code.

  data: begin of otf occurs 0.
          include structure itcoo .
  data: end of otf.

  data: itcpo like itcpo.
  data: itcpp like itcpp.

  clear itcpo.
<b>  itcpo-tdgetotf = 'X'.</b>

* Start writing OTF code
  call function 'OPEN_FORM'
       exporting
            form     = 'ZTEST'
            language = sy-langu
<b>            options  = itcpo</b>
            dialog   = false
       exceptions
            others   = 1.

  perform write_form.

<b>  move-corresponding itcpo to itcpp.</b>

  call function 'CLOSE_FORM'
       importing
  <b>          result  = itcpp</b>
       tables
   <b>         otfdata = otf</b>
       exceptions
            others  = 1.



Regards,

Rich Heilman

Read only

0 Likes
1,250

I have one more doubt associated with this.

If we want to convert this OTF data in PDF, where exactly we will use the convert_otf function module ? Will this be after Close_form ?

Note: According to solution given to me I will get OTF data after close_form function module..

Read only

0 Likes
1,250

AFter you get the OTF code from the CLOSE_FORM function module you will then call another function module to convert it to PDF format.

You may be able to use function module CONVERT_OTF_2_PDF for this.

REgards,

Rich Heilman