10-04-2008 9:52 PM
Hello,
I have created and populated a custom z table with data. I have also created a custom screen that takes input from the user. Is there a way to edit/update data fields in my table on the basis of what has been input?, Eg. If the table consists of 3 fields, part_number, part_name and description. The user enters a new description for an existing part_number. How to update the description in the table? Example code would be very helpful. Thanks in advance.
Regards
10-05-2008 2:06 AM
Hey,
First of all take the values in an internal table,when the user enter new values you can update the internal table using the MODIFY statement .After that delete the values in the custom table and upload the new values into the z-table.
Regards,
Midhun Abraham
10-05-2008 12:10 AM
Hi,
DATA:
BEGIN OF ITAB OCCURS 0,
F1(12) TYPE C,
END OF ITAB.
ITAB-F1 = 'MARA'.
APPEND ITAB.
ITAB-F1 = 'MAKT'.
APPEND ITAB.
EDITOR-CALL FOR ITAB TITLE 'List the tables'.
LOOP AT ITAB.
WRITE: / ITAB-F1.
ENDLOOP.
Here,
1. User can type more. But in each line, for the length of row in our internal table, data are updated back.
2. Old records can be changed.
3. New rows can be created.
Try this.
Regards,
R.Nagarajan.
-
We can -
10-05-2008 2:06 AM
Hey,
First of all take the values in an internal table,when the user enter new values you can update the internal table using the MODIFY statement .After that delete the values in the custom table and upload the new values into the z-table.
Regards,
Midhun Abraham