06-26-2008 10:04 AM
hi all,
I am hanged up in one issue. There an internal table is filled.
theres one field ,and i want to extract the data type of the field content.
Ex. i_tab is internal table having field var1.
let the content of var1 have data type same as that of matnr (material no.)
so here i want to extract this data type.
thanx in advance for efficient help
06-26-2008 10:06 AM
Hi;
try DESCRIBE FIELD statement....
If the hint is usefulu2026 Say thanks by rewardu2026.
Regards,
Prabhu Rajesh
06-26-2008 10:06 AM
Hi;
try DESCRIBE FIELD statement....
If the hint is usefulu2026 Say thanks by rewardu2026.
Regards,
Prabhu Rajesh
06-26-2008 10:12 AM
thanks prabhu....
will the describe field work for the custom data type.....
06-26-2008 10:11 AM
hi,
Use the statemnt
DESCRIBE FIELD
Use the edition TYPE typ [COMPONENTS com]
More help use F1
example fropm F1 help
DATA: BEGIN OF struc1,
comp1 TYPE c LENGTH 1,
comp2 TYPE string,
BEGIN OF struc2,
comp1 TYPE c LENGTH 1,
comp2 TYPE i,
END OF struc2,
END OF struc1,
typ1 TYPE c LENGTH 1,
comp1 TYPE i,
typ2 TYPE c LENGTH 1,
comp2 TYPE i.
DESCRIBE FIELD: struc1 TYPE typ1 COMPONENTS comp1,
struc1-struc2 TYPE typ2 COMPONENTS comp2.
regards
prasanth
06-26-2008 10:11 AM
hiiii
to get field you can use
DATA: FIELD0(8) TYPE N,
FIELD1.
DESCRIBE FIELD FIELD0 TYPE FIELD1.
Result: FIELD0 contains the value 'N'.
you can also use following FM
DDIF_FIELDINFO_GET.
regards
twinkal
06-26-2008 10:20 AM
hi...
i tried with fm DDIF_FIELDINFO_GET ,
but its saying it does not exists..
please verify it and tell me
06-26-2008 10:13 AM