cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform error message

Former Member
0 Kudos

Hi

I am new in form printing and I have this issue: I created a my own report printing a smartforms; everything works correctly, but recentley I noticed that if I decide to not print when the print panel prompt is shown (I hit cancel and not print or preview) I get an error and control is not returned to calling report. What should I do to avoid this error?

Thanks in advance

Gabriele

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

If the user aborts the print, the exception USER_CANCELED of the fm generated for the smartform is raised, so if you don't manage the exceptions a dump occurs, else u need to manage the exception and send a message if an exceptions is raised

.CALL FUNCTION <SMARTFORM FM>
  .............
  EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
       SEND_ERROR                = 3
       USER_CANCELED             = 4
       OTHERS                    = 5 .
  
 CASE SY-SUBRC.
   WHEN 0.
   WHEN 4. MESSAGE I208(00) WITH 'Print deleted by user'.
   WHEN OTHERS,
ENDCASE.

.

Max

Former Member
0 Kudos

thank you very much

Answers (0)