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

Error -ENTER must be a character-like data object (data type C, N, D, T, or STRING)

Hi ,

I am getting error ENTER must be a character-like data object (data type C, N, D, T, or STRING) in ECC 6.0 but not in 4.6c.

Structure of enter is as follows

DATA :

BEGIN OF enter,

x(1) TYPE x VALUE '0D', " Hexadecimal value for space

END OF enter,

The code where the field is used is as follows

* #-hexadecimal value and replace with space

LOOP AT i_docs.

ASSIGN i_docs TO <fs1>.

* TO check multiple occurance DO loop is set

DO.

* search for the #

SEARCH <fs1> FOR enter .

IF sy-subrc EQ 0 .

* replace # symbol with space

REPLACE enter WITH space INTO <fs1>.

IF sy-subrc EQ 0 .

* As table i_docs is with header line do the modification

MODIFY i_docs .

ENDIF.

* search fails then come out of DO loop

ELSE.

EXIT.

ENDIF.

ENDDO.

ENDLOOP.



Help on the same is appreciated.



Thanks

nishant

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 03, 2012 at 03:03 PM

    Hi,

    I think

    As ECC 6.0 is Unicode compatible, you are getting the error. you can execute the program by disabling the unicode check.

    In Abap editor menu bar

    GOTO -> properties -> uncheck the unicode checks active.

    try it.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 03, 2012 at 03:20 PM

    Use the constant CL_ABAP_CHAR_UTILITIES=>CR_LF to search for newline characters in your strings.

    Add a comment
    10|10000 characters needed characters exceeded

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.