<?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>report &#8211; SAP EWM Help</title>
	<atom:link href="https://www.sapewmhelp.com/question-tag/report/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>Sun, 24 Aug 2025 11:23:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.3</generator>
	<item>
		<title>Types of Internal Tables in ABAP</title>
		<link>https://www.sapewmhelp.com/question/types-of-internal-tables-in-abap/</link>
					<comments>https://www.sapewmhelp.com/question/types-of-internal-tables-in-abap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sun, 24 Aug 2025 11:22:22 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=types-of-internal-tables-in-abap</guid>

					<description><![CDATA[SAP defines three main types of internal tables based on their structure and access method: 1. Standard Table (STANDARD TABLE) Default type if nothing is specified. Entries are stored unsorted (in the order you append them). Index-based access (like arrays). Duplicate entries allowed. Access time: By index → very fast (O(1)) By key → linear [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>SAP defines <strong>three main types</strong> of internal tables based on their structure and access method:</p>
<h5>1. <strong>Standard Table (<code>STANDARD TABLE</code>)</strong></h5>
<ul>
<li>
<p>Default type if nothing is specified.</p>
</li>
<li>
<p>Entries are stored <strong>unsorted</strong> (in the order you append them).</p>
</li>
<li>
<p><strong>Index-based access</strong> (like arrays).</p>
</li>
<li>
<p><strong>Duplicate entries allowed</strong>.</p>
</li>
<li>
<p><strong>Access time:</strong></p>
<ul>
<li>
<p>By <strong>index</strong> → very fast (O(1))</p>
</li>
<li>
<p>By <strong>key</strong> → linear search (O(n))</p>
</li>
</ul>
</li>
</ul>
<p><strong>Use Case:</strong> Small-to-medium datasets where duplicates are needed, sequential processing.</p>
<p>&nbsp;</p>
<p>DATA: it_mara TYPE STANDARD TABLE OF mara WITH DEFAULT KEY,<br />wa_mara TYPE mara.</p>
<p>SELECT * FROM mara INTO TABLE it_mara UP TO 10 ROWS.<br />READ TABLE it_mara INTO wa_mara INDEX 5. &#8221; Access by index</p>
<p>&nbsp;</p>
<h5>2. <strong>Sorted Table (<code>SORTED TABLE</code>)</strong></h5>
<ul>
<li>
<p>Entries are always stored in a <strong>sorted order</strong> (by key).</p>
</li>
<li>
<p>No need to <code>SORT</code> explicitly.</p>
</li>
<li>
<p><strong>Unique or non-unique keys</strong> possible (depending on definition).</p>
</li>
<li>
<p><strong>Binary search</strong> used internally for key access.</p>
</li>
<li>
<p><strong>Access time:</strong></p>
<ul>
<li>
<p>By <strong>key</strong> → fast (O(log n))</p>
</li>
<li>
<p>By <strong>index</strong> → slower than standard</p>
</li>
</ul>
</li>
</ul>
<p><strong>Use Case:</strong> When you frequently read data by key and want it sorted automatically.</p>
<p>&nbsp;</p>
<p>DATA: it_mara_sorted TYPE SORTED TABLE OF mara<br />WITH UNIQUE KEY matnr.</p>
<p>SELECT * FROM mara INTO TABLE it_mara_sorted UP TO 10 ROWS.<br />READ TABLE it_mara_sorted WITH TABLE KEY matnr = &#8216;MAT001&#8217;<br />INTO DATA(wa_mara).</p>
<p>&nbsp;</p>
<h5>3. <strong>Hashed Table (<code>HASHED TABLE</code>)</strong></h5>
<ul>
<li>
<p>Entries are stored in <strong>hash algorithm format</strong> (like a dictionary).</p>
</li>
<li>
<p><strong>Only unique keys allowed</strong>.</p>
</li>
<li>
<p><strong>No index access</strong> → can only be accessed via key.</p>
</li>
<li>
<p><strong>Access time:</strong> By key → constant (O(1)) on average.</p>
</li>
<li>
<p>Best for <strong>large datasets</strong> when you always access by key.</p>
</li>
</ul>
<p><strong>Use Case:</strong> Fast key-based lookups, like material master lookup by MATNR.</p>
<p>&nbsp;</p>
<p>DATA: it_mara_hashed TYPE HASHED TABLE OF mara<br />WITH UNIQUE KEY matnr.</p>
<p>SELECT * FROM mara INTO TABLE it_mara_hashed UP TO 1000 ROWS.<br />READ TABLE it_mara_hashed WITH TABLE KEY matnr = &#8216;MAT001&#8217;<br />INTO DATA(wa_mara).</p>
<p>Summary : </p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Sorted?</th>
<th>Duplicates?</th>
<th>Access by Index</th>
<th>Access by Key</th>
<th>Performance</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Standard</strong></td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
<td>Linear Search</td>
<td>Best for small, sequential</td>
</tr>
<tr>
<td><strong>Sorted</strong></td>
<td>Yes</td>
<td>Optional</td>
<td>Yes</td>
<td>Binary Search</td>
<td>Best for ordered + key access</td>
</tr>
<tr>
<td><strong>Hashed</strong></td>
<td>N/A</td>
<td>No</td>
<td>No</td>
<td>Hash Search</td>
<td>Best for large, key-only access</td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/types-of-internal-tables-in-abap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to remove the leading zeros from the output of program in SAP ABAP ?</title>
		<link>https://www.sapewmhelp.com/question/how-to-remove-the-leading-zeros-from-the-output-of-program-in-sap-abap/</link>
					<comments>https://www.sapewmhelp.com/question/how-to-remove-the-leading-zeros-from-the-output-of-program-in-sap-abap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sat, 23 Aug 2025 21:11:30 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=how-to-remove-the-leading-zeros-from-the-output-of-program-in-sap-abap</guid>

					<description><![CDATA[Common Methods to Remove Leading Zeros in ABAP WRITE statement with NO-ZERO When outputting with WRITE, you can suppress leading zeros like this: code: DATA: lv_num TYPE n LENGTH 10 VALUE &#8216;0000123456&#8217;. WRITE lv_num NO-ZERO. &#8221; Output: 123456 SHIFT statement You can shift the contents to the left to remove zeros: code: DATA: lv_num TYPE [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Common Methods to Remove Leading Zeros in ABAP</p>
<h5><strong>WRITE statement with <code>NO-ZERO</code></strong></h5>
<p>When outputting with <code>WRITE</code>, you can suppress leading zeros like this:</p>
<p>code:</p>
<p>DATA: lv_num TYPE n LENGTH 10 VALUE &#8216;0000123456&#8217;.</p>
<p>WRITE lv_num NO-ZERO. &#8221; Output: 123456</p>
<h5><strong>SHIFT statement</strong></h5>
<p>You can shift the contents to the left to remove zeros:</p>
<p>code:</p>
<p>DATA: lv_num TYPE n LENGTH 10 VALUE &#8216;0000123456&#8217;.</p>
<p>SHIFT lv_num LEFT DELETING LEADING &#8216;0&#8217;.<br />
WRITE lv_num. &#8221; Output: 123456</p>
<h5></h5>
<h5>CONDENSE with <code>NO-GAPS</code></h5>
<p>Works if the field is CHAR/NUMC:</p>
<p>DATA: lv_char TYPE char10 VALUE &#8216;0000123456&#8217;.</p>
<p>CONDENSE lv_char NO-GAPS. &#8221; removes spaces<br />
SHIFT lv_char LEFT DELETING LEADING &#8216;0&#8217;.<br />
WRITE lv_char. &#8221; Output: 123456</p>
<p>&nbsp;</p>
<h5>Conversion Exit (for SAP standard fields)</h5>
<p>Some SAP fields (like Material Number <code>MATNR</code>) have <strong>conversion exits</strong> to display without leading zeros.</p>
<p>&nbsp;</p>
<p>DATA: lv_matnr TYPE matnr VALUE &#8216;000000000000123456&#8217;.</p>
<p>CALL FUNCTION &#8216;CONVERSION_EXIT_ALPHA_OUTPUT&#8217;<br />
EXPORTING<br />
input = lv_matnr<br />
IMPORTING<br />
output = lv_matnr.</p>
<p>WRITE lv_matnr. &#8221; Output: 123456</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Best practice:</strong></p>
<ul>
<li>
<p>Use <code>CONVERSION_EXIT_ALPHA_OUTPUT</code> if dealing with SAP database fields like <code>MATNR</code>, <code>KUNNR</code>, <code>LIFNR</code>.</p>
</li>
<li>
<p>Use <code>SHIFT ... DELETING LEADING '0'</code> or <code>WRITE ... NO-ZERO</code> for simple variables.</p>
</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/how-to-remove-the-leading-zeros-from-the-output-of-program-in-sap-abap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ABAP Selection-Screen Elements</title>
		<link>https://www.sapewmhelp.com/question/abap-selection-screen-elements/</link>
					<comments>https://www.sapewmhelp.com/question/abap-selection-screen-elements/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sat, 23 Aug 2025 20:26:34 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=abap-selection-screen-elements</guid>

					<description><![CDATA[This report is a sample program that demonstrates how a user can enter and organize different kinds of input on an SAP screen. It includes simple fields like dates, codes, and names where you can type in values. It also provides choices through radio buttons and checkboxes, allowing users to pick options easily. To keep [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This report is a <strong>sample program</strong> that demonstrates how a user can enter and organize different kinds of input on an SAP screen. It includes simple fields like dates, codes, and names where you can type in values. It also provides <strong>choices</strong> through radio buttons and checkboxes, allowing users to pick options easily. To keep things clear, inputs are grouped into <strong>sections with titles</strong> and labels. Visual elements such as lines, spacing, and comments make the screen more structured and easier to read. A <strong>button</strong> is available for triggering specific actions directly from the screen. The program also uses <strong>tabs</strong> to separate information into different pages, making it less cluttered. Overall, this example shows how SAP screens can be designed to be <strong>interactive, organized, and user-friendly</strong>.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-js" data-lang="JavaScript"><code><!--StartFragment --><span><span>*&amp;---------------------------------------------------------------------*</span>
<span>*&amp; Report  ZTEST_PROGRAM_2</span>
<span>*&amp;</span>
<span>*&amp;---------------------------------------------------------------------*</span>
<span>*&amp;</span>
<span>*&amp;</span>
<span>*&amp;---------------------------------------------------------------------*</span>

<span>REPORT </span>ztest_program_2<span>.</span>

<span>*---------------------------------------------------------------------*</span>
<span>* SELECTION-SCREEN DECLARATION</span>
<span>*---------------------------------------------------------------------*</span>
<span>tables</span><span>: </span>mara<span>.</span>

<span>*--- Simple parameters</span>
<span>PARAMETERS</span><span>: </span>p_matnr <span>TYPE </span>mara<span>-</span>matnr OBLIGATORY<span>,   </span><span>" Material number</span>
            p_mtart <span>TYPE </span>mara<span>-</span>mtart<span>,              </span><span>" Material type</span>
            p_date  <span>TYPE </span>sy<span>-</span>datum<span>.                </span><span>" Date input</span>

<span>*--- Select-options for ranges</span>
<span>SELECT-OPTIONS</span><span>: </span>s_matkl <span>FOR </span>mara<span>-</span>matkl<span>,           </span><span>" Material group range</span>
                s_ersda <span>FOR </span>mara<span>-</span>ersda<span>.           </span><span>" Creation date range</span>

<span>*--- Radio buttons (same group -&gt; only one active)</span>
<span>PARAMETERS</span><span>: </span>r_raw   <span>RADIOBUTTON </span><span>GROUP </span>g1 <span>DEFAULT </span>'X'<span>, </span><span>" Raw materials</span>
            r_finsi <span>RADIOBUTTON </span><span>GROUP </span>g1<span>.            </span><span>" Finished goods</span>

<span>*--- Checkbox</span>
<span>PARAMETERS</span><span>: </span>p_test <span>AS </span><span>CHECKBOX </span><span>DEFAULT </span>'X'<span>.</span>

<span>*--- Blocks with title</span>
<span>SELECTION-SCREEN </span><span>BEGIN </span><span>OF </span><span>BLOCK </span>b1 <span>WITH </span><span>FRAME </span><span>TITLE </span><span>text</span><span>-</span><span>001</span><span>.</span>
<span>PARAMETERS</span><span>: </span>p_user <span>TYPE </span>sy<span>-</span>uname <span>DEFAULT </span>sy<span>-</span>uname<span>.</span>
<span>SELECTION-SCREEN </span><span>END </span><span>OF </span><span>BLOCK </span>b1<span>.</span>

<span>*--- Inline elements</span>
<span>SELECTION-SCREEN </span><span>BEGIN </span><span>OF </span><span>LINE</span><span>.</span>
<span>PARAMETERS</span><span>: </span>p_len <span>TYPE </span><span>i </span><span>DEFAULT </span><span>10</span><span>.</span>
<span>SELECTION-SCREEN </span><span>COMMENT </span><span>25</span><span>(</span><span>20</span><span>) </span><span>text</span><span>-</span><span>002 </span><span>FOR </span><span>FIELD </span>p_len<span>.</span>
<span>SELECTION-SCREEN </span><span>END </span><span>OF </span><span>LINE</span><span>.</span>

<span>*--- Pushbutton</span>
<span>SELECTION-SCREEN </span>PUSHBUTTON <span>10</span><span>(</span><span>20</span><span>) </span>but1 <span>USER-COMMAND </span>pb1<span>.</span>

<span>*---------------------------------------------------------------------*</span>
<span>* TEXT ELEMENTS</span>
<span>*---------------------------------------------------------------------*</span>
<span>* text-001 = "User Settings"</span>
<span>* text-002 = "Length of Value"</span>
<span>* but1     = "Execute Action"</span>


<span>*---------------------------------------------------------------------*</span>
<span>* START-OF-SELECTION</span>
<span>*---------------------------------------------------------------------*</span>
<span>START-OF-SELECTION</span><span>.</span>

  <span>WRITE</span><span>: </span>/ 'Material <span>Number</span><span>:</span>'<span>, </span>p_matnr<span>,</span>
         / 'Material <span>Type  </span><span>:</span>'<span>, </span>p_mtart<span>,</span>
         / 'Date Entered   <span>:</span>'<span>, </span>p_date<span>.</span>

  <span>WRITE</span><span>: </span>/ 'Material <span>Group </span><span>:</span>'<span>, </span>s_matkl<span>,</span>
         / 'Creation <span>Date  </span><span>:</span>'<span>, </span>s_ersda<span>.</span>

  <span>IF </span>r_raw <span>= </span>'X'<span>.</span>
    <span>WRITE</span><span>: </span>/ 'Material Category<span>: </span>Raw Material'<span>.</span>
  <span>ELSE</span><span>.</span>
    <span>WRITE</span><span>: </span>/ 'Material Category<span>: </span>Finished Goods'<span>.</span>
  <span>ENDIF</span><span>.</span>

  <span>IF </span>p_test <span>= </span>'X'<span>.</span>
    <span>WRITE</span><span>: </span>/ 'Test <span>Mode </span>Active'<span>.</span>
  <span>ENDIF</span><span>.</span>

  <span>WRITE</span><span>: </span>/ 'User<span>:</span>'<span>, </span>p_user<span>.</span>
  <span>WRITE</span><span>: </span>/ 'Length<span>:</span>'<span>, </span>p_len<span>.</span>

  <span>" Fetch and display matching materials from MARA</span>
  <span>DATA</span><span>: </span>lt_mara <span>TYPE </span><span>TABLE </span><span>OF </span>mara<span>,</span>
        ls_mara <span>TYPE </span>mara<span>.</span>

  <span>SELECT </span>* <span>FROM </span>mara
    <span>INTO </span><span>TABLE </span>lt_mara
        <span>UP </span><span>TO </span><span>20 </span><span>ROWS</span>
    <span>WHERE </span>matnr <span>= </span>p_matnr
      <span>AND </span>mtart <span>= </span>p_mtart
      <span>AND </span>matkl <span>IN </span>s_matkl
      <span>AND </span>ersda <span>IN </span>s_ersda<span>.</span>

  <span>IF </span>sy<span>-</span>subrc <span>= </span><span>0</span><span>.</span>
    <span>WRITE</span><span>: </span>/ '<span>-</span>-<span>- </span>Materials Found <span>-</span>-<span>-</span>'<span>.</span>
    <span>LOOP </span><span>AT </span>lt_mara <span>INTO </span>ls_mara<span>.</span>
      <span>WRITE</span><span>: </span>/ ls_mara<span>-</span>matnr<span>, </span>ls_mara<span>-</span>mtart<span>, </span>ls_mara<span>-</span>matkl<span>, </span>ls_mara<span>-</span>ersda<span>.</span>
    <span>ENDLOOP</span><span>.</span>
  <span>ELSE</span><span>.</span>
    <span>WRITE</span><span>: </span>/ 'No materials found <span>for </span>given criteria<span>.</span>'<span>.</span>
  <span>ENDIF</span><span>.</span>


<span>*---------------------------------------------------------------------*</span>
<span>* AT SELECTION-SCREEN EVENT (for pushbutton handling)</span>
<span>*---------------------------------------------------------------------*</span>
<span>AT </span><span>SELECTION-SCREEN</span><span>.</span>
  <span>CASE </span>sy<span>-</span>ucomm<span>.</span>
    <span>WHEN </span>'PB1'<span>.</span>
      <span>MESSAGE </span>'Pushbutton was pressed!' <span>TYPE </span>'I'<span>.</span>
  <span>ENDCASE</span><span>.</span></span> </code></pre>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/abap-selection-screen-elements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Modular Screen Features</title>
		<link>https://www.sapewmhelp.com/question/modular-screen-features/</link>
					<comments>https://www.sapewmhelp.com/question/modular-screen-features/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Thu, 07 Aug 2025 07:28:22 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=modular-screen-features</guid>

					<description><![CDATA[1. SELECTION-SCREEN BEGIN OF SCREEN As already explained, this defines a custom screen (like a subscreen or popup), which you can call dynamically using CALL SELECTION-SCREEN. SELECTION-SCREEN BEGIN OF SCREEN &#60;screen_number&#62; [AS SUBSCREEN&#124;AS WINDOW] [TITLE &#60;text&#62;]. ... fields ... SELECTION-SCREEN END OF SCREEN &#60;screen_number&#62;. 2. SELECTION-SCREEN BEGIN OF BLOCK Used to group parameters and fields [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>1. SELECTION-SCREEN BEGIN OF SCREEN</p>
<p>As already explained, this defines a custom screen (like a subscreen or popup), which you can call dynamically using CALL SELECTION-SCREEN.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-scss" data-lang="SCSS"><code>SELECTION-SCREEN BEGIN OF SCREEN &lt;screen_number&gt; [AS SUBSCREEN|AS WINDOW] [TITLE &lt;text&gt;].
... fields ...
SELECTION-SCREEN END OF SCREEN &lt;screen_number&gt;.</code></pre>
<p>2. SELECTION-SCREEN BEGIN OF BLOCK<br />
Used to group parameters and fields into logical blocks, which can have their own frame and titles.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-scss" data-lang="SCSS"><code>SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_carrid TYPE s_carr_id,
p_connid TYPE s_conn_id.
SELECTION-SCREEN END OF BLOCK b1.
</code></pre>
<p>4. SELECTION-SCREEN BEGIN OF LINE<br />
Used to arrange fields horizontally on the selection screen (instead of vertical default layout).</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-scss" data-lang="SCSS"><code>SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) text-002 FOR FIELD p_flag.
PARAMETERS: p_flag AS CHECKBOX.
SELECTION-SCREEN END OF LINE.</code></pre>
<p>4. SELECTION-SCREEN COMMENT<br />
Displays a label or text on the selection screen.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-scss" data-lang="SCSS"><code>SELECTION-SCREEN COMMENT /1(30) text-003.

</code></pre>
<p>5. SELECTION-SCREEN TAB and SELECTION-SCREEN BEGIN OF TABBED BLOCK<br />
Used to create tabbed selection screens, where each tab holds a subscreen.</p>
</div>
<p>SELECTION-SCREEN BEGIN OF TABBED BLOCK mytab FOR 3 LINES.<br />
SELECTION-SCREEN TAB (20) tab1 USER-COMMAND tab1 SCREEN 101.<br />
SELECTION-SCREEN TAB (20) tab2 USER-COMMAND tab2 SCREEN 102.<br />
SELECTION-SCREEN END OF BLOCK mytab.</p>
<p>SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.<br />
PARAMETERS: p_name TYPE name1.<br />
SELECTION-SCREEN END OF SCREEN 101.</p>
<p>SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.<br />
PARAMETERS: p_age TYPE i.<br />
SELECTION-SCREEN END OF SCREEN 102.</p>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/modular-screen-features/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Classical Report Events in SAP ABAP</title>
		<link>https://www.sapewmhelp.com/question/classical-report-events-in-sap-abap/</link>
					<comments>https://www.sapewmhelp.com/question/classical-report-events-in-sap-abap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sun, 03 Aug 2025 06:54:31 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=classical-report-events-in-sap-abap</guid>

					<description><![CDATA[Classical Reports in ABAP use a sequence of predefined events during program execution. These events let you structure your code based on data fetching, formatting, and output rendering. Event Description LOAD-OF-PROGRAM Triggered once when the program is loaded into memory (before anything else) INITIALIZATION Called before the selection screen is displayed AT SELECTION-SCREEN Called after [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Classical Reports in ABAP use a sequence of predefined events during program execution. These events let you structure your code based on data fetching, formatting, and output rendering.</p>
<table>
<thead>
<tr>
<th>Event</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>LOAD-OF-PROGRAM</code></td>
<td>Triggered once when the program is loaded into memory (before anything else)</td>
</tr>
<tr>
<td><code>INITIALIZATION</code></td>
<td>Called before the selection screen is displayed</td>
</tr>
<tr>
<td><code>AT SELECTION-SCREEN</code></td>
<td>Called after user input is entered on the selection screen</td>
</tr>
<tr>
<td><code>START-OF-SELECTION</code></td>
<td>Main logic block, starts after selection screen input</td>
</tr>
<tr>
<td><code>TOP-OF-PAGE</code></td>
<td>Used to print page headers</td>
</tr>
<tr>
<td><code>END-OF-PAGE</code></td>
<td>Used to print page footers</td>
</tr>
<tr>
<td><code>END-OF-SELECTION</code></td>
<td>Called after START-OF-SELECTION, typically for final output</td>
</tr>
<tr>
<td><code>AT LINE-SELECTION</code></td>
<td>Triggered by user double-click (F2) on output</td>
</tr>
<tr>
<td><code>AT USER-COMMAND</code></td>
<td>Triggered when a custom function key is pressed</td>
</tr>
</tbody>
</table>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code><!--StartFragment --><span><span>REPORT </span>zrep_lclclass<span>.</span>

<span>TABLES</span><span>: </span>mara<span>.</span>
<span>data</span><span>: </span>lt_mara <span>type </span><span>table </span><span>of </span>mara<span>.</span>

<span>" Selection Screen</span>
<span>SELECT-OPTIONS</span><span>: </span>s_matnr <span>FOR </span>mara<span>-</span>matnr<span>.</span>

<span>" LOAD-OF-PROGRAM</span>

<span>LOAD-OF-PROGRAM</span><span>.</span>
  <span>WRITE</span><span>: </span>/ '&gt;&gt; <span>Program </span>loaded <span>into </span><span>memory</span><span>.</span>'<span>.</span>

  <span>" INITIALIZATION</span>

<span>INITIALIZATION</span><span>.</span>
  s_matnr<span>-</span><span>sign   </span><span>= </span>'I'<span>.</span>
  s_matnr<span>-</span>option <span>= </span>'EQ'<span>.</span>
  s_matnr<span>-</span>low    <span>= </span>'1'<span>.</span>
  s_matnr<span>-</span>high <span>= </span>'9999'<span>.</span>
  <span>APPEND </span>s_matnr<span>.</span>

  <span>" AT SELECTION-SCREEN</span>

<span>AT </span><span>SELECTION-SCREEN</span><span>.</span>
  <span>IF </span>s_matnr[] <span>IS </span><span>INITIAL</span><span>.</span>
    <span>MESSAGE </span>'Please enter a carrier ID' <span>TYPE </span>'E'<span>.</span>
  <span>ENDIF</span><span>.</span>

  <span>" START-OF-SELECTION</span>

<span>START-OF-SELECTION</span><span>.</span>
  <span>WRITE</span><span>: </span>/ '&gt;&gt; Start <span>of </span>selection'<span>.</span>
  <span>SELECT </span>* <span>FROM </span>mara <span>INTO </span><span>TABLE </span>lt_mara
  <span>WHERE </span>matnr <span>IN </span>s_matnr<span>.</span>

  <span>IF </span>sy<span>-</span>subrc <span>= </span><span>0</span><span>.</span>
    <span>LOOP </span><span>AT </span>lt_mara <span>INTO </span><span>DATA</span><span>(</span>ls_matnr<span>)</span><span>.</span>
      <span>WRITE</span><span>: </span>/ ls_matnr<span>-</span>matnr<span>,</span>
               ls_matnr<span>-</span>ernam<span>,</span>
               ls_matnr<span>-</span>ersda<span>.</span>
    <span>ENDLOOP</span><span>.</span>
  <span>ELSE</span><span>.</span>
    <span>WRITE</span><span>: </span>/ 'No <span>data </span>found'<span>.</span>
  <span>ENDIF</span><span>.</span>

  <span>" END-OF-SELECTION</span>

<span>END-OF-SELECTION</span><span>.</span>
  <span>WRITE</span><span>: </span>/ '&gt;&gt; <span>End </span><span>of </span>selection processing<span>.</span>'<span>.</span>

  <span>" TOP-OF-PAGE</span>

<span>TOP-OF-PAGE</span><span>.</span>
  <span>WRITE</span><span>: </span>/ 'Material Master Report'<span>.</span>
  <span>WRITE</span><span>: </span>/ '<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-<span>-</span>-'<span>.</span>

  <span>" AT LINE-SELECTION</span>

<span>AT </span><span>LINE-SELECTION</span><span>.</span>
  <span>MESSAGE </span>'You clicked a line!' <span>TYPE </span>'I'<span>.</span></span> </code></pre>
<p>Output:<br />
Execute<br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/classical-rep-event.png" /></p>
<p><img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/classical-rep-event2.png" /><br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/classical-rep-event3.png" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/classical-report-events-in-sap-abap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>FM for Help Request</title>
		<link>https://www.sapewmhelp.com/question/fm-for-help-request/</link>
					<comments>https://www.sapewmhelp.com/question/fm-for-help-request/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Wed, 30 Jul 2025 12:29:27 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=fm-for-help-request</guid>

					<description><![CDATA[Help Request (triggered by F1 key) provides field-level documentation to help users understand the purpose or use of a field. Types of Help Request: Automatic Help (F1) from Data Element Comes from documentation maintained in the data element. No coding needed — just maintain the documentation in SE11. Custom Help Request (Manual) In module pool [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Help Request</strong> (triggered by F1 key) provides <strong>field-level documentation</strong> to help users understand the purpose or use of a field.</p>
<h3 data-start="246" data-end="275">Types of Help Request:</h3>
<ol>
<li>
<p><strong>Automatic Help (F1) from Data Element</strong></p>
<ul>
<li>
<p>Comes from documentation maintained in the <strong>data element</strong>.</p>
</li>
<li>
<p>No coding needed — just maintain the documentation in SE11.</p>
</li>
</ul>
</li>
<li>
<p><strong>Custom Help Request (Manual)</strong></p>
<ul>
<li>
<p>In module pool programs, you can write custom F1 help logic using <code>PROCESS ON HELP-REQUEST</code>.</p>
</li>
</ul>
</li>
</ol>
<p>Code :</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code><!--StartFragment --><span><span>*&amp;---------------------------------------------------------------------*</span>
<span>*&amp;---------------------------------------------------------------------*</span>
<span>*&amp; Report ZPRG_TEST</span>
<span>*&amp;---------------------------------------------------------------------*</span>

<span>REPORT </span>zprg_test_ecc<span>.</span>

<span>DATA </span><span>:  </span>it_help <span>TYPE </span><span>STANDARD </span><span>TABLE </span><span>OF </span>helpval <span>WITH </span><span>HEADER </span><span>LINE</span><span>.</span>

<span>PARAMETERS </span><span>: </span>s_id <span>TYPE </span>ZAR_STUDENT_ID<span>.</span>

<span>AT </span><span>SELECTION-SCREEN </span><span>ON </span>s_id<span>.</span>
  <span>SELECT </span><span>SINGLE </span>student_id <span>FROM </span>zar_student_data <span>INTO </span>@DATA<span>(</span><span>id</span><span>)</span><span>.</span>
  <span>IF </span><span>id </span><span>IS </span><span>INITIAL</span><span>.</span>
    <span>MESSAGE </span><span>'Student ID not found' </span><span>TYPE </span><span>'E'</span><span>.</span>
  <span>ENDIF</span><span>.</span>

<span>AT </span><span>SELECTION-SCREEN </span><span>ON </span><span>HELP-REQUEST </span><span>FOR </span>s_id<span>.</span>
  <span>CLEAR </span>it_help[]<span>.</span>

  it_help<span>-</span>tabname <span>= </span><span>'bkid'</span><span>.</span>
  it_help<span>-</span>fieldname <span>= </span><span>'Student_ID'</span><span>.</span>
  it_help<span>-</span>keyword <span>= </span><span>'Description'</span><span>.</span>
  it_help<span>-</span>length <span>= </span><span>150</span><span>.</span>
  it_help<span>-</span><span>value </span><span>= </span><span>'Enter a student id or refer table ZAR_STUDENT_DATA to find student id'</span><span>.</span>

  <span>APPEND </span>it_help<span>.</span>

  <span>CALL </span><span>FUNCTION </span><span>'HELP_GET_VALUES'</span>
    <span>EXPORTING</span>
      popup_title <span>= </span><span>'About s-id'</span>
    <span>TABLES</span>
      <span>fields      </span><span>= </span>it_help
    <span>EXCEPTIONS</span>
      no_entries  <span>= </span><span>1</span>
      <span>OTHERS      </span><span>= </span><span>2</span><span>.</span>

  <span>IF </span>sy<span>-</span>subrc &lt;&gt; <span>0</span><span>.</span>
<span>* Implement suitable error handling here</span>
  <span>ENDIF</span><span>.</span>

<span>START-OF-SELECTION</span><span>.</span>

  <span>SELECT </span>* <span>FROM </span>zar_student_data <span>INTO </span><span>TABLE </span>@DATA<span>(</span>lc_it_zlib<span>) </span><span>WHERE </span>STUDENT_ID <span>= </span>@s_id<span>.</span>

  <span>LOOP </span><span>AT </span>lc_it_zlib <span>INTO </span><span>DATA</span><span>(</span>wa_zlib<span>)</span><span>.</span>
    <span>WRITE </span><span>(</span><span>22</span><span>) </span><span>: </span>wa_zlib<span>-</span>student_id<span>, </span>wa_zlib<span>-</span>student_fname<span>.</span>
    <span>SKIP</span><span>.</span>
  <span>ENDLOOP</span><span>.</span></span> 
</code></pre>
<p>Output :<br />
Execute and Press F1.<br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/07/help-req.png" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/fm-for-help-request/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
