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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a 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 a 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 a 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 a 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.