Application Development 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: 

table control

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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.

ssimsekler
Active Contributor
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Yes - Please use CHAR data type... It should work...

ssimsekler
Active Contributor
0 Kudos

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