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: 

Getting Error of Runtime Exceeded while generating OTF for PDF in smartform.

Former Member
0 Kudos

Hi All,

I am getting a error of runtime exceeded while generating OTF file for PDF in smartform through FM. The report is taking too much time before giving the output...and most of the time going to dump saying report has exceeded the runtime. All is working well till the Smartform FM reached. I debugged this FM and found that the TABLES parameter is having problem, may be there are too many tables in that parameter.Please help. Below is the code-

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = c_form_name
  IMPORTING
    fm_name            = v_fm_name

  EXCEPTIONS
    no_form            = 1
    no_function_module = 2
    OTHERS             = 3.

CALL FUNCTION   v_fm_name
  EXPORTING
    control_parameters      = wa_control
    output_options             = wa_output
    user_settings                = 'X'
    spl_gl                         = p_spl_gl
    open_dt                      = p_budat
    bukrs                         = p_bukrs
    w_check                    = w_check
    w_check1                   = w_check1

  IMPORTING
*   document_output_info =
    job_output_info                  = wa_otf
*   job_output_options     =

  TABLES
    kna1                       = t_kna1
    bsid_p                     = t_bsid_p
    bsid                         = t_bsid
    TEXT                       = t_text
    spl                           = t_spl
    bsid_x                      = t_bsid_x
    bsid_l                       = t_bsid_l
    bsid_h                      = t_bsid_h
    bsid_q                     = t_bsid_q
    bsid_tot                   = t_bsid_tot

  EXCEPTIONS
    formatting_error           = 1
    internal_error             = 2
    send_error                 = 3
    user_canceled              = 4
    OTHERS                     = 5

    .

1 ACCEPTED SOLUTION

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Are you the one who wrote the smart form ?

Max is probably referring to abap code that is residing in the smart form .

If you are the one creating the driver program and the smart form I suggest you keep all the business logic in the driver program and transfer the result for printing via the form interface .

ABAP program is much easier to debug.

Try ST05 .

Regards.

7 REPLIES 7

Former Member
0 Kudos

Hi

I suppose the problem is in the program inside your smartforms, you should check if there are bottleneck

Max

0 Kudos

Hi Max,

Thanks for the reply.

As I am new to Smartforms, could you please tell me exactly where to check the code in smartform?

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Are you the one who wrote the smart form ?

Max is probably referring to abap code that is residing in the smart form .

If you are the one creating the driver program and the smart form I suggest you keep all the business logic in the driver program and transfer the result for printing via the form interface .

ABAP program is much easier to debug.

Try ST05 .

Regards.

0 Kudos

Hi Eitan,

No..I didnt write the smartform and driver program.

0 Kudos

Hi,

Bad luck....

ST05 then.

Good luck.

Former Member
0 Kudos

Hi

Yes as Eltan says you need to consider there are two blocks of abap program:

- the first one is the driver program (but it seems there's no problem here because it called the smartform quickly)

- the second one is inside the smartform (It's possible to write abap routine in the smartform), and it seems the problem could be here

The variable c_form_name has the name of the smartform, you can manage it by transaction SMARTFORMS

but now it's not possible to say you why the print takes too long time, you need to do a trace

Max

0 Kudos

Hi Max,

I did tracing of the smartform and found that some of the SQL queries in the smartform code taking too much time to execute, will try to resolve them.

Thanks Max and Eitan for all the valuable suggestion