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

initial blank lines in tablecontrol

Hi;

I've create a TC manually and works "fine", i need the TC just to add data, it doesn't load data initially, but, it displays 7 blank lines at start, what i need is the TC not to display blank lines because the internal table is empty:

My code.

CONTROLS tc_fdpagos TYPE TABLEVIEW USING SCREEN 100.

ATA: BEGIN OF itab OCCURS 0,
fdpago TYPE c LENGTH 20,
mlocal TYPE kzwi1,
mdolar TYPE kzwi1,
END OF itab.

DATA witab LIKE itab.

MODULE status_0100 OUTPUT.
SET PF-STATUS 'S006'.
SET TITLEBAR 'PRUEBA'.

DESCRIBE TABLE itab LINES fill.
tc_fdpagos-lines = fill.
ENDMODULE.

MODULE fill_table_control OUTPUT.
READ TABLE itab INTO witab INDEX tc_fdpagos-current_line.
ENDMODULE.

MODULE read_table_control INPUT.
lines = sy-loopc.
MODIFY itab FROM witab INDEX tc_fdpagos-current_line.
ENDMODULE.

**************************************************

PROCESS BEFORE OUTPUT.
MODULE status_0100.

LOOP WITH CONTROL tc_fdpagos.
MODULE fill_table_control.
ENDLOOP.

**********************************************

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

LOOP WITH CONTROL tc_fdpagos.
MODULE read_table_control.
ENDLOOP.


MODULE user_command_0100.

Thanks on advance.

David Fúnez

Tegucigalpa, Honduras

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2012 at 02:52 PM

    How will you add data if there are no lines open in the table control?

    Rob

    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.