‎2010 Oct 19 10:25 AM
HI All
I need to create validation for this following types
The validation that i need to do is regard the length
of the type and the DEC places of it
I search for documntation in the help and this is what I have found
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_crm/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/content.htm
any idea
The data types are
1. Decimal
2. single
3. double
Edited by: Alex Dean on Oct 20, 2010 11:33 AM
‎2010 Oct 20 11:25 AM
Hi Alex,
It seems you are persistently trying to get the answer to the question which cannot be answered.
Neither single nor double exist in current SAP release (at least they are not defined as such). DEC on the other hand is a type which has some range. So I think you want to get info about data object of specific type not this data type itself. It is because for data type the lenght is not fixed so how would the system know what you are asking for. So the below is only available
data gr_elemdescr type ref to cl_abap_elemedescr.
data g_my_var(10) type p decimals 4. "existing data object to be checked
gr_elemdescr ?= cl_abap_typedescr=>describe_by_data( g_my_var ).
write: 'Length ', gr_elemdescr->length,
'Dec places', gr_elemdescr->decimals.
Regards
Marcin
‎2010 Oct 20 11:25 AM
Hi Alex,
It seems you are persistently trying to get the answer to the question which cannot be answered.
Neither single nor double exist in current SAP release (at least they are not defined as such). DEC on the other hand is a type which has some range. So I think you want to get info about data object of specific type not this data type itself. It is because for data type the lenght is not fixed so how would the system know what you are asking for. So the below is only available
data gr_elemdescr type ref to cl_abap_elemedescr.
data g_my_var(10) type p decimals 4. "existing data object to be checked
gr_elemdescr ?= cl_abap_typedescr=>describe_by_data( g_my_var ).
write: 'Length ', gr_elemdescr->length,
'Dec places', gr_elemdescr->decimals.
Regards
Marcin