Skip to Content
0

Rank function in SAP BODS

Jun 29, 2017 at 07:57 PM

74

avatar image

How do we implement the following logic in BODS for column fields:(say Line_num)

For every unique combination of other key fields (SERVID, PRODID, BILL_ACCT,) this has to incremented by 1. E.g. the first record will 1 and second 2 , so on so forth

.

Can we use the following syntax in the Query transform:

gen_row_num_by_group(SERVICID,PRODID,BILL_ACCT) and this should be given in the query

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Dirk Venken
Jun 30, 2017 at 09:28 AM
0

Yes.

Make sure that your data is sorted on SERVICID, PRODID and BILL_ACCT before processing it in the Query transform!

Share
10 |10000 characters needed characters left characters exceeded
Harini Ramani Jul 01, 2017 at 10:19 AM
0

Is there any way of sorting the data. It's a source file

The combination of the 3 columns service Id , ban and prod Id are unique.

So we have column Line num where the values are incremented by one if the same combination is repeated

Example

A B C 1

A B C 2

So how can I achieve this in BOds?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Harini,

As Dirk mentioned, you can sort the input data coming from Flat file in the Query Transform>Advanced options and then in the next query transform apply the gen_row_num_by_group(SERVICID,PRODID,BILL_ACCT) function for the mapping of LINE_NUM column

Regards

Arun Sasi

0
Harini Ramani Jul 01, 2017 at 10:19 AM
0

Is there any way of sorting the data. It's a source file

The combination of the 3 columns service Id , ban and prod Id are unique.

So we have column Line num where the values are incremented by one if the same combination is repeated

Example

A B C 1

A B C 2

So how can I achieve this in BOds?

Share
10 |10000 characters needed characters left characters exceeded