2009 Oct 12 6:20 AM
Hello Friends.
AS per my requirement in tcode cs72 ' No duplicate material should be entered in BOM'.
System shoud give error message ,when duplicate material number is entered.
I want to write logic (coding) in user exit pcsd0005.
But i cannot understand what coding should be written.
Can any one tell me the coding.
please.
Hello Friends.
AS per my requirement in tcode cs72 ' No duplicate material should be entered in BOM'.
System shoud give error message ,when duplicate material number is entered.
I want to write logic (coding) in user exit pcsd0005.
But i cannot understand what coding should be written.
Can any one tell me the coding.
please.
2009 Oct 13 10:56 AM
hi,
from your requirement i understood that, no two material(material no.) should be same.
so check whether the material entered are getting populated in the table 'MAT_BOM_ALLOCATION'. if populating, sort them by matnr and then loop the table and check whether user entered 2 same matnr and give ur error message.
ie.,
sort mat_bom_allocation.
loop at mat_bom_allocation.
if sy-tabix = 1.
wa = mat_bom_allocation.
else.
wa1 = mat_bom_allocation.
if wa1 = wa.
message e000(z1) with ' no duplicate materials allowed'.
exit.
else.
wa1 = wa.
endif.
endif.
endloop.where wa and wa1 are work areas of mat_bom_allocation.
hope this helps you.
Regards,
Sakthi Sri.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |