‎2009 Oct 21 7:04 AM
Dear all,
I m simply trying to get the length of a variable and written the following code.
DATA : var(20) type c,
len type i.
describe field var length len.
write : /len.
But it giving an error : In Unicode DESCRIBE length can only be used with the IN BYTE MODE or IN CHARACTER MODE addition.
Can any one suggest some solution.
Regards,
Maverick
‎2009 Oct 21 7:08 AM
Hi
Add that extra in the Statement IN CHARACTER MODE or IN BYTE MODE
For more info Please take F1 help
Cheers
Ram
Edited by: Ramchander Krishnamraju on Oct 21, 2009 8:09 AM
‎2009 Oct 21 7:08 AM
Hi
Add that extra in the Statement IN CHARACTER MODE or IN BYTE MODE
For more info Please take F1 help
Cheers
Ram
Edited by: Ramchander Krishnamraju on Oct 21, 2009 8:09 AM
‎2009 Oct 21 7:10 AM
Tried F1 ?
DATA : var(20) type c,
len type i.
describe field var length len IN CHARACTER MODE.
write:/ len.
‎2009 Oct 21 7:12 AM
else try with this as well
assign the char variable to string variable and use
gv_len = strlen ( string_name )
cheers
s.janagar
‎2009 Oct 21 7:13 AM
Hi,
Just try this ,
DATA : var(20) type c,
len type i.
describe field var length len.
write : / len.
Click On Goto - Attribute - Uncheck Unicode checks active check box say Save
Come back in programme & activate it.
Reagrds ,
SACHIN
‎2009 Oct 21 7:14 AM
Hi,
Just try this ,
DATA : var(20) type c,
len type i.
describe field var length len.
write : / len.
Click On Goto - Attribute - Uncheck Unicode checks active check box say Save
Come back in programme & activate it.
Reagrds ,
SACHIN
‎2009 Oct 21 7:14 AM
Hi,
Just try this ,
DATA : var(20) type c,
len type i.
describe field var length len.
write : / len.
Click On Goto - Attribute - Uncheck Unicode checks active check box say Save
Come back in programme & activate it.
Reagrds ,
SACHIN
‎2009 Oct 21 7:14 AM
Hi,
Just try this ,
DATA : var(20) type c,
len type i.
describe field var length len.
write : / len.
Click On Goto - Attribute - Uncheck Unicode checks active check box say Save
Come back in programme & activate it.
Reagrds ,
SACHIN
‎2009 Oct 21 7:18 AM
The error message clearly tells you to add either the IN BYTE MODE or IN CHARACTER MODE addition. What else is the issue you are facing here?
‎2009 Oct 21 7:24 AM
Describe is used to describe length of a field & how many number of lines for an internal table.
in case of field we have to provide in which format we have to read i.e. Character or Binary
in case of Internal Table no need to provide these things it will directly write number of lines to our field type integer.
*For Field
DESCRIBE FIELD dobj LENGTH ilen IN {BYTE|CHARACTER} MODE .
for more information go to F1 help
*For Internal Table
data:ivbap type standard table of <any table>,
da_tfill type i.
describe table ivbap lines da_tfill
‎2009 Oct 21 7:32 AM
HI,
Rewrite your code as
DATA : var(20) type c,
blen type i,
clen type i.
describe field var length blen in byte mode.
describe field var length clen in character mode.
write : blen , clen.here blen will give you the length in byte mode and clen in character mode.
Regards,
Anirban
‎2009 Oct 21 8:26 AM
Hi Maverick,
try this code.
DATA : var(20) type c,
len type i .
field-symbols <g1> type any.
assign var to <g1>.
describe field <g1> length len in CHARACTER MODE.
write : /' length :', len.
from kallam.
‎2010 Jan 19 2:10 AM
Hi Maverick
I am facing the same problem as you had encountered. May you share with me which is the correct syntax to use for DESCRIBE?
Thank you very much.
Regards
Kang Ring