{"id":1150,"date":"2014-10-14T21:43:30","date_gmt":"2014-10-14T20:43:30","guid":{"rendered":"http:\/\/oprsteny.cz\/?p=1150"},"modified":"2014-10-14T21:44:35","modified_gmt":"2014-10-14T20:44:35","slug":"abap-itab-and-clear-vs-refresh-vs-free","status":"publish","type":"post","link":"https:\/\/oprsteny.cz\/?p=1150","title":{"rendered":"ABAP &#8211; ITAB and CLEAR vs REFRESH vs FREE"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"358\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=358\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" data-orig-size=\"44,50\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Picasa&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1365690880&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"SAP\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" class=\"size-full wp-image-358 alignleft\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" alt=\"SAP\" width=\"44\" height=\"50\" \/>I experienced lot of confusion when I faced internal tables with header lines during my professional life. Therefore I strongly advice NOT to use internal tables with header lines. But they are heavily used in older programs so it&#8217;s good to know what is the difference between how to clear the header line and how to clear the itab contents and how it is different from internal tables WITHOUT header line.<!--more--><\/p>\n<p>We will have two cases:<\/p>\n<ul>\n<li><strong>Case A<\/strong> &#8211; <strong><span style=\"color: #ff0000;\">DATA<\/span><\/strong>: lt_itab <strong><span style=\"color: #ff0000;\">TYPE STANDARD TABLE OF<\/span><\/strong> something.<\/li>\n<li><strong>Case B<\/strong> &#8211; <span style=\"color: #ff0000;\"><strong>DATA<\/strong><\/span>: lt_itab <strong><span style=\"color: #ff0000;\">TYPE<\/span><\/strong> something <span style=\"color: #ff0000;\"><strong>OCCURS 0 WITH HEADER LINE<\/strong><\/span>.<\/li>\n<\/ul>\n<table style=\"font-size: 10px;\">\n<tbody>\n<tr>\n<td><\/td>\n<td>Case<\/td>\n<td>Initialize table contents<\/td>\n<td>Operating on work area\/structure<\/td>\n<td>Operating on table contents<\/td>\n<td>Release table header memory space<\/td>\n<td>Release table contents memory space<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><strong><span style=\"color: #ff0000;\">CLEAR<\/span><\/strong><\/td>\n<td>A<\/td>\n<td><span style=\"color: #ff0000;\">CLEAR lt_itab<\/span><\/td>\n<td><span style=\"color: #ff0000;\">N\/A<\/span><\/td>\n<td><span style=\"color: #ff0000;\">CLEAR lt_itab<\/span><\/td>\n<td>N\/A<\/td>\n<td>N\/A<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td><span style=\"color: #ff0000;\">CLEAR lt_itab[]<\/span><\/td>\n<td><span style=\"color: #ff0000;\">CLEAR lt_itab<\/span><\/td>\n<td><span style=\"color: #ff0000;\">CLEAR lt_itab[]<\/span><\/td>\n<td>N\/A<\/td>\n<td>N\/A<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">REFRESH<\/td>\n<td>A<\/td>\n<td>REFRESH lt_itab<\/td>\n<td>N\/A<\/td>\n<td>REFRESH lt_itab<\/td>\n<td>N\/A<\/td>\n<td>N\/A<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>REFRESH lt_itab<\/td>\n<td>N\/A<\/td>\n<td>REFRESH lt_itab<\/td>\n<td>N\/A<\/td>\n<td>N\/A<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">FREE<\/td>\n<td>A<\/td>\n<td>FREE lt_itab<\/td>\n<td>N\/A<\/td>\n<td>FREE lt_itab<\/td>\n<td>\u00a0N\/A<\/td>\n<td>FREE lt_itab<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>FREE lt_itab<\/td>\n<td>N\/A<\/td>\n<td>FREE lt_itab<\/td>\n<td>N\/A<\/td>\n<td>FREE lt_itab<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I experienced lot of confusion when I faced internal tables with header lines during my professional life. Therefore I strongly advice NOT to use internal tables with header lines. But they are heavily used in older programs so it&#8217;s good &hellip; <a href=\"https:\/\/oprsteny.cz\/?p=1150\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"ABAP - ITAB and CLEAR vs REFRESH vs FREE","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,9],"tags":[446,337,338,339],"class_list":["post-1150","post","type-post","status-publish","format-standard","hentry","category-abap","category-development","tag-abap","tag-clear","tag-free","tag-refresh"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3nYbe-iy","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/1150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1150"}],"version-history":[{"count":8,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/1150\/revisions"}],"predecessor-version":[{"id":1158,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/1150\/revisions\/1158"}],"wp:attachment":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}