Application Development and Automation 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: 
Read only

Problem while running program in background

Former Member
0 Likes
1,085

Hi All,

I have a report created back in 2002 which is using write statement. till nw it was being run in foreground. Output screen of the report is very long.

while running in background the output width is not coming properly. spool gets cut.

Please help me so that i can increase the output spool width.

thanks.

Vikash

12 REPLIES 12
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,045

Hello,

Check the value against LINE-SIZE param. The maximum value is 1023 characters.

The spool is getting truncated because the LINE-SIZE is less than the actual value of the list width.

BR,

SUhas

Read only

Former Member
0 Likes
1,045

Did you use Line-Size in your code????

Sas

Read only

0 Likes
1,045

Hi,

I have used line size and line count both.

Its running fine in foreground, but while doing so for background spools doesn't come properly.

need help .

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,045

Hello,

What is the LINE-SIZE used in the program? I think you should also check the default page layout of the spool being generated.

If it is less than the report output, the output will be truncated.

BR,

Suhas

Read only

0 Likes
1,045

@Suhas Da,

I have given the line size 1000.

How can i check and change the default output spool width.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,045

Hello,

When you double click on the spool request number, you can find the "Format" under the spool attributes tab.

Try changing this to X_65_255 & check. (You can change this value in the print options)

BR,

Suhas

Read only

Former Member
0 Likes
1,045

Hi Vikash,

Just check this:

1. When you see the spool, there is one button "RAW".

Press this button. Now you will be able to SCROLL to the right, and see the right-hand side data.

regards,

amit m.

Read only

Former Member
0 Likes
1,045

SAP Note 409339 probably describes what you're trying to do and how to do it...

Read only

0 Likes
1,045

Hi Dev,

That note is not working as my system is 4.7

Please suggest some soln

Read only

0 Likes
1,045

Hi,

Try using the 'Disply in max width' button. But im not sure whether this is available in 4.7 system. If this button is not there, try with those menus.

Read only

Former Member
0 Likes
1,045

Hi,

Same problem occurs with me also...

I have worked with the following solution....


  PERFORM sub_get_print_params.

  PERFORM sub_submit_program.

  PERFORM sub_get_spool_no.

  PERFORM sub_spool_to_pdf.

  PERFORM sub_send_mail.

FORM sub_get_print_params .

  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      no_dialog              = c_false
      report                 = c_repid
      user                   = sy-uname
    IMPORTING
      out_parameters         = w_print_parms
      valid                  = w_valid
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
  IF sy-subrc <> 0 OR w_valid <> c_x.
    MESSAGE e000(ymfi) WITH 'Error in getting print parameters'(002).
  ENDIF.

  w_print_parms-pdest = 'FRON'(003).
  w_print_parms-paart = c_paart.
  w_print_parms-linct = '36'.
  w_print_parms-linsz = '140'.

ENDFORM.                    " SUB_GET_PRINT_PARAMS

FORM sub_submit_program .

  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = p_jobnm
    IMPORTING
      jobcount         = w_number
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.

  IF sy-subrc = 0.
    SUBMIT yrfdashboard TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                        SPOOL PARAMETERS w_print_parms
                        VIA JOB p_jobnm NUMBER w_number
                        AND RETURN.
    IF sy-subrc = 0.

      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = w_number
          jobname              = p_jobnm
          strtimmed            = c_x
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
      IF sy-subrc <> 0.
        MESSAGE e000(ymfi) WITH 'Error in closing Job'(010).
      ENDIF.
    ENDIF.
  ENDIF.
ENDFORM.                    " SUB_SUBMIT_PROGRAM


Like that u have to proceed..

Please let me know for any more solutions.........

Regards

Arbind

Read only

Former Member
0 Likes
1,045

Hi,

Actually U have to create a spool out of it and than u u have to converte in PDF and proceed.

Regards

Arbind