Application Development and Automation 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: 
Read only

Insert issue with Table Control

Former Member
0 Likes
1,188

Hi Folks,

I have developed a table control through the wizard. I'm using the add/remove buttons to manage the records in the table control. The problem is when I click at the ADD button and fill the corresponding information it inserts correctly the new line, but if I click at the add button and then I use the scroll bar of the table control the sy-ucomm has the value to insert again, and a new line is inserted.

Does anyone knows why is this happening?

Thanks in advance for your help.

Regards,

Gilberto Li

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,064

Hi

The sy-ucomm for scroll is blank but PAI will be triggered,since u have clicked ADD before scrolling, that would've remained in sy-ucomm and done the respective action i.e, is saving the record.

You may add another condition in your save module/routine so that this will not happen.

Regards

Prabumanoharan

5 REPLIES 5
Read only

Former Member
0 Likes
1,064

Hi,

This could be because, the field OK-CODE is containing with the previous SY-UCOMM value. So may be you can restrict this one, like check the SY-UCOMM generated while scolling down and resrict if the SY-UCOMM equals to the above.

As the SY-UCOMM avilable for the button ADD is not part of the table control wizard, we need to manually handle this.

Regards,

Santhosh.

Read only

Former Member
0 Likes
1,065

Hi

The sy-ucomm for scroll is blank but PAI will be triggered,since u have clicked ADD before scrolling, that would've remained in sy-ucomm and done the respective action i.e, is saving the record.

You may add another condition in your save module/routine so that this will not happen.

Regards

Prabumanoharan

Read only

0 Likes
1,064

Thanks for your replies.

Sy-ucomm is always getting INSR, how could I differentiate if he's using scroll bar just click add button.

Can you give me an example on how to handle this situation.

Thanks.

Regards,

Gilberto Li

Edited by: Gilberto Li on Jun 16, 2009 5:58 PM

Read only

0 Likes
1,064

Got it working.

I'm using the ok_code instead of the sy-ucomm.

I believe the sy-ucomm doesn't get updated correctly through the screens and subscreens.

Thanks again.

Read only

Former Member
0 Likes
1,064

Hi all -

I also had a problem with my last insert / delete command hanging around when I'm attempting to scroll. In my scenario I had Program A with screen 1000, that called Function Group B with screen 2000, having a tab control with subscreen containing screen 3000 with a table control. Whew!

In this scenario I had to clear sy-ucomm on my table insert / delete actions in PAI for screen 1000, 2000 and 3000. I do use ok_code, but the message with sy-ucomm on the button press is sent to the entire screen hierarchy.

Hope this helps anyone else having the same problem!

Tim Grant