Dataport - Sales Document Nos. per Item

JosetxoJosetxo Member Posts: 92
Hello all,

I am trying to code a Dataport that lists, for every item, all the sales document numbers that have not been completely shipped.
Every exported row has to show the item number and the sales document number (among other values that I guess I can retrieve by myself)

I have set Item as the DataItem, and wrote the code in the OnBeforeExportRecord trigger in the dataport. The written code looks at the Sales Line table for every Item not completely shipped. I'd like to write a line in the export file for every record in the sales line that matches this criteria, but, as far as I know (I may be wrong of course), I can only write a single line in every OnBeforeExportRecord execution.

How can I write a line in the export file for every SalesLine record that matches the criteria?

Many thanks in advance,

Josetxo

Answers

  • ErictPErictP Member Posts: 164
    Change the design.

    Set the dataitem on "Sales Line"
    Set the DataItemTableView on : SORTING(Document Type,Type,No.,Variant Code,Drop Shipment,Location Code,Shipment Date) WHERE(Document Type=CONST(Order),Type=CONST(Item),Completely Shipped=CONST(No))
  • JosetxoJosetxo Member Posts: 92
    Many thanks, looks very very good.

    Josetxo
Sign In or Register to comment.