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: 

short dumb

Former Member
0 Kudos

the previous solution given Vinay did not help is there any other solution?

ERROR is

Runtime errors WRITE_TO_OFFSET_TOOLARGE

Occurred on 05/08/2007 at 16:34:38

-


Program error: Offset in WRITE TO in program "SAPLGRAP " is too large.

-


What happened?

-


Error in ABAP application program.

The current ABAP program "SAPLGRAP " had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

.

.

.

.

.

.

-


Source code extract

-


010800 ENDIF.

010810 ENDFORM.

010820

010830

010840

010850 ----


010860 * FORM FIELDNAMES_2_DAT *

010870 ----


010880 * ........ *

010890 ----


010900 * --> FIELDS *

010910 ----


010920 FORM FIELDNAMES_2_DAT TABLES FIELDS.

010930 DATA: FIELDNAME_OFFSET TYPE I.

010940 data: colselect_offset type i.

010950 data: col_active(1).

010960 DATA: BEGIN OF HT,

010970 X(1) TYPE X VALUE '09',

010980 END OF HT.

010990

011000 CLEAR GLOBAL_FIELDNAMES.

011010 CLEAR FIELDNAME_OFFSET.

011020 clear colselect_offset.

011030 col_active = 'X'.

011040 LOOP AT FIELDS.

011050 if GLOBAL_COL_SELECT = 'X'.

011060 move GLOBAL_COL_SELECTMASK+colselect_offset(1) to col_active.

011070 add 1 to colselect_offset.

011080 endif.

011090 if col_active = 'X'.

-


> WRITE FIELDS TO GLOBAL_FIELDNAMES+FIELDNAME_OFFSET.

011110 CONDENSE GLOBAL_FIELDNAMES.

011120 FIELDNAME_OFFSET = STRLEN( GLOBAL_FIELDNAMES ).

011130 WRITE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB TO

011140 GLOBAL_FIELDNAMES+FIELDNAME_OFFSET(1).

011150 ADD 1 TO FIELDNAME_OFFSET.

011160 endif.

011170 ENDLOOP.

011180 FIELDNAME_OFFSET = FIELDNAME_OFFSET - 1.

011190 IF FIELDNAME_OFFSET >= 0.

011200 WRITE SPACE TO GLOBAL_FIELDNAMES+FIELDNAME_OFFSET(1).

011210 ENDIF.

011220 ENDFORM.

011230

011240 ----


011250 * FORM ABAP_2_DAT *

011260 ----


011270 * ........ *

011280 ----


011290 * --> DATA_TAB *

can u help?

2 REPLIES 2

Former Member

Former Member
0 Kudos

check if the value in FIELDS is exceeding the length of offset GLOBAL_FIELDNAMES+FIELDNAME_OFFSET