M3_H5_CalculatePriceEvolution

Use this H5 script on the B panel of 'Purchase Agreement. Open Lines' (PPS101). The script adds three columns where you can view the price from the previous purchase agreement, the previous purchase agreement number, and the price increase in percentage for the latest agreement.

Additionally, the script creates a check box that, when clicked, filters only the records that are greater than the specified argument or the price evolution in percentage.

Purchase agreements are retrieved based on these rules:
  • Records with similar agreement types
  • Records with similar group identities
  • Line status that is set between twenty to ninety
  • Records with the closest from-date agreement in the highest priority

Prerequisites

Before adding a script, you must activate these tables in the M3 Function Search administration:
  • MPAGRL
  • MPAGRH
  • MPAGRP

See information about updating table indexes in the M3 Core User and Administration Library (Cloud).

Script argument

This table shows the argument and its description:
Argument Example Optional Description
Increase tolerance 5 Yes You can specify a value to filter records that show the increase tolerance in percentage. The script argument can be a negative value, for example -5.

APIs used in the script

This table shows details about M3 APIs used in this script:
Program Transaction
CMS100MI Lst_WD_LstLastP
PPS100MI GetAgrHead
GENERAL GetFieldHeading