on 12-07-2010 8:20 AM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.