06-24-2004 7:27 PM
i'm using table control. my element is numeric. my problem is i don't want to diplay the 0.00 on the screen on display mode. it does suppress it on change mode. could someone please help. thanks in advance.
06-28-2004 10:08 AM
Hi,
If I have understood your problem correctly, you can hide a table element by looping through the table control and setting cols-invisible to 'X'. Try
data: wa_cols type cxtab-column.
controls: tc_a type tableview using screen xxx.
tc_a is the table control
loop at tc_a-cols into wa_cols.
check wa_cols-screen-name = tc_a-element_to_be_hidden.
wa_cols-invisible = 'X'.
modify tc_a-cols from wa_cols
endloop.
06-28-2004 6:40 PM
Hi!
Kevin, I think you misunderstood the problem. The problem is not to hide a field.
In an SAP screen's display mode if the field type is numeric (numc, dec or int) and if it has the initial value, a "0" or "0,0..." is displayed in the field.
It really disturbs and I do not know a solution for this. May there be some reason which we cannot think of about this?
*--Serdar
06-28-2004 10:01 PM
I agree with Kevin, Standard functionality will always place the "0" into the field in display mode. I believe its part of the gui, and that there is no way to change this behavior. You can get around that by "hiding" the field if the contents are = 0 as Kevin has suggested.
Good thinking Kevin.
Regards,
Rich Heilman
06-29-2004 12:26 AM
If you don't want to have the field displayed 0.00 or 0 on screen, have a screen field with CHAR or NUMC and pass the field values to this field...
Thanks
Surgi
06-29-2004 6:27 AM
Hello,
if You use a numeric data-type of course zero is valid!
A solution is, to use a character data-type-field and
write the bumeric value into it using NO-ZERO.
write: gn_value to gt_tabcntrl-svalue no-zero.
In this case, i strongly suggest to supress all the
calculate icons using the exlude-tab!
BR
Michael
06-29-2004 8:41 AM
06-29-2004 6:29 PM
Hi folks!
I just mean that there is no solution for not displaying that dummy "0"s in numeric fields. And I claimed that hiding the field is not a proper solution for most cases.
But if the field type is changed to "char", naturally problem vanishes. However, at that time, you have a character-type field for which you have to check for user's alphanumeric inputs.
*--Serdar