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

regarding types

Former Member
0 Likes
638

HI after upgrade iam using an include in my program

where iam getting and syntax error stating

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

IN CHARACTER MODE addition.

FOR THE BELOW CODE IN THE INCLUDE.

DATA: L_LENGTH TYPE I.

DESCRIBE FIELD L_MSGTX LENGTH L_LENGTH.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
612

4.7 and above Ver:

describe field pdf_data length v_length in byte mode.

Byte Mode is an addition in Unicode system (4.7).Byte mode will generally give the length in bytes

1 Character holds one byte and an integer is of 4 bytes.

There is anther addition also character mode which is used for flat and character types.

4.6b Ver:

describe field pdf_data length v_length.

It is for non unicode system.this will not work in unicode systems.(i.e4.7).

It will give you also lenght in bytes.

Only difference is Unicode and Non-Unicode system..

Hope this will resolve your query.

Regards,

Gurpreet

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
612

Look at the abap documentation, and tell us what you don't understand. Also read [abap & unicode chapter in sap library|http://help.sap.com/saphelp_nw2004s/helpdata/en/62/3f2cadb35311d5993800508b6b8b11/frameset.htm]

Read only

Former Member
0 Likes
613

4.7 and above Ver:

describe field pdf_data length v_length in byte mode.

Byte Mode is an addition in Unicode system (4.7).Byte mode will generally give the length in bytes

1 Character holds one byte and an integer is of 4 bytes.

There is anther addition also character mode which is used for flat and character types.

4.6b Ver:

describe field pdf_data length v_length.

It is for non unicode system.this will not work in unicode systems.(i.e4.7).

It will give you also lenght in bytes.

Only difference is Unicode and Non-Unicode system..

Hope this will resolve your query.

Regards,

Gurpreet

Read only

former_member156446
Active Contributor
0 Likes
612

Hi

the addition IN BYTE MODE determines the length of the data object <dobj> in bytes

the addition IN CHARACTER MODE determines the length of the data object <dobj> in characters

Note: When using IN CHARACTER MODE, the data type of dobj must be flat and character-type. You can only specify IN BYTE MODE for deep data types

DATA: text  TYPE c LENGTH 1,
      blen  TYPE i,
      clen  TYPE i,
      bytes TYPE i.

DESCRIBE FIELD text: LENGTH blen IN BYTE MODE,
                     LENGTH clen IN CHARACTER MODE.

bytes = blen / clen.