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

syntax error in length or offset adressing

Former Member
0 Likes
390

DATA: JUST_LINE(255) TYPE C.

FIELD-SYMBOLS: <LV_JUST_HF> TYPE CHAR1.

do 255 times.

lv_index = sy-index - 1.

===> ASSIGN JUST_LINE+254(1) INCREMENT lv_index TO <LV_JUST_HF> RANGE JUST_LINE.

  • IF JUST_HF <> SPACE.

IF <LV_JUST_HF> <> SPACE.

*End of NSN P20 Upgrade Change u2013 20110708

EXIT.

As i am upgarding from ecc4.7 to ecc6.

one syntax error is coming that "we can not use offset or length adressing in the INCRIMENT for "JUST_LINE"

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
315

Hi,

You can try like this..

DATA: just_line(255) TYPE c,
      lv_index TYPE sy-tabix VALUE '255'.
FIELD-SYMBOLS: <lv_just_hf> TYPE char1.

DO 255 TIMES.
  TRY.
    ASSIGN just_line(lv_index) TO <lv_just_hf> CASTING.
    lv_index = lv_index - 1.
  ENDTRY.
ENDDO.

Regards,

Ravi.

1 REPLY 1
Read only

Former Member
0 Likes
316

Hi,

You can try like this..

DATA: just_line(255) TYPE c,
      lv_index TYPE sy-tabix VALUE '255'.
FIELD-SYMBOLS: <lv_just_hf> TYPE char1.

DO 255 TIMES.
  TRY.
    ASSIGN just_line(lv_index) TO <lv_just_hf> CASTING.
    lv_index = lv_index - 1.
  ENDTRY.
ENDDO.

Regards,

Ravi.