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

Removing Duplicates from matchcode..?

vamsilakshman_pendurti
Active Participant
0 Likes
1,385

Hi Experts ,

I used Database view in match code with displaying all key fields.

All are Key fields in that view ,

that DBview is placed in Search help then that search help i used in Matchcode object in my code...

But it displaying duplicates when i press F4...

My question is... here all fields i have taken are key fields in DBView then why do we get duplicate records in F4 help...

Could anybody please tell me the reason and let me know how to remove those duplicate records in VIEW (SE11) Itself...

Could you please give me solution for that ..... i need to use that Database view as MATCHCODE Object...

Thanks & Regards ,

Vamsilakshman.p

7 REPLIES 7
Read only

Former Member
0 Likes
1,107

Hi Vamsilakshman,

Can you tell us more about the view?  Is it a JOIN of more than one table?  If the table(s) or the view itself is standard SAP, tell us the names.

Jim

Read only

0 Likes
1,107

Hi

see the below screen for more details...

VIEW FLD     Table                        Field               Data element 

MANDT          VBRK                        MANDT         MANDT

VBELN           VBRK                        VBELN          VBELN_VF

FKDAT           VBRK                        FKDAT           FKDAT

NAME1          KNA1                         NAME1          NAME1_GP

EXNUM          J_1IEXCHDR            EXNUM         J_1IEXCNUM

KUNRG          VBRK                        KUNRG          KUNRG

Now i replaced those key fields with non key fields then also i am getting same problem..

Duplicates  came when i execute this VIEW alone...

See the above structure and those tables are VBRK , KNA1 and J_1IEXCHDR

These tables i used in my view .....

This is the statement i used in my Program...with Matchcode ...

PARAMETERS   : P_VBELN TYPE VBELN OBLIGATORY MATCHCODE OBJECT ZSD_SH_INV1.

Thanks ,

vamsi.

Read only

0 Likes
1,107

Hi Vamsi,

My guess is that you have more than one entry in J_1IEXCHDR table for a single billing document (VBRK record).  You could verify that by looking at the table with SE16; use the values for the JOIN fields from your view from a single VBRK record to see if more than one J_1IEXCHDR entry.

The only field you're including in the view from that table is EXNUM; so why not remove the table from the view and just take VBRK-EXNUM instead?

Jim

Read only

Former Member
0 Likes
1,107

Hi vamsi

Please check the selection screen field declaration once, i.e. to wich database field you refered the selection screen field.

regards

laxman

Read only

0 Likes
1,107

Hi lakshman ,

in the selection screen i used as below ....

PARAMETERS   : P_VBELN TYPE VBELN OBLIGATORY MATCHCODE OBJECT ZSD_SH_INV1.



Thanks ,


vamsi.

Read only

Former Member
0 Likes
1,107

You can remove duplicates from search help using search help exit

Read only

vamsilakshman_pendurti
Active Participant
0 Likes
1,107

Hi all ,

Thanks to every one for giving reply.....

Problem is solved ....

Thanks ,

vamsi.