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

spool error

Former Member
0 Likes
886

Hi,

I have a report which generates a spool file when executed in background.

The error is that the in one of the fields (Delivery No.) the last digit is getting truncated.

It displays like '12345678...'.

The value should have been '123456789'.

The field length has been specified as 15 which very well coverys the delivery no.

Please help me to know the error and how it can be resolved.

Thanks.

Edited by: David D on Jul 25, 2008 2:10 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
865

Hi David,

Do you have a Field Labels printed...

Delivery is of length 8

so is your display check if thats affecting your output.

santhosh

8 REPLIES 8
Read only

Former Member
0 Likes
866

Hi David,

Do you have a Field Labels printed...

Delivery is of length 8

so is your display check if thats affecting your output.

santhosh

Read only

0 Likes
865

Hi,

when i run in foreground, the ALV displays the delivery number correctly. This error occurs only in spool.

Thanks.

Read only

0 Likes
865

You specify the output length for the field and see..

FIELDCAT-OUTPUTLEN = '15'.

It happens in some cases. when you don't specify the Outputlength or Specifying less Length then you will get the problem.

Read only

0 Likes
865

Hi Vijay,

This is exactly what I have done.

And the ALV displays correct output.

The error is only in spool.

Thanks.

Read only

0 Likes
865

Hi David,

Did you by chance passed

colwidth_optimize = 'X'. in Layout?

if not while populating the SELTEXT_L, SELTEXT_M and SELTEXT_S

try to give "Delivery Number" in FULL and try...

santhosh

Read only

0 Likes
865

The Problem is with this

NO_ZERO = 'X'. set it for the field/column which you want in the fieldcatalog.

you set this and see the Background spool .

wa_field-no_zero = 'X'.

Read only

0 Likes
865

Check this one in Foreground and Background.

REPORT  ztest_alv.

TYPE-POOLS:slis.
DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
     wa_field LIKE LINE OF it_fieldcat.
DATA: BEGIN OF it_likp OCCURS 0,
       vbeln TYPE likp-vbeln,
      END OF it_likp.
DATA: layout TYPE slis_layout_alv.

wa_field-fieldname = 'VBELN'.
wa_field-tabname = 'IT_LIKP'.
wa_field-hotspot = 'X'.
wa_field-outputlen = 10.
wa_field-no_zero = 'X'.
wa_field-seltext_l = 'Sales'.
APPEND wa_field TO it_fieldcat.

SELECT vbeln FROM likp
UP TO 10 ROWS
INTO TABLE it_likp.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program      = sy-repid
    is_layout               = layout
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat             = it_fieldcat
  TABLES
    t_outtab                = it_likp
  EXCEPTIONS
    program_error           = 1.

*&---------------------------------------------------------------------*
*&      Form  user_Command
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->UCOMM      text
*      -->SELFIELD   text
*----------------------------------------------------------------------*
FORM user_command USING ucomm TYPE sy-ucomm
                    selfield TYPE slis_selfield.

  CASE ucomm.

    WHEN '&IC1'.

      SET PARAMETER ID 'VL'  FIELD selfield-value.
      CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.
  ENDCASE.

ENDFORM.                    "user_Command

Regards

Vijay Babu Dudla

Read only

Former Member
0 Likes
865

Thanks Vijay,

The issue is resolved.

Your solution was of great help.

Thanks.