cancel
Showing results for 
Search instead for 
Did you mean: 

Table to find current version of a document

shubham_kiyawat
Participant
0 Kudos

Dear Friends,

We are developing a report in which we are displaying the documents attached to BOM components.

I am able to select all the document originals attached to a material component from the table DRAD.

But I want to extract only current version for a particular material component not all versions.

(Like we can see current version of DIR attached to material in MM03).

Thanks

Shubham

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello Shubham,

  You can simply get the documents linked to an object using BAPI_DOCUMENT_GETOBJECTDOCS , and by setting the import parameter CURRENTVERSIONSONLY, you will get only current version.

Regards

Nathalie

Answers (3)

Answers (3)

former_member585060
Active Contributor
0 Kudos

Hi,

Based on the DRAD entries, get corresponding DRAW table entries. You need to pick the DRAW-DOKST field which will store the status of the Document, just check with your functional team asking which Document status(DRAW_DOKST) needs to be considered. Just pick only those documents and delete remaining version document.

Thanks & Regards

Bala Krishna

Former Member
0 Kudos

'BAPI_SRM_DOC_CHECKOUT_VIA_TAB' check with this f.m

Regards,

Giri

Former Member
0 Kudos

Try table DRAW

Brunot
Explorer
0 Kudos

If i got correctly your need, you may use bapi BAPI_DOCUMENT_GETACTVERSION,

it gives the last active version of a document.