Skip to Content
0
Former Member
Mar 19, 2010 at 05:28 PM

Advanced Script Logic

26 Views

I have a requirement to Lookup Prices of Materials from a different Application.

On the basis of the Prices, Invoice Values needs to be calculated in a different sales application.Invoice level data contains only Quantity which needs to be multiplied by Price to derive Invoice Value

For example, In my Sales Application

I am using LOOKUP Function to find out prices of Items.

*LOOKUP PRICEAPP

DIM AA: ACCOUNT="ITEM1"

DIM BB: ACCOUNT="ITEM2"

DIM CC: ACCOUNT="ITEM2"

.....

*ENDLOOKUP

Now I am using these Prices, to calculate the Invoice Value

e.g.

*WHEN S_ACCOUNT

*IS "QTY"

*WHEN ITEM

*IS "ITEM1"

REC(EXPRESSION = %VALUE%LOOKUP(AA),S_ACCOUNT = "VALUE")

*ENDWHEN

....

....

....

*ENDWHEN

It is working fine till here.

But there is another requirement. The prices change quite often in a month.And each price is stamped with the Version. Similarly, Invoice has a invoice date, as well as the price version that needs to be applied on it derive the value.

Version here is another dimension in Price Application and the same Version also is associated with the respective Invoices.

Can this requirement be accomplished through script logic.