Application Development 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: 

Preview button in smartform is not working

Former Member
0 Kudos

Hi experts,

I have created a smartform that i am calling it through a program. the program shows a number of PM orders based on selection criteria and the user selects some of them and clicks the button print. the code works fine and the smartform is ok itself.

1. the first  problem is  when I click on preview button it doesn't go to preview page no matter what printer I choose.

2. the second problem is when I choose Adobe PDF as printer and click on print button. after a long time the system asks for saving the file. my program is fast, I can see the spool request created and I can print it from there, but when it comes to program it takes a long time.


I have attached the screenshot of print window .


I would be grateful if you help me with these two problems.

Thank you in advance.

1 ACCEPTED SOLUTION

venuarun
Active Participant
0 Kudos

Hi Mozhgan,

Check the value of exception

EXCEPTIONS
        formatting_error       = 1
        internal_error           = 2
        send_error               = 3
        user_canceled          = 4.


This will give you the solution. and can you check whether you are suppressing the print preview in preview option

  wa_control_parameters-preview = 'X'.


With regards

Arun VS

6 REPLIES 6

Former Member
0 Kudos

hi,

may be something is missing due to which preview is not working.

Please check smartstyles is there or not. Also check the layout whether ok or not.

0 Kudos

Hi,

There are some reasons for this

a. you should have more coding in smart from initialization or program lines or select queries.

b. Smart form has more templates

c. Finally it might me related to GUI issues.

Please check and let me know if you have any other problems.

Thanks,

Sivanadh

ravi_golla3
Explorer
0 Kudos

Hi,

1. Print preview also depends on printer which you have selected. Try with multiple printers.

2. it is problem with GUI services. Check with Basis team.


0 Kudos

1. Set the break-point in smartform interface function module to find the error details. It may be any one of the below. Any case you can find the SY-MSGIG, SY-MSGNO and SY-MSGV1.....

Using these details you can trace the issue.

        EXCEPTIONS
        formatting_error     = 1
        internal_error       = 2
        send_error           = 3
        user_canceled        = 4.

2. You can check use runtime analysis. Still if you are not able to find then, BASIS team can check this iussue by switch on the trace from their side.

former_member202818
Active Contributor
0 Kudos

Hi Shabani,

EXCEPTIONS

       formatting_error     = 1

       internal_error       = 2

       send_error           = 3

       user_canceled        = 4

       OTHERS               = 5.

   IF sy-subrc <> 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

                         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.   "This will give the cause

   ENDIF.

Regards

Sreekanth

venuarun
Active Participant
0 Kudos

Hi Mozhgan,

Check the value of exception

EXCEPTIONS
        formatting_error       = 1
        internal_error           = 2
        send_error               = 3
        user_canceled          = 4.


This will give you the solution. and can you check whether you are suppressing the print preview in preview option

  wa_control_parameters-preview = 'X'.


With regards

Arun VS