FLM off-line form

An off-line form can be generated from the Floe Attachment User-Exit and added to the e-mail.

Within the Attachment user-exit, call the FLM function /FLM/PDF_OUT.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
DATA: l_pdf type xstring.
      ...

    CALL FUNCTION '/FLM/PDF_OUT'
      EXPORTING
        im_ccode      = l_ccode
        im_ftype      = l_ftype
        im_flang      = l_flang
        im_fver       = l_fver
        im_user       = l_user
        im_file_type  = /flm/core=>c_xdp_file_type
        im_ftransport = /flm/core=>c_offline
        im_fillable   = 'X'    
        im_email_rece = l_receiver
        im_document   = im_document
      IMPORTING
        ypdf          = g_pdf
        ymess         = lv_mess.

IF lv_mess-message IS NOT INITIAL.

* Handle Error - e.g. write to log
...

ELSE.

* Fill attachment table
...

ENDIF.

To write errors to the application log, you can use:

1:
2:
3:
4:
5:
6:
7:
    CALL METHOD /floe/core=>message_logger
      EXPORTING
        im_log_object    = '/FLOE/LOG'
        im_log_subobject = l_subobject
        im_log_message   = l_app_log_mess
      IMPORTING
        ex_subrc         = l_subrc.