cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform printing + Get OTF Data

Former Member
0 Kudos

Hello, i have a problem with smartforms. I need to both print the smartforms and get the OTF Data in order to save it to disk and email it. But if I mark the getotf check in control parameters, it doesn't print. In fact the description for that field says: Return of OTF table. No printing, display, or faxing.

Is there a way to get both the printed version and the OTF Data without having to call the Smartforms function module twice with different control parameters?

Thanks in advance.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

You call the smartform function module twice.

In first call you have to convert it to OTF data and store it in the presentation server and secondly you show your smartform output. Show you will not come to know that the pdf have saved in presentation server.

Thanks and regards,

Venkat

Former Member
0 Kudos

Hi,

Just call the same smartform fm twice one for printing and one for PDF output.

Hope this will be helpful to you.

Regards

Karthik D

Former Member
0 Kudos

Hello, I'm the person who wrote the thread, every time i tried to login, sdn kept asking me to register so I had to do it under a similar name...

Anyways, back to the original subject.

Naimesh thanks for you help, the problem is that I have to print a lot of forms so I'd really like to be able to do it in one step.

Suvendu, thanks, but the printing and saving must be done in a background process, so prompting the user is not an option.

Is there really no way to get both the OTF data and the printed version with only one call to the smartform?

Thanks in advance,

Unknown.

Former Member
0 Kudos

Hello

steps to fulfill your requirement



CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

 CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
      titlebar              = 'Select A option !'
      text_question         = 'Want a PDF file for this Transaction ?'
      text_button_1         = 'Yes'(001)
      text_button_2         = 'No'(002)
      display_cancel_button = ' '
      start_column          = 25
      start_row             = 6
    IMPORTING
      answer                = a.
  IF a = '1'.
*for CONTROL_PARAMETERS
    gw_ssfctrlop-getotf = 'X'.
    gw_ssfctrlop-no_dialog = 'X'.

*for OUTPUT_OPTIONS
    gw_ssfcompop-tdnoprev = 'X'.
    gw_ssfcompop-tdimmed = 'X'.
*------------------------------------

    CALL FUNCTION fm_name

CALL FUNCTION 'CONVERT_OTF'
CALL FUNCTION 'DOWNLOAD'
endif.

CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
        titlebar              = 'Select A option !'
        text_question         = 'Want to have a print privew for the same?'
        text_button_1         = 'Yes'(001)
        text_button_2         = 'No'(002)
        display_cancel_button = ' '
        start_column          = 25
        start_row             = 6
      IMPORTING
        answer                = a.
    IF a = 1.
      CALL FUNCTION fm_name. (without the control and output parameters).
endif.

This will surely solve your problem

Cheers,

Suvendu

naimesh_patel
Active Contributor
0 Kudos

You may try to first create the Spool and then try to read the OTF from the Spool. I never tried on this idea.

Regards,

Naimesh Patel