Skip to Content
author's profile photo Former Member
Former Member

I am getting a dump while running va23 and got follwing error.

The system tried to access field "ALL_NINES" with type "C" and length

36 in the current program "ZVADQU01_NEW" using length 40.

Partial field access is not allowed with a length specification that is

larger than actual field length.

CODE EXTRACT:

DATA: index LIKE sy-index,

f_type(1),

length TYPE i,

all_nines(36) VALUE '99999999999999999999'.

FIELD-SYMBOLS: <fsin>,

<fsout>,

<fieldname>.

DO.

index = index

+ 1.

ASSIGN COMPONENT index OF STRUCTURE inrec

TO <fsin>.

ASSIGN COMPONENT index OF STRUCTURE outrec

TO <fsout>.

IF sy-subrc <> 0.

EXIT.

ENDIF.

IF <fsin> <> space.

MOVE <fsin> TO <fsout>.

ELSE.

DESCRIBE FIELD <fsout> TYPE f_type.

IF f_type = 'C'.

MOVE 'ZZZZZZZZZZZZZZZZZZ' TO <fsout>.

ELSEIF f_type = 'N'.

DESCRIBE FIELD <fsout> LENGTH length in byte mode.

  • ERROR OCCURED HERE****

MOVE all_nines(length) TO <fsout>.

ENDIF.

ENDIF.

ENDDO.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 06:03 PM

    Hi Joseph,

    What is the size of OUTREC structure in your report.

    If size of OUTREC is less than size of ALL_NINES then your MOVE statement will work, otherwise change the length of ALL_NINES to size of OUTREC.

    all_nines(X) VALUE '99999999999999999999'.

    X - needs to be length of OUTREC.

    Thanks,

    Vinay

    Add a comment
    10|10000 characters needed characters exceeded

    • Oh, wait a minute, it would help if I actually read your error message. I think the problem is that you are trying to access the field when the field symbols length is greater than 36. You need to increase the length of ALL_NINES. Make it like 50.

      all_nines(50) VALUE '9999999999999999999999999999999999'.

      Regards,

      Rich Heilman

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.