Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
simon_hoeg
Product and Topic Expert
Product and Topic Expert
787

Dear SAP Community,

With the upcoming ABAP Platform 2025 and SAP S/4HANA 2025 Private Cloud Edition, the new FPM GenAI Service offers a new way to bring AI-powered interaction into classical FPM-based applications.
This service can be consumed via SAP BTP credits and is designed to seamlessly integrate large language models (LLMs) into ABAP-based UIs.

The Floorplan Manager (FPM) UI Framework provides an especially suitable foundation for this, thanks to its event-based control flow and stateful backend integration — both essential for combining generative AI logic with transactional business processes.

What is the FPM GenAI Service?

The FPM GenAI Service enables developers to connect their FPM applications with LLMs in order to interpret natural-language user input and transform it into application-specific operations at runtime.

Instead of navigating through the user interface in a traditional way, users can simply express their intent in natural language — for example:

“Please create a new business partner for SAP Deutschland SE & Co. KG”
“Show all open invoices from last month”

The service interprets the user’s request and executes the corresponding FPM events in the backend.

Key benefits:

  • Users no longer need expert-level knowledge about the UI or data model.

  • Reduced number of manual UI steps — one prompt replaces multiple operations.

  • Improved accessibility for occasional or business users.

Architecture Overview:

Architecture Overview of FPM GenAI ServiceArchitecture Overview of FPM GenAI Service

Step-by-Step Integration Guide for Application Developers

The following steps outline how to enable AI-driven interaction in an existing FPM application.

1. Define AI Use Cases

Collect all possible actions your application can perform that make sense for AI interaction.
Examples:

  • “Create a new business partner”

  • “Display all open sales orders for customer XYZ”

2. Define Parameters

Each operation may require parameters such as NAME, ADDRESS or SALES_ORDER_ID.
Collect them and describe how they relate to the operation.

3. Add Natural Language Descriptions

Provide concise, meaningful text descriptions for both operations and parameters.
Keep them short and precise — the LLM will use these to interpret prompts accurately.
(English is recommended for maintainability.)

4. Integrate AI into the UI

At the current stage, you can integrate the AI trigger via a button in your FPM toolbar.
In the demo applications, this is done using a button with an AI icon (sap-icon://ai), which opens the FPM Prompt RUIBB (component FPM_AI_QUICK_PROMPT).
A deeper integration with SAP Joule in the Fiori Launchpad is planned for the future.

5. Register Your Operations

Once your operations, parameters, and descriptions are ready, register them in the FPM GenAI Manager.

DATA: ls_operations TYPE if_fpm_genai_manager=>ty_s_operation,
      lt_operations TYPE if_fpm_genai_manager=>ty_t_operation,
      ls_parameter  TYPE if_fpm_genai_manager=>ty_s_parameter.

ls_operations-event_id    = 'AI_CREATE_BP'.
ls_operations-description = 'create a new business partner (BP)'.
ls_parameter-name         = 'COMPANY_NAME'.
ls_parameter-description  = 'only the company name (without legal form)'.
APPEND ls_parameter TO ls_operations-parameters.
APPEND ls_operations TO lt_operations.

DATA(lo_fpm_genai_manager) = cl_fpm_factory=>get_instance( )->get_genai_manager( ).
lo_fpm_genai_manager->set_operations( lt_operations ).

It’s recommended to register only those operations that are relevant to the current screen — this keeps prompts short and improves accuracy.

6. Execute the User Request

When the user submits a prompt, obtain the GenAI Manager API and call:

lo_fpm_genai_manager->execute_user_request( ).

7. Process the FPM Event

After receiving the LLM response, the FPM GenAI Manager creates and raises FPM events.
Handle these events in your implementation of IF_FPM_UI_BUILDING_BLOCK, typically in the method PROCESS_EVENT( ).

8. Handle Errors Gracefully

Use exception class CX_FPM_GENAI for error handling.
Possible cases include:

  • NO_USER_INPUT

  • USER_INPUT_ERROR

  • NO_OPERATIONS

  • GENAI_SDK_ERROR

Use the FPM Message Manager to communicate errors back to the user:

DATA(lo_msg_manager) = cl_fpm_factory=>get_instance( )->get_message_manager( ).
lo_msg_manager->report_error( cx_fpm_genai=>get_text( ) ).

That's everything for now 🙂 Now, let's check out the first

Example: EPM Demo Application (S_EPM_UX_BP)

The EPM demo application (S_EPM_UX_BP) has been enhanced to showcase the new GenAI capabilities.
The scenario demonstrates how the AI assistant can help with tasks such as creating business partners, listing products, and generating sales orders.

Step 1 – Create a New Business Partner

From the result list toolbar, select the AI button (“New”) and enter one of the following prompts:

“Please add a new business partner in the role customer, name = SAP Deutschland SE & Co. KG, street = Hasso-Plattner-Ring 7, city = 69190 Walldorf.”
“Hi, we have a new customer: SAP SE Deutschland. Copy the details from their imprint page.”

example2.png

Each of these prompts triggers the creation of a new business partner in the “Customer” role.
The AI framework interprets both structured and casual prompts and even derives parameter values (e.g., currency from country).

example3.png

Step 2 – Find Suitable Products

Next, the user can ask for product recommendations:

“Please compile a list of products that fit into the category laptops.”
“The customer wants laptops.”

The AI assistant understands synonyms (“laptop” ↔ “notebook”) thanks to semantic enrichment in parameter definitions.

example4.png

Step 3 – Create a Sales Order

Finally, the user can create a sales order:

“Please create a new sales order with each of the listed products.”
“Create a new SO, 10 items each, except the cheapest one.”

The AI framework handles parameter logic and even comparative instructions (“except the cheapest one”).

example5.png

Outlook and Further Resources

In upcoming releases, tighter integration with SAP Joule and Fiori Launchpad will further streamline the AI experience across the SAP ecosystem.

For more details, please refer to the SAP Help documentation.

You may also combine the new AI feature with the new FPM Camera and Audio functionalities.

Thanks to our developers ❤️ and I hope you like it 🙂

2 Comments