cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7: How to retrieve the previous version of an invoice?

Former Member
0 Kudos

Dear Experts

I am facing the following issue;

I need to compare the approved Invoice value with the previous version of an invoice.

I tried to use FM BBP_PROCDOC_GETDETAIL_ARCHIVE, but I can get just the very first version of Invoice in its ET_HISTORY_ARCH table.

Anybody could help on this topic?

Thank you

Regards

Imrich

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member208244
Active Participant
0 Kudos

Hello Imrich,

The prerequisite to retrieve previous version of an Invoice is to have flagged Version Control in Customizing.

Then, you just need to:

1. Run function module BBP_PD_INV_GETDETAIL

2. Read E_VERSION table. There you will get the HEADER's GUIDs of all versions.

Just take the one you want (by your own logic, like date or something)

3. Run function module BBP_PD_INV_GETDETAIL with the GUID ID you have selected from step 2.

Regards,

Sebastián

Former Member
0 Kudos

hello Sebastian.

Yes I tried that approach before, but the E_VERSION table contains only the same GUID as we have it now. It seems to me that Invoices have no versions with different GUIDs.

Please test it for yourself.

The invoice is created and some data have changed during approval. How can I retrieve the data of the previous version of a Invoice?

Regards

Imrich

Former Member
0 Kudos

Dear Sebastian

could you give me a hint where is that version control for Invoices in customizing?

Thanx

Imrich

former_member208244
Active Participant
0 Kudos

Hello Imrich,

Is in SAP Supplier Relationship Management > SRM Server > Switch On Version Control for Purchasing Documents; there you need to flag on BUS2205 Invoices.

Please be sure that Invoice have more than one version, in SAP SRM, modifications to an approved document creates new versions, if document has been modified until it gets approved I believe that SRM does not create new versions.

Regards

Former Member
0 Kudos

Hello Imrich,

Why don't you try with de FM BBP_CHANGE_DOC_GET_NEW, which retrieves you the changes of a document.

Regards,

German