cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Views - How to add Custom column

niranjanbk1
Member
0 Kudos

Hi,

I have two questions on CDS.

1. Is there a way to add a calculated column to CDS? eg: custom column (field) = Column D* Column D. This custom field not in data source, want to add directly in CDS. is that possible?

2 second question is, I am getting data in rows, is there a way to transpose those values into columns? eg: We have CDS with stock (Material, Qty, batch number) and three batch characteristics. When I pull data in CDS, material, Qty and batch numbers repeat for each batch characteristic and total values are not correct. Pl see example below:

Current CDS output:

Material Batch Qty Chars Value

4000 ABC 19500 REO 55

4000 ABC 19500 Moisture 10

4000 ABC 19500 KG.REO 8000

Expected:

Material Batch Qty REO Moisture KG.REO

4000 abc 19500 55 10 8000

Thanks in advance for your response.

Niranjan

Accepted Solutions (1)

Accepted Solutions (1)

Nelli_Lang
Discoverer
0 Kudos

Hello Niranjan,

to your first question:

Depending on your exact requirements, you could look into following extensibility options:

- App “Custom fields and logic” allows you to create and edit custom fields and extend CDS views

- App “Custom CDS Views” allows you to create your own CDS view and add custom fields

Following blog provides an short overviews of these features: https://blogs.sap.com/2015/09/30/the-key-user-extensibility-tools-of-s4-hana/

Best regards

Nelli

Answers (0)