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

LINE-SIZE

Former Member
0 Likes
1,492

I have a program that needs a lot of column and it will took 1000 for line-size. However, the limit is 930. Is there a way to override it. Or change it be change in the configuration?

14 REPLIES 14
Read only

Former Member
0 Likes
1,378

Hi

I believe the limit is 1023, but you need to use NEW-PAGE statament.

NEW-PAGE LINE-SIZE 1000.

Max

Read only

Former Member
0 Likes
1,378

Better way, I believe is to use ALV instead of normal report.

Cheers,

Thomas.

Read only

Former Member
0 Likes
1,378

Hi,

use ALV grid reprot instead of Normal report. that will work. it will trouble you.

Regards

vijay

Read only

0 Likes
1,378

But is this header possible with ALV?


+---------------------------------------------+
|                   Date                      |
+---------------------+-----------------------+
|    Title 1          |       Title 2         |
+------+-------+------+-------+-------+-------+
|  A   |   B   |  C   |   A   |   B   |   C   |
+------+-------+------+-------+-------+-------+

Read only

0 Likes
1,378

Hi,

check this sample.., i made it.

REPORT  ZTEST_ALV_CHECK     MESSAGE-ID ZZ   .


TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
      IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
      L_LAYOUT TYPE SLIS_LAYOUT_ALV,
      X_EVENTS TYPE SLIS_ALV_EVENT,
      IT_EVENTS TYPE SLIS_T_EVENT.

DATA: BEGIN OF ITAB OCCURS 0,
      VBELN LIKE VBAK-VBELN,
      POSNR LIKE VBAP-POSNR,
      MALE TYPE I,
      FEMALE TYPE I,
     END OF ITAB.


SELECT VBELN
       POSNR
       FROM VBAP
       UP TO 20 ROWS
       INTO TABLE ITAB.


X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.

X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
  X_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
  X_EVENTS-FORM = 'TOP_OF_PAGE'.
  APPEND X_EVENTS  TO IT_EVENTS.
  CLEAR X_EVENTS .

  L_LAYOUT-NO_COLHEAD = 'X'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM       = SY-REPID
    IS_LAYOUT                = L_LAYOUT
    IT_FIELDCAT              = IT_FIELDCAT
    IT_EVENTS                = IT_EVENTS
  TABLES
    T_OUTTAB                 = ITAB
  EXCEPTIONS
    PROGRAM_ERROR            = 1
    OTHERS                   = 2.
IF SY-SUBRC <> 0.

  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

FORM TOP_OF_PAGE.

*-To display the headers for main list
    FORMAT COLOR COL_HEADING.
        WRITE: / SY-ULINE(103).
    WRITE: /   SY-VLINE,
          (8) ' ' ,
               SY-VLINE,
          (8)  ' ' ,
               SY-VLINE,
          (19) 'SEX'(015) CENTERED,
               SY-VLINE.

    WRITE: /   SY-VLINE,
          (8) 'VBELN'(013) ,
               SY-VLINE,
          (8) 'POSNR'(014) ,
               SY-VLINE,
          (8) 'MALE'(016) ,
               SY-VLINE,
           (8)  'FMALE'(017) ,
               SY-VLINE.

    FORMAT COLOR OFF.

ENDFORM.

Regards

vijay

Read only

0 Likes
1,378

Hi Adrian

I think the problem is on what you need.

The advantage of ALV isn't to can listed list longer than 255 char, but to can manage several colunms and decide which ones have to be showed and which ones hided.

Anyway you there's a limit of the numbers of colunm of ALV grid.

If you easly need to display an ABAP list longer than 255 char you can use NEW-PAGE statament.

Max

Read only

0 Likes
1,378

This is very helpful. By the way, what's the limit column for ALV?

Thanks.

Read only

0 Likes
1,378

hi checa,

<b>you cannot have more than 255 columns in ALV.</b>

Cheers,

Abdul Hakim

Mark all useful answers..

Read only

Former Member
0 Likes
1,378

Hi !

The limitation of the LINE-SIZE is 1023 so your 1000 column list should be no problem.

What error do you get at LINE-SIZE 1000 ???

Regards

Rainer

Read only

0 Likes
1,378

I'm getting this error.

WRITE_TO_OFFSET_TOOLARGE

Error analysis:

In a "WRITE src TO dest+off[(len)] [INDEX i]" statement, "off" contains a target field offset (931) which is larger than the length of the target field "dest" (930).

This is not allowed

Read only

0 Likes
1,378

can you show the code once..so that it is easy to correct,

Regards

vijay

Read only

0 Likes
1,378

Declaring dest as dest(1023) should solve ur problem

<b>data: dest(1023).</b>

Check below example

DATA: SRC(1023),

DST(50).

SRC = 'HELLO'.

WRITE: SRC TO DST+49(5). "works fine DST = ' H'.

WRITE: SRC TO DST+60(5). "Gives WRITE_TO_OFFSET_TOOLARGE dump

Read only

Former Member
0 Likes
1,378

Hi,

Since the size of DST is 50, u cant offsct more than 50... Increase its size..it will work..

Sreedhar

Read only

0 Likes
1,378

Hi Sreedhar,

That's what I was saying to Adrian.