04-10-2007 9:57 AM
Hi Experts,
I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
Thanks a lot.
04-10-2007 10:03 AM
04-10-2007 10:03 AM
are you looking for this
REPORT YCHATEST.
DATA : V_MATNR LIKE MARA-MATNR,
V_TYPE(5).
DESCRIBE FIELD V_MATNR TYPE V_TYPE.
WRITE : V_TYPE.
04-10-2007 10:03 AM
04-10-2007 10:08 AM
Thanks for your reply, however my code needs to support the dynamically specified table name and field name. Therefore I'm not sure if your code works.
04-10-2007 2:35 PM
hi
use the following code
<b>data:datatype LIKE dd03l-datatype.
SELECT fieldname position keyflag datatype
INTO TABLE ifield
FROM dd03l
WHERE tabname = tabname
AND fieldname NOT LIKE '.INCLU%'
ORDER BY position</b>.
regards
ravish
<b>plz reward points if helpful</b>
04-10-2007 5:27 PM