|
Seeks an Analytical Centre entry by its document and entry number. |
|
|
VARIANT_BOOL SeekByDocEntry ( enum eSeekMode eSeekMode, enum eBookType eBookType, BSTR bsBook, LONG lDocNum, SHORT sEntryNum, LONG lSysNum ) |
|
|
Key information | | This method uses key number 7 (See SwapKey). | | This is a unique key. |
| | Key segment information | Segment Name | Type | Order | Collation | pBookType | BYTE | Ascending | - | pBook | BSTR | Ascending | Case insensitive | pDocNum | LONG (unsigned) | Ascending | - | pEntEntryNum | SHORT (unsigned) | Ascending | - | pSysNum | LONG | Ascending | - |
| | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | eBookType | [in] A value of the 'eBookType' enumeration. | bsBook | [in] The book code of the document of which you want to seek an analytical entry. | lDocNum | [in] The document date of the document of which you want to seek an analytical entry. | sEntryNum | [in] The entry number of the document of which you want to seek an analytical entry. | lSysNum | [in] The system number of the analytical centre entry you want to seek. | | Return value |
True if the record with the given properties was found, otherwise false. | | Remarks |
| The value for sEntryNum is a 0-based, i.e. if you want to know the analytical entries of the 5th detail line of a document, you need to supply an entry number of 4. |
|
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Seek all analytical centre entries of detail line 7 of the sales document with book code = 'ASALS' and document number = 12
CString strBook = "ASALS";
long lDocNum = 12;
short sEntryNum = 6;
pAnCnt->SeekByDocEntry (smGreaterOrEqual, btSales, (LPCSTR)strBook, lDocNum, sEntryNum, 0);
while (pAnCnt->GetDBStatus () == 0 && (BYTE)pAnCnt->pBookType == btSales && (CString)pAnCnt->pBook == strBook && (long)pAnCnt->pDocNum == lDocNum && (short)pAnCnt->pEntEntryNum == sEntryNum)
{
// Process record data
pAnCnt->GetNext ();
}
|
|
|
C# |
|
// Seek all analytical centre entries of detail line 7 of the sales document with book code = 'ASALS' and document number = 12
string strBook = "ASALS";
int iDocNum = 12;
short sEntryNum = 6;
oAnCnt.SeekByDocEntry (eSeekMode.smGreaterOrEqual, eBookType.btSales, strBook, iDocNum, sEntryNum, 0);
while (oAnCnt.GetDBStatus () == 0 && (eBookType)((byte)oAnCnt.pBookType) == eBookType.btSales && oAnCnt.pBook.ToString () == strBook && (int)oAnCnt.pDocNum == iDocNum && (short)oAnCnt.pEntEntryNum == sEntryNum)
{
// Process record data
oAnCnt.GetNext ();
}
|
|
|
VBS |
|
' Seek all analytical centre entries of detail line 7 of the sales document with book code = 'ASALS' and document number = 12
Dim strBook
Dim lDocNum
Dim sEntryNum
strBook = "ASALS"
lDocNum = 12
sEntryNum = 6
Call oAnCnt.SeekByDocEntry(smGreaterOrEqual, btSales, strBook, lDocNum, sEntryNum, 0)
While oAnCnt.GetDBStatus() = 0 And oAnCnt.pBookType = btSales And oAnCnt.pBook = strBook And oAnCnt.pDocNum = lDocNum And oAnCnt.pEntEntryNum = sEntryNum
' Process record data
Call oAnCnt.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek all analytical centre entries of detail line 7 of the sales document with book code = 'ASALS' and document number = 12
Dim strBook As String
Dim lDocNum As Long
Dim sEntryNum As Short
strBook = "ASALS"
lDocNum = 12
sEntryNum = 6
oAnCnt.SeekByDocEntry(eSeekMode.smGreaterOrEqual, eBookType.btSales, strBook, lDocNum, sEntryNum, 0)
While oAnCnt.GetDBStatus() = 0 And oAnCnt.pBookType = eBookType.btSales And oAnCnt.pBook = strBook And oAnCnt.pDocNum = lDocNum And oAnCnt.pEntEntryNum = sEntryNum
' Process record data
oAnCnt.GetNext()
End While
|
|