cancel
Showing results for 
Search instead for 
Did you mean: 

SFP generate blank form

tony_morellet
Participant
0 Kudos

Hi, I've create an interactive forms with the transaction SFP.

I need to print it and , for that, I've create a program :

*******************************

call function 'FP_FUNCTION_MODULE_NAME'
    exporting
      i_name     = 'Z_HCHAN_PROP_MDN_PDF'
    importing
      e_funcname = fm_name.

  if sy-cprog eq 'RS_TESTFRAME_CALL'.
    sy-cprog = 'RS_TESTFRAME_CALL_X'.
  endif.


  outputparams-nodialog = 'X'.
  outputparams-getpdf = 'X'.
*     Recup de l'imprimante locale
  outputparams-dest = 'LOCL'.
  docparams-fillable = 'X'.


  if p_natal = 'X'.

    sort wt_editpernr by name2 vorna.

    refresh wt_resultcm_tot.
    clear wt_resultcm_tot.
    loop at wt_editpernr.                                   "cor131106

      cm-key = wt_editpernr-srtfd.
      zp-imp-c7-cm.

      append lines of wt_resultcm to wt_resultcm_tot.
    endloop.

    perform f_fp_job_open changing w_subrc.
    check w_subrc eq 0.

*         appel du MF SFP de génération du 307/100
    call function fm_name
      exporting
        /1bcdwb/docparams  = docparams
        wt_result          = wt_resultcm_tot
        ws_result          = ws_resultcm
      importing
        /1bcdwb/formoutput = formoutput
      exceptions
        usage_error        = 1
        system_error       = 2
        internal_error     = 3
        others             = 4.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

    perform f_fp_job_close.



    if not formoutput-pdf is initial.
*           Conversion du XSTRING généré vers un format
*           binaire pour download
      perform f_scms_xstring_to_binary.

*NAT_MDN_CAMP_NV_STT_AAAAMMJJ.pdf
      concatenate c_repertoire
                  'NAT'         '_'
                  'MDN'         '_'
                   p_camp       '_'
                   p_nivau      '_'
                   p_statu      '_'
                   sy-datum
                   '.pdf'
                   into w_file.

*           Transfert du fichier PDF sur serveur d'application
      open dataset w_file for output in binary mode .

      loop at l_tab into ltab.
        transfer ltab to w_file.
      endloop.

      close dataset w_file.

    endif.

************************

this program is launch by batch.

When I open my form after download, I have an adobe message (this document enabled extended features in adobe reader) and the document is blank un less an area not binding.

If you have an idea !!!!

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

1) try SFP output (like SE38 run/ test), you should get your form with no data

2) if 1) passes only: try the immediate ABAP output? Do not set outputparams, leave it initial. Run the generation program and do not print, use print preview button. Do you get anthing on the screen? Your form in Reader?

3) if 1) cannot be passed your problem is very serious

- did you try the FP_TEST_* reports? Did you get the test forms using them?

- do you use any scripting?

Otto

tony_morellet
Participant
0 Kudos

Hello Otto

I have solved my problem.

The problem is in the download program not in the SFP.

Thank you for your help.

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello, please provide more details.

What does that mean, your form is blank? You cannot see a thing? Or you can see the layout but no data?

You can check if your form is ok without the batch, use preview. This way you can tell where there is a bug.

Next check binding. Check data passing into the form. Set up the form trace in SFP, set very detailed trace and examine the form attachment with the debug data. Check your fonts. Provide more details about the form and what have you checked so far and we can debug it out for you, regards Otto

tony_morellet
Participant
0 Kudos

Hi Otto,

Thank you for your answer.

In my form I cannot see the layout and text fields.