ComAp::SeekBySuppl (Interface: ComAp)
 
Seeks a Commercial Purchase Agreement by its supplier info.
 
VARIANT_BOOL SeekBySuppl (
    enum eSeekMode eSeekMode,
    enum eComAgType eComAgType,
    VARIANT_BOOL bPriority,
    enum eSupKind eSupKind,
    LONG lSupNum,
    enum eArtKind eArtKind,
    BSTR bsArtNum,
    BSTR bsArtCat,
    DOUBLE dQuantity
)
 
Key information
This method uses key number 1 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pComAgTypeBYTEAscending-
pPriorityVARIANT_BOOLDescending-
pSupKindBYTEAscending-
pSupNumLONG (unsigned)Ascending-
pSupCatBSTRAscendingCase insensitive
pArtKindBYTEAscending-
pArtNumBSTRAscendingHierarchy
pArtCatBSTRAscendingCase insensitive
pQuantityDOUBLEAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
eComAgType
[in] A value of the 'eComAgType' enumeration.
bPriority
[in] Does the commercial purchase agreement you want to seek have priority?
 
Remarks
Commercial purchase agreements that have no priority are unique records. In this case you can use the value smEqual for the parameter eSeekMode.
Priority records can occur more than once for the same data, but for different periods. In this case it is not safe to use the value smEqual for the parameter eSeekMode.
eSupKind
[in] A value of the 'eSupKind' enumeration.
lSupNum
[in] The supplier number of the commercial purchase agreement you want to seek.
eArtKind
[in] A value of the 'eArtKind' enumeration.
bsArtNum
[in] The article number of the commercial purchase agreement you want to seek.
bsArtCat
[in] The article category of the commercial purchase agreement you want to seek.
dQuantity
[in] The quantity for which you want to seek a commercial purchase agreement.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateComAp
 
Samples
 
C++
 
// Find the non-prior commercial purchase agreement of type discount for supplier with number 25 when buying 100 pieces of the article with number 'ART_001'.
if (pComAp->SeekBySuppl (smEqual, caDiscount, VARIANT_FALSE, skNum, 25, akNum, "ART_001", "", 100.0))
    // Process record data

C#
 
// Find the non-prior commercial purchase agreement of type discount for supplier with number 25 when buying 100 pieces of the article with number 'ART_001'.
if (oComAp.SeekBySuppl (eSeekMode.smEqual, eComAgType.caDiscount, false, eSupKind.skNum, 25, eArtKind.akNum, "ART_001", "", 100.0))
    // Process record data

VBS
 
' Find the non-prior commercial purchase agreement of type discount for supplier with number 25 when buying 100 pieces of the article with number 'ART_001'.
If oComAp.SeekBySuppl(smEqual, caDiscount, False, skNum, 25, akNum, "ART_001", "", 100.0) Then
    ' Process record data
End If

VB.NET
 
' Find the non-prior commercial purchase agreement of type discount for supplier with number 25 when buying 100 pieces of the article with number 'ART_001'.
If oComAp.SeekBySuppl(eSeekMode.smEqual, eComAgType.caDiscount, False, eSupKind.skNum, 25, eArtKind.akNum, "ART_001", "", 100.0) Then
    ' Process record data
End If