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

Editable ALV Quantity/Decimal field

Former Member
0 Likes
5,631

Hi,

I have one column in ALV output which is editable .I have defined that in this way:

data :input type resb-bdmng.

fieldcatalog-fieldname = 'INPUT'.

fieldcatalog-seltext_m = ' Scrap'.

fieldcatalog-col_pos = fieldcatalog-col_pos + 1.

fieldcatalog-input = 'X'.

fieldcatalog-edit ='X'.

APPEND fieldcatalog TO fieldcatalog.

CLEAR fieldcatalog.

But if we edit the field in the output it gives error : " Too many decimal places ( maximum 0)"

If we add fieldcatalog-datatype = 'DECIMAL'. then it works fine but in that case it throws dump for toolbar button " Export to the local file " Its functinality is copied from standard interface SAPLKKBL program The dump is The current statement requires chaarater data type object .It cant take decimal fieldcatalogtype . If we remove fieldcatalog-datatype = 'DECIMAL'. then this button works fine but in this case the first error comes "Too many decimal places ( maximum 0)"

Please suggest how can I remove first error without setting fieldcatalog-datatype = 'DECIMAL'. property.

Will definetly ..... if its helpful

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,258

Try passing reference table and field in your fieldcat.

fieldcatalog-ref_fieldname = 'BDMNG'.

fieldcatalog-ref_tabname = 'RESB'.

Regards

Sathar

Hi,

I have one column in ALV output which is editable .I have defined that in this way:

data :input type resb-bdmng.

fieldcatalog-fieldname = 'INPUT'.

fieldcatalog-seltext_m = ' Scrap'.

fieldcatalog-col_pos = fieldcatalog-col_pos + 1.

fieldcatalog-input = 'X'.

fieldcatalog-edit ='X'.

APPEND fieldcatalog TO fieldcatalog.

CLEAR fieldcatalog.

But if we edit the field in the output it gives error : " Too many decimal places ( maximum 0)"

If we add fieldcatalog-datatype = 'DECIMAL'. then it works fine but in that case it throws dump for toolbar button " Export to the local file " Its functinality is copied from standard interface SAPLKKBL program The dump is The current statement requires chaarater data type object .It cant take decimal fieldcatalogtype . If we remove fieldcatalog-datatype = 'DECIMAL'. then this button works fine but in this case the first error comes "Too many decimal places ( maximum 0)"

Please suggest how can I remove first error without setting fieldcatalog-datatype = 'DECIMAL'. property.

Will definetly ..... if its helpful

5 REPLIES 5
Read only

Former Member
0 Likes
2,259

Try passing reference table and field in your fieldcat.

fieldcatalog-ref_fieldname = 'BDMNG'.

fieldcatalog-ref_tabname = 'RESB'.

Regards

Sathar

Read only

0 Likes
2,258

It works . But in this case the column name is coming as the refernce field name which I dont want .

I want it fieldcatalog-seltext_m = ' Scrap'.

Please suggest

Read only

kamesh_g
Contributor
0 Likes
2,258

hi

It might be bcoz of length probelm of output field scrap .

us fieldcatalog-outputlen = '30' like that

Read only

Former Member
0 Likes
2,258

hi,

This is a common problrm when yu want to display the values in decimals...if the datatype is any other than character, if u try to export to file,it will throw dump.change the datatype into character in ur internal table itself ,,then calculte the values in decimals and insert to this fieldand display.Now it will allow edit and wont throw dump

Edited by: soniya baboo on Jan 23, 2009 8:07 AM

Read only

0 Likes
2,258

Hi

Thanks for your reply. I have found the solution that is

fieldcatalog-datatype = 'PREC'.

Its solves my all the problems.

Thanks