0% found this document useful (0 votes)
169 views

Modify Table Control

This document provides instructions for selecting and modifying records in a master table using table control values. It describes setting a mark variable as the selection column, looping through the internal table with control of the table control, and updating the mark field for the selected line. It also provides a code example to delete records marked with an 'X' when a delete button is pressed.

Uploaded by

Jatin Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views

Modify Table Control

This document provides instructions for selecting and modifying records in a master table using table control values. It describes setting a mark variable as the selection column, looping through the internal table with control of the table control, and updating the mark field for the selected line. It also provides a code example to delete records marked with an 'X' when a delete button is pressed.

Uploaded by

Jatin Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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