cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Master Duplication

Former Member
0 Kudos

Dear All,

when i am creating a customer master i want to check weather customer name already exist or not. can i assign message control for this.

Thanks,

sajeewa.

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

Check this thread

[Re: Duplicate check on Customer Master Record|;

thanks

G. Lakshmipathi

Former Member
0 Kudos

thanks. can you send me the userexist which i need to use and code for this

Rgds,

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

You can use too the enhancement SAPMF02D. Think that you are searching customers in tables with fields without index, so, you could have troubles in performance. I suggest you begin to filter with other fields (country, region, postal code,...). Check with a basis consultant if it's interesting to set a secondary index in these fields. Of course, this problem will be more important for a high number of records in KNA1 and when the creation or modification of customer will be more frequent.

A posible code in the report ZXF04U01:


DATA: lt_kna1 LIKE kna1 OCCURS 100 WITH HEADER LINE.

SELECT * FROM kna1
  INTO TABLE lt_kna1
    WHERE land1 = i_kna1-land1
    AND      regio = i_kna1-regio
    AND      pstlz = i_kna1-pstlz.

" check with an ABAPer how to design this algorithm, how to use the compare
" of string chain:

LOOP AT lt_kna1.
  IF lt_kna1-stras CA i_kna1-stras.   "debugg to set a criteria to compare, or command,
                                                         "eg: CS, CO,....
    message s398 with ' ' ' ' ' ' ' '.    "set yours message code or texts.
  ENDIF.
ENDLOOP.

I hope this helps you

Regards

Eduardo

Edited by: E_Hinojosa on Dec 7, 2010 9:42 AM

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

I'm confussing with address. I'm sorry. But I'm thinking. If you use the VAT ID you have solve this issue, for instance, if you set this field as mandatory.

Regards,

Eduardo