I am quite in new SAP database queries and I need somebody to explain, how to achieve the following result:
Problem:
- I must find all documents of type PRT with attachment PDF (created via CV01N)
- Those attachments have descriptions, of which some could have a description like "ISSUE123" or could be simply empty. The description field is from table MCDOK, the field is MCDOK-FILE_DESCRIPTION (standard view CV03N > Originals > Details of attachment).
- I want to retrieve all attachments with description "ISSUE123" or empty
Currently I do not know how to retrieve data from the table MCDOK. In SQVI no JOIN operations are possible. In SE16N it is not possible to open MCDOK directly.
I am learning SAP Query by doing. It would be very helpful if somebody could help me to build a quick solution or direct me into the right direction.
The database table with all the documents appears to be the table
DRAW
.Even though I never used that transaction before, I was able to find that out by:
The description texts for documents, though, appear to be in the table
DRAT
. I found that by opening a random document and doing the same process with the description field. Note that a document can have different descriptions depending on the language. So for each entry in tableDRAW
there can be any number of entries in tableDRAT
.