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: 

Syntax error

Former Member
0 Kudos

After upgrade iam getting the following error for below code please guide

In Unicode, DESCRIBE LENGTH can only be used with the IN BYTE MODE or

IN CHARACTER MODE addition. is the error message

this part of code

DATA:

L_LMESS LIKE LMESS,

L_LENGTH TYPE I.

DESCRIBE FIELD L_MSGTX LENGTH L_LENGTH.

IF L_LENGTH LT C_MIN_MSGTX_LENGTH.

MESSAGE I000(ZS)

WITH 'The message text variable that you pass to routine'

'GET_BDC_MESSAGE must have a defined length greater'

'than or equal to'

C_MIN_MSGTX_LENGTH.

EXIT.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

THE DESCRIBE LENGTH can only be used with the IN BYTE or IN CHARACTER MODE

i.e. describe field e_text length line_length.

would be replaced with

describe field e_text length line_length IN CHARACTER MODE.

3 REPLIES 3

Sandeep_Kumar
Advisor
Advisor
0 Kudos

If you are using L_MSGTX as string then try:

l_length = strlen(l_msgtx).

Former Member
0 Kudos

THE DESCRIBE LENGTH can only be used with the IN BYTE or IN CHARACTER MODE

i.e. describe field e_text length line_length.

would be replaced with

describe field e_text length line_length IN CHARACTER MODE.

Former Member
0 Kudos

DATA: A(3) TYPE N,

B(50) TYPE C VALUE 'Amit Gupta'.

A = STRLEN( B ).

A will be equal to 10

DESCRIBE FIELD B LENGTH A IN CHARACTER MODE.

A will be equal to 50.