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

an error message using DESCRIBE FIELD

Former Member
0 Likes
1,118

DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG .

that line off code gives me an error message:

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

can anyone else provide me an explanation and solution..thanks

1 ACCEPTED SOLUTION
Read only

former_member282823
Active Participant
0 Likes
1,049

Hi,

just try like this, I had check it and it is not throwing any error.

{ DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG in byte mode. }

Regards,

Ramesh.

9 REPLIES 9
Read only

Former Member
0 Likes
1,049

Hi

see the below example.

DATA: text TYPE c LENGTH 1,

blen TYPE i,

clen TYPE i,

bytes TYPE i.

DESCRIBE FIELD text LENGTH blen IN BYTE MODE.

i used this code works fine. Try this one.

Rgds,

Kiran

Read only

Former Member
0 Likes
1,049

do like this...

DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG in CHARACTER MODE.

Try F1...

If u r not able to find answer Search SDN before u post...

Edited by: Veeranji Reddy on May 20, 2009 1:35 PM

Read only

Sm1tje
Active Contributor
0 Likes
1,049

Well, the solution would be to add IN CHARACTER MODE.

F1 help on DESCRIBE.

Read only

Former Member
0 Likes
1,049

i've did exactly what you've told..

same error still occurs..

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,049

Hello,

You want to have the length of the field MAKT-MATNR. Then you can use the function STRLEN.

DATA:
MNR_LNG TYPE I.

MNR_LNG = STRLEN(MAKT-MATNR).

Else as suggested you have to use the addition IN CHARACTER MODE with DESCRIBE FIELD.

Depends on your requirement.

Hope this helps !!

BR,

Suhas

Read only

Former Member
0 Likes
1,049

hi suhas,

does the STRLEN function has the same outcome as DESCRIBE FIELD?

if it does, i can use STRLEN as a replacement instead.

thanks

soo hing

Read only

former_member282823
Active Participant
0 Likes
1,050

Hi,

just try like this, I had check it and it is not throwing any error.

{ DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG in byte mode. }

Regards,

Ramesh.

Read only

Former Member
0 Likes
1,049

Try this statement,i think it will works

DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG IN BYTE MODE.

Read only

0 Likes
1,049

Hi,

When you are using descirbe statement u have to user either charcter mode or binary mode in Unicode.