cancel
Showing results for 
Search instead for 
Did you mean: 

Total PO value - Old and New

Former Member
0 Kudos

Experts,

I would like to include Total PO Value (Both old and new value), whenever there is a change as part of SAP Workflow.

I am able to get New value from EKPO-EFFWR. Alternatively, i can get condition record no against PO from EKKO-KNUMV and pass it to KONV table. Filter records with KSCHL as PBXX and sum up the value of KWERT column. So far so good.

Challenge: I see that CDHDR and CDPOS entries are not created for object class (EINKBELEG-Purchase order). So i am not sure where from i can get old total PO value.

Please share your valuable inputs.

BR,

Aspire

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member233510
Active Contributor
0 Kudos

Please check the list width of table CDPOS. You can get old and new value for the net value change.

Former Member
0 Kudos

Hi Rosh,

Thanks a lot for your reply. As you have mentioned, I am able to get the change for EFFWR field at EKPO level. But because we add a new line item in PO, the total value of PO will also change right. This value we are not getting in CDHDR/POS table.

Say i have 2 items in PO. Say total value of PO is 10,000. Assume i add a new line item to PO. Because of this item, say the total PO value is increasing to 30,000. Now we are able to access the new value 30,000. But old value of 10,000 is not available anywhere.

The data that is captured in CDHDR/POS table(which you have mentioned as well) is only the EFFWR for the newly added item. Not the total PO value.

BR,

Aspire

Former Member
0 Kudos

Hi Rosh,

I am displaying data in SE16 using ALV Grid display option(Not list display).

BR,
Aspire

former_member233510
Active Contributor
0 Kudos

Ok, got it. Could you please check the possibility of activation version management for PO so you can get the new net value and the value change from the table EREV.

Former Member
0 Kudos

Thanks a lot Rosh. Let me check with my functional counterpart about activating version management.

Will keep everyone posted with feedback.

BR,

Aspire

JL23
Active Contributor
0 Kudos

Can you explain this part in more detail "Challenge: I see that CDHDR and CDPOS entries are not created for object class (EINKBELEG-Purchase order). "

Why is there such challenge? In which case does SAP not create change documents when changing a PO?

Former Member
0 Kudos

Hi Juergen,

So happy to see your reply. Usually if we make changes for PO fields like Net price etc... its captured perfectly in CDHDR/POS tables. I am able to leverage this to capture the old value and new value for item level changes.

My scenario: I added a new line item to PO which changed the total value of PO. In this scenario, we do not get entries in CDHDR/POS tables for the new line item inserted(CDHDR-CDCHNGINDH = 'I' Insert). Due to this, i am not able to track the old value for PO total.

I have to capture PO total value (Old & New) in my workflow mail sent to approver.

BR,

Aspire

JL23
Active Contributor
0 Kudos

When do you actually need this value? Are you doing it in a separate program or are you still in the PO program?

Former Member
0 Kudos

Hi Juergen,

Thanks a lot for your reply. SAP event to kick off workflow will be raised whenever change to PO is done. Assume users add a line item to PO and save. On action save, sap event will kick off workflow. Inside this Workflow, i have to write logic to build a list of all changes that have been done to PO and send an email to approver.

In worst case where there is no way to trace the old value and new value for PO total, then we might have to make an enhancement in PO program to see if there is a point where we have old and new value and update it in a custom table. Later in workflow, i will refer this custom table instead of CDHDR/POS tables to fetch the old total PO value - Please correct me if i am wrong.

BR,

Aspire

Former Member
0 Kudos
Are you doing it in a separate program or are you still in the PO program?

Juergen,

In my case, Workflow will kick off after new data has been added in PO screen and then saved. So its not same PO program where i am looking for old and new value. Its outside PO program.

Thanks

Aspire