cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Collumn concatenate?

warcsi
Participant
0 Kudos
207

Hi, 
I have a question about what I am trying to do is even possible. 

A standard FIORI application is using the CDS View C_Manageoperations, I figured out if I extend the CDS I can get a couple more fields that are usefull. 
So I created this 

@AbapCatalog.sqlViewAppendName: 'Z_EXTEND_TEST'
@EndUserText.label: 'Erweiterrung von C_MANAGEOPERATIONS'
extend view C_Manageoperations with ZC_MANAGEOPERATIONS_EXT


association [1..1] to ZC_PRODUCTIONITEM as _object on _object.Aufpl =  $projection.orderinternalbillofoperations

{

@EndUserText.label: 'Systemstatus'
    _object.SystemStatus
}

The association to the extension 

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Fertigungsaufträge'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #X,
    sizeCategory: #S,
    dataClass: #MIXED
}
define view entity ZC_PRODUCTIONITEM as select from afvc
association [1..1] to ZC_StatusObjectStatusBasic as _ZSystemStatus on _ZSystemStatus.Objnr = afvc.objnr
{
key aufpl as Aufpl,
key aplzl as Aplzl,
objnr as Object,
_ZSystemStatus.Text as SystemStatus
}
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Status Object for buffering data'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #X,
    sizeCategory: #S,
    dataClass: #MIXED
}
define view entity ZC_StatusObjectStatusBasic as select from jest 
    left outer join ZC_SYSTEMSTATUS as _Status on _Status.Istat = jest.stat 
                                    
//association [1..1] to ZC_SYSTEMSTATUS as _systat ON _systat.statusText
{
   key jest.objnr as Objnr,
   key jest.stat as Stat,
   _Status.Text


}
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Systemstatus description german'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #X,
    sizeCategory: #S,
    dataClass: #MIXED
}
define view entity ZC_SYSTEMSTATUS as select from tj02t 
{
key istat as Istat,
key spras as Spras,
txt04 as Text


}
where spras = 'D'


This delivers me this result. 

warcsi_0-1739197844706.png

This is all okay and is the expected behaviour I had so far, my question is would it be possible to Concatenate position 20 into one single entry using both of the assigned System Status and if possible how could it be done. 

I would really aprecaite pointers on my issue.

Thank you in advance have a nice day!

 

Accepted Solutions (1)

Accepted Solutions (1)

NooruBohra
Active Participant
0 Kudos
warcsi
Participant
0 Kudos
Hi, sorry for the late reply thank you very much for your answer, I implemented this solution and it works perfectly.

Answers (1)

Answers (1)

raymond_giuseppi
Active Contributor

Look for usage of STRING_AGG.

warcsi
Participant
0 Kudos
Hi Thank you very much for your reply, yes that was what I was looking for.