cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in SAP HANA

Former Member
0 Kudos

Hi Experts,

I am new SAP HANA.

Can any one of you help me on this issue?

Actually my input is:   

Customer ID
Customer NameAmountQuantity
1000C1100012
1000C120005
1000C115009
1000C1180016
1001C250018
1000C16006
1000C170017
1001C218605
1001C25003

I need the result in the below format

Customer ID     Customer Name     Amount     Quantity

1000                         C1                    1000               12

                                                        2000               5

                                                        1500               9

                                                        1800              16

                                                        600                6

                                                        700                17


Sub Total:                                        7600              67 


1001                         C2                  500                 18

                                                      1860                5

                                                       500                 3


Sub Total:                                      2860              26


Grand Total:                                  10460             93

Accepted Solutions (1)

Accepted Solutions (1)

rindia
Active Contributor
0 Kudos

Hi Hityshi,,

The output which you are looking for is actually done in reporting tool like WebIntelligence (WebI).

Regards

Raj

Former Member
0 Kudos

Hi Raj,

  I tried to generate this report in Webi but still customer name and customer id is repeating.Can you please solve this issue for me.

Regards,

Hityshi Gullipalli

rindia
Active Contributor
0 Kudos

Hi Hityshi,,

It is done by using Break functionality. Here you can find the tutorial.

Regards

Raj

Former Member
0 Kudos

Hi raj,

Its working.Thank you very much.

Regards,

Hityshi Gullipalli

former_member182302
Active Contributor
0 Kudos

Hi Hityshi,

I was thinking that you wanted the output to be framed at the backend itself ( As we are all trying to push as much as reporting logic to backend to see the optimal performance of HANA )

As Raj, rightly mentioned we can use "Break" functionality in WebI to display customer id and name only once.

Adding to it,you might also want to do the Sub Totals and Totals also using WebI .

Please find the link below

:

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna Tangudu,

Thank you for your valuable information.

Regards,

Hityshi Gullipalli.

Answers (1)

Answers (1)

former_member182302
Active Contributor
0 Kudos

Hi Hityshi,

Are you looking for an output like this:

Please find the select statement i have used below:


select DISTINCT "Customer ID" AS "Customer_ID","Customer Name" AS "Customer_Name", sum("Amount"), sum("Quantity")

    from krishna."Customer"

    group by grouping sets WITH TOTAL

    (

      ("Customer ID", "Customer Name","Amount","Quantity"),

      ("Customer ID", "Customer Name")

    )ORDER BY 1 NULLS LAST,2 NULLS LAST

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna Tangudu,

In that output the customer id and customer fields  display on first row only

Regards,

Hityshi Gullipalli