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.

KVSPSAFilterJobPSPLineFromBudgetLine(Record KVSPSA Job Budget Line, Record KVSPSAJobPSPLine) :#

Summary: Filters the Job PSP Line based on the Job Budget Line. Set the filters for the Job PSP Line based on the Job Budget Line. Job PSP Line is call by Reference.

procedure KVSPSAFilterJobPSPLineFromBudgetLine(JobBudgetLine: Record "KVSPSA Job Budget Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"): 

Parameters:

  • JobBudgetLine:
  • JobPSPLine:

KVSPSAFindLineForJobPSPLineFromBudgetLine(Record KVSPSA Job Budget Line) : Integer#

Summary: This procedure trys to find a Job PSP Line for the given Job Budget Line. If the Job PSP Line is found, the function returns the Line No. of the Job PSP Line.

procedure KVSPSAFindLineForJobPSPLineFromBudgetLine(JobBudgetLine: Record "KVSPSA Job Budget Line"): Integer

Parameters:

  • JobBudgetLine:

Returns: "Line No." of the Job PSP Line.

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) :#

Summary: Integration event raised before testing the connection of a budget line. This event allows subscribers to override the standard budget line connection validation logic with custom implementation.

[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;

Parameters:

  • JobNo: The job number to validate the budget connection for.
  • WorkPackageCode: The work package code of the PSP line.
  • PhaseCode: The phase code of the PSP line.
  • TaskCode: The task code of the PSP line.
  • StepCode: The step code of the PSP line.
  • BudgetLineNo: The budget line number to validate.
  • TypeText: The text representation of the type being validated.
  • Type: The job budget line type enum value being validated.
  • No: The number/code of the resource, item, or account being validated.
  • VariantCode: The variant code being validated.
  • JobBudgetLine: The job budget line record found during validation.
  • ErrorText: The error message text to be set if validation fails.
  • OK: The validation result - true if validation passes, false if it fails.
  • IsHandled: Indicates whether a subscriber has handled the validation. Set to true to skip standard validation logic.