Retrieving first 6 purchase order lines

mvdvalkmvdvalk Member Posts: 9
I need to retrieve the Expected Receipt Date and Outstanding Quantity of the first 6 existing purchase order lines of a item and pass the values to the appropiate variables in a Dataport.

Anyone have an idea how to do that?
Marion van der Valk

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Take Purchase Line table and apply filter with ur Item no.
    repeat 6 times and get the Values what u want
  • mvdvalkmvdvalk Member Posts: 9
    Yes, I understand that, but I am hoping that someone will help me to get in the right direction with a little bit of example code.

    Thanks
    Marion van der Valk
  • AlbertvhAlbertvh Member Posts: 516
    Hi
    Try this
    Value := 0;
    PurchLine.SETRANGE(Type,PurchLine.Type::Item);
    PurchLine.SETRANGE("No.",MyItemNo);
    FOR i := 1 TO 6 DO BEGIN
       IF PurchLine.NEXT = 0 THEN BEGIN
          Value := Value + PurchLine.Amount;
       END;
    END;
    
    CLEAR(MyDataport);
    MyDataport.SetValue(Value);
    MyDataport.RUNMODAL;
    

    Hope this helps


    Albert
Sign In or Register to comment.