‎2008 Feb 15 9:22 AM
Hi,
I was just going through the threads related to Message_type_x and found one as below
declare the field qty in the the itab as follows
data: begin of itab occurs 0,
qty type p decimals 2,
end of itab.
and then in the fieldcatalog make sure that the datatype is set correctly.
ls_fcat-datatype = 'QUAN'.
I didn't get what he mean to say by
ls_fcat-datatype = 'QUAN'..
Can anyone here please let me know about the same.
Thanks,
K.Kiran
‎2008 Feb 15 9:45 AM
Hi,
Similar to how DATS is a datatype for date fields, similarly QUAN is a data type for quantity (packed with decimal) fields.
All possible data types are stored under the possible values in domain DATATYPE with a short description to help you understand.
Go to se11 , in Domain enter DATATYPE and check Value Range.
QUAN Quantity field, points to a unit field with format UNIT
Cheers,
Aditya
‎2008 Feb 15 9:42 AM
hi,
QUAN is a datatype used for quantity, in the statement they are checking whether the datatype of that field is quan.
if it is quan it executes the statements after it.
if ls_fcat-fieldname EQ 'QUAN'.
wa_fcat-scrtext_s = 'QUANTITY'.
wa_fcat-scrtext_m = 'QUANTITY'.
wa_fcat-scrtext_l = 'QUANTITY'.
wa_fcat-reptext = 'QUANTITY'.
wa_fcat-seltext = 'QUANTITY'.
wa_fcat-DECIMALS_O = '3'.
in the above statements we assign 3 decimal points i.e. if u give 20,000 u get 20
hope it is useful.
regards,
sreelakshmi
‎2008 Feb 15 9:48 AM
Sree,
Thanks alot.when the fieldcatalog is declared as below
DEFINE m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
itfieldcat-do_sum = &4.
itfieldcat-outputlen = &5.
append itfieldcat to itfieldcat.
clear itfieldcat.
END-OF-DEFINITION.
m_fieldcat 'LFBNR' '' 'GR NO' '' 10.
m_fieldcat 'BELNR' '' 'MIRO NO' '' 10.
m_fieldcat 'QUANTITY' '' 'QTY' '' 13.
...
...
then how to check the datatype in the fieldcatalog.
K.Kiran.
‎2008 Feb 15 9:45 AM
Hi,
Similar to how DATS is a datatype for date fields, similarly QUAN is a data type for quantity (packed with decimal) fields.
All possible data types are stored under the possible values in domain DATATYPE with a short description to help you understand.
Go to se11 , in Domain enter DATATYPE and check Value Range.
QUAN Quantity field, points to a unit field with format UNIT
Cheers,
Aditya