Skip to Content
0
Oct 13, 2014 at 06:50 AM

Adding new record in a database table from table control

76 Views

Hello experts,

Now the issue I have is a very common issue and I have seen several threads pertaining to it. However, I am unable to get the desired result in spite of following the resolutions of such threads. I am unable to figure out where I am wrong so it would be of immense help if someone can help me out with it.

The main requirement is to edit and add new records in a custom database table via a table control with wizard in module pool. Below are the relevant screenshots.

I have created the ztable as shown:

Then I created a module pool . Below are the variables I declared at the TOP include.

For editing existing records, the flow logic is below:

The code in MODULE TC1_USER_COMMAND is:

The above code is working fine.

Now for adding new records, my code is incorrect somewhere. Below are the screenshots of the flow logic and code:

Below is the code:

On executing my program, when I click on "NEW" :

When I add new records in the table control and press "SAVE", there is no data which is saved in the table and hence no new records are getting updated in my ztable. 😕

On debugging it, IT_MASTER2 doesnt have any records. As a result, ITMASTER isnt getting populated and the records are not getting modified in the ztable. How do I rectify this?

Regards.

Manish.

Attachments

Capture.PNG (24.1 kB)
Capture.PNG (28.6 kB)
Capture.PNG (15.0 kB)
Capture.PNG (15.0 kB)
Capture.PNG (14.5 kB)
Capture.PNG (18.0 kB)
Capture.PNG (3.5 kB)
Capture.PNG (22.7 kB)
Capture.PNG (29.3 kB)
Capture.PNG (22.7 kB)