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: 

Saving the screen entries in the DATABASE Table

Former Member
0 Kudos

Hi All,

I have two fields in ztable(Database) namely by name and contact number.

And in the same way i have referred this dictionay fields and place a two set of fields in my screen like

 name  number 
            name  number 

when ever ever the user makes an entry in first row it should get stored in the first row and so on accordingly ( Eveytime table wil get updated and it going to have only two entries)

Any idea of how to make it.

Thanks,

jOE

1 ACCEPTED SOLUTION

amit_khare
Active Contributor
0 Kudos

SAP needs an event to trigger to perform certain tasks.

Fro your description my assumption is you have maintained 4 different parameters on the screen. So eiter place a Button or use F8 funtionality.

Check for SY-UCOMM and use UPDATE statement to update the corresponding row of the table. You need to check the value of the field and the corresponding row before updating the table. If same, don't do anything else update.

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

SAP needs an event to trigger to perform certain tasks.

Fro your description my assumption is you have maintained 4 different parameters on the screen. So eiter place a Button or use F8 funtionality.

Check for SY-UCOMM and use UPDATE statement to update the corresponding row of the table. You need to check the value of the field and the corresponding row before updating the table. If same, don't do anything else update.

0 Kudos

Hi

u R right and there is a four different parameters and when ever the user executed the sy-ucomm = SICH it needs to get saved.

But my doubt is how to map the first row from screen to get updated in the first row of the table and second one to the second row of the table.

Tnx,

JOE

0 Kudos

Create a Table of type you Table.

Now select all data from the table.

Do READ with INDEX 1 and check for 1st 2 entries, if different, call UPDATE by passing the 2 values to a Work-Area of that Table Type.

Repeat the Above steps with INDEX 2 for second row.