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: 

Size of the data element

Former Member
0 Kudos

How can I know the size of the data element of a variable in time of execution??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Alvaro,

Use DESCRIBE FIELD f.

Check this link for the usage of the above statement and its options with sample code:

http://members.tripod.com/~sap_abap/descri04.htm

Hope this helps you.

Regards,

Chandra Sekhar

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can use DESCRIBE FIELD abap Statement in the program.

[DESCRIBE FIELD SYNTAX|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3145358411d1829f0000e829fbfe/content.htm]

[Sample program for DESCRIBE FIELD|http://help.sap.com/saphelp_nw70/helpdata/en/9f/db979d35c111d1829f0000e829fbfe/content.htm]

Hope this would help you.

Regards

Narin Nandivada.

Former Member
0 Kudos

Hi Alvaro,

Use DESCRIBE FIELD f.

Check this link for the usage of the above statement and its options with sample code:

http://members.tripod.com/~sap_abap/descri04.htm

Hope this helps you.

Regards,

Chandra Sekhar

Former Member
0 Kudos

Use this.

DATA: dataType TYPE REF to cl_abap_datadescr,
                   field         TYPE C.

dataType ?= cl_abap_typedescr=>describe_by_data( field ).

Amandeep