Skip to content

KVSPSAFindPSPAndBudgetLine#

Procedures#

ChooseBudgLineForPSPLine(Record KVSPSAJobPSPLine, Enum KVSPSAJobBudgetLineType, Code[20], Code[20], Integer, Record KVSPSA Job Budget Line) : Boolean#

Summary: Choose Budget Line for PSP Line

procedure ChooseBudgLineForPSPLine(JobPSPLine: Record "KVSPSAJobPSPLine"; TypeFilter: Enum "KVSPSAJobBudgetLineType"; NoFilter: Code[20]; VariantCodeFilter: Code[20]; OldLineNo: Integer; var JobBudgetLine: Record "KVSPSA Job Budget Line"): Boolean

Parameters:

  • JobPSPLine: Job PSP Line
  • TypeFilter: Type Filter
  • NoFilter: No Filter
  • VariantCodeFilter: Variant Code Filter
  • OldLineNo: Old Line No
  • JobBudgetLine: Job Budget Line

Returns: Founded

FindJobAndPSPLine(Code[20], Code[20], Code[20], Code[20], Code[20], Record Job, Record KVSPSAJobPSPLine, Text) : Boolean#

Summary: This procedure trys to find a Job and a Job PSP Line for the given parameters. If the Job is not found, an error message is returned in ErrorText. If the Job is found, but no active WBS could be found, an error message is returned in ErrorText. If the Job is found, but no active WBS contains a WBS line that is of type Work Package and shows the given values, an error message is returned in ErrorText. If the Job, the active WBS and the WBS line are found, the Job and the JobPSPLine are returned. If the Job, the active WBS and the WBS line are found, the function returns true. If the Job, the active WBS and the WBS line are not found, the function returns false. If the Job, the active WBS and the WBS line are found, but the WorkPackageCode is empty, an error message is returned in ErrorText. If the Job, the active WBS and the WBS line are found, but the WorkPackageCode is not found in the active WBS, an error message is returned in ErrorText.

procedure FindJobAndPSPLine(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; var Job: Record "Job"; var JobPSPLine: Record "KVSPSAJobPSPLine"; var ErrorText: Text): Boolean

Parameters:

  • JobNo: The Job No. of the Job PSP Line to find.
  • WorkPackageCode: The Work Package Code of the Job PSP Line to find.
  • PhaseCode: The Phase Code of the Job PSP Line to find.
  • TaskCode: The Task Code of the Job PSP Line to find.
  • StepCode: The Step Code of the Job PSP Line to find.
  • Job: The Job to find.
  • JobPSPLine: The Job PSP Line to find.
  • ErrorText: The error message to return if the Job, the active WBS or the WBS line are not found.

Returns: true if the Job, the active WBS and the WBS line are found, false otherwise.

FindUniqueBudgetLine(Code[20], Code[20], Code[20], Code[20], Code[20], Enum KVSPSAJobBudgetLineType, Code[20], Code[20], Record KVSPSA Job Budget Line) : Boolean#

Summary: This procedure trys to find a unique Job Budget Line for the given parameters.

procedure FindUniqueBudgetLine(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; JobBudgetLineType: Enum "KVSPSAJobBudgetLineType"; No: Code[20]; VariantCode: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"): Boolean

Parameters:

  • JobNo: The Job No. of the Job Budget Line to find.
  • WorkPackageCode: The Work Package Code of the Job Budget Line to find.
  • PhaseCode: The Phase Code of the Job Budget Line to find.
  • TaskCode: The Task Code of the Job Budget Line to find.
  • StepCode: The Step Code of the Job Budget Line to find.
  • JobBudgetLineType: The Type of the Job Budget Line to find.
  • No: The No. of the Job Budget Line to find.
  • VariantCode: The Variant Code of the Job Budget Line to find.
  • JobBudgetLine: The Job Budget Line to find.

Returns: true if a unique Job Budget Line was found.

FindUniqueBudgetLine(Code[20], Code[20], Code[20], Code[20], Code[20], Enum KVSPSAJobBudgetLineType, Code[20], Code[20], Record KVSPSA Job Budget Line, Boolean) : Boolean#

Summary: This procedure trys to find a unique Job Budget Line for the given parameters.

procedure FindUniqueBudgetLine(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; JobBudgetLineType: Enum "KVSPSAJobBudgetLineType"; No: Code[20]; VariantCode: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; UseBudgetStatusFilter: Boolean): Boolean

Parameters:

  • JobNo: The Job No. of the Job Budget Line to find.
  • WorkPackageCode: The Work Package Code of the Job Budget Line to find.
  • PhaseCode: The Phase Code of the Job Budget Line to find.
  • TaskCode: The Task Code of the Job Budget Line to find.
  • StepCode: The Step Code of the Job Budget Line to find.
  • JobBudgetLineType: The Type of the Job Budget Line to find.
  • No: The No. of the Job Budget Line to find.
  • VariantCode: The Variant Code of the Job Budget Line to find.
  • JobBudgetLine: The Job Budget Line to find.
  • UseBudgetStatusFilter: If true, the Status filter for the Budget Line is used.

Returns: true if a unique Job Budget Line was found.

TestConnectedBudget(Code[20], Code[20], Code[20], Code[20], Code[20], Integer, Text, Enum KVSPSAJobBudgetLineType, Code[20], Code[20], Record KVSPSA Job Budget Line, Text) : Boolean#

Summary: Test connected Budget Line

procedure TestConnectedBudget(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; BudgetLineNo: Integer; TypeText: Text; Type: Enum "KVSPSAJobBudgetLineType"; No: Code[20]; VariantCode: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var ErrorText: Text): Boolean

Parameters:

  • JobNo: Job No
  • WorkPackageCode: Work Package Code
  • PhaseCode: Phase Code
  • TaskCode: Task Code
  • StepCode: Step Code
  • BudgetLineNo: Budget Line No
  • TypeText: Type Text
  • Type: Type
  • No: No
  • VariantCode: Variant Code
  • JobBudgetLine: Job Budget Line
  • ErrorText: Error Text

Returns: Connected

Events#

KVSPSAOnBeforeTestConnectedBudget(Code[20], Code[20], Code[20], Code[20], Code[20], Integer, Text, Enum KVSPSAJobBudgetLineType, Code[20], Code[20], Record KVSPSA Job Budget Line, Text, Boolean, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeTestConnectedBudget(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; BudgetLineNo: Integer; TypeText: Text; Type: Enum "KVSPSAJobBudgetLineType"; No: Code[20]; VariantCode: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var ErrorText: Text; var OK: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAFindPSPAndBudgetLine", 'KVSPSAOnBeforeTestConnectedBudget', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeTestConnectedBudget(JobNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; BudgetLineNo: Integer; TypeText: Text; Type: Enum "KVSPSAJobBudgetLineType"; No: Code[20]; VariantCode: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var ErrorText: Text; var OK: Boolean; var IsHandled: Boolean)
begin
end;