Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Tracking the changes to NETWR field in VBAP table

Former Member
0 Kudos
2,371

Hi,

I have a requirement to figure out all the sales order activity on a given day. These details are available in the VBAP table. The orders that could have been entered yesterday and changed/canceled today would impact the net sales activity and this is where I have the problem.

I am trying to track all the changes to the NETWR field of the VBAP table using the change document table CDPOS. But change history log on the field NETWR is not enabled. Hence I tried to do get the overall net value impact due to quantity change (VBEP-WMENG) or net price change (VBAP-NETPR), the change log for these two fields is available in CDPOS. But this is way too complicated as the sales order item could be changed several times and the scenarios are just too many.

Is there any other way I can track all the sales order activity easily (update/deletion of sales orders included)?

1 ACCEPTED SOLUTION

brad_bohn
Active Contributor
0 Kudos
288

I wouldn't modify or switch data elements. Without much thought, I think my first crack at that would be to use a custom subtotal field such as VBAP-ZZWI7 in the pricing procedure which captures the net value. The custom data element attached to the field could be flagged for changes.

4 REPLIES 4

former_member195402
Active Contributor
0 Kudos
288

Hi,

VBAP-NETWR has the data element NETWR_AP, which has no "Change Document" flag in "Further Characteristics" (see SE11).

Either you could modify this data element's attribute or you can replace data element NETWR_AP for VBAP field NETWR with an own identically defined data element, where the "Change Document" flag is set.

But both activities are modifications and should be only done, if you can't find any solution in SAP standard!

Regards,

Klaus

brad_bohn
Active Contributor
0 Kudos
289

I wouldn't modify or switch data elements. Without much thought, I think my first crack at that would be to use a custom subtotal field such as VBAP-ZZWI7 in the pricing procedure which captures the net value. The custom data element attached to the field could be flagged for changes.

Former Member
0 Kudos
288

Hi,

Thanks for the reply, I can create a field for this purpose just like you said but the NETWR field (which is multiplication of the quantity and price) could change from a number of transactions and I would have to change ZZI7 at the same time. Is there a specific user exit for the pricing procedure that gets triggered before the change of NETWR in VBAP table ?

brad_bohn
Active Contributor
0 Kudos
288

You don't need a user exit if your pricing procedure is configured correctly with a subtotal and a calculation formula. The (statistical) subtotal will adjust automatically as the pricing adjusts. Use a subtotal indicator (such as subtotal D) on the line in your PP that represents net value (or create a statistical one of your own). Then on a statistical line in the PP, add a calculation formula to send the value to your new field in VBAP (via KOMP):


komp-zzwi7 = xworkd.
xkwert = komp-zzwi7.