SAPConditions

This is a delegate of type UserExitSAPConditions and has the following parameters.

  • IWorkdoc doc

  • ILineData[] lineData

  • IConditionData[] condData

  • IMiscCharges miscCharge

  • ref int materialLineCount

  • ref bool condAllotted

  • ref string description

This user exit is called during the miscellaneous charge handling procedure of the line pairing routine for a very specific situation.

The user exit is called only if all of the following are true:

  • Material line pairing is successful.

  • The type of miscellaneous charge being processed is configured and booked against conditions on a SAP purchase order.

  • The number of available conditions to book against is exactly equal to the number of instances of that miscellaneous charge type read from the invoice. For example, two itemized freight amounts on the invoice and two conditions relating to freight against the paired lines on the purchase order.

  • The total value of the miscellaneous charge type is different to the total value of the SAP conditions that relate to that charge type.

In this circumstance, it is not clear to the system which instance of the miscellaneous charge should goes to which condition. Therefore, this user exit adds custom business logic that forces a decision.

If no business logic is added and this scenario arises, then line pairing fails because the miscellaneous charge cannot be allocated.

The ILineData array structure contains successfully paired lines.

The IConditionalData array structure contains conditions for the miscellaneous charge type.

The IMiscCharges is the single line structure that contains details of the miscellaneous charge that is processed. The miscCharge property of this structure is a sub-array that contains the individual amounts read from the invoice relating to this miscellaneous charge type.

The lngMaref int materialLineCount is the number of material lines in the ILineData structure.

This user exit is available during export processing only.