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

message_type_x

kiran_k8
Active Contributor
0 Likes
558

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

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

3 REPLIES 3
Read only

Former Member
0 Likes
525

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

Read only

0 Likes
525

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.

Read only

Former Member
0 Likes
526

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