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

How to get data type of variable in program..

Former Member
0 Likes
1,783

Hi ABAP Guru.

I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.

Please give me your advice

Thank you all.

Nattapash C.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
987

Hi,

To know the type of a variable you can take the help of key word DESCRIBE

Please take F1 on the above key word .

Best Regards

Ramchander Rao.K

Hi ABAP Guru.

I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.

Please give me your advice

Thank you all.

Nattapash C.

3 REPLIES 3
Read only

Former Member
0 Likes
987
data : v_value type i,
         v_char(10) type c.

v_value = 10.

move v_value to v_char.
REPLACE ALL OCCURRENCES of '#' from v_char....

Best regards,

Prashant

Read only

Former Member
0 Likes
988

Hi,

To know the type of a variable you can take the help of key word DESCRIBE

Please take F1 on the above key word .

Best Regards

Ramchander Rao.K

Read only

0 Likes
987

Thank you very much Prashant Patil and Ramchander Krishnamraju.

Edited by: Nattapash Changpant on Dec 29, 2008 3:23 AM