Options

Search for correct Sales Price

Will_SVWill_SV Member Posts: 13
Hi there,

I have a Problem with sales price.

There is table 7002 Sales Price with start and ending dates for a certain product.
I need to find the sales price valuable on a certain date e.g.

Sales price Date 15.06.09

Table 7002:
Starting Date 01.06.09 - Ending Date 14.06.09 100$
Starting Date 15.06.09 - Ending Date 14.07.09 99$

Result should be 99$

Any idea for the code?
Thanks !!!

Answers

  • Options
    matteo_montanarimatteo_montanari Member Posts: 189
    Will_SV wrote:
    Hi there,

    I have a Problem with sales price.

    There is table 7002 Sales Price with start and ending dates for a certain product.
    I need to find the sales price valuable on a certain date e.g.

    Sales price Date 15.06.09

    Table 7002:
    Starting Date 01.06.09 - Ending Date 14.06.09 100$
    Starting Date 15.06.09 - Ending Date 14.07.09 99$

    Result should be 99$

    Any idea for the code?
    Thanks !!!

    Hi

    WITH SalesPrice DO BEGIN
    SETFILTER("Starting Date", '..%1', WORKDATE);
    SETFILTER("Ending Date", '%1..|%2', WORKDATE, 0D);
    IF FINDLAST THEN;
    END;

    Bye

    Matteo
    Reno Sistemi Navision Developer
  • Options
    Will_SVWill_SV Member Posts: 13
    THANKS
Sign In or Register to comment.