Custom_Alloc

이 함수는 Factor POV를 할당의 기초로 사용하여 Source POV를 Destination POV에 할당하고 할당된 총 금액을 Elimination POV에 역 게시하는 옵션을 제공합니다. 이 함수는 사용자정의 차원 할당용으로 설계되었습니다.

반환 값

반환 값이 없습니다.

구문

Custom_Alloc(Destination,Source,Factor,FactorN,FactorD,
Elimination)

표 12-18 Custom_Alloc 함수 구문

매개변수 적합한 값

Destination

계정, ICP 및 사용자정의 1-4 멤버의 적합한 조합인 적합한 대상 POV입니다.

소스

차원 멤버의 적합한 조합인 적합한 소스 POV입니다. Source는 할당할 금액입니다.

Factor

적합한 소스 POV입니다. Factor는 할당 요소를 저장하는 데 사용되는 계정입니다.

FactorN

적합한 소스 POV입니다. FactorN은 할당의 기초로 사용되는 분자 요소입니다.

FactorD

적합한 소스 POV입니다. FactorD는 할당의 기초로 사용되는 분모 요소입니다.

Elimination

적합한 소스 POV입니다. Elimination은 빈 문자열("")일 수 있으며, 이 경우 이 매개변수가 무시됩니다. Elimination 매개변수가 설정된 경우 Destination POV에 게시된 금액에 -1을 곱하여 Elimination POV에 게시합니다.

자세한 설명

이 함수는 Factor POV를 할당의 기초로 사용하여 Source POV를 Destination POV에 할당하고 할당된 총 금액을 Elimination POV에 역 게시하는 옵션을 제공합니다. 이 함수는 사용자정의 차원 할당용으로 설계되었습니다.

Factor 매개변수는 FactorNFactorD로 나눈 결과를 저장합니다. 요소에서 현재 엔티티보다 오래된 엔티티를 참조할 수 있게 하려면 이 매개변수가 필요합니다.

Source POV의 엔티티가 상위 멤버인 경우 하위 멤버 레벨에서 계산을 실행하기 전에 상위 멤버를 통합해야 합니다. 상위 통화가 하위 통화와 다른 경우 하위 멤버 레벨에서 계산을 실행하기 전에 관련된 모든 통화의 환산도 실행해야 합니다.

호출 루틴에서 변수를 설정하여 Custom_Alloc 함수로 전달하는 것이 좋습니다. 이 함수는 Destination, Source, Factor, FactorN, FactorD 및 Elimination POV를 정의합니다. 또한 호출 루틴의 변수 이름을 Custom_Alloc 함수와 동일하게 설정하는 것이 좋습니다.

Elimination 매개변수는 빈 문자열("")일 수 있으며, 이 경우 이 매개변수가 무시됩니다. Elimination 매개변수가 설정된 경우 Destination POV에 게시된 금액에 -1을 곱하여 Elimination POV에 게시합니다.

총 판매에 대한 제품 판매의 비율을 기준으로 제품에 Telephone 계정이 할당됩니다. 할당된 금액의 역수가 Allocations 계정에 게시됩니다.

표 12-19 Custom_Alloc 함수 예

계정 Jan2014 Feb2014 Mar2014

A#Telephone.C1#[None]

100

300

400

A#Sales.C1#Product1

1000

1000

1000

A#Sales.C1#Product2

1000

2000

3000

A#Sales.C1#TotalProducts

2000

3000

4000

Custom_Alloc(A#Telephone","A#Telephone.C1#[None]", "A#Factor", A#Sales", "A#Sales.C1#TotalProducts", "A#ProductAllocations.C1#[None])

N/A

N/A

N/A

A#Factor.C1#Product1

0.50

0.33

0.25

A#Factor.C1#Product2

0.50

0.66

0.75

A#Telephone.C1#Product1

50

100

100

A#Telephone.C1#Product2

50

200

300

A#ProductAllocations.C1#[None]

-100

-300

-400

CUSTOM_ALLOC 함수에서 반환되는 결과는 다음과 같습니다.

HS.EXP "A#Factor = A#Sales / A#Sales.C1#TotalProducts"
HS.EXP "A#Telephone = A#Telephone.C1#[None] * A#Factor"
HS.EXP "A#Allocations.C1#[None] = (A#Telephone.C1#[None] * -1)" 

샘플 스크립트

이 스크립트에는 다음 정보가 들어 있습니다.

  • 호출 루틴 내에 작성된 샘플 명령문

  • 호출 루틴에서 설정되어 Custom_Alloc 함수로 전달된 변수

  • Custom_Alloc 함수와 동일하게 설정된 호출 루틴의 변수 이름

    Sub Calculate()
    Dim Destination
    Dim Source
    Dim Elimination
    Dim Factor
    Dim FactorN
    Dim FactorD
    Dim C1list
    Dim C1item
    C1list = HS.Custom1.List("Alloc")
    For Each C1item in C1list  
    Source = "A#Telephone.C1#[None]"
    Destination = "A#Telephone.C1#" & C1item
    Factor = "A#Factor.C1#" & C1item
    FactorN = "A#Sales.C1#" & C1item
    FactorD = "A#Sales.C1#TotalProducts"
    Elimination = "A#ProductAllocations.C1#" & C1item 
    Call Custom_Alloc(Destination,Source,Factor,FactorN,
    FactorD,Elimination)
    Next 
    End Sub
    ' Beginning of the Custom_Alloc function 
    Sub Custom_Alloc(Destination,Source,FactorN,FactorD,
    Elimination)
    HS.Clear Factor
    HS.Exp Factor & " = " & FactorN & "/" & FactorD
    HS.EXP Destination & " = " & Source & " * " & Factor 
    If Elimination <> "" Then
    HS.EXP Elimination & " = " & Source & " * -1 * " & Factor
    End If
    End Sub