Posts

Showing posts from December, 2025

ABAP - Create CSV Files Easily Using CL_CSV_FACTORY

Hello Everyone! 👋 Create CSV Files Easily in ABAP Using CL_CSV_FACTORY In many scenarios, we need to download internal table data in CSV format. Often, the requirements vary for example, using different field separators such as semicolon (;), comma (,). Additionally, we may need to include a header row and format fields like date, time, or timestamp. All of this can be handled very easily using the CL_CSV_FACTORY class. The best part is that this class is also available in the SAP Public Cloud. Step 1 – Select the Data SELECT FROM vbak FIELDS vbeln, vbtyp, erdat INTO TABLE @DATA(lt_test) UP TO 10 ROWS. Step 2 – Create a Simple CSV with Header This example generates a CSV using a semicolon as the delimiter and includes the header row automatically. DATA(lv_xstring_v1) = cl_csv_factory=>new_writer( )->set_delimiter( ';' )->set_write_header( abap_tr...

RAP - Real Time UI Updates Using Event-Driven Side Effects

Hello Everyone! 👋 Real-Time UI Updates in RAP Using Event-Driven Side Effects We've all come across situations where something changes in the backend, and we want those updates to automatically reflect in the UI without manually refreshing the page. In traditional setups, we used ABAP Channels for this but how can we achieve the same in RAP? Here's a simple example: I'm updating the travel status in one class/report, while the app is open in parallel. As soon as the status is updated in the backend, it automatically reflects in the UI no refresh needed! This is made possible through Event-Driven Side Effects . This is useful when: Background jobs update data We want to notify users with messages in real time Multiple users are working on the same data simultaneously Step 1 – Add the event-driven side effects in the BDEF managed with additional save .... .. define behavior for YR_YABS_TRAVEL...

RAP - Usage of Static Default Factory Action

Hello Everyone! 👋 The Usage of Static Default Factory Action in RAP Have you ever encountered a scenario in a RAP managed where you need to execute custom logic when the Create button is pressed? This is possible using a static default factory action , which is automatically triggered when the Create button is clicked in the SAP Fiori Elements UI. This approach can be applied in various situations, such as: Setting default values from different sources Performing parameterized create operations The Use of Factory Actions and Types: Factory actions allow you to create entity instances: Static factory actions are not bound to any specific instance but apply to the entire entity. They are ideal for creating instances with predefined default values. Instance factory actions can be used when you need to copy certain values from an existing instance. When defin...

CDS - Grouping Action Parameters in the Action Parameter Dialog

Image
Hello Everyone! 👋 Grouping Action Parameters in the Action Parameter Dialog We already know that fields on the Object Page can be grouped easily using Facets, making the UI cleaner and more intuitive. The good news is this capability is now available for action popups as well. With the new facet purpose OperationalParameterFacets , you can organize action parameters into logical groups inside the action parameter dialog. Using the OperationalParameterFacets annotation, action parameters can be grouped under specific titles, just like facets on the Object Page. @EndUserText.label: 'Abstract Test' define abstract entity ZGROUP_PARAMETERS { @UI.facet: [ { purpose: #OPERATION_PARAMETER, id: 'FieldGroup1', label: 'Field Group 1', type: #FIELDGROUP_REFERENCE, targetQualifier: 'FieldGroup1', position: 10 }, { purpose: #OPERATION_PARAMETER, id: ...

Fiori URL Generation and Navigation Using CL_LSAPI_MANAGER

Hello Everyone!👋 Fiori URL Generation and Navigation Using CL_LSAPI_MANAGER CL_LSAPI_MANAGER - This class allows you to easily generate SAP Fiori Launchpad URLs or trigger intent-based navigation. You’ll find it useful when you need to: Launch Fiori apps from the SAP GUI Generate dynamic Fiori URLs using semantic objects, actions, and parameters Share specific Fiori app links via email Navigate directly to transactions, and more DATA(lo_lsapi) = cl_lsapi_manager=>get_instance( ). " Generate URL to launch a Fiori app DATA(lv_flp_app_url) = cl_lsapi_manager=>create_flp_url( object = 'MaintenanceObject' " Semantic Object action = 'listFunctionalLocStructure' " Action system_alias = 'LOCAL' " SM59 Alias for FES parameters = VALUE #( name = 'DY_TPLNR' value = '0001' ) ). " Generate URL to launch a tran...