Skip to Content
author's profile photo Former Member
Former Member

table control

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.

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2004 at 09: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.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 28, 2004 at 05: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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2004 at 11:26 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2004 at 05: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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 29, 2004 at 05: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

    Add comment
    10|10000 characters needed characters exceeded