Skip to Content
author's profile photo Former Member
Former Member

Forbidding equipment Description Duplication

team,

how can i avoid duplication of equipment description at the time equipment creation. is there some user exist i can use to warn me if equipment description are identical at the time of creation?

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Posted on Sep 07, 2016 at 02:27 AM

    Mutale

    • Possible that, first myself and then everyone cautioning you about system performance while Saving an equipment (IE01), might be creating some hesitation in you about whether to go for it or not. In this regard please go through the following points.
    • Though the requirement is uncommon, but must be having some meaningful purpose depending upon the way you are using the Description field.
    • In fact I too have similar case for one category of Maint Order. I had my own techniques here to reduce the number of records to compare for detecting a Duplicate text. In my case the last two characters of the text represent the year and duplicacate needs to be detected withing the year. I extract that part and further reduce the records for scanning. I am telling this to induce some ideas in you. If it is not relevant to your situation forget about it.
    • Then let's come back to present discussion. you need not be afraid of things by the the cautions you received. Just have an idea about the testing environments. I'll explain further.
    • It often happens that, your Equipment saving (after the code is in place) did not get effected in DEV and QAS servers, but has an impact in PRD.
    • To judge this condition you should compare the records your Select statement of the code above is fetching between servers.
    • How you do it. It is through SE11/SE16. Here you give the inputs as per Select Statement in DEV find out how many records you are getting same exercise in QAS and PRD, which gives you an idea about how much impact there will be.
    • Suppose it is about handling 10,000 records in DEV server, it might take around 5-10sec (approx) to save an Equipment. And if the same Select fetches 100,000 records in PRD it might take very longer.
    • If your QAS is almost a mirror to PRD then the performance will be known to you in QAS itself.
    • Also Debugging the code given by a session break-point and seeing what is happening while the code advances, is also recommended.
    • Another important thing is, you should have an idea about the growth of Equipment master database in coming years, and its impact on the code we are using (increase in number of records by the Select statement).
    • So, with these inputs and with the help of your ABAPer, you can work upon it and judge about things.
    • Even in the worst case (after transporting the work to PRD), it takes very few minutes to disable the code and take the Transport request to PRD.
    • May revert in case of any further clarifications.

    Good luck

    KJogeswaraRao

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 06, 2016 at 08:18 AM

    Hi Mutale,

    I guess you can use IEQM0003

    Refer below link for reference

    PM-CS User Exits - ERP Operations - SCN Wiki

    Regards

    Terence

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 06, 2016 at 10:11 AM

    Mutale

    Your requirement needs to scan 1000s of Equipments before an equipment is created with this check. If you do not want to repeat the description across all categories then it will take considerable time while Equipment saving. So you need to filter the numbers as far as possible.

    Let's assume that your requirement is within an Equipment category. The include where you need to put the code is ZXEQMU02 of exit IEQM0003.


    Then the code: (I have confined the code for Equipment Create situation only)

    IF sy-tcode = 'IE01'.

    TYPES: BEGIN OF ty_eqkt,

    equnr TYPE equnr,

    eqktx TYPE ktx01,

    END OF ty_eqkt.

    DATA: itab TYPE TABLE OF ty_eqkt,

    wa TYPE ty_eqkt.

    SELECT a~equnr b~eqktx FROM equi AS a INNER JOIN eqkt AS b ON a~equnr = b~equnr INTO TABLE itab WHERE a~eqtyp = data_equi-eqtyp.

    LOOP AT itab INTO wa.

    IF wa-eqktx = data_eqkt-eqktx.

    MESSAGE: ' Please change the Equipment description. Another Equipment with the same description is existing.' TYPE 'E'.

    ENDIF.

    ENDLOOP.

    ENDIF.

    The code is syntactically correct but not tested functionally. It should work. You can test the same with the your technical assistance and adopt.

    Good luck

    KJogeswaraRao

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2016 at 11:13 AM

    Hi,

    Use the user exit IEQM0003 Include ZXEQMU02.

    If your using only EN as language , use Binary search against the table EQUI and field EQKTU (Equipment description). So performance also will not get affected.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2016 at 09:11 PM

    Hello,

    Just an addition to what was already mentioned above from our experts. You need to very careful in having a select query comparing the ‘current equipment’ with ‘equipment numbers’ already stored in the database tables through the exit IEQM0003.

    Thorough testing is needed to see the performance behavior on how the system responding while creating the equipment. (You can take help from Basis/Security person to switch on Trace and find out the waiting time).

    Please also ensure to retrieve valid equipments while comparing using the proper statuses/ validity dates/ Inactive /Deletion objects.

    Thanks

    Sri.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.