Skip to Content
author's profile photo
Former Member

Grouping ODS Data???

Hello everyone,

I have 2 ODS.

1 = ZODS1

2 = ZODS2

Key fields in ZODS1 = A, B , C, D

Key fields in ZODS2 = A, B , C

I have to load data from ZODS1 to ZODS2.

So i have to select from ZODS1 and group the data using key A,B,C and some other condition.

This iam doing in START ROUTINE of update rules in ZODS2.

So what is logic in START ROUTINE to group the data coming from ZODS1 into ZODS2 based on the key A,B,C.

Can you please let me know the process???

Thanks

KT

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jan 25, 2005 at 11:55 AM

    You do not have to do this.

    If the update rule to ODS2 are update type 'addition' (default), BW will do the 'grouping' automatically.

    ODS1 contains

    A B C D KF

    1 2 3 4 10

    1 2 3 5 20

    ODS2 will contain

    A B C KF

    1 2 3 10 when receives the first record

    1 2 3 30 total when receives second record

    Philippe

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      you cannot do this because you have no assurance that all the records regarding the same keys A B C will be in the same datapackage. In your example

      Ordernumber LastChangedOn QTY

      111 20.01.2005 10

      111 21.01.2005 -10

      222 20.01.2005 20

      can be in one package

      222 21.01.2005 -10

      can be in another package

      So you have to do this before the extraction. Instead of using generated DS 8ZODS1, you have to create your own DataSource based on infoset query.

      Other option is to have an additional layer ODS3 and you do your test between 2 and 3.