Thank Derek and Nathan for your answers!
I haven't used SAP GUI scripting, but I will look in to it.
Nathan, the method you describe sounds very intresting. I extract an excelfile from our PDM system containing relevant document connected to each material. Only problem here is that I get the latest verson of all documents. Sometimes the latest document is "in work" and not released yet. I guess that I would have to find a way of looping the script to a released lower version in cases when the extracted version of the document isn't released yet? Or make a lookup somehow to fetch the latest version from SAP. But we only have a Transaction license.
Thanks you again, now I have gotten closer to a solution!
Kind regards,
Sofia
------------------------------
Sofia Engman | SAP & PLM Specialist
Atlas Copco Industrial Technique AB
------------------------------
Original Message:
Sent: 03-07-2019 09:47
From: Nathan Zahn
Subject: Delete document/drawing in material master
There is no way to select the correct document with the SAP functionality. If the other recommendation does not work, I usually delete all the documents on the material master and then add back the ones I want to keep.
To do this use SE16 or other table view t-codes to view DRAD table for document links. Use multi select to paste in your list of material masters. DOKOB = MARA for MM to document links. Export your list to a spreadsheet and remove the rows you want to delete. What you have left are the ones you want to reconnect after deleting all the links.
Deleting can be done with Winshuttle. Simply pick one row at a time or an entire page worth to delete until all are gone.
When adding them back I insert a blank row and enter the new document so as to not overwrite an existing one. I haven't tried to other method recommended, but it sounds much easier than this method.
------------------------------
Nathan Zahn |
Spirit Aerosystems |
Original Message:
Sent: 03-06-2019 09:23
From: Derek Sayres
Subject: Delete document/drawing in material master
Hello Sofia,
One method is to use GUI scripting and the IF on Index functionality. This will allow you to input variables that are normally not selectable on screen. You can select the Type, Document Number, Dpt and version or any combination of those fields to be able to remove the correct document. Another option might be BAPI direct script.
Derek
------------------------------
Derek Sayres | SAP PLM Business Analyst
Original Message:
Sent: 03-05-2019 04:03
From: Sofia Engman
Subject: Delete document/drawing in material master
Hi, Could anyone advice on how to delete a document record from the material master in mm02 with Winshutle script?
I trying to find out how to "fetch" the right document to delete? When pressing the "Find document"-button I am just adding one more document of the same, f.ex. PZ5152 z02 47 instead of selecting the existing document from the table.


------------------------------
Sofia Engman | SAP & PLM Specialist
Atlas Copco Industrial Technique AB
------------------------------