Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Edit data in internal table programatically

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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 -


Former Member
0 Kudos

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