Skip to Content
0
May 14, 2018 at 12:36 PM

Field routine in the transformation

227 Views Last edit May 14, 2018 at 12:43 PM 5 rev

Hi Gurus,

I am a new BI user and trying to write a field routine for the field "Counter" in the transformation from one DSO1 to another DSO2 (or in transformation from DataSource in DSO1). The field “Counter” is defined only in the target DSO and is not filled from source. The initial value of counter should be 1 and increases by 1 for each new record for the Key Purchasing no., Purchasing Item and Number. Purchasing no. and purchasing Item are always same where the Number should be sorted in ascending order. see example Input

There are many purchasing no., Purchasing Item in the PSA or in DSO1. So the field Counter should be filled in the same way.

Input:

Purchasing no. | Purchasing Item | Number

1111 | 10 | 1

1111 | 10 | 6

1111 | 10 | 5

Output:

Purchasing no. | Purchasing Item | Number | Counter

1111 | 10 | 1 | 1

1111 | 10 | 5 | 2

1111 | 10 | 6 | 3

Thank you