Skip to Content
0
Sep 27, 2010 at 04:04 PM

SRM 3.0 - Historical version of documents and related bindings

277 Views

Hello gurus,

I'm working on documents in SRM 3.0 (PO, CTR) which have an historical version, that is, in BBP_PD, a version signed with an 'H'.

As far as I've seen, an historical version uses a set of dictionary table which is different from a "change" or active version; in particular:

- no entries are available for the historical version in CRMD_ORDERADM_H; table BBP_PDHAD_V is used instead;

- no entries are available for the items of an H version in CRMD_ORDERADM_I; table BBP_PDIAD_V is used instead;

tables BBP_PDHGP and BBP_PDIGP are used in the same way.

Now... my problem is that, given a GUID of an historical version (header GUID), I don't know how to retrieve all the item positions contained in BBP_PDIAD_V. On a simple, active version, I used a lot of times a query done as follows:

SELECT * FROM CRMD_ORDERADM_I
   INTO TABLE my_items_itab
    WHERE header = document_guid.

but this doesn't work on BBP_PDIAD_V since I've seen in debug mode that fields like HEADER or PARENT are always blank in this table.

So... how can I realize a binding between the "H" guid of the document and the related positions in BBP_PDIAD_V ? My guess is I have to pass through BBP_PDIGP, but actually I don't know how to pass from header structures to these position tables.

Looking for your help, thanks in advance 😉