cancel
Showing results for 
Search instead for 
Did you mean: 

Want to retrieve versions of PO

Former Member
0 Kudos

Hi Experts,

I want to retrieve latest version of PO as part of my report output. I tried passing parameters i_with_change_version, i_change_lock and i_with_closed in FM BBP_PD_PO_GETLIST but not able to retrieve the latest version.

Now I have three doubts: -

1. If after PO being in ordered status, we change anything in vendor text then isn't it considered as new version?

2. Is there any other parameter which is suppose to be included in FM to retrieve the latest version?

3. Is there any other FM which can be used for this purpose.

Thanks

Siddarth

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Sidarth,

>

> (...) 1. If after PO being in ordered status, we change anything in vendor text then isn't it >considered as new version?

> (...)

I don't know what are fields comparision in standard to generate or not a document version at saving, but you can have a look at view BBPV_COMP_FIELDS for comparison methods 'CVR' or NWF (don't know exactly which one to concider for PO).

Anyway, you should be able to manage your own version control by implementing method BBP_VERSION_CREATE_CONTROL from BAdI BBP_VERSION_CONTROL for object type BUS2201.

>

> (...) 2. Is there any other parameter which is suppose to be included in FM to retrieve the latest version?

> (...)

Using import parameter I_WITH_CHANGE_VERSION with value empty, you will get list of PO and their last version number: see export parameter E_PDLIST-VERSION_NO.

If this field is empty, this means purchasing document is incomplete ( E_PDLIST-DOC_INCOMPLETE = 'X') or your PO workflow is in error.

If you populate I_WITH_CHANGE_VERSION with 'X', you will get list of PO with changer version ( E_PDLIST-VERSION_NO = 'C'): modifications for those PO are not validated (PO workflow is awaiting approval).

>

> (...) 3. Is there any other FM which can be used for this purpose.

> (...)

For each PO, you can use BBP_PD_PO_GETDETAIL function module.

Regards.

Laurent.

Former Member
0 Kudos

Hi Laurent,

You misunderstood my question.

First of all I want the latest version of PO not the last version.

Second I need this details of latest version in a report so BADI implementation won't help here.

Third BBP_PD_PO_GETDETAIL gives the details of PO but doesn't say anything about versions of PO.

So if you can help me on these points then it would be a great help.

Thanks

Siddarth

laurent_burtaire
Active Contributor
0 Kudos

Hello Siddarth,

>

> (...) First of all I want the latest version of PO not the last version. (...)

>

What is the difference between the latest version and last version ?

If PO has version 1, 2, and 3, 3 is the latest version (equivalent to last version).

>

(...)

> Second I need this details of latest version in a report so BADI implementation won't help here.

> (...)

I answer to first question of your first message (standard and specific version controls for purchasing document).

>

(...)

> Third BBP_PD_PO_GETDETAIL gives the details of PO but doesn't say anything about versions of PO.

> (...)

Look at table E_VERSION, you will have the latest version (last version) and also all historical version type (type 'H' ).

If you want to get also PO change version (type 'C' ), use BBP_PROCDOC_VERSION_GETLIST function module.

Regards.

Laurent.

Former Member
0 Kudos

Hey Laurent,

Thanks a lot. FM BBP_PROCDOC_VERSION_GETLIST with parameter IV_READ_ALL_CHANGE_VERSIONS = X helped me a lot. Thanks once again for your inputs.

Siddarth.

Answers (0)