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

regarding duplicate entries in table control

Former Member
0 Likes
1,136

hi,

i have created one table control in module pool. while entering values into the table control how can we validate the table control if we enter duplicate values.ie in the first line i entered 200 500 400

again inthe second line i

entered 200 500 400.

validation should tabke place and error msg should be populated. pls help...

i have used the below code.

LOOP AT IT_TC2.

CHAIN.

FIELD:ZTC_ATMP-BUKRS,

ZTC_ATMP-LEGACCNO,

ZTC_ATMP-ZZDESKCODE,

ZTC_ATMP-SAKNR.

MODULE READ_TABLE_CONTROL.

MODULE check_duplicates ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

but here module check_duplicates is not triggering why? any idea..

1 ACCEPTED SOLUTION
Read only

valter_oliveira
Active Contributor
0 Likes
749

Hi there.

Two questions:

1 - is that code in PAI of table control screen?

2 - go to screen layout (graphical) and check in the lines of table control if the fields are really named ZTC_ATMP-BUKRS, etc ...

Best regards.

Valter Oliveira.

Hi there.

Two questions:

1 - is that code in PAI of table control screen?

2 - go to screen layout (graphical) and check in the lines of table control if the fields are really named ZTC_ATMP-BUKRS, etc ...

Best regards.

Valter Oliveira.

3 REPLIES 3
Read only

valter_oliveira
Active Contributor
0 Likes
750

Hi there.

Two questions:

1 - is that code in PAI of table control screen?

2 - go to screen layout (graphical) and check in the lines of table control if the fields are really named ZTC_ATMP-BUKRS, etc ...

Best regards.

Valter Oliveira.

Read only

Former Member
0 Likes
749

Hi,

you can try like this...

************************************

LOOP AT IT_TC2.

CHAIN.

FIELD ZTC_ATMP-BUKRS module CHK1.

FIELD ZTC_ATMP-LEGACCNO module CHK1.

FIELD ZTC_ATMP-ZZDESKCODE module CHK1.

FIELD ZTC_ATMP-SAKNR module CHK1.

MODULE READ_TABLE_CONTROL.

ENDCHAIN.

ENDLOOP.

Now write the validations for the corresopnding Fields in there Respective Modules.... for example Validation for ZTC_ATMP-BUKRS filed in module CHK1 and so on..

************************************

Reward if helpful.

Regards,

Syed

Read only

Former Member
0 Likes
749

Thank You