<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RAP &#8211; SAP EWM Help</title>
	<atom:link href="https://www.sapewmhelp.com/question-category/rap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sapewmhelp.com</link>
	<description>SAP EWM questions answered by experts — ABAP, S/4HANA, warehouse management</description>
	<lastBuildDate>Fri, 31 Oct 2025 17:52:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>How do you implement an Unmanaged Query in RAP, and what are the key steps involved?</title>
		<link>https://www.sapewmhelp.com/question/how-do-you-implement-an-unmanaged-query-in-rap-and-what-are-the-key-steps-involved/</link>
					<comments>https://www.sapewmhelp.com/question/how-do-you-implement-an-unmanaged-query-in-rap-and-what-are-the-key-steps-involved/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Fri, 31 Oct 2025 17:52:55 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=how-do-you-implement-an-unmanaged-query-in-rap-and-what-are-the-key-steps-involved</guid>

					<description><![CDATA[To implement an Unmanaged Query in RAP, you follow a structured approach involving several key steps. First, you create a CDS view entity that defines the data structure or projection you want to expose. Then, you define a Query Behavior Definition for that view using the keyword define behavior for ... implementation in class ... [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>To implement an <strong>Unmanaged Query</strong> in RAP, you follow a structured approach involving several key steps. First, you create a <strong>CDS view entity</strong> that defines the data structure or projection you want to expose. Then, you define a <strong>Query Behavior Definition</strong> for that view using the keyword <code>define behavior for ... implementation in class ... unmanaged</code>. This tells RAP that you will provide your own implementation logic rather than relying on managed data handling.</p>
<p>Next, you create an <strong>ABAP class</strong> (the query provider class) that implements the interface <strong><code>IF_RAP_QUERY_PROVIDER</code></strong>. The core method <strong><code>IF_RAP_QUERY_PROVIDER~SELECT</code></strong> must be redefined in this class. Inside this method, you write custom ABAP logic to retrieve data — it could be from a database table, an API, or even a legacy system. You then fill the result table and pass it back to the framework.</p>
<p>This unmanaged approach is used when data retrieval cannot be handled by CDS-based managed queries (for example, reading from custom logic, calling RFCs, or combining different data sources). It provides greater flexibility at the cost of additional coding responsibility.</p>
<p>Example structure:</p>
<p>CLASS zcl_query_provider DEFINITION<br />
PUBLIC FINAL CREATE PUBLIC.<br />
PUBLIC SECTION.<br />
INTERFACES if_rap_query_provider.<br />
ENDCLASS.</p>
<p>CLASS zcl_query_provider IMPLEMENTATION.<br />
METHOD if_rap_query_provider~select.<br />
&#8221; Custom data retrieval logic<br />
ENDMETHOD.<br />
ENDCLASS.</p>
<div class="text-base my-auto mx-auto pb-10 [--thread-content-margin:--spacing(4)] thread-sm:[--thread-content-margin:--spacing(6)] thread-lg:[--thread-content-margin:--spacing(16)] px-(--thread-content-margin)">
<div class="[--thread-content-max-width:40rem] thread-lg:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn">
<div class="flex max-w-full flex-col grow">
<div data-message-author-role="assistant" data-message-id="249988b6-56ef-49de-986a-98a986eced09" class="min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal [.text-message+&amp;]:mt-1" data-message-model-slug="gpt-5">
<div class="flex w-full flex-col gap-1 empty:hidden first:pt-[1px]">
<div class="markdown prose dark:prose-invert w-full break-words dark markdown-new-styling">
<p>This allows you to control how data is fetched and presented to consumers while still leveraging the RAP framework for OData exposure and metadata management.</p>
</div>
</div>
</div>
</div>
<div class="z-0 flex min-h-[46px] justify-start"></div>
<div class="mt-3 w-full empty:hidden">
<div class="text-center"></div>
</div>
</div>
</div>
<div data-edge="true" class="pointer-events-none h-px w-px"></div>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/how-do-you-implement-an-unmanaged-query-in-rap-and-what-are-the-key-steps-involved/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is Unmanaged Query Implementation in RAP, and when do we use it?</title>
		<link>https://www.sapewmhelp.com/question/what-is-unmanaged-query-implementation-in-rap-and-when-do-we-use-it/</link>
					<comments>https://www.sapewmhelp.com/question/what-is-unmanaged-query-implementation-in-rap-and-when-do-we-use-it/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Fri, 31 Oct 2025 17:51:55 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=what-is-unmanaged-query-implementation-in-rap-and-when-do-we-use-it</guid>

					<description><![CDATA[In the RAP (RESTful ABAP Programming Model), Unmanaged Query Implementation refers to a scenario where the developer manually implements the data retrieval logic for a query instead of relying on the automatic query handling provided by the framework. Normally, in a managed scenario, the framework automatically handles standard operations like READ, CREATE, and UPDATE using [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In the <strong>RAP (RESTful ABAP Programming Model)</strong>, <strong>Unmanaged Query Implementation</strong> refers to a scenario where the developer manually implements the data retrieval logic for a query instead of relying on the automatic query handling provided by the framework. Normally, in a <strong>managed scenario</strong>, the framework automatically handles standard operations like <code>READ</code>, <code>CREATE</code>, and <code>UPDATE</code> using the CDS data model. However, in certain cases — such as when the data comes from <strong>external systems</strong>, <strong>non-ABAP sources</strong>, or <strong>complex joins not suitable for CDS views</strong> — automatic handling is not possible.</p>
<p>In such cases, you define a <strong>Query Behavior Definition (behavior definition for a query)</strong> and then implement it manually using an <strong>Unmanaged Query Implementation Class</strong>. This class must implement the <strong>interface <code>IF_RAP_QUERY_PROVIDER</code></strong>, particularly the method <strong><code>IF_RAP_QUERY_PROVIDER~SELECT</code></strong>, which contains the ABAP logic to fetch and return data. This approach gives full control over query execution, filtering, and pagination. It’s typically used in integration scenarios or custom reports where CDS-based managed queries are insufficient.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/what-is-unmanaged-query-implementation-in-rap-and-when-do-we-use-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Add buttons in sap rap application</title>
		<link>https://www.sapewmhelp.com/question/add-buttons-in-sap-rap-application/</link>
					<comments>https://www.sapewmhelp.com/question/add-buttons-in-sap-rap-application/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Thu, 30 Oct 2025 18:07:31 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=add-buttons-in-sap-rap-application</guid>

					<description><![CDATA[Step 1: Create the RAP Project In ABAP Development Tools (ADT): Go to File → New → ABAP Project. Connect to your system. Create a new ABAP Package (e.g., Z_RAP_BUTTONS). Create the RAP artifacts: Business Object (BO): Right-click the package → New → Other ABAP Repository Object → Business Object → RAP Business Object. Example: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Step 1: Create the RAP Project</strong></p>
<ol>
<li>
<p>In <strong>ABAP Development Tools (ADT)</strong>:</p>
<ul>
<li>
<p>Go to <strong>File → New → ABAP Project</strong>.</p>
</li>
<li>
<p>Connect to your system.</p>
</li>
<li>
<p>Create a new <strong>ABAP Package</strong> (e.g., <code>Z_RAP_BUTTONS</code>).</p>
</li>
</ul>
</li>
<li>
<p>Create the RAP artifacts:</p>
<ul>
<li>
<p><strong>Business Object (BO)</strong>:</p>
<ul>
<li>
<p>Right-click the package → New → Other ABAP Repository Object → Business Object → RAP Business Object.</p>
</li>
<li>
<p>Example: <code>ZBO_SALESORDER</code>.</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<p>&nbsp;</p>
<p><strong>Step 2: Define the Behavior (Behavior Definition)</strong></p>
<ol>
<li>
<p>In your <strong>Behavior Definition</strong> (<code>.behavior</code>):</p>
</li>
</ol>
<p>define behavior for ZI_SALESORDER<br />
persistent table ZI_SALESORDER<br />
lock master<br />
{<br />
create;<br />
update;<br />
delete;</p>
<p>// Add custom action button<br />
action confirm order result [0..1];<br />
}</p>
<p>&nbsp;</p>
<p><strong>Step 3: Implement the Behavior Logic</strong></p>
<ol>
<li>
<p>In <strong>Behavior Implementation</strong> (<code>.behavior.abap</code>):</p>
</li>
</ol>
<p>implementation in class zbp_i_salesorder unique;</p>
<p>method confirm_order.<br />
&#8221; Your business logic goes here<br />
loop at it_entity into data(ls_entity).<br />
ls_entity-status = &#8216;CONFIRMED&#8217;.<br />
modify table et_entity from ls_entity.<br />
endloop.<br />
endmethod.</p>
<p>endimplementation.</p>
<p>&nbsp;</p>
<p><strong>Step 4: Expose Action in Service Definition</strong></p>
<ol>
<li>
<p>Open <strong>Service Definition</strong> (<code>.service</code>):</p>
</li>
</ol>
<p>define service ZC_SALESORDER_SRV {<br />
expose ZI_SALESORDER;<br />
// Optionally expose action explicitly<br />
action confirm order;<br />
}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Step 5: Register &amp; Test Service</strong></p>
<ol>
<li>
<p>Go to <strong>/IWFND/MAINT_SERVICE</strong> → register your RAP service.</p>
</li>
<li>
<p>Test via <strong>SAP Gateway Client</strong> (<code>/IWFND/GW_CLIENT</code>) to see the metadata:</p>
<ul>
<li>
<p>You should see your <code>confirm order</code> action exposed.</p>
</li>
</ul>
</li>
</ol>
<p><strong>Step 6: Fiori/UI Integration</strong></p>
<ul>
<li>
<p>If you use <strong>Fiori Elements</strong> (List Report / Object Page):</p>
<ol>
<li>
<p>The <code>action confirm order</code> will automatically appear as a button in the <strong>Object Page</strong> or <strong>List Report</strong>.</p>
</li>
<li>
<p>No extra UI5 code is required if you use standard Fiori Elements.</p>
</li>
<li>
<p>If you want <strong>custom UI5</strong>, you can bind a button like this:</p>
</li>
</ol>
</li>
</ul>
<p>&lt;Button<br />
text=&#8221;Confirm Order&#8221;<br />
press=&#8221;.onConfirmOrder&#8221;<br />
/&gt;</p>
<p>&nbsp;</p>
<p>And in your controller:</p>
<p>onConfirmOrder: function(oEvent) {<br />
var oModel = this.getView().getModel();<br />
var sPath = oEvent.getSource().getBindingContext().getPath();<br />
oModel.callFunction(&#8220;/ConfirmOrder&#8221;, {<br />
method: &#8220;POST&#8221;,<br />
urlParameters: {<br />
SalesOrderID: oModel.getProperty(sPath + &#8220;/SalesOrderID&#8221;)<br />
},<br />
success: function() {<br />
MessageToast.show(&#8220;Order Confirmed!&#8221;);<br />
},<br />
error: function() {<br />
MessageToast.show(&#8220;Error!&#8221;);<br />
}<br />
});<br />
}</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/add-buttons-in-sap-rap-application/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Managed Scenario with Unmanaged save</title>
		<link>https://www.sapewmhelp.com/question/managed-scenario-with-unmanaged-save/</link>
					<comments>https://www.sapewmhelp.com/question/managed-scenario-with-unmanaged-save/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Fri, 05 Sep 2025 20:08:52 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=managed-scenario-with-unmanaged-save</guid>

					<description><![CDATA[The managed save sequence is a key concept in the RAP (Restful Application Programming) framework used to handle persistence operations for entity instances in ABAP. It automates the process of saving changes made toan entity while allowing customization when needed. Key Components of the Managed Save Sequence  Standard Behavior Automatically saves changes made to entity [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>The managed save sequence is a key concept in the RAP (Restful Application Programming) framework used to handle persistence operations for entity instances in ABAP. It automates the process of saving changes made to<br />an entity while allowing customization when needed.</p>
<p><strong>Key Components of the Managed Save Sequence</strong></p>
<ul>
<li> Standard Behavior
<ul>
<li>Automatically saves changes made to entity instances in the database.</li>
<li>Ensures consistent data persistence without requiring additional coding.</li>
</ul>
</li>
<li>Steps in the Sequence
<ul>
<li>Data Validation: Validates the modified instance to ensure data integrity.</li>
<li>Data Modification: Updates or inserts the instance data into the database.</li>
<li>Lifecycle Management: Manages the lifecycle events triggered during the save process.</li>
<li>Post-Save Actions: Completes any final actions after the data persisted.</li>
</ul>
</li>
<li>Customizing with Extra Save
<ul>
<li>The extra save feature allows adding additional logic to the save process, such as logging changes or triggering external services.</li>
<li>Developers can implement additional steps using the save_modified method in a saver class.</li>
</ul>
</li>
<li> Change Tracking
<ul>
<li>Logs changes made to an instance, such as modified fields or newly added data.</li>
<li>These changes can be written to a log table for auditing or debugging purposes.</li>
</ul>
</li>
</ul>
<p>Unmanaged save is ideal when the default save logic in the RAP framework (managed save)cannot handle specific business requirements. It gives developers full control over how data persisted, enabling customization for complex scenarios like:</p>
<p> Custom Table Structures: When data is stored in unconventional formats or across multiple tables.<br /> Advanced Integrations: When saving data involves external APIs or systems.<br /> Complex Logic: For operations requiring extensive calculations, validations, or dependencies between entities.</p>
<p><strong>Steps to implement unmanage save.</strong><br />Before that ensure persistence, table is not specified, as unmanaged save implementation cannot have persistence table specified to it.</p>
<p><strong>Step 1:</strong> Include the unmanaged save keywords for all nodes where unmanaged behavior is required.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/un1.png" /></p>
<p><strong>Step 2:</strong> Redefine method save_modified in Saver Local class implementation level.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/un2.png" /></p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/un3.png" /></p>
<p>In this way we can implement the Unmanaged Save Sequence.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/managed-scenario-with-unmanaged-save/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Search Help and Value Help in SAP RAP (RESTful ABAP Programming Model)</title>
		<link>https://www.sapewmhelp.com/question/search-help-and-value-help-in-sap-rap-restful-abap-programming-model/</link>
					<comments>https://www.sapewmhelp.com/question/search-help-and-value-help-in-sap-rap-restful-abap-programming-model/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Fri, 05 Sep 2025 19:46:18 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=search-help-and-value-help-in-sap-rap-restful-abap-programming-model</guid>

					<description><![CDATA[search help/value help is not implemented in the classic way (with SE11 search helps + F4 help). Instead, RAP follows the Fiori and OData paradigm: Search Help (free text search): Implemented via @Search annotations on CDS views. Value Help (F4 help / dropdowns): Implemented via associations + @Consumption.valueHelpDefinition annotations. 1. Search Help in RAP Search [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>search help/value help</strong> is not implemented in the classic way (with SE11 search helps + F4 help). Instead, RAP follows the <strong>Fiori and OData paradigm</strong>:</p>
<ul>
<li><strong>Search Help (free text search):</strong> Implemented via <code>@Search</code> annotations on CDS views.</li>
<li><strong>Value Help (F4 help / dropdowns):</strong> Implemented via associations + <code>@Consumption.valueHelpDefinition</code> annotations.</li>
</ul>
<h5>1. Search Help in RAP</h5>
<p>Search is enabled using annotations in the <strong>Projection View</strong> or <strong>Consumption View</strong>.</p>
<p>@Search.searchable: true<br />define view entity ZI_Book<br />as select from zbook<br />{<br />key book_id,<br />title,<br />author,<br />publisher<br />}</p>
<ul>
<li><code>@Search.searchable: true</code> → Allows free-text search across all fields.</li>
<li>You can refine it:</li>
</ul>
<p>@Search.defaultSearchElement: true<br />title,</p>
<p>@Search.defaultSearchElement: true<br />author</p>
<p>&nbsp;</p>
<h5>2. Value Help in RAP</h5>
<p>For dropdowns or F4 helps, you define <strong>associations</strong> and annotate them.</p>
<h6>Step 1: Define Value Help View</h6>
<p>@EndUserText.label: &#8216;Value Help for Publishers&#8217;<br />define view entity ZI_PublisherVH<br />as select from zpublisher<br />{<br />key publisher_id,<br />name<br />}</p>
<p>&nbsp;</p>
<h6>Step 2: Add Association in Main View</h6>
<p>define view entity ZI_Book<br />as select from zbook<br />association [0..1] to ZI_PublisherVH as _Publisher<br />on $projection.publisher_id = _Publisher.publisher_id<br />{<br />key book_id,<br />title,<br />publisher_id,<br />_Publisher<br />}</p>
<p>&nbsp;</p>
<h6>Step 3: Annotate Value Help</h6>
<p>@Consumption.valueHelpDefinition: [<br />{ entity: { name: &#8216;ZI_PublisherVH&#8217;, element: &#8216;publisher_id&#8217; } }<br />]<br />publisher_id,</p>
<p>&nbsp;</p>
<p>Now in Fiori, <code>publisher_id</code> will show F4 help with dropdown based on <code>ZI_PublisherVH</code>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/search-help-and-value-help-in-sap-rap-restful-abap-programming-model/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is EML in SAP RAP?</title>
		<link>https://www.sapewmhelp.com/question/what-is-eml-in-sap-rap/</link>
					<comments>https://www.sapewmhelp.com/question/what-is-eml-in-sap-rap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Tue, 02 Sep 2025 19:50:01 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=what-is-eml-in-sap-rap</guid>

					<description><![CDATA[EML (Entity Manipulation Language) is a standardized way to interact with RAP business objects (BOs).Instead of directly updating database tables, you manipulate entities of a business object using EML statements. It’s similar to SQL but tailored for RAP-managed business objects (like CDS-based BOs). Common EML Statements You can use EML to perform: READ → retrieve [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>EML (<strong>Entity Manipulation Language</strong>) is a standardized way to <strong>interact with RAP business objects</strong> (BOs).<br />Instead of directly updating database tables, you manipulate <strong>entities of a business object</strong> using EML statements.</p>
<p>It’s similar to SQL but tailored for RAP-managed business objects (like CDS-based BOs).</p>
</p>
<h6>Common EML Statements</h6>
<p>You can use EML to perform:</p>
<ul>
<li><strong>READ</strong> → retrieve data from BO entities</li>
<li><strong>CREATE</strong> → create new instances</li>
<li><strong>UPDATE</strong> → change existing instances</li>
<li><strong>DELETE</strong> → delete instances</li>
<li><strong>ACTION</strong> → call business actions</li>
<li><strong>FUNCTION</strong> → call determinations/validations indirectly</li>
</ul>
<p><strong>Syntax Examples</strong></p>
<p>1. <strong>Read</strong></p>
<p>READ ENTITIES OF zi_travel<br />
ENTITY travel<br />
FIELDS ( travel_id agency_id status )<br />
WITH VALUE #( ( travel_id = &#8216;0001&#8217; ) )<br />
RESULT DATA(lt_travel).</p>
<p>&nbsp;</p>
<p>2. <strong>Create</strong></p>
<p>MODIFY ENTITIES OF zi_travel<br />
ENTITY travel<br />
CREATE<br />
FIELDS ( travel_id agency_id customer_id )<br />
WITH VALUE #( ( travel_id = &#8216;1001&#8217; agency_id = &#8216;7000&#8217; customer_id = &#8216;C01&#8217; ) )<br />
FAILED DATA(ls_failed)<br />
REPORTED DATA(ls_reported).</p>
<p>&nbsp;</p>
<p>3. <strong>Update</strong></p>
<p>MODIFY ENTITIES OF zi_travel<br />
ENTITY travel<br />
UPDATE<br />
FIELDS ( status )<br />
WITH VALUE #( ( travel_id = &#8216;1001&#8217; status = &#8216;X&#8217; ) )<br />
FAILED DATA(ls_failed)<br />
REPORTED DATA(ls_reported).</p>
<p>4. <strong>Delete</strong></p>
<p>MODIFY ENTITIES OF zi_travel<br />
ENTITY travel<br />
DELETE<br />
FROM VALUE #( ( travel_id = &#8216;1001&#8217; ) )<br />
FAILED DATA(ls_failed)<br />
REPORTED DATA(ls_reported).</p>
<p>5. <strong>Action Execution</strong></p>
<p>MODIFY ENTITIES OF zi_travel<br />
ENTITY travel<br />
EXECUTE action confirm<br />
FROM VALUE #( ( travel_id = &#8216;1001&#8217; ) )<br />
FAILED DATA(ls_failed)<br />
REPORTED DATA(ls_reported).</p>
<p>&nbsp;</p>
<h6>Key Points</h6>
<ul>
<li>
<p>Always executed <strong>against business objects (BOs)</strong>, not database tables.</p>
</li>
<li>
<p>Works inside <strong>ABAP classes (behavior implementations, service consumption, or test code)</strong>.</p>
</li>
<li>
<p>Returns:</p>
<ul>
<li><strong>RESULT</strong> → successful data</li>
<li><strong>FAILED</strong> → failed instances</li>
<li><strong>REPORTED</strong> → messages/warnings</li>
</ul>
</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/what-is-eml-in-sap-rap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Abstract Entity In RAP</title>
		<link>https://www.sapewmhelp.com/question/abstract-entity-in-rap/</link>
					<comments>https://www.sapewmhelp.com/question/abstract-entity-in-rap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Tue, 02 Sep 2025 19:45:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=abstract-entity-in-rap</guid>

					<description><![CDATA[Abstract Entity. A CDS abstract entity defines the type attributes of a CDS entity without defining a database object. CDS abstract entities can be used as  data types whose type attributes go beyond the regular DDIC structures in the ABAP Dictionary prototype definitions of data models without being created as instances of a data object. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Abstract Entity.</strong><br />
A CDS abstract entity defines the type attributes of a CDS entity without defining a database<br />
object.<br />
<strong>CDS abstract entities can be used as</strong></p>
<ul>
<li> data types whose type attributes go beyond the regular DDIC structures in the ABAP Dictionary</li>
<li>prototype definitions of data models without being created as instances of a data object.</li>
</ul>
<p><strong>Example:</strong><br />
Administrators can update a seller&#8217;s email via a &#8220;Update Email&#8221; button in the Seller Details form.Clicking the button opens a popup modal displaying the current email, an input field for the newemail, and an optional reason for the update. Validation ensures the new email has a proper format and is not duplicated. On save, an abstract entity processes the update, and the system<br />
records the change for compliance.</p>
<p><strong>Create a CDS abstract entity</strong></p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/a1.png" /></p>
<p>Add it using action in Behavior definition.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/a2.png" /></p>
<p>Implement the method and modify the field.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/a3.png" /></p>
<p>In Preview Screen → Before email update</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/a4.png" /></p>
<p>Email field updated</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/a5.png" /></p>
<p><strong>Conclusion:</strong><br />
Abstract entities in RAP applications provide a powerful framework for enhancing modularity, scalability, and reusability by encapsulating shared business logic and ensuring consistent behavior across root entities. This is particularly evident in scenarios like updating a seller&#8217;s email, where an abstract entity centralizes the handling of operations such as validation, transformation, and automated updates. The use of a popup modal for updates, paired with the abstract entity&#8217;s logic, ensures a user-friendly experience, streamlined workflows, and systemwide synchronization. This approach aligns with clean architecture principles, resulting in robust, maintainable, and adaptable applications capable of efficiently meeting current and future requirements.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/abstract-entity-in-rap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Employee management APP in RAP</title>
		<link>https://www.sapewmhelp.com/question/employee-management-app-in-rap/</link>
					<comments>https://www.sapewmhelp.com/question/employee-management-app-in-rap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Mon, 01 Sep 2025 19:55:20 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=employee-management-app-in-rap</guid>

					<description><![CDATA[Employee management APP.   Firstly, Create an employee table with the draft à zemployee_01 Create a draft table. à zemployee_01_d Create a class to insert the data. à zdpm_populate_empoyee Create a CDS root view entity  à zdpm_employee_transapp Create a projection, View. à zcl_employee_trans. Now create a metadata extension with UI annotation à zdpm_employee_transapp &#160; Create [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Employee management APP.</strong></p>
<p><strong> </strong></p>
<p><strong>Firstly, </strong></p>
<p>Create an employee table with the draft à zemployee_01</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e1.png" /></p>
<p>Create a draft table. à zemployee_01_d</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e2.png" /></p>
<p>Create a class to insert the data. à zdpm_populate_empoyee</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e3.png" /></p>
<p>Create a CDS root view entity  à zdpm_employee_transapp</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e4.png" /></p>
<p>Create a projection, View. à zcl_employee_trans.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e5.png" /></p>
<p>Now create a metadata extension with UI annotation à zdpm_employee_transapp</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e6.png" /></p>
<p>&nbsp;</p>
<p>Create managed implementation on CUD operations.</p>
<p>Behavior Definition.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e8.png" /></p>
<p>Make the class using the code below à zdp_i_employee_transapp</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e9.png" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Create a local classà lcl_</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e10.png" /></p>
<p>Create a business projection for business object. à zc_employee_transapp</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e11.png" /></p>
<p>Create a service definition.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e12.png" /></p>
<p>Choose the <strong>defined service.</strong></p>
<p>Use the projection view name</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e13.png" /></p>
<p>Now create the service binding</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e14.png" /></p>
<p>If the service is not getting published, then change it to OData V2- UI.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e15.png" /></p>
<p>Now publish it, you will get the entity set then login to the Fiori application.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e16.png" /></p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e17-1.png" /></p>
<p>Goto the service URL.</p>
<p>Login in and click on the <strong>GO</strong> to view the data.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e18.png" /></p>
<p>Now click on the row and you will find the detailed information.</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e19.png" /></p>
<p>You can add the filer based on the fields like:</p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e20.png" /></p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/09/e21.png" /></p>
<p>&nbsp;</p>
<p><strong>Completed. </strong></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/employee-management-app-in-rap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to create a web api using custom entity</title>
		<link>https://www.sapewmhelp.com/question/how-to-create-a-web-api-using-custom-entity/</link>
					<comments>https://www.sapewmhelp.com/question/how-to-create-a-web-api-using-custom-entity/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Wed, 27 Aug 2025 10:06:50 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=how-to-create-a-web-api-using-custom-entity</guid>

					<description><![CDATA[A Custom Entity in RAP is like a virtual data model — it does not persist data in a DB table, but fetches it from logic (e.g., CDS views, APIs, function modules, or custom code). It is exposed via a behavior definition and then published as an OData/Web API service. 1. Create a Custom Entity [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A <strong>Custom Entity</strong> in RAP is like a <strong>virtual data model</strong> — it does <strong>not persist data in a DB table</strong>, but fetches it from logic (e.g., CDS views, APIs, function modules, or custom code).</p>
<p>It is exposed via a <strong>behavior definition</strong> and then published as an <strong>OData/Web API service</strong>.</p>
</p>
<p><strong>1. Create a Custom Entity in CDS</strong></p>
<p>@EndUserText.label: &#8216;Custom Employee API Entity&#8217;<br />
define custom entity ZC_EMPLOYEE_API {<br />
key empid : abap.char(10);<br />
empname : abap.char(40);<br />
department: abap.char(20);<br />
}</p>
</p>
<p><strong>2. Define a Behavior Implementation (Handler Class)</strong></p>
<p>CLASS zcl_employee_handler DEFINITION<br />
PUBLIC FINAL CREATE PUBLIC.<br />
PUBLIC SECTION.<br />
INTERFACES if_rap_query_provider.<br />
ENDCLASS.</p>
<p>CLASS zcl_employee_handler IMPLEMENTATION.<br />
METHOD if_rap_query_provider~select.<br />
DATA lt_data TYPE TABLE OF zc_employee_api.</p>
<p>&#8220;Fetch data (from table, FM, RFC, etc.)<br />
SELECT empid, empname, dept AS department<br />
FROM zemployees<br />
INTO TABLE @lt_data.</p>
<p>&#8220;Return data<br />
result = CORRESPONDING #( lt_data ).<br />
ENDMETHOD.<br />
ENDCLASS.</p>
<p>&nbsp;</p>
<p><strong>3. Register Service in Service Definition</strong></p>
<p>@EndUserText.label: &#8216;Employee API Service&#8217;<br />
define service ZUI_EMPLOYEE_API {<br />
expose ZC_EMPLOYEE_API;<br />
}</p>
<p>&nbsp;</p>
<p><strong>4. Publish via Service Binding</strong></p>
<ul>
<li>Create a <strong>Service Binding</strong> (<code>ZUI_EMPLOYEE_API_BIND</code>).</li>
<li>Choose <strong>OData V4</strong> as binding type.</li>
<li>Activate it → SAP generates a URL endpoint.</li>
</ul>
<p>/sap/opu/odata4/sap/zui_employee_api/srvd_a2x/sap/zui_employee_api/0001/</p>
<p>&nbsp;</p>
<p><strong>5. Test the API</strong></p>
<ul>
<li>
<p>Use <code>/IWFND/MAINT_SERVICE</code> (for OData V2 in SEGW) or Fiori Preview (for OData V4).</p>
</li>
<li>
<p>Run the URL in browser or Postman:</p>
</li>
</ul>
<p>GET &#8230;/ZC_EMPLOYEE_API</p>
<p>&nbsp;</p>
<h5>Summary</h5>
<ul>
<li>
<p><strong>Custom Entity</strong> = Virtual CDS entity (no table).</p>
</li>
<li>
<p>Implement a <strong>handler class</strong> to supply data.</p>
</li>
<li>
<p>Expose it in a <strong>service definition</strong>.</p>
</li>
<li>
<p>Bind it with <strong>service binding</strong> (OData V2/V4).</p>
</li>
<li>
<p>Test via Fiori preview or Postman.</p>
</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/how-to-create-a-web-api-using-custom-entity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to establish connection between S/4 and BTP using  OData API present in S/4 ?</title>
		<link>https://www.sapewmhelp.com/question/how-to-establish-connection-between-s-4-and-btp-using-odata-api-present-in-s-4/</link>
					<comments>https://www.sapewmhelp.com/question/how-to-establish-connection-between-s-4-and-btp-using-odata-api-present-in-s-4/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sat, 23 Aug 2025 20:15:15 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=how-to-establish-connection-between-s-4-and-btp-using-odata-api-present-in-s-4</guid>

					<description><![CDATA[CLASS /iap/chm_cl_aux_product DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS: get_client_proxy RETURNING VALUE(ro_client_proxy) TYPE REF TO /iwbep/if_cp_client_proxy. PROTECTED SECTION. PRIVATE SECTION. CONSTANTS: c_destination TYPE string VALUE `destination_name`. ENDCLASS. CLASS /IAP/CHM_CL_AUX_PRODUCT IMPLEMENTATION. METHOD get_client_proxy. TRY. DATA(lo_destination) = cl_http_destination_provider=&#62;create_by_cloud_destination( i_name = c_destination i_authn_mode = if_a4c_cp_service=&#62;service_specific ). DATA(lo_client) = cl_web_http_client_manager=&#62;create_by_http_destination( lo_destination ). ro_client_proxy = /iwbep/cl_cp_factory_remote=&#62;create_v2_remote_proxy( is_proxy_model_key = [&#8230;]]]></description>
										<content:encoded><![CDATA[<div style="background-color: #1e1f22;padding: 0px 0px 0px 2px">
<div style="color: #cccccc;background-color: #1e1f22;font-size: 10pt">
<p style="margin: 0"><span style="color: #56a5e4;border: dashed 1pt #40abfe">CLASS</span><span style="color: #56a5e4"> </span><span style="color: #cccccc">/iap/chm_cl_aux_product</span><span style="color: #56a5e4"> DEFINITION</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> PUBLIC</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> FINAL</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> CREATE PUBLIC .</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> PUBLIC SECTION.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> CLASS-METHODS:</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">get_client_proxy</span><span style="color: #56a5e4"> RETURNING VALUE(</span><span style="color: #cccccc">ro_client_proxy</span><span style="color: #56a5e4">) TYPE REF TO </span><span style="color: #cccccc">/iwbep/if_cp_client_proxy</span><span style="color: #56a5e4">.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> PROTECTED SECTION.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> PRIVATE SECTION.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> CONSTANTS:</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">c_destination</span><span style="color: #56a5e4"> TYPE </span><span style="color: #cccccc">string</span><span style="color: #56a5e4"> VALUE </span><span style="color: #1eb540">`destination_name`</span><span style="color: #56a5e4">.</span></p>
<p style="margin: 0"><span style="color: #56a5e4;border: dashed 1pt #40abfe">ENDCLASS</span><span style="color: #56a5e4">.</span></p>
<p style="margin: 0"><span style="color: #56a5e4">CLASS </span><span style="color: #cccccc">/IAP/CHM_CL_AUX_PRODUCT</span><span style="color: #56a5e4"> IMPLEMENTATION.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> METHOD </span><span style="color: #cccccc">get_client_proxy</span><span style="color: #56a5e4">.</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> TRY.</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> DATA(</span><span style="color: #cccccc">lo_destination</span><span style="color: #56a5e4">) = </span><span style="color: #cccccc">cl_http_destination_provider</span><span style="color: #56a5e4">=&gt;</span><span style="color: #cccccc">create_by_cloud_destination</span><span style="color: #56a5e4">(</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">i_name</span><span style="color: #56a5e4"> = </span><span style="color: #cccccc">c_destination</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">i_authn_mode</span><span style="color: #56a5e4"> = </span><span style="color: #cccccc">if_a4c_cp_service</span><span style="color: #56a5e4">=&gt;</span><span style="color: #cccccc">service_specific</span><span style="color: #56a5e4"> ).</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> DATA(</span><span style="color: #cccccc">lo_client</span><span style="color: #56a5e4">) = </span><span style="color: #cccccc">cl_web_http_client_manager</span><span style="color: #56a5e4">=&gt;</span><span style="color: #cccccc">create_by_http_destination</span><span style="color: #56a5e4">( </span><span style="color: #cccccc">lo_destination</span><span style="color: #56a5e4"> ).</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">ro_client_proxy</span><span style="color: #56a5e4"> = </span><span style="color: #cccccc">/iwbep/cl_cp_factory_remote</span><span style="color: #56a5e4">=&gt;</span><span style="color: #cccccc">create_v2_remote_proxy</span><span style="color: #56a5e4">(</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">is_proxy_model_key</span><span style="color: #56a5e4"> = VALUE #( </span><span style="color: #cccccc">repository_id</span><span style="color: #56a5e4"> = </span><span style="color: #1eb540">&#8216;DEFAULT&#8217;</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">proxy_model_id</span><span style="color: #56a5e4"> = </span><span style="color: #1eb540">&#8216;/IAP/CHM_SCM_PRODUCT&#8217;</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">proxy_model_version</span><span style="color: #56a5e4"> = </span><span style="color: #1eb540">&#8216;0001&#8217;</span><span style="color: #56a5e4"> )</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">io_http_client</span><span style="color: #56a5e4"> = </span><span style="color: #cccccc">lo_client</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> </span><span style="color: #cccccc">iv_relative_service_root</span><span style="color: #56a5e4"> = </span><span style="color: #1eb540">&#8216;/sap/opu/odata/sap/API_PRODUCT_SRV&#8217;</span><span style="color: #56a5e4"> ).</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> CATCH </span><span style="color: #cccccc">cx_root</span><span style="color: #56a5e4">.</span></p>
<p style="background-color: #292929;margin: 0"><span style="color: #56a5e4"> ENDTRY.</span></p>
<p style="margin: 0"><span style="color: #56a5e4"> ENDMETHOD.</span></p>
<p style="margin: 0"><span style="color: #56a5e4">ENDCLASS.</span></p>
</div>
</div>
<p>It is a <strong>utility class</strong> that provides a static method <code>get_client_proxy</code> to connect to the external <strong>OData V2 service <code>API_PRODUCT_SRV</code></strong> via the BTP cloud destination <strong><code>iaapinc</code></strong>.<br />The method:</p>
<ul>
<li>Reads the cloud destination,</li>
<li>Creates an HTTP client,</li>
<li>Builds an OData V2 proxy (<code>/iwbep/if_cp_client_proxy</code>) based on proxy model <code>/IAP/CHM_SCM_PRODUCT</code>,</li>
<li>Returns this proxy so other classes can easily consume the Product API without handling low-level HTTP setup.</li>
</ul>
<p>👉 In short: <strong>It’s a helper to simplify access to the Product OData API in SAP BTP ABAP.</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/how-to-establish-connection-between-s-4-and-btp-using-odata-api-present-in-s-4/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
