-
TYPE DOC_COMMENT_TABLE_TYPE PL/SQL TABLE
Table type for comments to documents.
-
TYPE DOC_COMMENT_TYPE PL/SQL RECORD
Document comment.
| Field name |
Reference type |
Type |
Description |
| N_LINE_ID |
SD_DOC_COMMENTS.N_LINE_ID%TYPE |
NUMBER |
Comment |
| N_DOC_ID |
SD_DOC_COMMENTS.N_DOC_ID%TYPE |
NUMBER |
Document |
| D_OPER |
SD_DOC_COMMENTS.D_OPER%TYPE |
DATE |
Comment date |
| D_SIGNAL |
SD_DOC_COMMENTS.D_SIGNAL%TYPE |
DATE |
Reminder date |
| CL_COMMENT |
SD_DOC_COMMENTS.CL_COMMENT%TYPE |
CLOB |
Comment text |
| VC_COMMENT |
VARCHAR2(4000 |
VARCHAR2 |
Comment text (for backward compatibility) |
| N_AUTHOR_ID |
SD_DOC_COMMENTS.N_AUTHOR_ID%TYPE |
NUMBER |
Comment author |
| D_EXEC |
SD_DOC_COMMENTS.D_EXEC%TYPE |
DATE |
Execution date |
| N_DOC_COUNT |
NUMBER |
NUMBER |
Number of comments to the document |
-
TYPE DOC_PERIOD_TABLE_TYPE PL/SQL TABLE
Table type for documents with their periods.
-
TYPE DOC_PERIOD_TYPE PL/SQL RECORD
Document with its validity period.
| Field name |
Reference type |
Type |
Description |
| N_LINE_NO |
NUMBER |
NUMBER |
Ordinal number |
| N_DOC_ID |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
Document |
| D_BEGIN |
SD_DOCUMENTS.D_BEGIN%TYPE |
DATE |
Period start date |
| D_END |
SD_DOCUMENTS.D_END%TYPE |
DATE |
Period end date |
-
TYPE DOC_STATE PL/SQL RECORD
Document status.
| Field name |
Reference type |
Type |
Description |
| N_DOC_STATE_ID |
SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
NUMBER |
Document status (REF_TYPE_Document_State reference data) |
| VC_DOC_STATE |
SI_REF.VC_NAME%TYPE |
VARCHAR2 |
Document status name |
-
TYPE DOC_STATES_LIST PL/SQL TABLE
Table type for document statuses.
-
TYPE SD_DOC_BINDS_LIST PL/SQL RECORD
Binding between documents.
| Field name |
Reference type |
Type |
Description |
| N_DOC_ID |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
Document |
| N_DOC_TYPE_ID |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
Document type (REF_TYPE_Document_Type reference data) |
| N_DOC_STATE_ID |
SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
NUMBER |
Document status (REF_TYPE_Document_State reference data) |
| N_DOC_BIND_ID |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
Bound document |
| N_DOC_BIND_TYPE_ID |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
Bound document type (REF_TYPE_Document_Type reference data) |
| N_DOC_BIND_STATE_ID |
SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
NUMBER |
Bound document state (REF_TYPE_Document_State reference data) |
| N_LEVEL |
NUMBER |
NUMBER |
Binding level |
| N_BIND_TYPE_ID |
NUMBER |
NUMBER |
Binding type (REF_TYPE_Docs_Bind_Type reference data) |
| N_COUNT |
NUMBER |
NUMBER |
Number of bound documents |
-
TYPE SD_DOC_BINDS_LIST_TABLE_TYPE PL/SQL TABLE
Table type for bindings between documents.
-
TYPE SD_DOC_FILES_TABLE_TYPE PL/SQL TABLE
Table type for document print templates.
-
TYPE SD_DOC_FILE_TYPE PL/SQL RECORD
Print template for a document.
| Field name |
Reference type |
Type |
Description |
| N_DOC_FILE_ID |
SD_DOC_FILES.N_DOC_FILE_ID%TYPE |
NUMBER |
Binding between the template and the document |
| N_DOC_TYPE_ID |
SD_DOC_FILES.N_DOC_TYPE_ID%TYPE |
NUMBER |
Document type (REF_TYPE_Document_Type reference data) |
| VC_DOC_TYPE |
SI_REF.VC_NAME%TYPE |
VARCHAR2 |
Document type code |
| N_DOC_ID |
SD_DOC_FILES.N_DOC_ID%TYPE |
NUMBER |
Document |
| N_FILE_ID |
SD_DOC_FILES.N_FILE_ID%TYPE |
NUMBER |
File, i.e., print template |
| N_DOC_FILE_TYPE_ID |
SD_DOC_FILES.N_DOC_FILE_TYPE_ID%TYPE |
NUMBER |
Binding type (CONST.DOC_FILE_TYPE_PrintTemplate) |
| N_PAR_DOC_FILE_ID |
SD_DOC_FILES.N_PAR_DOC_FILE_ID%TYPE |
NUMBER |
Parent binding |
| N_ACCESS_RIGHT_ID |
SD_DOC_FILES.N_ACCESS_RIGHT_ID%TYPE |
NUMBER |
Permission to open the file (REF_TYPE_Doc_File_Rights reference data) |
| N_FILE_TYPE_ID |
SS_FILES.N_FILE_TYPE_ID%TYPE |
NUMBER |
File type (REF_TYPE_Doc_File_Type reference data) |
| VC_FILENAME |
SS_FILES.VC_FILENAME%TYPE |
VARCHAR2 |
File name |
| BL_DATA |
SS_FILES.BL_DATA%TYPE |
BLOB |
File data |
| VC_NAME |
SS_FILES.VC_NAME%TYPE |
VARCHAR2 |
Template name |
| VC_CODE |
SS_FILES.VC_CODE%TYPE |
VARCHAR2 |
Template code |
| D_BEGIN |
SS_FILES.D_BEGIN%TYPE |
DATE |
Start date of a template validity period |
| D_END |
SS_FILES.D_END%TYPE |
DATE |
End date of the template validity period |
| N_SIZE |
SS_FILES.N_SIZE%TYPE |
NUMBER |
File size |
| N_SIZE_UNIT_ID |
SS_FILES.N_SIZE_UNIT_ID%TYPE |
NUMBER |
File size measuring unit (REF_TYPE_Unit_Data_Type reference data) |
| N_FIRM_ID |
SS_FILES.N_FIRM_ID%TYPE |
NUMBER |
Division |
| VC_FIRM |
SI_SUBJECTS.VC_NAME%TYPE |
VARCHAR2 |
Division name |
| VC_REM |
SS_FILES.VC_REM%TYPE |
VARCHAR2 |
Remark |
| N_LINE_NO |
SD_DOC_FILES.N_LINE_NO%TYPE |
NUMBER |
Ordinal number |
| N_TEMPLATE_LANG_ID |
SD_DOC_FILES.N_TEMPLATE_LANG_ID%TYPE |
NUMBER |
|
-
TYPE SD_DOC_LIST PL/SQL RECORD
Document bound to a specific document.
| Field name |
Reference type |
Type |
Description |
| N_DOC_ID |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
Document |
| N_DOC_TYPE_ID |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
Document type (REF_TYPE_Document_Type reference data) |
| N_DOC_STATE_ID |
SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
NUMBER |
Document status (REF_TYPE_Document_State reference data) |
| N_LEVEL |
NUMBER |
NUMBER |
Binding level |
| N_BIND_TYPE_ID |
NUMBER |
NUMBER |
Binding type (REF_TYPE_Docs_Bind_Type reference data) |
| N_COUNT |
NUMBER |
NUMBER |
Number of bound documents |
-
TYPE SD_DOC_LIST_TABLE_TYPE PL/SQL TABLE
Table type for documents bound to a specific document.
-
FUNCTION GET_ADDR_BY_ROLE
Get an address by a role in a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Address role (REF_TYPE_Addr_DocRoles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching among active bindings between addresses and the document, otherwise 'N' |
| RETURN SI_DOC_ADDRESSES.N_ADDRESS_ID%TYPE |
Address in the role |
-
FUNCTION GET_D_TIME
Get a document time.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.D_TIME%TYPE |
Document time |
-
FUNCTION GET_HIGHER_DOC_LIST
Get a list of parent documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| dt_D_OPER |
IN |
DATE |
DATE |
SYSDATE |
Operation date |
| RETURN SD_DOC_LIST_TABLE_TYPE |
Table with parent documents |
| PIPELINED |
-
PROCEDURE CHK_DOC_CONTAINDED_PERIOD
Check for a document period to be nested in a period of another (basic) document.
Start dates of the document periods are to be non-empty.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_BASE_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Basic document |
-
FUNCTION GET_ACCOUNT_BY_ROLE
Get a subject's account by a role in a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Subject role (REF_TYPE_Subj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching among active bindings between subjects and the document, otherwise 'N' |
| RETURN SI_DOC_SUBJECTS.N_ACCOUNT_ID%TYPE |
Account |
-
FUNCTION GET_DOC_BY_BIND
Get a document bound to a specified one.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_BIND_TYPE_ID |
IN |
SD_DOC_DOCUMENTS.N_DOC_BD_TYPE_ID%TYPE |
NUMBER |
|
Binding type (REF_TYPE_Docs_Bind_Type reference data) |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
NULL |
Bound document type (REF_TYPE_Document_Type reference data) |
| RETURN SD_DOC_DOCUMENTS.N_DOC_BIND_ID%TYPE |
Bound document |
-
FUNCTION GET_D_END
Get an end date of a document validity period.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.D_END%TYPE |
Period end date |
-
FUNCTION GET_N_FIRM_ID
Get a division a document belongs to.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_FIRM_ID%TYPE |
Division the document belongs to |
-
FUNCTION GET_N_REASON_DOC_ID
Get a reason document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_REASON_DOC_ID%TYPE |
Reason document |
-
FUNCTION GET_PAYMENT_HISTORY_COMMENT
Get a comment on a payment by a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOC_COMMENTS.CL_COMMENT%TYPE |
Comment on the payment |
-
PROCEDURE CHK_DOCS_SUBJECTS
Check if a subject that is assigned a specified role in a document has a role in another (basic) document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_BASE_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Basic document |
| num_N_SUBJ_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_SUBJECT_ID%TYPE |
NUMBER |
SS_CONSTANTS_PKG_S.SUBJ_ROLE_Provider |
Subject role in the document (REF_TYPE_Subj_Roles reference data) |
| num_N_BASE_SUBJ_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_SUBJECT_ID%TYPE |
NUMBER |
SS_CONSTANTS_PKG_S.SUBJ_ROLE_Provider |
Subject role in the basic document (REF_TYPE_Subj_Roles reference data) |
-
PROCEDURE CLEAR_DUBS_TT_V_DOC_BINDS
Delete duplicates with data on bound documents from the temporary table TT_V_DOC_BINDS.
-
FUNCTION GET_DOC_C_VALUE
Get a char value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.C_VALUE%TYPE |
Char value |
-
FUNCTION GET_DOC_C_VALUE
Get a char value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.C_VALUE%TYPE |
Char value |
-
FUNCTION GET_DOC_N_REF_ID
Get a value of a drop-down list (a reference value).
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.N_REF_ID%TYPE |
Value of the drop-down list |
-
FUNCTION GET_DOC_N_REF_ID
Get a value of a drop-down list (a reference value).
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.N_REF_ID%TYPE |
Value of the drop-down list |
-
FUNCTION GET_DOC_PERIOD_STRING
Get a document validity period as a string.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN VARCHAR2 |
Document period as a string |
-
FUNCTION GET_DOC_VALUE
Get a document record.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS%ROWTYPE |
Document record |
-
FUNCTION GET_N_CONTRACT_ID
Get a service contract by an annex or an addendum.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
NULL |
Document type (REF_TYPE_Document_Type reference data) |
| RETURN SD_DOCUMENTS.N_DOC_ID%TYPE |
Service contract, if the document is an annex (CONST.DOC_TYPE_ContractAPP) or an addendum (CONST.DOC_TYPE_AddAgreement), otherwise the document itself |
-
FUNCTION GET_N_DOC_TYPE_ID
Get a document type.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
Document type (REF_TYPE_Document_Type reference data) |
-
FUNCTION GET_N_SINGLE_DOC_ID
Get a document by a provider.
Warning: the function works only for documents that are unique in terms of periods and providers.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_PROVIDER_ID |
IN |
SI_SUBJECTS.N_SUBJECT_ID%TYPE |
NUMBER |
|
Provider |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| dt_D_OPER |
IN |
DATE |
DATE |
NULL |
Operation date |
| b_RAISE_EXCEPTIONS |
IN |
MA.BOOL |
NUMBER |
MAIN.b_TRUE |
Raise an exception when no document or too many documents found? {*} CONST.b_TRUE — raise the exception {*} CONST.b_FALSE — return NULL |
| RETURN SD_DOCUMENTS.N_DOC_ID%TYPE |
Document |
-
FUNCTION GET_SUBJECT_BY_ROLE
Get a subject by a role in a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Subject role (REF_TYPE_Subj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching among active bindings between subjects and the document, otherwise 'N' |
| RETURN SI_DOC_SUBJECTS.N_SUBJECT_ID%TYPE |
Subject in the role |
-
FUNCTION IS_DOC_DRAFT
Check whether a document is a draft.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN MAIN.BOOL |
CONST.b_TRUE, when the document status is "Draft" CONST.b_FALSE otherwise |
-
PROCEDURE CHK_DOC_PERIOD
Check (and adjust if needed) a document period.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| num_N_DOC_STATE_ID |
IN |
SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
NUMBER |
|
Document status (REF_TYPE_Document_State reference data) |
| dt_D_DOC |
IN |
SD_DOCUMENTS.D_DOC%TYPE |
DATE |
|
Document date |
| vch_VC_NAME |
IN |
SD_DOCUMENTS.VC_NAME%TYPE |
VARCHAR2 |
|
Document name |
| num_N_PARENT_DOC_ID |
IN |
SD_DOCUMENTS.N_PARENT_DOC_ID%TYPE |
NUMBER |
|
Parent document |
| dt_D_BEGIN |
IN/OUT |
SD_DOCUMENTS.D_BEGIN%TYPE |
DATE |
|
Period start date |
| dt_D_END |
IN/OUT |
SD_DOCUMENTS.D_END%TYPE |
DATE |
|
Period end date |
-
PROCEDURE GEN_DOC_CODE_NAME_IF_NEEDED
Generate a document code and name (if not generated yet).
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| rc_Doc |
IN |
SD_DOCUMENTS%ROWTYPE |
PL/SQL RECORD |
|
Document record |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| dt_D_DOC |
IN |
SD_DOCUMENTS.D_DOC%TYPE |
DATE |
|
Document date |
| vch_VC_DOC_NO |
IN |
SD_DOCUMENTS.VC_DOC_NO%TYPE |
VARCHAR2 |
|
Document number |
| vch_VC_NAME_Put |
IN |
SD_DOCUMENTS.VC_NAME%TYPE |
VARCHAR2 |
|
|
| vch_VC_CODE_Put |
IN |
SD_DOCUMENTS.VC_CODE%TYPE |
VARCHAR2 |
|
|
| vch_VC_NAME |
OUT |
SD_DOCUMENTS.VC_NAME%TYPE |
VARCHAR2 |
|
Supposed document name |
| vch_VC_CODE |
OUT |
SD_DOCUMENTS.VC_CODE%TYPE |
VARCHAR2 |
|
Supposed document code |
-
FUNCTION GET_DOC_PATTERN_FILES_LIST
Get a list of document print templates.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOC_FILES_TABLE_TYPE |
Table with document print templates |
| PIPELINED |
-
FUNCTION GET_N_DOC_STATE_ID
Get a document status.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_DOC_STATE_ID%TYPE |
Document status |
-
FUNCTION GET_N_PARENT_DOC_ID
Get a parent document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_PARENT_DOC_ID%TYPE |
Parent document |
-
FUNCTION GET_VC_DOC_CODE
Get a document code.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.VC_CODE%TYPE |
Document code |
-
FUNCTION IS_EXIST_DOC_NO
Check whether an uncanceled document with the same number as the specified document exists.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| vch_VC_DOC_NO |
IN |
SD_DOCUMENTS.VC_DOC_NO%TYPE |
VARCHAR2 |
|
|
| num_N_DOC_EXCLUDE_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
NULL |
Document to be excluded from the search |
| num_N_PARENT_DOC_ID |
IN |
SD_DOCUMENTS.N_PARENT_DOC_ID%TYPE |
NUMBER |
NULL |
Parent document |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| dt_D_DOC |
IN |
SD_DOCUMENTS.D_DOC%TYPE |
DATE |
SYSDATE |
Document date |
| RETURN MAIN.BOOL |
CONST.b_TRUE when such a document exists, otherwise CONST.b_FALSE |
-
PROCEDURE CHECK_SINGLE_DOC_PERIOD_CLN
Check a document period.
The procedure searches for a document with the same type, provider and client as the specified one, and a period
that overlaps the document period. If such a document is found, an error message is added to the temporary table
TT_MESSAGE_LOGS.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| b_Errors |
OUT |
MAIN.BOOL |
NUMBER |
|
CONST.b_TRUE when there are documents with overlapping periods, otherwise CONST.b_FALSE |
| num_N_ERR_LEVEL |
IN |
NUMBER |
NUMBER |
SS_CONSTANTS_PKG_S.ERR_LEVEL_Warning |
Error level for a message to be added to TT_MESSAGE_LOGS (CONST.ERR_LEVEL_Warning or CONST.ERR_LEVEL_Error) |
-
FUNCTION DOCUMENT_SUBJECTS_HISTORY
Get a list of changes in subjects bound to a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific binding between a subject and the document) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in subjects |
| PIPELINED |
-
FUNCTION DOCUMENT_VALUES_HISTORY
Get a list of changes in document custom fields values.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific value) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in document custom fields values |
| PIPELINED |
-
PROCEDURE GENERATE_DOC_CODE_NAME
Generate a document code and name.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| dt_D_DOC |
IN |
SD_DOCUMENTS.D_DOC%TYPE |
DATE |
|
Document date |
| vch_VC_DOC_NO |
IN |
SD_DOCUMENTS.VC_DOC_NO%TYPE |
VARCHAR2 |
|
Document number |
| vch_VC_NAME |
OUT |
SD_DOCUMENTS.VC_NAME%TYPE |
VARCHAR2 |
|
Document name |
| vch_VC_CODE |
OUT |
SD_DOCUMENTS.VC_CODE%TYPE |
VARCHAR2 |
|
Document code |
-
FUNCTION GET_AVAILABLE_DOC_TRANSITIONS
Get a list of statuses a document can be transferred to from its current status.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_USER_ID |
IN |
SI_SUBJECTS.N_SUBJECT_ID%TYPE |
NUMBER |
SYS_CONTEXT('MAIN' 'N_USER_ID') |
Current user |
| RETURN DOC_STATES_LIST |
Table with available statuses |
| PIPELINED |
-
FUNCTION GET_DOC_BINDS_DOC_LIST
Get a list of all bound documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| b_ExcludeDraft |
IN |
MA.BOOL |
NUMBER |
MAIN.b_TRUE |
Exclude draft documents from the list? {*} CONST.b_TRUE — exclude draft documents {*} CONST.b_FALSE — include draft documents |
| dt_D_OPER |
IN |
DATE |
DATE |
SYSDATE |
Operation date |
| RETURN SD_DOC_BINDS_LIST_TABLE_TYPE |
Table with bound documents |
| PIPELINED |
-
FUNCTION GET_DOC_C_FL_VALUE
Get a value of a check box custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.C_FL_VALUE%TYPE |
Value of the check box |
-
FUNCTION GET_DOC_C_FL_VALUE
Get a value of a check box custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.C_FL_VALUE%TYPE |
Value of the check box |
-
FUNCTION GET_DOC_VALUE_ROW
Get a record with a value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES%ROWTYPE |
Record with the field value |
-
FUNCTION GET_DOC_VALUE_ROW
Get a record with a value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES%ROWTYPE |
Record with the field value |
-
FUNCTION GET_DOC_VC_VALUE
Get a string value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.VC_VALUE%TYPE |
String value |
-
FUNCTION GET_DOC_VC_VALUE
Get a string value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.VC_VALUE%TYPE |
String value |
-
FUNCTION GET_N_SUBDOC_WORKFLOW_ID
Get a service contract workflow by a basic contract.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Basic contract |
| RETURN SD_CONTRACTS.N_SUBDOC_WORKFLOW_ID%TYPE |
Service contract workflow |
-
FUNCTION GET_VALUE_BY_ROLE
Get a record for a binding between a subject and a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Subject role (REF_TYPE_Subj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching for an active binding, otherwise 'N' |
| RETURN SI_DOC_SUBJECTS%ROWTYPE |
Binding record |
-
FUNCTION GET_VC_DOC_NO
Get a document number.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.VC_DOC_NO%TYPE |
Document number |
-
FUNCTION DOCUMENT_HISTORY
Get a list of changes in document parameters common for all documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in document parameters |
| PIPELINED |
-
FUNCTION DOCUMENT_OBJECTS_HISTORY
Get a list of changes in objects bound to a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific binding) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in objects |
| PIPELINED |
-
FUNCTION GET_DOC_NEAREST_DOC_LIST
Get a list of closest bound documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| b_ExcludeDraft |
IN |
MA.BOOL |
NUMBER |
MAIN.b_TRUE |
Exclude draft documents from the list? {*} CONST.b_TRUE — exclude draft documents {*} CONST.b_FALSE — include draft documents |
| dt_D_OPER |
IN |
DATE |
DATE |
SYSDATE |
Operation date |
| num_N_INCLUDE_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
NULL |
Document to be included in the list regardless of its status |
| RETURN SD_DOC_LIST_TABLE_TYPE |
Table with closest bound documents |
| PIPELINED |
-
FUNCTION GET_DOC_PERIOD_INTERSECT
Check whether periods of two documents intersect.
Warning: please avoid using this function in SELECT statements since no indexes for period start and end dates
are used.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| dt_D_BEGIN_1 |
IN |
SD_DOCUMENTS.D_BEG%TYPE |
DATE |
|
Period start date for a first document |
| dt_D_END_1 |
IN |
SD_DOCUMENTS.D_END%TYPE |
DATE |
|
Period end date for the first document |
| dt_D_BEGIN_2 |
IN |
SD_DOCUMENTS.D_BEG%TYPE |
DATE |
|
Period start date for a second document |
| dt_D_END_2 |
IN |
SD_DOCUMENTS.D_END%TYPE |
DATE |
|
Period end date for the second document |
| RETURN CHAR |
'Y' when the periods intersect, otherwise 'N' |
-
FUNCTION GET_DOC_PERIOD_INTERSECT
Check whether periods of two documents overlap.
Warning: please avoid using this function in SELECT statements since no indexes for period start and end dates
are used.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID_1 |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
First document |
| num_N_DOC_ID_2 |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Second document |
| RETURN CHAR |
'Y' when the periods intersect, otherwise 'N' |
-
FUNCTION GET_INTERSECT_DOC_LIST
Get a list of documents which periods overlap with a specified one.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_PROVIDER_ID |
IN |
SI_SUBJECTS.N_SUBJECT_ID%TYPE |
NUMBER |
|
Provider |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
|
Period start date |
| dt_D_END |
IN |
DATE |
DATE |
|
Period end date |
| RETURN DOC_PERIOD_TABLE_TYPE |
Table with documents which periods overlap with the specified one |
| PIPELINED |
-
FUNCTION GET_LAST_COMMENT
Get the last comment to a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN DOC_COMMENT_TABLE_TYPE |
Last comment |
| PIPELINED |
-
FUNCTION GET_STORNO_PROC_BY_DOC
Get a procedure for copying a document and check whether the document can be reversed.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| vch_CopyProc |
OUT |
VARCHAR2 |
VARCHAR2 |
|
Procedure for copying |
| RETURN MAIN.BOOL |
CONST.b_TRUE when the document can be reversed, otherwise CONST.b_FALSE |
-
FUNCTION GET_VC_DOC_NAME
Get a document name.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.VC_NAME%TYPE |
Document name |
-
PROCEDURE CHECK_SINGLE_DOC_PERIOD
Check a document period.
The procedure is for documents that must exist at any given time, be unique in terms of periods and providers,
and have non-empty period start dates (exchange rates specifications, time intervals specifications).
It searches for intersections and gaps between document periods. If there are any, error messages are added to the
temporary table TT_MESSAGE_LOGS.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| b_Errors |
OUT |
MAIN.BOOL |
NUMBER |
|
CONST.b_TRUE when there is a gap or intersection, otherwise CONST.b_FALSE |
| num_N_ERR_LEVEL |
IN |
NUMBER |
NUMBER |
SS_CONSTANTS_PKG_S.ERR_LEVEL_Warning |
Error level for messages to be added to TT_MESSAGE_LOGS (CONST.ERR_LEVEL_Warning or CONST.ERR_LEVEL_Error) |
| ch_C_CHECK_WORKFLOW |
IN |
CHAR |
CHAR |
'N' |
Search only among documents with the same workflow? {*} 'Y' — search only among documents with the same workflow {*} 'N' — ignore workflows |
-
FUNCTION DOCUMENT_ADDRESSES_HISTORY
Get a list of changes in addresses bound to a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific binding) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in addresses |
| PIPELINED |
-
FUNCTION DOCUMENT_CONTENT_HISTORY
Get a list of changes in document contents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific content line) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in document contents |
| PIPELINED |
-
FUNCTION DOCUMENT_GOODS_HISTORY
Get a list of changes in services bound to a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_PRIMARY_KEY_VALUE |
IN |
NUMBER |
NUMBER |
NULL |
Primary key value (when searching for a specific binding) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in services |
| PIPELINED |
-
FUNCTION DOCUMENT_GOOD_AUTHORS
Get a list of users who created subscriptions.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_SUBJ_GOOD_ID |
IN |
SI_SUBSCRIPTIONS.N_SUBSCRIPTION_ID%TYPE |
NUMBER |
NULL |
Subscription (when searching for a specific one) |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_AUTHOR_LIST |
Table with users who created subscriptions |
| PIPELINED |
-
FUNCTION DOCUMENT_SPECIAL_HISTORY
Get a list of changes in document parameters specific for this type of documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| dt_D_BEGIN |
IN |
DATE |
DATE |
ADD_MONTHS(SYSDATE -3) |
Start date of a search period |
| dt_D_END |
IN |
DATE |
DATE |
SYSDATE |
End date of the search period |
| RETURN SS_AUDIT_PKG_S.TABLE_HISTORY_LIST_TABLE_TYPE |
Table with changes in document parameters |
| PIPELINED |
-
PROCEDURE FILL_TT_V_DOC_BINDS
Fill the temporary table TT_V_DOC_BINDS with data on bound documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| b_ExcludeDraft |
IN |
MAIN.BOOL |
NUMBER |
MAIN.b_TRUE |
Exclude draft documents from the table? {*} CONST.b_TRUE — exclude draft documents {*} CONST.b_FALSE — include draft documents |
| dt_D_OPER |
IN |
DATE |
DATE |
SYSDATE |
Operation date |
| b_ClearTemps |
IN |
MAIN.BOOL |
NUMBER |
MAIN.b_TRUE |
Delete old data from the table? {*} CONST.b_TRUE — delete {*} CONST.b_FALSE — do not delete |
-
FUNCTION GET_ADDR_VALUE_BY_ROLE
Get a record for a binding between an address and a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_ADDRESSES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_ADDRESSES.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Address role (REF_TYPE_Addr_DocRoles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_ADDRESSES.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching for an active binding, otherwise 'N' |
| RETURN SI_DOC_ADDRESSES%ROWTYPE |
Binding record |
-
FUNCTION GET_DOC_D_VALUE
Get a date value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.D_VALUE%TYPE |
Date value |
-
FUNCTION GET_DOC_D_VALUE
Get a date value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.D_VALUE%TYPE |
Date value |
-
FUNCTION GET_DOC_N_VALUE
Get a numerical value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.N_VALUE%TYPE |
Numerical value |
-
FUNCTION GET_DOC_N_VALUE
Get a numerical value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.N_VALUE%TYPE |
Numerical value |
-
FUNCTION GET_NEIGHBOR_DOC_LIST
Get a list of documents with the same type and provider as a specified one, ordered by document periods
start dates. You can restrict start and end dates in document periods.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document |
| dt_D_BEGIN_MIN |
IN |
SD_DOCUMENTS.D_BEG%TYPE |
DATE |
NULL |
Minimum start date |
| dt_D_END_MIN |
IN |
SD_DOCUMENTS.D_END%TYPE |
DATE |
NULL |
Minimum end date |
| dt_D_BEGIN_MAX |
IN |
SD_DOCUMENTS.D_BEG%TYPE |
DATE |
NULL |
Maximum start date |
| dt_D_END_MAX |
IN |
SD_DOCUMENTS.D_END%TYPE |
DATE |
NULL |
Maximum end date |
| ch_C_INCLUDE_SELF |
IN |
CHAR |
CHAR |
'Y' |
Include the specified document into the list? {*} 'Y' — include the document {*} 'N' - exclude the document |
| ch_C_CHECK_WORKFLOW |
IN |
CHAR |
CHAR |
'N' |
Search only among documents with the same workflow? {*} 'Y' — search only among documents with the same workflow {*} 'N' — ignore workflows |
| RETURN DOC_PERIOD_TABLE_TYPE |
Table with documents with the same type and provider as the specified one |
| PIPELINED |
-
FUNCTION GET_NEXT_DOC_NO
Get the next available number by a document type.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_TYPE_ID |
IN |
SD_DOCUMENTS.N_DOC_TYPE_ID%TYPE |
NUMBER |
|
Document type (REF_TYPE_Document_Type reference data) |
| num_N_PARENT_DOC_ID |
IN |
SD_DOCUMENTS.N_PARENT_DOC_ID%TYPE |
NUMBER |
|
Parent document |
| dt_D_DOC |
IN |
SD_DOCUMENTS.D_DOC%TYPE |
DATE |
NULL |
Document date |
| RETURN SD_DOCUMENTS.VC_DOC_NO%TYPE |
Next available number |
-
FUNCTION GET_N_DOC_WORKFLOW_ID
Get a document workflow.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.N_WORKFLOW_ID%TYPE |
Document workflow |
-
FUNCTION GET_OBJ_VALUE_BY_ROLE
Get a record for a binding between an object and a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_ADDRESSES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_ADDRESSES.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Object role (REF_TYPE_Obj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_ADDRESSES.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching for an active binding, otherwise 'N' |
| RETURN SI_DOC_OBJECTS%ROWTYPE |
Binding record |
-
FUNCTION GET_DOC_CL_VALUE
Get a CLOB value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_VALUE_TYPE_ID |
IN |
SD_DOC_VALUES.N_DOC_VALUE_TYPE_ID%TYPE |
NUMBER |
|
Custom field |
| RETURN SD_DOC_VALUES.CL_VALUE%TYPE |
CLOB value |
-
FUNCTION GET_DOC_CL_VALUE
Get a CLOB value of a custom field.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOC_VALUES.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| vch_VC_DOC_VALUES_TYPE_CODE |
IN |
SD_DOC_VALUES_TYPE.VC_CODE%TYPE |
VARCHAR2 |
|
Custom field code |
| RETURN SD_DOC_VALUES.CL_VALUE%TYPE |
CLOB value |
-
FUNCTION GET_D_BEGIN
Get a start date of a document validity period.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| RETURN SD_DOCUMENTS.D_BEGIN%TYPE |
Period start date |
-
FUNCTION GET_OBJECT_BY_ROLE
Get an object by a role in a document.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Object role (REF_TYPE_Obj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching among active bindings between objects and the document, otherwise 'N' |
| RETURN SI_DOC_OBJECTS.N_OBJECT_ID%TYPE |
Object in the role |
-
FUNCTION GET_ROOT_BASE_CONTRACT_ID
Get a top-level basic contract for a contract.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SD_DOCUMENTS.N_DOC_ID%TYPE |
NUMBER |
|
Contract |
| RETURN SD_DOCUMENTS.N_DOC_ID%TYPE |
Top-level basic contract |
-
FUNCTION GET_SUBJECT_BY_PARENT_ROLE
Get a subject by a role either in a document or one of its parent documents.
| Argument |
Direction |
Reference type |
Type |
Default value |
Description |
| num_N_DOC_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ID%TYPE |
NUMBER |
|
Document |
| num_N_DOC_ROLE_ID |
IN |
SI_DOC_SUBJECTS.N_DOC_ROLE_ID%TYPE |
NUMBER |
|
Subject role (REF_TYPE_Subj_Roles reference data) |
| ch_C_ACTIVE |
IN |
SI_DOC_SUBJECTS.C_ACTIVE%TYPE |
CHAR |
'Y' |
'Y' when searching among active bindings between subjects and the document, otherwise 'N' |
| RETURN SI_DOC_SUBJECTS.N_SUBJECT_ID%TYPE |
Subject in the role |