2006 Oct 30 8:46 PM
Hi,
I am using ALV grid control to display a table. The table contains one quanity field with 3 decimals. The ALV is editable.
Now, when the user enters a value in the quantity field..for example 12, then ALV assumes it as 0.012. How can avoid this problem.
Regards,
Vara
Hi,
I am using ALV grid control to display a table. The table contains one quanity field with 3 decimals. The ALV is editable.
Now, when the user enters a value in the quantity field..for example 12, then ALV assumes it as 0.012. How can avoid this problem.
Regards,
Vara
2006 Oct 31 4:25 AM
Hello Vara
This behavious is not normal. I made the following test:
(1) Copy BCALV_EDIT_03 to Z_BCALV_EDIT_03
(2) Modify form BUILD_FIELDCATALOG:
*
*& Form BUILD_FIELDCAT
*&----
*
text
*----
*
<--P_GT_FIELDCAT text
*----
*
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
loop at pt_fieldcat into ls_fcat.
if ls_fcat-fieldname eq 'PLANETYPE'
or ls_fcat-fieldname eq 'SEATSOCC'
*$Commment: Make field PRICE editable, too.
or ls_fcat-fieldname eq 'PRICE'.
*§1.Set status of columns PLANETYPE and SEATSOCC to editable.
ls_fcat-edit = 'X'.
Field 'checktable' is set to avoid shortdumps that are caused
by inconsistend data in check tables. You may comment this out
when the test data of the flight model is consistent in your system.
ls_fcat-checktable = '!'. "do not check foreign keys
modify pt_fieldcat from ls_fcat.
endif.
endloop.
endform.[/code]
When I now run the report and enter value 12 in column "Airfare" and push ENTER (or REFRESH) the value is displayed as 12.00.
Regards
Uwe
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |