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

Former Member
0 Likes
785

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
Read only

Former Member
0 Likes
759

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
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
759

If you are using L_MSGTX as string then try:

l_length = strlen(l_msgtx).

Read only

Former Member
0 Likes
760

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.

Read only

Former Member
0 Likes
759

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.