Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Generate CAP Project and Fiori List Report App from Figma Design

  1. In the Cline panel, choose Plan Mode.

plan mode

  1. Copy and paste the following prompt into the task input:

    Generate a new CAP project and SAP Fiori app based on following Figma design.
    Include technical key and business key for all entities.
    Use MCP servers and follow all rules.
    
    <Copy and Paste Figma screenshot(png) for Screen 1 - List Report here> 
    
  2. Open Figma, right-click on "Screen 1 - List Report" -> Copy/Paste as -> Copy as PNG

Note

Refer to ex 1.4 Export your designs to copy Figma PNG for list report.

cline task

  1. Press Enter to execute the task.

  2. Cline prepares an Implementation Plan using the AI model and MCP servers.

    • During preparation, Cline may request approval to use MCP servers.
    • Click Approve.

    cds mcp approval

    • After executing 20 API requests Cline needs manual approval click to proceed.

    autoapprove task

    If you face terminal issue as shown below

    • Cline remains pending and commands (such as npm install) are not executed in the VS Code terminal.

    Solution: Toggle between Act and Plan mode, then click Resume Task.

    terminal

    Solution:

    resume task

  • Cline may ask additional questions to prepare the plan. Enter the following information only if cline asks for it:
    1. Would you like to specify a project name? travel-management
    2. Would you like to provide a Fiori app name? process-travels
    3. Would you like to include sample data? yes
    4. Would you like to specify any additional features beyond what's shown in Figma? no additional features required beyond figma design
  1. Once the implementation plan is ready, review it.

Note

The implementation plan generated by Cline may differ from the example shown below. Below image is just for reference.

implementation plan

  1. Switch to Act mode.

  2. Cline executes the implementation plan with the following steps:

    Monitor the execution process and manually approve Cline requests whenever prompted to proceed

    • Cline runs the command automatically to initialize your CAP project:

      cds init travel-management
      
    • Uses the cds-mcp server to generate the data model and service. When prompted, click Approve to allow this action.

    • Before saving the generated data model to your project, Cline will ask you to review and confirm the content. Click Save to proceed.

Note

To Auto-approve future save requests -> Activate both Edit project files and Edit all files as shown below.

![edit file autoapprove](./images/edit-file-autoapprove.png)
  • Cline creates sample data files automatically (in .csv format) for your project.

  • After the app is generated successfully, Cline installs all required dependencies for your project:

    cd <project-name> && npm install

  • Finally, Cline starts the application for you:

    cd <project-name> && npm run watch-<project-name>


  1. After completing all the planned steps, the application should automatically open in your browser, displaying a travel list report application that matches the Figma design.

Note

Windows security may ask 'Do you want to allow public and private network to access this app'. Click on Allow

node js runtime

application preview

Troubleshoot

  1. Application preview does not open automatically in the browser:

    • Close current task and start new task.
    • Enter prompt Preview application
    • If the issue still exists, then you can start watch script manually.
      • Open the package.json file.
      • Right click on watch script and select Run Script.

    watch script

  2. If the application prompts for authentication, use username: dummy and password: dummy

  3. In the browser, If your application does not load or displays a blank page:

  • Open Developer Tools in your browser to check the error message.

    • Windows: Press F12 or Ctrl + Shift + I

    • Mac: Press Cmd + Option + I

      developer tools

  • For a 404 error, enter the prompt:
    Error: Could not load metadata: 404 Not Found

    • Press Enter and Cline will fix the service URL path issue.
  • For a 200 error, enter the prompt:
    Check if the EDM JSON expression ($edmJson) syntax is incorrect and validate it using CAP MCP.

  • If the issue still exists, enter this prompt: Remove all instances of EDM JSON ($edmJson) expression syntax from the code.


Continue to - Exercise 2.1 - Enable automatic data loading in List Report