cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual element field displays but is duplicated for every work item

Y_D_ABAPER
Explorer
0 Kudos
196

Greetings all, first let me apologize as I am extremely new to ABAP, hence forgive my confusion. I am currently experimenting with an abap class that determines the current approver for work items. I am using virtual elements to determine this field which is displayed in my cds view as follows:

 

@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:Z_TEST_CLASS'
cast('' as abap.sstring( 12 )) as CurrentApprover,

 

My virtual element displays a current approver in my fiori elements preview, however, the same user is shown for every work item and I am completely stumped as to where I am going wrong. From my understanding the code should work correctly as I have:
 - Used the correct virtual element interfaces and methods
- Specified an internal table of type of my CDS view
- moved it_original-data into my local table
- have specified the fields that are required in my get_calculation_info method

 

 

 

View Entire Topic
junwu
Active Contributor
0 Kudos

just debug it. not just looking at the code.

MBartsch71
Participant
0 Kudos
Maybe the user shown is the user which is used for the workflow. Sometimes this is an special user which is used for the work items to proceed.