Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Table control

Procedure for Table control line selection and modifying master table using those values.

1). U should take one variable in your internal table or in structure which is used for table
control fields

ex :
data :begin of itab occurs 0 ,
mark type c ,
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .

Controls: TABC types TABLEVIEW using screen 100.


2). This mark variable should be given in Table control properties.
follow the path
double click on the table control---->attributes .--->select w/SelColumn and in that
itab-mark.
3). After that. Take this example.

PROCESS BEFORE OUTPUT.


********************
MODULE STATUS_0100.

LOOP AT ITAB WITH CONTROL tabc

ENDLOOP.

PROCESS AFTER INPUT.


MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.

This will update the


ITAB table MARK
field with ‘X ‘
==============================
whatever we have
In this Module read_table_control, m
selected on table
control.
You should write the following code

MODULE read_table_control INPUT.


MODIFY itab INDEX tabc-current_line.
ENDMODULE.

4) If you want to Delete some of the records from Table control

follow this code …Create one pushbutton and give Fucnction code to that and write
below code

WHEN 'DELETE'.
LOOP AT itab WHERE mark = 'X'.
DELETE itab.
ENDLOOP.
ENDIF.

You might also like