02-15-2016 4:39 AM
I am working with alv secondary list when i enter amount and click on save it should save in table as .00 at the end.like for example if i enter amount as 100 it should save as 100.00? How can i acheive it??
02-15-2016 4:50 AM
02-15-2016 6:58 AM
02-15-2016 7:05 AM
Hi Sandeep,
Pass domain and reference table information for NETWR field in fieldcatalog.
Regards,
Praveer.
02-15-2016 7:09 AM
Hi,
populate yhe fieldcatalog table.
wa_fieldcat_alv-fieldname = 'NETWR'.
wa_fieldcat_alv-tabname = 'IT_ITEM'.
wa_fieldcat_alv-outputlen = 20.
wa_fieldcat_alv-seltext_l = 'Net Price in Doc Curr'.
APPEND wa_fieldcat_alv TO it_fieldcat_alv.
CLEAR wa_fieldcat_alv.
thanks!!
02-15-2016 7:22 AM
02-15-2016 7:26 AM
Hi Sandeep,
You have to pass reference table information when you are trying to enter any quantity or amount related field in ALV.
Regards,
Praveer.
02-15-2016 7:48 AM
i have passed it but by keeping data type as netwr i am facing above bugs
02-15-2016 7:54 AM
Hi Sandeep,
Pass the NETWR field catalog information as below and try.
ls_fcat--fieldname = 'NETWR'.
ls_fcat-ref_field = 'NETWR'.
ls_fcat-ref_table = 'VBAP'.
ls_fcat-currency = 'EUR'.
ls_fcat-edit = 'X'.
Regards,
Praveer.
02-15-2016 7:56 AM
No you are not passing them: from the screenshot you are declaring those fields as currency.
Declare as NETWR and fill fields
or fields
02-15-2016 8:03 AM
Hi.
I think something is wrong in your Field-Catalog. Every Amount-field needs a reference-field with a currency-Type. It looks like your 'check Amount'-Filed is defines as a currency field but is holding a value.
It is much easier, if you define a structure in the dictionary and then using the Structure for the ALV, instead of building the field-catalog manually.
Peer.
02-15-2016 8:31 AM
Here i have declared netwr as data element for that i have provided ref field as waerk and ref table as vbak in custom table.in my report i have declared field catalogue as above is it right??
wa_fieldcat-fieldname = 'INVAMT'.
wa_fieldcat-seltext_l = text-006.
wa_fieldcat-col_pos = 6.
wa_fieldcat-ref_fieldname = 'WAERK'.
wa_fieldcat-ref_tabname = 'VBAK'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
02-15-2016 8:36 AM
Declare your currency field name based upon a field in your field catalogue.
02-15-2016 8:39 AM
02-15-2016 8:46 AM
Hi.
The Currency-Field should be a field in your alv-table not in an other table (e.g. VBAK), then it should work.
Regards,
Peer
02-15-2016 10:40 AM
Either every amount column of your internal table is associated to a single currency or it depends on item, in first case put the currency code "value" in CURRENCY field of field catalog, in second case add a currency field to your internal table fill it and pass its "name" to field CFIELDNAME of field catalog.
Regards,
Raymond