|
Seeks an Analytical Unit 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 unit 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 unit 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;
pAnUnt->SeekByDocEntry (smGreaterOrEqual, btSales, (LPCSTR)strBook, lDocNum, sEntryNum, 0);
while (pAnUnt->GetDBStatus () == 0 && (BYTE)pAnUnt->pBookType == btSales && (CString)pAnUnt->pBook == strBook && (long)pAnUnt->pDocNum == lDocNum && (short)pAnUnt->pEntEntryNum == sEntryNum)
{
// Process record data
pAnUnt->GetNext ();
}
|
|
|
C# |
|
// Seek all analytical unit 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;
oAnUnt.SeekByDocEntry (eSeekMode.smGreaterOrEqual, eBookType.btSales, strBook, iDocNum, sEntryNum, 0);
while (oAnUnt.GetDBStatus () == 0 && (eBookType)((byte)oAnUnt.pBookType) == eBookType.btSales && oAnUnt.pBook.ToString () == strBook && (int)oAnUnt.pDocNum == iDocNum && (short)oAnUnt.pEntEntryNum == sEntryNum)
{
// Process record data
oAnUnt.GetNext ();
}
|
|
|
VBS |
|
' Seek all analytical unit 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 oAnUnt.SeekByDocEntry(smGreaterOrEqual, btSales, strBook, lDocNum, sEntryNum, 0)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pBookType = btSales And oAnUnt.pBook = strBook And oAnUnt.pDocNum = lDocNum And oAnUnt.pEntEntryNum = sEntryNum
' Process record data
Call oAnUnt.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek all analytical unit 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
oAnUnt.SeekByDocEntry(eSeekMode.smGreaterOrEqual, eBookType.btSales, strBook, lDocNum, sEntryNum, 0)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pBookType = eBookType.btSales And oAnUnt.pBook = strBook And oAnUnt.pDocNum = lDocNum And oAnUnt.pEntEntryNum = sEntryNum
' Process record data
oAnUnt.GetNext()
End While
|
|