‎2009 Feb 23 6:52 AM
hi to all experts,
in the output of an alv there is a field menge for that what will be the reference field if i give the reference field as menge and reference table mseg . Im getting the error that description not matched ....please help
‎2009 Feb 23 6:55 AM
Hi,
Give field name in capital letters,
Check this
Eg.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD3'.
fieldcat_ln-tabname = 'ITAB1'.
fieldcat_ln-ref_fieldname = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
fieldcat_ln-ref_tabname = 'MSEG'. "<- REF TABLE IN THE DICTIONNARY
fieldcat_ln-no_out = ' '.
fieldcat_ln-do_sum = 'X'. "SUM UPON DISPLAY
append fieldcat_ln to gt_fieldcat.
‎2009 Feb 23 7:00 AM
hi selva,
one more query can i change the menge field from packed decimal to char it is editable in alv output . for example i got the menge as 0.0002 when i changed it to 5 it should reflect as 5 not 0.0005 after calling the method checked_changed_data . is this possible
‎2009 Feb 23 7:10 AM
Hi,
U can change the data type from packed decimal to char, but u can't do total and sub-total on char field.
If u don't have any requirement on total and sub total for menge field then u can change.
‎2009 Feb 23 7:03 AM
hi
please copy paste the code where u r getting error .
field catalog rules : in quotations use capital letters for fileds .
for system fileds like sy-uname ,sy-repid dont use quotations .
if u can post ut code snippet easily can solve probelm .
‎2009 Feb 23 7:18 AM
Mozam ,
u need to specify likewise in the filedcatalog..
fs_fcat-fieldname = 'MENGE'.
fs_fcat-qfieldname = 'MSEHI'.
modify t_fcat frm fs_fcat transporting qfieldname where fieldname = 'MENGE'.
QFIELDNAME
type- LVC_QFNAME
length- Char(30)
value range - SPACE, name of a field in the output table
Defining a reference to quantity units. The ALV links the field specified in FIELDNAME to the field for quantity units specified in QFIELDNAME . The field specified in QFIELDNAME must have a separate entry in the field catalog.
Hope this helps..
Regards,
Mdi.Deeba