cancel
Showing results for 
Search instead for 
Did you mean: 

FM returns wrong total value for Limit type PO's

Former Member
0 Kudos

Hi all,

I am working on SRM 5.0 (SP13) ECS.

I have implemented the BADI "BBP_WFL_APPROVAL_BADI" for determining the Approvers for PO whenevr a PO is changed.If the diference between the Old PO value and new PO value is > 1000 and the approval text field(custom text under "Documents" link) is set to "YES",then the WF approval is required and the approvers are determined.

The above logic works fine for the Standard type PO's where the difference between the old value and new value is determined using FM "BBP_PD_PO_GETDETAIL" by passing the GUID (for the change version and the active vesion) obtained at runtime in the BADI.

However for the limit type PO's,whenevr I change the total value for the Limit item,I see that the FM "BBP_PD_PO_GETDETAIL" doesnt return the changed value but always returns blank!

Bcause I need to check bth the values i.e. Custom text set to "YES" as well as Total value diff ,I cant use the start conditions in tcode SWB_COND.ALso I need to fetch the approvers based on the price diff so I need this value at runtime in the BADI using the FM "BBP_PD_PO_GETDETAIL".

Please advise why the FM is not returning the changed values for the Limit type PO and is there any other way(other table/FM) to get the changed value at runtime for the LIMIT type PO.

Thanks for your time.

Edited by: Rads1234 on Nov 18, 2010 4:39 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi..

I hope you can use cdhdr and cdpos tables to get the change history details.. try and let us know if you need more information..

Regards,

Saravanan

Former Member
0 Kudos

Thanks.But I the total value changes are not stored in these tables either!Please advise.

Former Member
0 Kudos

Thanks.But I the total value changes are not stored in these tables either!Please advise.

Former Member
0 Kudos

Hi...

Did you use change version PO GUID_ID to get the total value from the table CDHDR?.

Regards,

Saravanan..

Former Member
0 Kudos

Thanks for the rpely.

Yes.I am using the GUID available at runtime in the BADI "BBP_WFL_APPROV_BADI" which is the current change version GUID.I tried using that GUID to get the data from both FM as well as CDHDR and CDPOS tables.

I think this is something related to LImit type PO because for Standard type PO's the FM returns the corretc changed value (as in the screen) for the change version GUID.I fail to understand why the changed values are shwon on the screen but are not stored anywhere in the system before actually ordering the PO!

Former Member
0 Kudos

Hi..

I think you have used 'bbp_pd_po_getdetail' FM to get the details or Standard Method lo_pdo_po->get_header_details instead of these two try to use 'bbp_procdoc_getdetails' fm to get the value..

Saravanan

Former Member
0 Kudos

Thanks Saravanan.I used the same FM 'bbp_procdoc_getdetails' and could see the changed values.

Thanks for the reply.

Former Member
0 Kudos

Hi,

Nice..

FYI - BBP_PD_SC_GETDETAIL will not update with the buffer data... that is why.. we always recommand to use FM 'bbp_procdoc_getdetails' .

Saravanan..