Lanham EDI Credit Memo Returning SAC codes

natskuunatskuu Member Posts: 14
I'm required to send an SAC/C310 if the customer has a line discount and also required to send a SAC/D170 if they get 100% free product

What is happening is when I have a line discount of 100% EDI is producing 2 SAC codes doubling the discount (see example)


So in this case we had a BOGO (Buy 3 at 30% and get 3 free)

In the pink is the correct 30% discount for line 1 on our CREDIT MEMO

In Blue is where my problem is.. Because I had a 100% discount it brought over the SAC code C310 at $82.44 and also brought over the D170 at qty 3 * the amount creating the incorrect discount on the receiving end. It doubled up the total discount to $164.88.

Is was thinking of creating an EDI Out Field that would filter, something like this:

//NP 12/26/2012
'Line Disc 100':
IF SalesCrMemoLine.Amount = 100 THEN
DecimalVariable := 0

I believe the SAC/C310 would still send to the Trading Partner but with a 0 value thus eliminating the duplication but perhaps someone has another idea of how this could be accomplished.. A conditional maybe??

Ultimately, when the Line Discount is = to 100, I don't want the SAC/C310 to show up on my outbound data.

Thanks in advance for any suggestions/help that can be offered.


  • Options
    klavinklavin Member Posts: 117
    Well, if you have other discount percentages that you use commonly this solution wouldn't work, but you could add a bogus element at the end of the mapping with Line Amount or whatever, length 0, and use the Bypass Segment if Blank.

    Try to think of using a field to set off this flag as a simple way without creating an EDI field and completely custom coding for it if possible. For the most part I find it almost impossible to avoid customization when it comes to EDI.

    Straight from an old EDI Mapping Guide:

    If a segment needs to be sent only if specific information applies to a Navision Order, set the Bypass Segment if
    Blank flag on the element that determines the need for the segment. For example, if a SAC Segment is required
    only if a discount applies to the invoice, set the Bypass flag on the element that references the Discount Amount
    from the invoice.

    However, this wouldn't work if you have some odd percents in there as well where it would need to send. That is why I'm thinking of some additional field if that would be the case. Even an EDI In field if there is something that comes across that would mark it.

    Play around with it, let me know if you have any questions regarding this.
    "Profanity is the one language all programmers know best."
Sign In or Register to comment.