POrderDet::SeekByOpenSup (Interface: POrderDet)
 
Seeks an open Purchase Order Detail line by its supplier number.
 
VARIANT_BOOL SeekByOpenSup (
    enum eSeekMode eSeekMode,
    LONG lSupNum,
    LONG lSupSubNum,
    BSTR bsBook,
    LONG lDocNum,
    SHORT sLineNum
)
 
Key information
This method uses key number 3 (See SwapKey).
This is a unique key.
This is a null key, only the records where pIsOpen is true are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pSupNumLONG (unsigned)Ascending-
pSupSubNumLONG (unsigned)Ascending-
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
pLineNumSHORT (unsigned)Ascending-
pIsOpenVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
lSupNum
[in] The supplier number of the Purchase Order of which you want to seek a detail line.
lSupSubNum
[in] The supplier subnumber of the Purchase Order of which you want to seek a detail line.
bsBook
[in] The book code of the Purchase Order of which you want to seek a detail line.
lDocNum
[in] The document number of the Purchase Order of which you want to seek a detail line.
sLineNum
[in] The line number of the Purchase Order Detail line you want to seek.
 
Remarks
This number is a 0-based index, i.e. it starts from 0. Therefore the value of this parameter is 1 less than the numbers shown in the Venice grids and 1 less than the value returned by the property vLine (see properties)!
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePOrderDet
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek the data of all open detail lines of all purchase orders for the supplier with number 125/0
long lSupNum = 125, lSubNum = 0;
pPOrderDet->SeekByOpenSup (smGreaterOrEqual, lSupNum, lSubNum, "", 0, 0);
while (pPOrderDet->GetDBStatus () == 0 && (long)pPOrderDet->pSupNum == lSupNum && (long)pPOrderDet->pSupSubNum == lSubNum)
{
    // Process record data
    
    pPOrderDet->GetNext ();
}

C#
 
// Seek the data of all open detail lines of all purchase orders for the supplier with number 125/0
int iSupNum = 125, iSubNum = 0;
oPOrderDet.SeekByOpenSup (eSeekMode.smGreaterOrEqual, iSupNum, iSubNum, "", 0, 0);
while (oPOrderDet.GetDBStatus () == 0 && (int)oPOrderDet.pSupNum == iSupNum && (int)oPOrderDet.pSupSubNum == iSubNum)
{
    // Process record data
    
    oPOrderDet.GetNext ();
}

VBS
 
' Seek the data of all open detail lines of all purchase orders for the supplier with number 125/0
Dim iSupNum, iSubNum
iSupNum = 125
iSubNum = 0
Call oPOrderDet.SeekByOpenSup(smGreaterOrEqual, iSupNum, iSubNum, "", 0, 0)
While oPOrderDet.GetDBStatus() = 0 And oPOrderDet.pSupNum = iSupNum And oPOrderDet.pSupSubNum = iSubNum
    ' Process record data

    Call oPOrderDet.GetNext()
Wend

VB.NET
 
' Seek the data of all open detail lines of all purchase orders for the supplier with number 125/0
Dim iSupNum, iSubNum As Integer
iSupNum = 125
iSubNum = 0
oPOrderDet.SeekByOpenSup(eSeekMode.smGreaterOrEqual, iSupNum, iSubNum, "", 0, 0)
While oPOrderDet.GetDBStatus() = 0 And oPOrderDet.pSupNum = iSupNum And oPOrderDet.pSupSubNum = iSubNum
    ' Process record data

    oPOrderDet.GetNext()
End While