Skip to Content

un answered by more than 100 viewers previously!!!

Hi All....

Iam having field in table control to display the output... Can i restrict that field as to give non zero values only?

like....

write:/ itab-field no-zero.

....in reports.....

Thank you,

Naveen.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 02, 2008 at 10:36 AM

    Hi,

    You can do that if the column will be used for output only.

    PBO.

    loop at internal_table with tab_ctr.

    module screen_att_change.

    endloop.

    Module screen_att_change output.

    loop at screen.

    if internal_tab-value is initial.

    if screen-name = 'INTERNAL_TAB-VALUE'.

    screen-active = 0.

    screen-invisible = '1'.

    modify screen.

    endif.

    endif.

    endloop.

    endmodule.

    Thanks and regards,

    S. Chandra Mouli.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2008 at 10:20 AM

    Before populating the table control, delete all entries from internal table (used as basis for your table control) where this field is empty (not initial. or NULL or what ever condition is needed for that matter).

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 02, 2008 at 10:22 AM

    Naveen,

    U want to display the output in Table Control, first u get the data in Internal Table.

    At the time of filling the Internal table U can restrict the fields with Only Non Zeros.

    Try this Way.

    Hope this Help.

    Thanks,

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 02, 2008 at 10:25 AM

    hi

    can you clarify your requirement.

    if you do not want to print leading Zeros than you can do like:

    data: tmp(30) type c.

    tmp = itab-field.

    shift tmp left delete leading '0'.

    write: tmp.

    if you want field containing 0 should not print than u can use if condition like:

    if itab-field <> 0.

    write:/ itab-field.

    endif.

    if other than this give details

    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.