Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 3.28 KB

File metadata and controls

97 lines (70 loc) · 3.28 KB

Add Analytical Chart to List Report Page

Step 1: Add destination column before creating analytical chart

  1. In the Cline panel, close the previous task and start a new one. Select Plan Mode.
  2. Enter this prompt in the task input:
    Create and add a new column "Destination" to the list report table
    
  3. Press Enter to begin. Cline will generate an Implementation Plan.

Note:

  • Cline may ask additional questions to prepare the plan. Enter the following information only if cline asks for it:
    1. I have no destination fields in travel entity. Would you like to add destination field to the CDS data model ? Yes
    2. Where the column should appear in list report? next to agency column
    3. Would you like to include sample data? yes
  1. Review the plan when ready.

Note

The implementation plan generated by Cline may differ from the example shown below.

destination implementation plan

  1. Switch to Act mode.
  2. Cline will execute the implementation plan.
  3. After completion, confirm the destination column appears in the list report.

destination column

Step 2: Create Analytical Chart showing the average price per destination

  1. Close the current task. Start new task. Switch to Plan mode.

  2. Enter prompt in the task input:

    Add an analytical column chart to the List Report (ALP) that displays the average price per destination.
    Configure Price as an aggregated property in the analytical chart,
    and use the Views configuration to display the analytical chart above the table.
    Use fiori mcp
    
  3. Press Enter to begin. Cline will generate an Implementation Plan.

  4. Make sure Cline uses fiori-mcp to understand best approach for analytical chart creation.

doc search

  1. Review the plan when ready.

Note

The implementation plan generated by Cline may differ from the example shown below.

chart implementation plan

chart implementation plan 2

  1. Enter prompt show code to review below technical plan in detail.

Key Technical Details:

Analytics Configuration:

@Aggregation.ApplySupported: {
  Transformations: ['aggregate', 'groupby', 'filter'],
  GroupableProperties: [Destination],
  AggregatableProperties: [{Property: TotalPrice}]
}
@Analytics.AggregatedProperty #avgPrice: {
  Name: 'avgTotalPrice',
  AggregationMethod: 'average',
  AggregatableProperty: 'TotalPrice',
  ![@Common.Label]: 'Average Price'
}

Chart Annotation:

@UI.Chart: {
  $Type: 'UI.ChartDefinitionType',
  Title: 'Average Price per Destination',
  ChartType: #Column,
  DynamicMeasures: ['@Analytics.AggregatedProperty#avgPrice'],
  Dimensions: [Destination]
}
  1. Switch to Act mode and wait for task completion.

  2. After completion, verify the analytical chart and table both are displayed on the list report page.

analytical chart

Troubleshooting

  • If the Chart does not appear in the list report, Enter the prompt: Use fiori mcp to verify correct manifest configuration to display chart above table

  • If you see [50017] - Invalid data binding. Enter prompt: Invalid data binding with chart