Title displaying on top of page in Dreamweaver
Not sure why this is happening. When I try updating the template on all of the pages I also get this. (some regions in this document has no corresponding regions in the new template) It's for the heading
Any help would be appreciated. Here is the code I just detached from the template.
Thanks
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="JS/jquery.js"></script>
<script type="text/javascript" src="JS/slider.js"></script>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript"> // This is the script for the banner slider
$(document).ready(function() {
$('#slider').s3Slider({
timeOut: 6000
</script>
<link href='CSS/styles.css' rel="stylesheet" type="text/css" media="screen" />
<link href='CSS/print.css' media="print" />
<link href='CSS/slider.css' rel="stylesheet" type="text/css" media="screen"/>
<link rel="shortcut icon" href='Images/Icons/favicon KU.bmp' />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" content="cache" />
<meta name="robots" content="INDEX, FOLLOW" />
<meta name="keywords" content="Kuuma Wood Furnaces,Kuuma Sauna Stoves,indoor wood gasification furnace,forced air wood furnace,high efficiency wood furnace,wood stoves,Vapor-Fire,indoor wood furnace,wood burning,gasification,indoor wood stove,burning wood,smokeless,green energy,wood sauna stove,electric sauna stove,sauna heaters,electric heaters,steam bath,wood sauna heater,Daryl Lamppa,lamppa mfg,saunafin,efficient wood,green heat,central furnace,add on furnace" />
<meta name="description" content="Lamppa Manufactures The World's #1 Indoor Wood Burning Forced Air Furnace the Kuuma Vapor-Fire. It's Amazing High Efficiency and Low Emissions are backed by Independent Test Results. We also Manufacture Fantastic Kuuma Wood & Electric Sauna Stoves" />
<title>Kuuma "Smokeless" Vapor-Fire High Efficiency Wood Gasification Furnaces & Fantasic Sauna Stoves by Lamppa Manufacturing Inc.</title>
<!-- Google Analytics Code Goes Below Here -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23759472-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
</script>
<!-- End Google Analytics Code -->
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<meta name="p:domain_verify" content="fef245a5203202c0a7d5f4dc5561115a" />
</head>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="outer">
<div id="wrapper">
<div id="logo">
<img title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Banner" src="Images/Banners/Kuuma Banner 1 500.png" />
</div>
<div id="social-media-icons">
<ul>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Facebook Link" href="http://www.facebook.com/pages/Lamppa-Manufacturing-Incorporated-Kuuma-Furnaces-Sauna-Stove s/215958785138157"><img src="Images/Social Media/facebook.png" /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves YouTube Link" href="http://www.youtube.com/user/Lampmfg/videos"><img src="Images/Social Media/youtube.png" /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Twitter Link" href="https://twitter.com/#!/lampmfg"><img src='Images/Social Media/twitter.png' /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves RSS Feed Link" href="http://lamppakuuma.blogspot.com/"><img src='Images/Social Media/rss.png' /></a></li>
</ul>
</div>
<div id="MenuBar">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href='index.html'>Kuuma Home</a>
<ul>
<li><a title="Kuuma Vapor-Fire High Efficiency Wood Gasification Funraces" href='kuuma-vapor-fire-high-efficiency-wood-gasification-furnace.html'>Kuuma Furnaces</a></li>
<li><a title="Kuuma Wood and Electric Sauna Stoves" href='kuuma-sauna-stoves-wood-electric-heater.html'>Kuuma Sauna Stoves</a></li>
<li><a title="Press Releases Featuring Kuuma Smokeless Furnaces & Fantasic Sauna Stoves" href='press-releases-kuuma-furnaces-sauna-stoves.html'>Press Releases</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='kuuma-vapor-fire-high-efficiency-wood-gasification-furnace.html'>Kuuma Furnaces</a>
<ul>
<li><a title="Kuuma Vapor-Fire 100 High Efficiency Wood Gasification Furnaces" href='kuuma-vapor-fire-100-high-efficiency-wood-gasification-furnace.html'>Kuuma Vapor-Fire 100</a></li>
<li><a title="Kuuma Vapor-Fire 200 High Efficiency Wood Gasification Furnaces" href='kuuma-vapor-fire-200-high-efficiency-wood-gasification-furnace.html'>Kuuma Vapor-Fire 200</a></li>
<li><a title="Facts about Kuuma Wood Gasification Furnaces and Sauna Stoves" href='faq-kuuma-vapor-fire-furnace-sauna-stove.html'>FAQ's</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='kuuma-sauna-stoves-wood-electric-heater.html'>Kuuma Sauna Stoves</a>
<ul>
<li><a title="Kuuma Wood Sauna Stoves and Heaters" href='kuuma-wood-sauna-stove-heater.html'>Wood Sauna Stoves</a></li>
<li><a title="Kuuma Electric Sauna Stoves and Heaters" href='kuuma-electric-sauna-stove-heater.html'>Electric Sauna Stoves</a></li>
<li><a title="Facts about Kuuma Wood Gasification Furnaces and Sauna Stoves" href='faq-kuuma-vapor-fire-furnace-sauna-stove.html'>FAQ's</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='gallery-kuuma-vapor-fire-furnace-sauna-stove.html'>Video Gallery</a>
<ul>
<li><a title="Lamppa Manufacturing Inc. History" href='lamppa-story-kuuma-wood-furnaces-sauna-stove.html'>Lamppa Story</a></li>
<li><a title="Testimonials featuring Kuuma VaporFire Wood Gasification Furnaces and Sauna Stoves" href='testimonials-kuuma-wood-gasification-furnace-sauna-stove.html'>Testimonials</a></li >
<li><a title="Contact Us Sign-Up for Periodic Specials" href='contactus.html'>Contact Us</a></li></ul></li></ul>
</div>
<div id="slider">
<ul id="sliderContent">
<!-- use this list item if you dont NOT want to include a link -->
<li class="sliderImage">
<img title="Andy Feast Custom Kuuma Sauna" src='Images/Banners/AndyFeest Oustide Sauna Cropped 900x300.jpg'/>
<span class="top"><strong>Andy's Kuuma Sauna Stove</strong>
<br />Picture of a Kuuma Wood Sauna Stove with an
<br />outside feed, which really limits clean-up.</span>
</li>
<li class="sliderImage">
<img title="Daryl Lamppa Grinding on a Kuuma" src='Images/Banners/900 x300 Daryl grinding.jpg'/>
<span class="top"><strong>Kuuma Quality!!</strong>
<br />All of our products are manufactured indiviually
<br />with care.
<br />Over 30 + years of experience (Kuuma = Quality)...</span>
</li>
<li class="sliderImage">
<img title="Tim Fetterer's Custom Kuuma Sauna" src='Images/Banners/Tim Fetterer Sauna Glass cropped 900x300.jpg'/>
<span class="top"><strong>Tim's Kuuma Sauna Stove</strong>
<br />Picture of a Kuuma Wood Sauna Stove
<br />with a glass window for romantic viewing.
<br />Visit our Facebook page for other custom set-up's!!</span>
</li>
<li class="sliderImage">
<img title="Kuuma Sauna Stove Final Touches" src='Images/Banners/sauna stove welding 900 x 300.jpg' />
<span class="top"><strong>Manufacturing Process</strong>
<br />Picture of a Kuuma Wood Sauna Stove
<br />undergoing a few final touches.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Vapor-Fire Furnace Bodies" src='Images/Banners/900 x 300 Stove Bodies 2.jpg'/>
<span class="top"><strong>Kuuma Vapor-Fire 100</strong>
<br />Picture of Kuuma Vapor-Fire bodies
<br />just before the painting process.</span>
</li>
<li class="sliderImage">
<img title="Billy Hiltunen Painting" src='Images/Banners/Painting 900 x 300.jpg'/>
<span class="top"><strong>Custom Painting</strong>
<br />Picture of Billy Hiltunen Painting Kuuma
<br />Furnaces & Sauna Stoves.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Electric Sauna Stove Wall Model Display" src='Images/Banners/900 x 300 Electric Sauna.jpg'/>
<span class="top"><strong>Kuuma Electric</strong>
<br />Picture of our Kuuma Electric Sauna Stove,
<br />available in either a Floor or Wall Mount Model.
<br />Get off the top bench!!</span>
</li>
<li class="sliderImage">
<img title="Kuuma Vapor-Fire Furnace 24 Volt Computer" src='Images/Banners/24 Volt Computer 900 x 300.jpg'/>
<span class="top"><strong>Kuuma 24 Volt Computer</strong>
<br />High Efficiency & Low Emmissions...
<br />How? With our revolutionary
<br />24 volt Kuuma Vapor-Fire computer.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Wood Sauna Stove Bodies" src='Images/Banners/900 x 300 sauna stove bodies 2.jpg'/>
<span class="top"><strong>Kuuma Wood</strong>
<br />Picture of Kuuma Wood Sauna Stove bodies
<br />just before the painting process.
<br />Get off the top bench!!</span>
</li>
<div class="clear sliderImage"></div>
</ul>
</div>
<div id="content">
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<h1>The World's #1 Forced Air Wood Gasification Furnaces<br>
**********"Kuuma today for a better tomorrow"**********</h1>
<p>Well it's all about safety, <em>high efficiency</em>, and enhancing our environment when it comes to <em>burning wood</em> using a <fire>Kuuma</fire><em><a title="Kuuma Vapor-Fire High Efficiency Wood Gasification Funraces" href="kuuma-vapor-fire-high-efficiency-wood-gasification-furnace.html"> Vapor-Fire Wood Gasification Furnace</a></em>. <strong>"Smokeless"</strong> burns say it all...</p>
<img src='Images/Employee/10.23 Kuuma main pic Dad Grandpa 280 x 180.jpg' class="image-frame" id="Image1" onMouseOver="MM_swapImage('Image1','','Images/Furnaces/Large Kuuma from side - Sample.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<img src='Images/Furnaces/Dad Welding 280 x 180 9.21.12.jpg' class="image-frame" id="Image2" title="Kuuma Electric Sauna Stoves and Heaters" onMouseOver="MM_swapImage('Image2','','Images/Employee/Dave Grinding 280 x 180 9.21.12.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<p>The biggest difference from the <fire>Kuuma</fire> Vapor-Fire 100 and 200 to any other hot air woodburning furnace is that the Vapor-Fires are true gasification furnaces, while others aren't. With emissions as low as .01 gr/mj or less than 1 gr/hr. and combustion efficiencies of 99%, you know for a fact that gasification is taking place. Also, at the same time, smokeless burns are taking place and further demonstrate gasification. Remember this, when there is no smoke, there is also no creosote.</p>
<p>With emissions that average 5 gr/hr or more or .3 gr/mj, you won't have smokeless burns and true wood gasification.</p>
<p>Consequently, the <fire>Kuuma</fire> Vapor-Fire furnaces stand alone for efficiency, safety and enhancing our environment.</p>
<a href="//pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.lamppakuuma.com%2F&media=ht tp%3A%2F%2Fwww.lamppakuuma.com%2FImages%2FCustomer%2520Pictures%2FTim%2520Fetterer%2520635 %2520px.jpg&description=Next%20stop%3A%20Pinterest" data-pin-do="buttonPin" data-pin-config="above"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>
<H3>****Save $$$$, because the $300 tax credit is back. Anyone that purchased a Kuuma Vapor-Fire in 2012 (retroactive) or 2013 is eligible. <a href="http://www.hpba.org/government-affairs/major-projects/25c-tax-credit">Click here for details...</a> <a href="Sales Flyers-Diagrams/Tax Credit 2012.2013.pdf">Print here...</a></h3> <br>
<h1>Fantastic Wood & Electric Sauna Stoves</h1>
<p onMouseOver="MM_swapImage('Image5','','Images/Customer Pictures/stove,bench, metal 280 x 180.jpg',1)">By definition taking a <em>sauna</em> is a steam bath taken in the Finnish manner. That's exactly what both our <em>wood and electric sauna stoves</em> do for you, provide excellent heat and a great level of steam. Be ready to move down off the top bench when using a <fire>Kuuma</fire><em><a title="Kuuma Wood and Electric Sauna Stoves" href="kuuma-sauna-stoves-wood-electric-heater.html"> Sauna Stove</a></em>.
<a href="//pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.lamppakuuma.com%2F&media=ht tp%3A%2F%2Fwww.lamppakuuma.com%2FImages%2FCustomer%2520Pictures%2FTim%2520Fetterer%2520635 %2520px.jpg&description=Next%20stop%3A%20Pinterest" data-pin-do="buttonPin" data-pin-config="above"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></p>
<img src='Images/Customer Pictures/Tim Fetterer 280 x 180.jpg' name="Image3" class="image-frame" id="Image3" title="Kuuma Wood Sauna Stoves and Heaters" onMouseOver="MM_swapImage('Image3','','Images/Customer Pictures/stove,bench, metal 280 x 180.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<img src='Images/Gallery Photos/Electric Sauna Stove Wall 2 280 x 180.jpg' class="image-frame" id="Image4" title="Kuuma Electric Sauna Stoves and Heaters" onMouseOver="MM_swapImage('Image4','','Images/Sauna Stoves/Electric Floor Inside 280 x 180.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script> </div>
<div id="rightside">
<h1>Call or E-Mail<br><br>
TODAY!!!!<br><br>
"1-800-358-2049"<br><br>
<a title="Lamppa Manufacturing Incorporated e-mail address" href="mailto:[email protected]">[email protected]</a></h1>
<h2>***Intertek Testing***</h2>
<p><strong>.45 Gr/HR.</strong> <em>Emissions</em><br>
<strong>.01 Gr/MJ.</strong> <em>Emissions</em><br>
<strong>99.4%</strong> <em>Combustion Efficiency</em><br>
<strong>84%</strong> <em>Overall Efficiency</em><br>
<strong>99%</strong> <em>Smokeless Burns</em><br><br>
<u>Unlike most of our competitors we actually provide proof (below) and not just promises...</u><br><br>
<a title="Efficiency Testing Kuuma Vapor-Fire 100 PDF" href="Test Results-Intertek/Vapor Fire 100 signed.pdf">Vapor-Fire 100 Efficiency Testing Results (Signed PDF)</a><br><br>
<a title="Efficiency Testing Kuuma Vapor-Fire 200 PDF" href="Test Results-Intertek/Vapor Fire 200 1,2 signed.pdf">Vapor-Fire 200 Efficiency Testing Results (Signed PDF) Burns 1 and 2 </a> , <a href="Test Results-Intertek/Vapor Fire 200 3,4 Signed.pdf">Burns 3 and 4</a></p>
<img title="Kuuma Vapor-Fire Furnace Testing Process" src='Images/Furnaces/VF 100 Test Pic 1 200 x 150.jpg'/img>
<p>"We have not seen any other <em>wood furnace</em> in the market with these type of results," said owner and designer Daryl Lamppa.</p>
<p><a title="Intertek Home Page Link" href="http://www.intertek.com/">Intertek</a> is an accredited world leader in the testing, inspection and certification of consumer goods and works with more than one-third of all global retailers' supply chains
<h2>******Win a Free******</h2>
<h2>Kuuma Sauna Stove</h2>
<h2>Visit us on Facebook</h2><br><br><br>
<h2>***We Know Cold!!***</h2><br><br>
<span style="display: block !important; width: 180px; text-align: center; font-family: sans-serif; font-size: 12px;"><a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=zmw:55790.1.99999&banner typeclick=wu_macwhite" title="Tower, Minnesota Weather Forecast" target="_blank"><img src="http://weathersticker.wunderground.com/weathersticker/cgi-bin/banner/ban/wxBanner?bannerty pe=wu_macwhite&pwscode=KMNELY4&ForcedCity=Tower&ForcedState=MN&zip=55790&language=EN" alt="Find more about Weather in Tower, MN" width="160" /></a><br><a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=zmw:55790.1.99999&banner typeclick=wu_macwhite" title="Get latest Weather Forecast updates" style="font-family: sans-serif; font-size: 12px" target="_blank">Click for weather forecast</a></span>
</div>
</div>
<div id="footer">
<p class="footer-text">Lamppa Manufacturing Inc.<br>
512 South 3rd Street<br>
Tower, MN 55790<br>
1-800-358-2049 , 218-753-2330<br>
<a title="Lamppa Manufacturing Incorporated e-mail address" href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</html>
Here is a copy of the template. Updating any region my template gives me the error when trying to apply to all of my other pages. I know that I can unapply the template from each page and edit, but I would prefer to keep the template on all for easy updating. Thanks for any help!!
Here is what the box says.
Inconsistent Region Names
Some regions in this document have no corresponding regions in the new template.
Editable Region
Head Not Resolved
Move content to new region have a drop down with a few choices
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="../JS/jquery.js"></script>
<script type="text/javascript" src="../JS/slider.js"></script>
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript"> // This is the script for the banner slider
$(document).ready(function() {
$('#slider').s3Slider({
timeOut: 6000
</script>
<link href='../CSS/styles.css' rel="stylesheet" type="text/css" media="screen" />
<link href='../CSS/print.css' rel="stylesheet" type="text/css" media="print" />
<link href='../CSS/slider.css' rel="stylesheet" type="text/css" media="screen"/>
<link rel="shortcut icon" href='../Images/Icons/favicon KU.bmp' />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" content="cache" />
<meta name="robots" content="INDEX, FOLLOW" />
<meta name="keywords" content="Kuuma Wood Furnaces,Kuuma Sauna Stoves,indoor wood gasification furnace,forced air wood furnace,high efficiency wood furnace,wood stoves,Vapor-Fire,indoor wood furnace,wood burning,gasification,indoor wood stove,burning wood,smokeless,green energy,wood sauna stove,electric sauna stove,sauna heaters,electric heaters,steam bath,wood sauna heater,Daryl Lamppa,lamppa mfg,saunafin,efficient wood,green heat,central furnace,add on furnace" />
<meta name="description" content="Lamppa Manufactures The World's #1 Indoor Wood Burning Forced Air Furnace the Kuuma Vapor-Fire. It's Amazing High Efficiency and Low Emissions are backed by Independent Test Results. We also Manufacture Fantastic Kuuma Wood & Electric Sauna Stoves" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Kuuma "Smokeless" Furnaces & Fantasic Sauna Stoves by Lamppa Manufacturing Inc.</title>
<!-- TemplateEndEditable -->
<!-- Google Analytics Code Goes Below Here -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23759472-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
</script>
<!-- End Google Analytics Code -->
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
</head>
<div id="outer">
<div id="wrapper">
<div id="logo">
<img title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Banner" src="../Images/Banners/Image00001.jpg" />
</div>
<div id="social-media-icons">
<ul>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Facebook Link" href="http://www.facebook.com/pages/Lamppa-Manufacturing-Incorporated-Kuuma-Furnaces-Sauna-Stove s/215958785138157"><img src="../Images/Social Media/facebook.png" /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves YouTube Link" href="http://www.youtube.com/user/Lampmfg/videos"><img src="../Images/Social Media/youtube.png" /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves Twitter Link" href="https://twitter.com/#!/lampmfg"><img src='../Images/Social Media/twitter.png' /></a></li>
<li><a title="Kuuma Smokeless Furnaces & Fantastic Sauna Stoves RSS Feed Link" href="http://lamppakuuma.blogspot.com/"><img src='../Images/Social Media/rss.png' /></a></li>
</ul>
</div>
<div id="MenuBar">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href='../index.html'>Kuuma Home</a>
<ul>
<li><a title="Kuuma Vapor-Fire High Efficiency Wood Gasification Funraces" href='../kuuma-vapor-fire-high-efficiency-wood-gasification-furnace.html'>Kuuma Furnaces</a></li>
<li><a title="Kuuma Wood and Electric Sauna Stoves" href='../kuuma-sauna-stoves-wood-electric-heater.html'>Kuuma Sauna Stoves</a></li>
<li><a title="Press Releases Featuring Kuuma Smokeless Furnaces & Fantasic Sauna Stoves" href='../press-releases-kuuma-furnaces-sauna-stoves.html'>Press Releases</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='../kuuma-vapor-fire-high-efficiency-wood-gasification-furnace.html'>Kuuma Furnaces</a>
<ul>
<li><a title="Kuuma Vapor-Fire 100 High Efficiency Wood Gasification Furnaces" href='../kuuma-vapor-fire-100-high-efficiency-wood-gasification-furnace.html'>Kuuma Vapor-Fire 100</a></li>
<li><a title="Kuuma Vapor-Fire 200 High Efficiency Wood Gasification Furnaces" href='../kuuma-vapor-fire-200-high-efficiency-wood-gasification-furnace.html'>Kuuma Vapor-Fire 200</a></li>
<li><a title="Facts about Kuuma Wood Gasification Furnaces and Sauna Stoves" href='../faq-kuuma-vapor-fire-furnace-sauna-stove.html'>FAQ's</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='../kuuma-sauna-stoves-wood-electric-heater.html'>Kuuma Sauna Stoves</a>
<ul>
<li><a title="Kuuma Wood Sauna Stoves and Heaters" href='../kuuma-wood-sauna-stove-heater.html'>Wood Sauna Stoves</a></li>
<li><a title="Kuuma Electric Sauna Stoves and Heaters" href='../kuuma-electric-sauna-stove-heater.html'>Electric Sauna Stoves</a></li>
<li><a title="Facts about Kuuma Wood Gasification Furnaces and Sauna Stoves" href='../faq-kuuma-vapor-fire-furnace-sauna-stove.html'>FAQ's</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href='../gallery-kuuma-vapor-fire-furnace-sauna-stove.html'>Video Gallery</a>
<ul>
<li><a title="Lamppa Manufacturing Inc. History" href='../lamppa-story-kuuma-wood-furnaces-sauna-stove.html'>Lamppa Story</a></li>
<li><a title="Testimonials featuring Kuuma VaporFire Wood Gasification Furnaces and Sauna Stoves" href='../testimonials-kuuma-wood-gasification-furnace-sauna-stove.html'>Testimonials</a>< /li>
<li><a title="Contact Us Sign-Up for Periodic Specials" href='../contactus.html'>Contact Us</a></li></ul></li></ul>
</div>
<div id="slider">
<ul id="sliderContent">
<!-- use this list item if you dont NOT want to include a link -->
<li class="sliderImage">
<img title="Andy Feast Custom Kuuma Sauna" src='../Images/Banners/AndyFeest Oustide Sauna Cropped 900x300.jpg'/>
<span class="top"><strong>Andy's Kuuma Sauna Stove</strong>
<br />Picture of a Kuuma Wood Sauna Stove with an
<br />outside feed, which really limits clean-up.</span>
</li>
<li class="sliderImage">
<img title="Daryl Lamppa Grinding on a Kuuma" src='../Images/Banners/900 x300 Daryl grinding.jpg'/>
<span class="top"><strong>Kuuma Quality!!</strong>
<br />All of our products are manufactured indiviually
<br />with care.
<br />Over 30 + years of experience (Kuuma = Quality)...</span>
</li>
<li class="sliderImage">
<img title="Tim Fetterer's Custom Kuuma Sauna" src='../Images/Banners/Tim Fetterer Sauna Glass cropped 900x300.jpg'/>
<span class="top"><strong>Tim's Kuuma Sauna Stove</strong>
<br />Picture of a Kuuma Wood Sauna Stove
<br />with a glass window for romantic viewing.
<br />Visit our Facebook page for other custom set-up's!!</span>
</li>
<li class="sliderImage">
<img title="Kuuma Sauna Stove Final Touches" src='../Images/Banners/sauna stove welding 900 x 300.jpg' />
<span class="top"><strong>Manufacturing Process</strong>
<br />Picture of a Kuuma Wood Sauna Stove
<br />undergoing a few final touches.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Vapor-Fire Furnace Bodies" src='../Images/Banners/900 x 300 Stove Bodies 2.jpg'/>
<span class="top"><strong>Kuuma Vapor-Fire 100</strong>
<br />Picture of Kuuma Vapor-Fire bodies
<br />just before the painting process.</span>
</li>
<li class="sliderImage">
<img title="Billy Hiltunen Painting" src='../Images/Banners/Painting 900 x 300.jpg'/>
<span class="top"><strong>Custom Painting</strong>
<br />Picture of Billy Hiltunen Painting Kuuma
<br />Furnaces & Sauna Stoves.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Electric Sauna Stove Wall Model Display" src='../Images/Banners/900 x 300 Electric Sauna.jpg'/>
<span class="top"><strong>Kuuma Electric</strong>
<br />Picture of our Kuuma Electric Sauna Stove,
<br />available in either a Floor or Wall Mount Model.
<br />Get off the top bench!!</span>
</li>
<li class="sliderImage">
<img title="Kuuma Vapor-Fire Furnace 24 Volt Computer" src='../Images/Banners/24 Volt Computer 900 x 300.jpg'/>
<span class="top"><strong>Kuuma 24 Volt Computer</strong>
<br />High Efficiency & Low Emmissions...
<br />How? With our revolutionary
<br />24 volt Kuuma Vapor-Fire computer.</span>
</li>
<li class="sliderImage">
<img title="Kuuma Wood Sauna Stove Bodies" src='../Images/Banners/900 x 300 sauna stove bodies 2.jpg'/>
<span class="top"><strong>Kuuma Wood</strong>
<br />Picture of Kuuma Wood Sauna Stove bodies
<br />just before the painting process.
<br />Get off the top bench!!</span>
</li>
<div class="clear sliderImage"></div>
</ul>
</div>
<div id="content"><!-- TemplateBeginEditable name="content" -->
<h1>The World's #1 Wood Gasification Furnaces<br>
"Kuuma today for a better tomorrow"</h1>
<p>Well it's all about safety, high efficiency, and enhancing our environment when it comes to burning wood using a Vapor-Fire Wood Gasification Furnace. "Smokeless" burns say it all...</p>
<img src="../Images/Furnaces/Large Kuuma from side - Sample.jpg" class="image-frame" id="Image1" onMouseOver="MM_swapImage('Image1','','../Images/Furnaces/Image00002.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<img src='../Images/Furnaces/Kuuma 200 from front-sample.jpg' class="image-frame" id="Image2" onMouseOver="MM_swapImage('Image2','','../Images/Furnaces/Kuuma 200 from rear-sample.jpg',1)" onMouseOut="MM_swapImgRestore()" img/>
<p>Well it's all about safety, high efficiency, and enhancing our environment when it comes to burning wood using a Vapor-Fire Wood Gasification Furnace. "Smokeless" burns say it all...</p>
<h1>Fantastic Wood & Electric Sauna Stoves</h1>
<p>Well it's all about safety, high efficiency, and enhancing our environment when it comes to burning wood using a Vapor-Fire Wood Gasification Furnace. "Smokeless" burns say it all...</p>
<img src='../Images/Sauna Stoves/Sauna Stove H20 tank front 280x180.jpg' class="image-frame" id="Image3" onMouseOver="MM_swapImage('Image3','','../Images/Sauna Stoves/Sauna Stove H20 tank rear 280 x 180.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<img src='../Images/Sauna Stoves/Electric Sauna Stove Front 280 x 180.jpg' class="image-frame" id="Image4" onMouseOver="MM_swapImage('Image4','','../Images/Sauna Stoves/Wood Sauna Stove no tank 280 x 180.jpg',1)" onMouseOut="MM_swapImgRestore()" img />
<p>Well it's all about safety, high efficiency, and enhancing our environment when it comes to burning wood using a Vapor-Fire Wood Gasification Furnace. "Smokeless" burns say it all...</p>
<!-- TemplateEndEditable --></div>
<!-- TemplateBeginEditable name="right" -->
<div id="rightside">
<h2>Press Releases</h2>
<p class="date">December 12, 2011</p>
<h3><a href="http://www.duluthnewstribune.com/">Duluth News Tribune</a></h3>
<p><a href="Press Releases/Lamppa Story DNT P.1.pdf">Read Press Release in the Duluth News Tribune Part 1</a>, <a href="Press Releases/Lamppa Story DNT P.2.pdf">Part 2...</a></p>
<p class="date">November 30, 2010</p>
<h3><a href="http://www.virginiamn.com/">Mesabi Daily News</a></h3>
<p><a href="Press Releases/Mesabi Daily News Article.pdf">Read Press Release in the Mesabi Daily News...</a></p>
<p class="date">October 23, 2010</p>
<h3><a href="http://www.timberjay.com/">The Timberjay</a></h3>
<p><a href="Press Releases/LAMPPAKUUMA1Timberjay.pdf">Read Press Release in The Timberjay Part 1</a>,<a href="Press Releases/LAMPPAKUUMA2Timberjay.pdf">Part 2...</a></p>
<p class="date">Volume 34, No.5</p>
<h3><a href="http://www.farmshow.com/">Farm Show</a></h3>
<p><a href="Press Releases/Cleanest Burning Farm Magazine.pdf">Read Press Release in Farm Show Magazine...</a></p>
</div>
<!-- TemplateEndEditable --></div>
<div id="footer">
<p class="footer-text">Lamppa Manufacturing <br>
512 South 3rd Street<br>
Tower, MN 55790<br>
1-800-358-2049 , 218-753-2330<br>
<a title="Lamppa Manufacturing Incorporated e-mail address" href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</html>
Similar Messages
-
Page Header Not Displaying at Top of Page
Report Builder 3
We have a number of reports that include navigation links in the page header. The links use the Bookmarks Action to move the user to a different page. The pages are separated using Page Breaks. Below is an example:
> Top row is the Page Header.
> Second section is the Resource Listing & Alerts page.
> After the first page a rectangle is placed which has Page Break set to Start.
> After the rectangle comes the start of the "Data Extract" page. The title is in a rectangle with a Bookmark called Page2.
> Click the link to be forwarded to the Data Extract.
> Page displays, but the Page Header is not visible because the screen is scrolled down slightly.
I have not been able to fix this or find a workaround that forces the Page Header to always display at the top. It has been suggested that putting the page break before the bookmark would force this to work, but that is not working.
Any ideas? Thank you! NaamkeekHi Naamkeek,
Based on my understanding, you add a bookmark link for “Data Extract” in page header, however, when clicking this fields, other page displays without visible page header.
In Reporting Service, when setting page header in a report, the page header will display in each report page. In your scenario, since you set BreakLocation as Start in PageBreak property, the rectangle could make the page header upper and screen scroll down
lightly. So please change this property to End. As we tested in our environment, we set BreakLocation as End in PageBreak property for the blank rectangle. Then adding a bookmark link in page header, when we click “Data Extract”, the page header will appear
on a new page. Please refer to screenshots below:
Reference:
Page Headers and Footers (Report Builder and SSRS)
Best regards,
Qiuyun Yu -
Image won't display at top of page: Firefox, Opera
http://www.mariagrist.net/dev/TCT/
It's the logo at the top left I am looking at. The image is
inside a td
which has a valign=top attribute.
Image correctly displays flush to top of page in Internet
Explorer, but
there is a white gap in both IE and Opera.Change this -
<td valign="top"><p><img
src="images/logo-top-left.gif" alt="logo-top-left"
width="162" height="168"></p></td>
to this -
<td valign="top"><img
src="images/logo-top-left.gif" alt="logo-top-left"
width="162" height="168"></td>
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Pixel Warrior" <[email protected]> wrote in
message
news:eohh5a$799$[email protected]..
>
http://www.mariagrist.net/dev/TCT/
>
> It's the logo at the top left I am looking at. The image
is inside a td
> which has a valign=top attribute.
>
> Image correctly displays flush to top of page in
Internet Explorer, but
> there is a white gap in both IE and Opera.
> -
Mouse over HTML link causes single frame to display at top of page Netscape only
Having a wierd problem. When you run the mouse over HTML
links on the page a single frame of the flash movie apears at the
top center of the page. It only happens in netscape in firefox
mode. IE, Opera, and Firefox do not have the problem.
Problem site
Thanks in Advance,
VorschThe problem goes away if i modify my .css file by removing
the
border: 1px solid #999999;
line from the "a:hover" style.
I ran my css file thru the validator at w3c and its fine. The
Page also validates as xhtml transitional.
and just a note the same file version is on my public server
and my testing server.
Has anyone ever seen this before?? I have several sites with
a:hover effects and flass media and have never run across this
before. -
Problem while displaying top of page in list display
Hi,
M facing problem in displaying top of page in list .
M using following methods:-
lr_outer_grid TYPE REF TO cl_salv_form_layout_grid,
lr_inner_grid TYPE REF TO cl_salv_form_layout_grid,
lr_label TYPE REF TO cl_salv_form_label,
lr_text TYPE REF TO cl_salv_form_text.
For displaying the top of page m using event TOP_OF_PAGE.
CREATE OBJECT lr_outer_grid.
*Outer grid
lr_inner_grid = lr_outer_grid->create_grid(
row = 1
column = 1 ).
*... create lable information in inner_grid
User ID
lr_label = lr_inner_grid->create_label(
row = 1
column = 1
text = text-h03 ).
*... create text information in inner_grid
lr_text = lr_inner_grid->create_text(
row = 1
column = 2
text = sy-uname ).
*... set label for text
lr_label->set_label_for( lr_text ).
But while m going to do same coding for second parameter its not intializing length so adding extra spaces while displaying second row.
e.g
USERID abcdefghjik
PLANT jhk to hjk
I want that output should look like
USERID abcdefghjik
PLANT jhk to hjk
Please tell me the solution what should i do for avoiding extra spaceHi Neelema,
You could try this sample code.
[http://sap-img.com/fu037.htm]
[http://sap-img.com/abap/sample-alv-heading-in-alv.htm]
Regards,
Amit. -
Hi Abapers,
I am using the sortinfo_alv to get page break for each customer.Now my client is asking to display the cutomer name in the top of page insted in the main table. how will i do this .
I am using alv_commentary_write to display the top of page data.
Awaiting for reply.
Regards,
PriyaHi Priya,
here is the example code for your reference
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
* Title
wa_header-typ = 'H'.
wa_header-info = text-h01.
APPEND wa_header TO t_header.
CLEAR wa_header.
* Date
wa_header-typ = gc_s.
wa_header-key = text-h02.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info."todays date
APPEND wa_header TO t_header.
CLEAR: wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
Reward points if it helps,
Satish -
ALV - Top of Page Trigger for Each New Page
Hi Abapers,
I am using the sortinfo_alv to get page break for each customer.Now my client is asking to display the cutomer name in the top of page insted in the main table. how will i do this .
I am using alv_commentary_write to display the top of page data.
Awaiting for reply.
Regards,
RahulHi
Follow the below steps.
Include the two forms in your program
Pass event internal table parameter to FM ALV display.
Declare the ALV parameter in Declaration part.
DATA: i_events TYPE slis_t_event. "(IT) for populating events
g_header TYPE slis_t_listheader, "Header for alv
g_events TYPE slis_alv_event, "Struc for populating events
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_events = i_events
*& Form EVENTTAB_BUILD
* Building Events table For ALV
* -->P_T_EVENTS[] text
FORM eventtab_build USING p_i_events.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_events
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
CLEAR: g_events.
READ TABLE i_events INTO g_events
WITH KEY name = 'TOP_OF_PAGE'. "slis_ev_top_of_page.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO g_events-form.
MODIFY i_events FROM g_events INDEX sy-tabix TRANSPORTING form.
CLEAR g_events.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form top_of_page
* Header Data Population
FORM top_of_page.
DATA: l_htext TYPE slis_listheader,
l_text(200) TYPE c,
ld_lines TYPE i,
ld_linesc(9) TYPE c.
REFRESH g_header.
****************TOP OF PAGE HEADINGS****************************
* For Headers, Key is not printed and is irrelevant. Will not cause
* a syntax error, but is not used.
* TYP: Indicator: Header
l_htext-typ = 'H'. "H = Header,S = selection,a = action
CONCATENATE 'Planned Order: -' s_plnum-low 'To' s_plnum-high
INTO l_text SEPARATED BY space.
* INFO: Information
l_htext-info = l_text.
APPEND l_htext TO g_header.
* FM for dispalying text at Top of Page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = g_header
i_logo =
'ENJOYSAP_LOGO'. " From transaction "OAOR"
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE -
Problem in downloading top-of-page to excel
Hi All,
I have developed a report using OOALV. Im using split containers to display the data of Docking container.
The problem is when I'm downloading the report to excel, its only printing the main data from bottom container. Its not displaying the top-of-page data, which is printing in top container.
Here is the sample code, which Im using to print the top-of-page.
CALL METHOD o_document->new_line. (SAMPLE CODE)
***Fiscal Year
CLEAR:v_string.
CONCATENATE 'Run Date:'(143) v_print_date INTO v_string SEPARATED BY space.
CONDENSE v_string.
* Adding Text
CALL METHOD o_document->add_text
EXPORTING
text = v_string.
* Display the data
CALL METHOD o_document->display_document
EXPORTING
parent = o_top_container.
* Calling the method of ALV to process top of page
CALL METHOD alv_grid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_document.
Please advise me how to download the data along with the top of page from OOALV output.
Thanks,
PriyaHi Priya,
Sorry for the delay.. here
Simple explanation...
ABAP - OLE Automation using MS-Excel - Code Gallery - SCN Wiki
You can find a detail doc here
http://www.heyiamonline.com/abap/pdf/ABAPOLEAUTOMATION.pdf
Regards -
How to display values in top of page in ALV report
Hai,
This is my billing report program, i developed that object by using ALV but i could not able to use Top-of-page. please any one correct my code,
*& Report ZE0232_ALV_BILLING *
report ze0232_alv_billing.
type-pools: slis.
data: repid like sy-repid.
data: fieldcatalog type slis_t_fieldcat_alv,
wa_fieldcatalog type slis_fieldcat_alv.
data : ievent type slis_t_event,
wevent type slis_alv_event.
data: sal_text like tvkot-vtext,
DIS_TEXT LIKE TVTWT-VTEXT,
DIV_TEXT LIKE TSPAT-VTEXT.
tables: vbrk.
data: begin of i_vbrk occurs 0,
vbeln like vbrk-vbeln,
fkdat like vbrk-fkdat,
erdat like vbrk-erdat,
kunrg like vbrk-kunrg,
name1 like kna1-name1,
netwr like vbrk-netwr,
stext like tvkot-vtext,
dtext like tvtwt-vtext,
divtext like tspat-vtext,
end of i_vbrk.
selection-screen begin of block billing with frame.
parameters: salesorg like vbrk-vkorg.
select-options: dischanl for vbrk-vtweg,
division for vbrk-spart,
bildat for vbrk-fkdat.
selection-screen end of block billing.
select vbeln fkdat erdat kunrg netwr from vbrk into corresponding fields of table i_vbrk where vkorg = salesorg
and vtweg in dischanl
and spart in division
and fkdat in bildat.
select vtext from tvkot into sal_text where vkorg = salesorg and spras = 'EN'.
endselect.
select vtext from TVTWT into DIS_text where VTWEG IN dischanl and spras = 'EN'.
endselect.
select vtext from TSPAT into DIV_text where SPART IN DIVISION and spras = 'EN'.
endselect.
loop at i_vbrk.
move: sal_text to i_vbrk-stext,
DIS_TEXT TO I_VBRK-DTEXT,
DIV_TEXT TO I_VBRK-DIVTEXT.
modify i_vbrk.
endloop.
perform get_fieldcatalog.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = repid
I_GRID_TITLE =
i_callback_top_of_page = 'TOPS'
it_fieldcat = fieldcatalog
tables
t_outtab = i_vbrk
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*& Form GET_FIELDCATALOG
text
<b>form tops.
write :/ 'Hai Welcome'.
endform. "tops</b>&----
*& Form get_fieldcatalog
text
form get_fieldcatalog.
wa_fieldcatalog-col_pos = '1'.
wa_fieldcatalog-fieldname = 'VBELN'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'SALES DOCUMENT'.
WA_fieldcatalog-rollname = 'VBELN'.
wa_fieldcatalog-hotspot = 'X'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '2'.
wa_fieldcatalog-fieldname = 'FKDAT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'BILL DATE'.
WA_fieldcatalog-rollname = 'VBELN'.
WA_fieldcatalog-hotspot = 'X'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '3'.
wa_fieldcatalog-fieldname = 'ERDAT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CREATED DATE'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '4'.
wa_fieldcatalog-fieldname = 'KUNRG'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CUSTOMER NO'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '5'.
wa_fieldcatalog-fieldname = 'NAME1'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CUSTOMER NAME'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '6'.
wa_fieldcatalog-fieldname = 'NETWR'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'NET VALUE'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '7'.
wa_fieldcatalog-fieldname = 'STEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'SALES ORG'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '8'.
wa_fieldcatalog-fieldname = 'DTEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'DIS.CHANNEL'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '9'.
wa_fieldcatalog-fieldname = 'DIVTEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'DIVISION'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
endform. "GET_FIELDCATALOGHI see this report
you can know how to write TOP-OF_PAGE code
and insert LOGO also
*& Report ZTEST_ALV_LOGO
REPORT ztest_alv_logo.
TYPE-POOLS : slis.
*ALV Formatting tables /structures
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: gt_events TYPE slis_t_event.
DATA: gs_layout TYPE slis_layout_alv.
DATA: gt_page TYPE slis_t_listheader.
DATA: gs_page TYPE slis_listheader.
DATA: v_repid LIKE sy-repid.
*ALV Formatting work area
DATA: w_fieldcat TYPE slis_fieldcat_alv.
DATA: w_events TYPE slis_alv_event.
DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
INITIALIZATION.
PERFORM build_events.
PERFORM build_page_header.
START-OF-SELECTION.
*perform build_comment. "top_of_page - in initialization at present
SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
*USING = Row, Column, Field name, display length, table name, heading
*OR
PERFORM build_fieldcat.
gs_layout-zebra = 'X'.
*top of page event does not work without I_callback_program
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'BSID'
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'This is the grid title'
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
TABLES
t_outtab = gt_bsid.
Form..............: populate_for_fm
Description.......: Populates fields for function module used in ALV
FORM populate_for_fm USING p_row
p_col
p_fieldname
p_len
p_table
p_desc.
w_fieldcat-row_pos = p_row. "Row Position
w_fieldcat-col_pos = p_col. "Column Position
w_fieldcat-fieldname = p_fieldname. "Field name
w_fieldcat-outputlen = p_len. "Column Lenth
w_fieldcat-tabname = p_table. "Table name
w_fieldcat-reptext_ddic = p_desc. "Field Description
w_fieldcat-input = '1'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " populate_for_fm
*& Form build_events
FORM build_events.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events
WITH KEY name = slis_ev_user_command
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_user_command TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events
WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_top_of_page TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " build_events
*& Form USER_COMMAND
When user command is called it uses 2 parameters. The itab
passed to the ALV is in whatever order it currently is on screen.
Therefore, you can read table itab index rs_selfield-tabindex to get
all data from the table. You can also check r_ucomm and code
accordingly.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE gt_bsid INDEX rs_selfield-tabindex.
error checking etc.
SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDFORM. "user_command
*& Form top_of_page
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form build_fieldcat
*Many and varied fields are available here. Have a look at documentation
*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
FORM build_fieldcat.
w_fieldcat-fieldname = 'BUDAT'.
w_fieldcat-seltext_m = 'Dte pst'.
w_fieldcat-ddictxt(1) = 'M'.
w_fieldcat-edit = 'x'.
Can change the position of fields if you do not want them in order
of the DDIC or itab
w_fieldcat-row_pos = '1'.
w_fieldcat-col_pos = '10'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fieldcat
*& Form build_page_header
gt_page is used in top of page (ALV subroutine - NOT event)
*H = Header, S = Selection, A = Action
FORM build_page_header.
For Headers, Key is not printed and is irrelevant. Will not cause
a syntax error, but is not used.
gs_page-typ = 'H'.
gs_page-info = 'Header 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'H'.
gs_page-info = 'Header 2'.
APPEND gs_page TO gt_page.
For Selections, the Key is printed (bold). It can be anything up to 20
bytes. It gets printed in order of code here, not by key value.
gs_page-typ = 'S'.
gs_page-key = 'And the winner is:'.
gs_page-info = 'Selection 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'S'.
gs_page-key = 'Runner up:'.
gs_page-info = 'Selection 2'.
APPEND gs_page TO gt_page.
For Action, Key is also irrelevant.
gs_page-typ = 'A'.
gs_page-info = 'Action goes here'.
APPEND gs_page TO gt_page.
ENDFORM. " build_page_header
<b>Reward if useful</b> -
ALV Top of Page is not displaying
Hi,
in this program TOP OF PAGE is displaying as empty
* Tables
TABLES:/irm/ipsipart.
* Type pools
TYPE-POOLS slis.
* Types
TYPES:BEGIN OF typ_ipsipart,
depcode TYPE /irm/ip_depcode,
partid TYPE /irm/ip_ktonr,
endda TYPE /irm/ip_pedat,
begda TYPE /irm/ip_pbdat,
END OF typ_ipsipart.
TYPES:BEGIN OF typ_pa0000,
pernr TYPE persno,
endda TYPE endda,
begda TYPE begda,
massn TYPE massn,
massg TYPE massg,
stat2 TYPE stat2,
partid TYPE /irm/ip_ktonr,
END OF typ_pa0000.
TYPES:BEGIN OF typ_pa0001,
pernr TYPE persno,
endda TYPE endda,
ename TYPE ename,
END OF typ_pa0001.
TYPES:BEGIN OF typ_pernr,
pernr TYPE persno,
END OF typ_pernr.
TYPES:BEGIN OF typ_a942,
zzpersnr TYPE persno,
END OF typ_a942.
TYPES:BEGIN OF typ_a943,
zzpersnr TYPE persno,
END OF typ_a943.
TYPES:BEGIN OF typ_a976,
zzpersnr TYPE persno,
END OF typ_a976.
TYPES:BEGIN OF typ_final,
pernr TYPE persno,
ename TYPE ename,
begda TYPE begda,
statx(9) TYPE c,
mgtxt TYPE mgtxt,
depcode TYPE /irm/ip_depcode,
begda_c TYPE /irm/ip_pbdat,
endda_c TYPE /irm/ip_pedat,
END OF typ_final.
TYPES:BEGIN OF typ_t530t,
massn TYPE massn,
massg TYPE massg,
mgtxt TYPE mgtxt,
END OF typ_t530t.
* Internal Tables
DATA:it_a942 TYPE TABLE OF typ_a942,
it_a943 TYPE TABLE OF typ_a943,
it_a976 TYPE TABLE OF typ_a976,
it_pernr TYPE TABLE OF typ_pernr,
it_pa0000 TYPE TABLE OF typ_pa0000,
it_pa0001 TYPE TABLE OF typ_pa0001,
it_ipsipart TYPE TABLE OF typ_ipsipart,
it_final TYPE TABLE OF typ_final,
it_t530t TYPE TABLE OF typ_t530t.
* Work areas
DATA:wa_a942 TYPE typ_a942,
wa_a943 TYPE typ_a943,
wa_a976 TYPE typ_a976,
wa_pernr TYPE typ_pernr,
wa_pa0000 TYPE typ_pa0000,
wa_pa0001 TYPE typ_pa0001,
wa_ipsipart TYPE typ_ipsipart,
wa_final TYPE typ_final,
wa_t530t TYPE typ_t530t.
* Constants
CONSTANTS:c_stat2 TYPE stat2 VALUE '0',
c_statx(9) TYPE c VALUE 'Withdrawn',
c_endda TYPE endda VALUE '99991231',
c_ptype TYPE /irm/ip_patype VALUE 'PE',
c_kappl TYPE kappl VALUE 'V',
c_ysam TYPE kschl VALUE 'YSAM',
c_ysdm TYPE kschl VALUE 'YSDM',
c_yssm TYPE kschl VALUE 'YSSM',
c_ysse TYPE kschl VALUE 'YSSE',
c_sprsl TYPE spras VALUE 'E'.
* Variables
DATA:v_begda TYPE begda,
v_endda TYPE endda.
DATA:v_variant LIKE disvariant,
v_save(1) TYPE c,
v_repid TYPE sy-repid.
* ALV Declaraion Part
* FIELD CATALOG DECLARATION *****
DATA:it_fcat TYPE slis_t_fieldcat_alv,
wa_fcat TYPE slis_fieldcat_alv.
* ALV SORT INFORMATION *****
DATA:wa_sort TYPE slis_sortinfo_alv,
it_sort TYPE slis_t_sortinfo_alv.
*ALV LAYOUT INFORMATION *****
DATA:wa_layout TYPE slis_layout_alv.
*ALV TOOLBAR EXCLUDING *****
DATA:it_excluding TYPE slis_t_extab,
wa_excluding TYPE slis_extab.
* Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:s_pernr FOR /irm/ipsipart-partid,
s_date FOR /irm/ipsipart-begda OBLIGATORY NO-EXTENSION,
s_depcod FOR /irm/ipsipart-depcode.
SELECTION-SCREEN END OF BLOCK b1.
* At Selection Screen
AT SELECTION-SCREEN.
IF NOT s_date-low IS INITIAL AND s_date-high IS NOT INITIAL.
READ TABLE s_date INDEX 1.
v_begda = s_date-low.
v_endda = s_date-high.
ENDIF.
IF s_date-low IS INITIAL AND s_date-high IS NOT INITIAL.
READ TABLE s_date INDEX 1.
v_begda = s_date-high.
v_endda = s_date-high.
ENDIF.
IF s_date-low IS NOT INITIAL AND s_date-high IS INITIAL.
READ TABLE s_date INDEX 1.
v_begda = s_date-low.
v_endda = s_date-low.
ENDIF.
* Start of selection
START-OF-SELECTION.
break vkreddy1x.
PERFORM get_data.
PERFORM move_data_to_finalitab.
IF NOT it_final[] IS INITIAL.
PERFORM field_catalog TABLES it_final
USING it_fcat[]
wa_fcat.
PERFORM alv_sort_info USING it_sort[]
wa_sort.
PERFORM alv_layout_build USING wa_layout.
PERFORM alv_toolbar_excluding USING it_excluding[]
wa_excluding.
PERFORM load-variant USING v_variant v_repid v_save.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = it_fcat
it_excluding = it_excluding
it_sort = it_sort
i_save = v_save
is_variant = v_variant
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
PERFORM info_msg.
ENDIF.
*& Form GET_DATA
* text
* --> p1 text
* <-- p2 text
FORM get_data .
SELECT zzpersnr FROM a942 INTO TABLE it_a942 WHERE kappl = c_kappl
AND kschl = c_ysdm
AND datbi >= v_begda
AND datab <= v_endda.
IF sy-subrc EQ 0.
SORT it_a942 BY zzpersnr.
DELETE ADJACENT DUPLICATES FROM it_a942 COMPARING zzpersnr.
LOOP AT it_a942 INTO wa_a942.
MOVE wa_a942-zzpersnr TO wa_pernr-pernr.
APPEND wa_pernr TO it_pernr.
CLEAR:wa_pernr,wa_a942.
ENDLOOP.
ENDIF.
SELECT zzpersnr FROM a943 INTO TABLE it_a943 WHERE kappl = c_kappl
AND ( kschl = c_ysam
OR kschl = c_ysse )
AND datbi >= v_begda
AND datab <= v_endda.
IF sy-subrc EQ 0.
SORT it_a943 BY zzpersnr.
DELETE ADJACENT DUPLICATES FROM it_a943 COMPARING zzpersnr.
LOOP AT it_a943 INTO wa_a943.
MOVE wa_a943-zzpersnr TO wa_pernr-pernr.
APPEND wa_pernr TO it_pernr.
CLEAR:wa_pernr,wa_a943.
ENDLOOP.
ENDIF.
SELECT zzpersnr FROM a976 INTO TABLE it_a976 WHERE kappl = c_kappl
AND kschl = c_yssm
AND datbi >= v_begda
AND datab <= v_endda.
IF sy-subrc EQ 0.
SORT it_a976 BY zzpersnr.
DELETE ADJACENT DUPLICATES FROM it_a976 COMPARING zzpersnr.
LOOP AT it_a976 INTO wa_a976.
MOVE wa_a976-zzpersnr TO wa_pernr-pernr.
APPEND wa_pernr TO it_pernr.
CLEAR:wa_pernr,wa_a976.
ENDLOOP.
ENDIF.
SORT it_pernr BY pernr.
DELETE ADJACENT DUPLICATES FROM it_pernr COMPARING pernr.
IF NOT it_pernr[] IS INITIAL.
SELECT pernr endda begda massn massg stat2 FROM pa0000
INTO TABLE it_pa0000
FOR ALL ENTRIES IN it_pernr
WHERE pernr = it_pernr-pernr
AND endda >= v_begda
AND begda <= v_endda
AND stat2 = c_stat2.
ENDIF.
LOOP AT it_pa0000 INTO wa_pa0000.
wa_pa0000-partid = wa_pa0000-pernr.
MODIFY TABLE it_pa0000 FROM wa_pa0000 .
ENDLOOP.
IF NOT it_pa0000[] IS INITIAL.
SELECT depcode partid endda begda FROM /irm/ipsipart
INTO CORRESPONDING FIELDS OF TABLE it_ipsipart
FOR ALL ENTRIES IN it_pa0000
WHERE nrart = c_ptype
AND partid = it_pa0000-partid
AND endda >= it_pa0000-begda
AND begda <= it_pa0000-endda.
SELECT pernr ename FROM pa0001 INTO TABLE it_pa0001
FOR ALL ENTRIES IN it_pa0000
WHERE pernr = it_pa0000-pernr
AND endda = c_endda.
SELECT mgtxt FROM t530t INTO TABLE it_t530t
FOR ALL ENTRIES IN it_pa0000
WHERE sprsl = c_sprsl
AND massn = it_pa0000-massn
AND massg = it_pa0000-massg.
ENDIF.
ENDFORM. " GET_DATA
*& Form MOVE_DATA_TO_ITAB
FORM move_data_to_finalitab .
LOOP AT it_pa0000 INTO wa_pa0000.
MOVE wa_pa0000-pernr TO wa_final-pernr.
MOVE wa_pa0000-begda TO wa_final-begda.
IF wa_pa0000-stat2 = c_stat2.
MOVE c_statx TO wa_final-statx.
ENDIF.
READ TABLE it_pa0001 INTO wa_pa0001 WITH KEY pernr = wa_pa0000-pernr.
IF sy-subrc EQ 0.
MOVE wa_pa0001-ename TO wa_final-ename.
ENDIF.
READ TABLE it_t530t INTO wa_t530t WITH KEY massn = wa_pa0000-massn
massg = wa_pa0000-massg.
IF sy-subrc EQ 0.
MOVE wa_t530t-mgtxt TO wa_final-mgtxt.
ENDIF.
READ TABLE it_ipsipart INTO wa_ipsipart WITH KEY
partid = wa_pa0000-partid.
IF sy-subrc EQ 0.
MOVE wa_ipsipart-depcode TO wa_final-depcode.
MOVE wa_ipsipart-begda TO wa_final-begda_c.
MOVE wa_ipsipart-endda TO wa_final-endda_c.
ENDIF.
APPEND wa_ipsipart TO it_ipsipart.
CLEAR wa_ipsipart.
ENDLOOP.
ENDFORM. " MOVE_DATA_TO_ITAB
*& Form FIELD_CATALOG
* text
* --> p1 text
* <-- p2 text
FORM field_catalog TABLES p_it_final LIKE it_final
USING p_it_fcat TYPE slis_t_fieldcat_alv
p_wa_fcat TYPE slis_fieldcat_alv.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '1'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'PERNR'.
p_wa_fcat-key = 'X'.
p_wa_fcat-seltext_l = 'Personnel Number'.
p_wa_fcat-seltext_m = 'Personnel No.'.
p_wa_fcat-seltext_s = 'Pers.No.'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '2'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'ENAME'.
p_wa_fcat-key = 'X'.
p_wa_fcat-seltext_l = 'Employee Name'.
p_wa_fcat-seltext_m = 'Emp Name'.
p_wa_fcat-seltext_s = 'Name'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '3'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'BEGDA'.
p_wa_fcat-key = ' '.
p_wa_fcat-seltext_l = 'Termination start date'.
p_wa_fcat-seltext_m = 'Term start date'.
p_wa_fcat-seltext_s = 'Term start date'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '4'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'MGTXT'.
p_wa_fcat-seltext_l = 'Reason f.action text'.
p_wa_fcat-seltext_m = 'Reason for action'.
p_wa_fcat-seltext_s = 'Act.reason'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '5'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'STATX'.
p_wa_fcat-seltext_l = 'Employment status text'.
p_wa_fcat-seltext_m = 'Employment status'.
p_wa_fcat-seltext_s = 'Employment status'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '6'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'DEPCODE'.
p_wa_fcat-seltext_l = 'Deployment Code'.
p_wa_fcat-seltext_m = 'Deployment Code'.
p_wa_fcat-seltext_s = 'Dep. Code'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '7'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'BEGDA_C'.
p_wa_fcat-seltext_l = 'Participation Start Date'.
p_wa_fcat-seltext_m = 'Participation Start'.
p_wa_fcat-seltext_s = 'Start Date'.
APPEND p_wa_fcat TO p_it_fcat.
CLEAR p_wa_fcat.
p_wa_fcat-col_pos = '8'.
p_wa_fcat-tabname = p_it_final.
p_wa_fcat-fieldname = 'ENDDA_C'.
p_wa_fcat-seltext_l = 'Participation End Date'.
p_wa_fcat-seltext_m = 'Participation End'.
p_wa_fcat-seltext_s = 'End Date'.
APPEND p_wa_fcat TO p_it_fcat.
ENDFORM. " FIELD_CATALOG
*& Form ALV_SORT_INFO
* text
* -->P_IT_SORT[] text
* -->P_WA_SORT text
FORM alv_sort_info USING p_it_sort TYPE slis_t_sortinfo_alv
p_wa_sort TYPE slis_sortinfo_alv .
p_wa_sort-fieldname = 'PERNR'.
p_wa_sort-up = 'X'.
APPEND p_wa_sort TO p_it_sort.
ENDFORM. " ALV_SORT_INFO
*& Form ALV_LAYOUT_BUILD
FORM alv_layout_build CHANGING p_wa_layout TYPE slis_layout_alv.
p_wa_layout-no_input = 'X'.
p_wa_layout-colwidth_optimize = 'X'.
ENDFORM. " ALV_LAYOUT_BUILD
*& Form ALV_TOOLBAR_EXCLUDING
* text
FORM alv_toolbar_excluding USING p_it_excluding TYPE slis_t_extab
p_wa_excluding TYPE slis_extab.
p_wa_excluding-fcode = '&GRAPH'.
APPEND p_wa_excluding TO p_it_excluding.
p_wa_excluding-fcode = '&ABC'.
APPEND p_wa_excluding TO p_it_excluding.
p_wa_excluding-fcode = '%SL'.
APPEND p_wa_excluding TO p_it_excluding.
ENDFORM. " ALV_TOOLBAR_EXCLUDING
*& Form LOAD-VARIANT
FORM load-variant USING p_v_variant STRUCTURE disvariant
p_v_repid
p_v_save.
CLEAR p_v_variant.
p_v_variant-report = p_v_repid.
p_v_save = 'A'.
ENDFORM. " LOAD-VARIANT
*& Form info_msg
* text
FORM info_msg .
MESSAGE i016(rp) WITH 'No Data Selected for the Selection Criteria'.
ENDFORM. "info_msg
*& Form top_of_page
* text
FORM top_of_page.
DATA:it_listhead TYPE slis_t_listheader.
DATA:wa_listhead TYPE slis_listheader.
wa_listhead-typ = 'H'.
wa_listhead-info = 'Withdrawn Employees Still Active on Commission Plan'.
APPEND wa_listhead TO it_listhead.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listhead.
ENDFORM. "top_of_pageHello,
You try in this way you will get the solution
data:
y_i_events TYPE STANDARD TABLE OF slis_alv_event,
constants:
y_k_top_of_page TYPE slis_alv_event-name VALUE 'TOP_OF_PAGE',
y_k_top_of_form TYPE slis_alv_event-form VALUE 'Y_F_TOP_OF_FORM'.
PERFORM y_f_build_events CHANGING y_i_events.
FORM y_f_build_events CHANGING y_li_events TYPE STANDARD TABLE.
DATA : y_lwa_events TYPE slis_alv_event.
y_lwa_events-name = y_k_top_of_page.
y_lwa_events-form = y_k_top_of_form.
APPEND y_lwa_events TO y_li_events.
CLEAR y_lwa_events.
ENDFORM. " y_f_BUILD_EVENTS
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = y_lv_progname
is_layout = y_wa_layout
it_fieldcat = y_i_fieldcat[]
it_events = y_i_events
TABLES
t_outtab = y_i_error
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM y_f_top_of_form .
*To display the date in dd mm yyyy formate
CLEAR y_v_date.
MOVE: sy-datum TO y_v_date.
y_wa_header-typ = y_k_h.
CONCATENATE text-h01 y_v_date+6(2)
y_v_date+4(2)
y_v_date+0(4)
INTO y_wa_header-info
SEPARATED BY space.
APPEND y_wa_header TO y_i_listheader.
CLEAR y_wa_header.
*Top of page
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = y_i_listheader[].
REFRESH y_i_listheader[].
ENDFORM. " y_f_top_of_form
Try this you we get the top-of-page. -
How to devide the top of page in alv grid display
hi all
in the alv grid display am getting the page number and total number of pages in the left hand side
but what i need is i need in the right hand side
how to get thatHi,
PLease refer to the code below:
*& Report ZDEMO_ALVGRID *
*& Example of a simple ALV Grid Report *
*& The basic requirement for this demo is to display a number of *
*& fields from the EKKO table. *
REPORT zdemo_alvgrid .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
form build_fieldcatalog.
* There are a number of ways to create a fieldcat.
* For the purpose of this example i will build the fieldcatalog manualy
* by populating the internal table fields individually and then
* appending the rows. This method can be the most time consuming but can
* also allow you more control of the final product.
* Beware though, you need to ensure that all fields required are
* populated. When using some of functionality available via ALV, such as
* total. You may need to provide more information than if you were
* simply displaying the result
* I.e. Field type may be required in-order for
* the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
* gd_layout-totals_only = 'X'.
* gd_layout-f2code = 'DISP'. "Sets fcode for when double
* "click(press f2)
* gd_layout-zebra = 'X'.
* gd_layout-group_change_edit = 'X'.
* gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
* is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
* Form TOP-OF-PAGE *
* ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
* Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
* Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
* Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
endform.
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
* Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
* Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
* Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
Thanks,
Sriram Ponna. -
Top of page in ALV GRID display
Hi All,
Is it possible to have a top of page in ALV grid display?
If yes, then how?
Thanks and Regards,
Sirishahi
check out the following code:
report z_alv2 line-count 20.
type-pools : slis.
type-pools : icon.
tables:
lfa1, lfb1, lfm1.
selection-screen begin of block b1 with frame title text-001.
select-options:
s_lifnr for lfa1-lifnr, "VENDOR
s_bukrs for lfb1-bukrs, "COMPANY CODE
s_ekorg for lfm1-ekorg, "PURCHASING ORGANIZATION
s_ktokk for lfa1-ktokk. "ACCOUNT GROUP
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
parameters: r1 radiobutton group g1,
r2 radiobutton group g1.
selection-screen end of block b2.
data:
v_repid like sy-repid,
begin of itab occurs 0,
lifnr like lfa1-lifnr,
bukrs like lfb1-bukrs,
ekorg like lfm1-ekorg,
ktokk like lfa1-ktokk,
name1 like lfa1-name1,
stras like lfa1-stras,
ort01 like lfa1-ort01,
regio like lfa1-regio,
pfort like lfa1-pfort,
pstlz like lfa1-pstlz,
pstl2 like lfa1-pstl2,
telf1 like lfa1-telf1,
end of itab.
data : itab_event type slis_t_event,
wa_event type slis_alv_event.
data : itab_fld_cat type slis_t_fieldcat_alv,
wa_fldcat type slis_fieldcat_alv.
data : wa_layout type slis_layout_alv.
start-of-selection.
*PERFORM GET_VARIANT.
PERFORM data_validation.
perform select_data.
perform get_events using itab_event .
perform fieldcatmerge.
if r1 = 'X'.
perform alvlistdisplay.
elseif r2 = 'X' .
perform alvgriddisplay.
endif.
*& Form DATA_VALIDATION
text
--> p1 text
<-- p2 text
form data_validation .
data: v_count type i.
if s_lifnr is initial and
s_bukrs is initial and
s_ekorg is initial and
s_ktokk is initial.
message e000(z13325).
Enter any value in the Selection Screen
endif.
select count(*) from lfa1 where lifnr in s_lifnr.
if sy-subrc <> 0.
message e000(z13325).
Enter any value in the Selection Screen
endif.
select count(*) from lfb1 where lifnr in s_bukrs.
if sy-subrc <> 0.
message e000(z13325).
Enter any value in the Selection Screen
endif.
select count(*) from lfm1 where lifnr in s_ekorg.
if sy-subrc <> 0.
message e000(z13325).
Enter any value in the Selection Screen
endif.
select count(*) from lfa1 where lifnr in s_ktokk.
if sy-subrc <> 0.
message e000(z13325).
Enter any value in the Selection Screen
endif.
endform. " DATA_VALIDATION
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
form select_data .
select a~lifnr
b~bukrs
c~ekorg
a~ktokk
a~name1
a~stras
a~ort01
a~regio
a~pfort
a~pstlz
a~pstl2
a~telf1
into corresponding fields of table itab
from lfa1 as a inner join lfb1 as b
on alifnr = blifnr
inner join lfm1 as c
on alifnr = clifnr
where a~lifnr in s_lifnr
and b~bukrs in s_bukrs
and c~ekorg in s_ekorg
and a~ktokk in s_ktokk.
sort itab by lifnr bukrs ekorg.
endform. " SELECT_DATA
*& Form FIELDCATMERGE
text
--> p1 text
<-- p2 text
form fieldcatmerge .
v_repid = sy-repid.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = v_repid
i_internal_tabname = 'ITAB'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
changing
ct_fieldcat = itab_fld_cat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " FIELDCATMERGE
*& Form ALVLISTDISPLAY
text
--> p1 text
<-- p2 text
form alvlistdisplay .
v_repid = sy-repid.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
is_layout = wa_layout
it_fieldcat = itab_fld_cat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
I_SAVE = 'A'
IS_VARIANT =
it_events = itab_event
IT_EVENT_EXIT = itab_exit
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " ALVLISTDISPLAY
*& Form ALVGRIDDISPLAY
text
--> p1 text
<-- p2 text
form alvgriddisplay .
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = 'GRID DISPLAY'
I_GRID_SETTINGS =
IS_LAYOUT = WS_LAYOUT1
it_fieldcat = itab_fld_cat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = itab_event
IT_EVENT_EXIT = itab_exit
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " ALVGRIDDISPLAY
*& Form GET_EVENTS
text
--> p1 text
<-- p2 text
form get_events using itab_event type slis_t_event.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
importing
et_events = itab_event
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
read table itab_event with key name = slis_ev_top_of_page into wa_event
if sy-subrc = 0.
wa_event-form = 'FRM_TOP_OF_PAGE'.
modify itab_event from wa_event index sy-tabix.
endif.
endform. " GET_EVENTS
*& Form FRM_TOP_OF_PAGE
text
form frm_top_of_page.
write : 130 'Time:' ,sy-uzeit .
write :/2 'User: ', sy-uname.
write: 59 sy-title, 130 'Page:' , sy-pagno.
write:/ 'this is swathi and this is top of page '.
endform. "FRM_TOP_OF_PAGE
Reward points if helpful.
Regards
Swathi -
Create TOP-OF-PAGE display for REUSE_ALV_GRID_DISPLAY
Hi,
I need to create a TOP-OF-PAGE display to show the MATNR, description and EA per CSE for my report.
The report is output using "REUSE_ALV_GRID_DISPLAY."
See following code:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_TOP_OF_PAGE =
I_STRUCTURE_NAME = 'ZSTATE_PROD_INQ'
TABLES
T_OUTTAB = I_ALV_MATNR.
How do I add a TOP-OF-PAGE display to the report, while using the above alv?
Points will be rewarded and all responses will be greatly appreciated.
Thanks,
JohnSee the example Program :
Use FM -
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'FDLOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
REPORT ZMM_INV_DAYS_SUPPLY no standard page heading
message-id zwave.
======================================================================
Program Name : ZMM_INV_DAYS_SUPPLY *
Description : this report identify Obsolete and Excessive inventory*
it show show days of supply by date. Need to define *
Average daily sales for a sku. Possibly look back to *
the last 3 weeks or look at the same period a year ago*
puls a growth factor to help with seasonal items *
Author : Seshu *
Date : 03/14/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
03/14/07| Seshu | DEVK922128 | Initial *
03/22/07| Seshu | DEVK922148 | Removed Duplicates *
03/26/07| Seshu | DEVK922152 | Added new selection-screen *
03/27/07| Seshu | DEVK922154 | Material status as range option now*
03/27/07| Seshu | DEVK922158 | Corrected storage type in where con*
======================================================================
type-pools
type-pools : slis.
Data Declaration
tables : mara,
marc,
lagp,
mvke,
makt.
Constants
constants : c_werks(4) type c value '1000'," Plant
c_lgort(4) type c value '1000'," Storage Location
c_periv like MARC-PERIV value 'XX',
c_perkz like MVER-PERKZ value 'T'.
Internal Tables
Internal Table for MARA and MAKT and MARD
data : begin of I_material occurs 0,
matnr like mara-matnr, " Material
lgpla like mlgt-lgpla," Storage Type
zzdept like marc-zzdept," Pick Dept
ZZPRODDEPT like marc-ZZPRODDEPT," Prod Dept
vmsta like mvke-vmsta, " Material Status
end of i_material.
Structure
data : begin of i_final occurs 0 ,
matnr like mara-matnr," Material #
maktx like makt-maktx," Description
lgpla like mlgt-lgpla, " Storage Bin
days like P0347-SCRDD, " No of Days
menge like mseg-menge, " Avg Daily Sales
kbetr like konp-kbetr, " Avg
labst like mard-labst," Inventory Stock
stprs like mbew-stprs, " Mvg avg Price
dos like mseg-menge, " DOS Units
dosm like konp-kbetr, " DOS $$
end of i_final.
data : int_ges_verb_tab like sverbtaba
occurs 0 with header line.
Internal table for A004
data : i_a004 like a004 occurs 0 with header line.
Data Variables
data : v_stprs like konp-kbetr,
v_repid like sy-repid,
v_labst like mard-labst,
v_maktx like makt-maktx.
ALV Function Module Variables
DATA: g_repid like sy-repid,
gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
Selection-screen
selection-screen : begin of block blk with frame title text-001.
parameters : p_werks like marc-werks obligatory default '1000'.
select-options : s_matnr for mara-matnr,
s_MATKL for mara-MATKL,
s_mtart for mara-mtart,
s_LGTYP for LAGP-LGTYP,
p_vmsta for MVKE-VMSTA,
s_dept for marc-zzdept,
s_pdept for MARC-ZZPRODDEPT.
selection-screen: end of block blk.
selection-screen begin of block periods with frame title text-002.
selection-screen begin of line.
selection-screen comment (15) text-c01.
selection-screen position 18.
Period 1
parameters: p_stdat1 like mkpf-budat obligatory.
selection-screen position 35.
selection-screen comment (10) text-c02.
parameters: p_endat1 like mkpf-budat obligatory.
selection-screen end of line.
selection-screen end of block periods.
Fill the default values
initialization.
v_repid = sy-repid.
PERFORM LAYOUT_INIT USING GS_LAYOUT.
PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
Validation for Dates
at selection-screen.
if p_stdat1 > p_endat1.
message e206(zwave) with
' End date should be greater than or equal to Start Date'.
endif.
Make one of the Selection should be mandatory
if s_matnr-low is initial.
if s_matkl-low is initial and s_mtart-low is initial and
s_dept-low is initial and s_pdept-low is initial.
message e208(zwave) with
'Enter atleast one selection Criteria'.
endif.
endif.
Start-of-selection.
start-of-selection.
Get the data from MARA,MARD,MAKT Table
perform get_data_tables.
Read the data into FInal Table.
perform read_data.
END-OF-SELECTION.
end-of-selection.
if not i_final[] is initial.
ALV Function Module
perform print_alv.
endif.
*& Form get_data_tables
Get the data from Tables MARA,MARD,MAKT
FORM get_data_tables.
select a~matnr
b~lgpla
czzdept cZZPRODDEPT d~vmsta into table i_material
from mara as a inner join mlgt as b on amatnr = bmatnr
inner join marc as c on cmatnr = amatnr
inner join mvke as d on dmatnr = amatnr
where a~matnr in s_matnr
and c~werks = p_werks
and a~mtart in s_mtart
and c~ZZPRODDEPT in s_pdept
and a~MATKL in s_MATKL
and c~zzdept in s_dept
and b~lgnum = '100'
and b~LGTYP in s_lgtyp
and b~lgpla ne space
and d~vkorg = '0001'
and d~vtweg = '01'
and d~matnr in s_matnr
and d~vmsta in p_vmsta.
if sy-subrc ne 0.
message e207(zwave) with 'No data found for Given Selection Criteria'.
endif.
sort i_material by matnr .
DELETE ADJACENT DUPLICATES FROM i_material COMPARING matnr.
ENDFORM. " get_data_tables
*& Form read_data
Read the data
FORM read_data.
loop at i_material.
Storage Bin
i_final-lgpla = i_material-lgpla.
Days of Sales ( End date - Start date )
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
DATE1 = p_endat1
DATE2 = p_stdat1
OUTPUT_FORMAT = '02'
IMPORTING
DAYS = i_final-days.
Get the Average Daily Sales (Units) from MVER Table
perform get_average_sales.
Get the Average Daily Sales ($$) from VK13 Transaction
perform get_avgsales_price.
clear : v_labst.
Get the Inventory from MARD Table
select single labst from mard into v_labst
where matnr = i_material-matnr
and werks = p_werks
and lgort = c_lgort.
if sy-subrc eq 0.
Inventory Stock - MARD-LABST
i_final-labst = v_labst.
endif.
Material #
i_final-matnr = i_material-matnr.
Get the Material Description
clear v_maktx.
select single maktx from makt into v_maktx
where matnr = i_material-matnr
and spras = 'EN'.
if sy-subrc eq 0.
Description
i_final-maktx = v_maktx.
endif.
Get the Mvg Average Price
perform get_moving_avgpr.
Days of Supply Units.
if i_final-kbetr ne 0.
i_final-dos = i_final-labst / i_final-menge.
endif.
Days of Supply $$
i_final-dosm = i_final-dos * v_stprs.
append i_final.
clear : i_final,
i_material.
endloop.
refresh i_material.
ENDFORM. " read_data
*& Form get_average_sales
Get the data from MVER Table
FORM get_average_sales.
data : lv_menge like mseg-menge.
refresh int_ges_verb_tab.
clear : int_ges_verb_tab,
lv_menge.
CALL FUNCTION 'CONSUMPTION_READ_FOR_MM'
EXPORTING
KZRFB = ' '
MATNR = i_material-matnr
WERKS = c_werks
PERKZ = c_perkz
PERIV = c_periv
TABLES
GES_VERB_TAB = int_ges_verb_tab
UNG_VERB_TAB =
EXCEPTIONS
WRONG_CALL = 1
NOT_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at int_ges_verb_tab.
if int_ges_verb_tab-ertag >= p_stdat1 and
int_ges_verb_tab-ertag <= p_endat1.
add int_ges_verb_tab-vbwrt to lv_menge.
endif.
endloop.
i_final-menge = lv_menge / i_final-days.
ENDFORM. " get_average_sales
*& Form get_avgsales_price
Avg Daily Sales Price
FORM get_avgsales_price.
Get the data from A004 table to get KNUMH
Added new field Sales Unit - Seshu 01/09/2006
refresh : i_a004.
clear : i_a004.
data : lv_kbetr like konp-kbetr," Condition value
lv_KPEIN like konp-kpein , "per
lv_KMEIN like konp-KMEIN. " Sales Unit
select * from a004 into table i_a004
where matnr = i_material-matnr
and vkorg = '0001'
and vtweg = '01'.
if sy-subrc eq 0.
sort i_a004 by DATAB descending.
Get the Latetest Date
read table i_a004 with key matnr = i_material-matnr
vkorg = '0001'
vtweg = '01'
binary search.
Get the Sales Value
select single kbetr KPEIN KMEIN from konp
into (lv_kbetr,lv_KPEIN, lv_KMEIN)
where knumh = i_a004-knumh
and kappl = i_a004-kappl
and kschl = i_a004-kschl.
if sy-subrc eq 0.
i_final-kbetr = lv_kbetr / lv_KPEIN.
i_final-kbetr = i_final-kbetr * i_final-menge.
endif.
endif.
clear : lv_kbetr,
lv_kpein,
lv_KMEIN.
ENDFORM. " get_avgsales_price
*& Form get_moving_avgpr
Get the data from MVEW Table
FORM get_moving_avgpr.
Local Variables
data : lv_stprs like mbew-stprs, " Standard Price
lv_verpr like mbew-verpr, " Moving avg Price
lv_vprsv like mbew-vprsv. " Price Indicator
clear : lv_stprs,
lv_verpr,
lv_vprsv,
v_stprs.
select single stprs verpr vprsv from mbew
into (lv_stprs,lv_verpr,lv_vprsv)
where matnr = i_material-matnr.
if sy-subrc eq 0.
if lv_vprsv = 'S'.
i_final-stprs = lv_stprs * i_final-labst.
v_stprs = lv_stprs.
elseif lv_vprsv = 'V'.
i_final-stprs = lv_verpr * i_final-labst.
v_stprs = lv_verpr.
endif.
endif.
ENDFORM. " get_moving_avgpr
*& Form print_alv
REUSE_ALV_GRID_DISPLAY Function Module
FORM print_alv.
PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
Populate field catalog
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = g_top_of_page
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " print_alv
*& Form get_fieldcatlog
Fieldcatlog
*& Form fieldcat_init
Fieldcat
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'MARA'.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-OUTPUTLEN = 30.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Description'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Storage Bin
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LGPLA'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Storage Bin'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Start Date
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'SDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Start Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
End Date.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'End Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Days of Sales
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DAYS'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Days of Sales'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales(Units).
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MENGE'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KBETR'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory(Units)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LABST'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STPRS'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOSM'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS(Days)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOS'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS(Days)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " get_fieldcatlog
FORM COMMENT_BUILD *
--> LT_TOP_OF_PAGE *
FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Variables for Date
data : lv_year(4) type c,
lv_mon(2) type c,
lv_day(2) type c,
lv_date1(10) type c,
lv_date2(10) type c.
LIST HEADING LINE: TYPE H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = sy-title.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date1.
lv_year = p_stdat1+0(4).
lv_mon = p_stdat1+4(2).
lv_day = p_stdat1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date1.
STATUS LINE: TYPE S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-c01.
LS_LINE-INFO = lv_date1.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date2.
lv_year = P_ENDAT1+0(4).
lv_mon = P_ENDAT1+4(2).
lv_day = P_ENDAT1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date2.
LS_LINE-KEY = text-c02.
LS_LINE-INFO = lv_date2.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'FDLOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
FORM EVENTTAB_BUILD *
--> RT_EVENTS *
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM.
FORM LAYOUT_INIT *
--> RS_LAYOUT *
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
**"Build layout for list display
RS_LAYOUT-DETAIL_POPUP = 'X'.
lslayout-f2code = p_f2code.
rs_layout-zebra = 'X'.
rs_layout-colwidth_optimize = 'X'.
ENDFORM. -
Alv not displaying top-of-page
hi every buddy,
i am workiong on report where there is a requirment of dislpaying alv
with top of page having some details . the event function mudule is calling the top-of-page fm properly
but perform for top-of page is not called up
i.e. controls are not goin to that point of perform
please give me your valuable suggestions
regards
prashantHi,
please check this code it is working
type-pools: slis.
* Including icon for icon display
include <icon>.
* Including symbol
include <symbol>.
* Declaring structure for vbak
types: begin of t_vbak,
vbeln type vbeln_va,
auart type auart,
netwr type netwr,
vkorg type vkorg,
vtweg type vtweg,
erdat type erdat,
vbtyp type vbtyp,
augru type augru,
icon type icon-id,
end of t_vbak.
* Declaring structure for vbap
types: begin of t_vbap,
vbeln type vbeln_va,
posnr type posnr,
matnr type matnr,
arktx type arktx,
lsmeng type dzmeng,
auart type auart,
netwr type netwr,
vkorg type vkorg,
vtweg type vtweg,
erdat type erdat,
vbtyp type vbtyp,
augru type augru,
icon type icon-id,
end of t_vbap.
* Declaring variables
data: v_vbeln type vbeln,
my_tab type sy-tabix.
* Declaring internal table and wa for vbak and vbap
data: i_vbak type table of t_vbak,
wa_vbak type t_vbak,
i_vbap type table of t_vbap,
i_pbo type table of t_vbap,
wa_vbap type t_vbap.
* Declaring internal table and wa for alv components(fieldcatalog,layout,events,header)
data: i_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv,
wa_layout type slis_layout_alv,
i_event type slis_t_event,
wa_event type slis_alv_event,
i_header type slis_t_listheader,
wa_header type slis_listheader,
wa_varient type disvariant,
wa_sort type slis_sortinfo_alv,
i_sort type slis_t_sortinfo_alv.
* Declaring selection-screen details
selection-screen: begin of block b1 with frame title text-001.
selection-screen skip.
select-options: s_vbeln for v_vbeln.
selection-screen: begin of block b2 with frame title text-008.
parameter: ch1 type c as checkbox, "check bos for Subtotal.
ch2 type c as checkbox. "check box for Grand total.
selection-screen: end of block b2.
selection-screen: end of block b1.
* Start of start-of-selection
start-of-selection.
* Fetching data from vbak table
select vbeln
auart
netwr
vkorg
vtweg
erdat
vbtyp
augru
from vbak into table i_vbak
where vbeln in s_vbeln.
if sy-subrc = 0.
* Fetching data for vbap table
select vbeln
posnr
matnr
arktx
lsmeng
from vbap into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
* Looping data for final output
loop at i_vbak into wa_vbak.
* checking conditiions for icon
if wa_vbak-netwr < 10000.
wa_vbak-icon = '@08@'.
elseif wa_vbak-netwr < 15000.
wa_vbak-icon = '@09@'.
else.
wa_vbak-icon = '@0A@'.
endif.
modify i_vbak from wa_vbak index sy-tabix .
endloop.
*Looping data for final output
loop at i_vbap into wa_vbap.
my_tab = sy-tabix.
read table i_vbak into wa_vbak with key vbeln = wa_vbap-vbeln.
if sy-subrc = 0.
wa_vbap-auart = wa_vbak-auart.
wa_vbap-netwr = wa_vbak-netwr.
wa_vbap-vkorg = wa_vbak-vkorg.
wa_vbap-vtweg = wa_vbak-vtweg.
wa_vbap-erdat = wa_vbak-erdat.
wa_vbap-vbtyp = wa_vbak-vbtyp.
wa_vbap-augru = wa_vbak-augru.
wa_vbap-icon = wa_vbak-icon.
modify i_vbap from wa_vbap index my_tab transporting
auart netwr vkorg vtweg erdat vbtyp augru icon.
endif.
endloop.
* Preparing fieldcatalog for final output
perform main_fieldcat.
*Preparing final layout for final output
perform layout.
*Preparing list header for final output
perform list_header.
*Preaparing events for alv display
perform event.
*Getting subtotals for amount fields
if ch1 eq 'X'.
perform sub_total.
endif.
*Showing final output data
perform alv_display.
form main_fieldcat .
*Fieldcatalog for icon
wa_fieldcat-fieldname = 'ICON'.
* WA_FIELDCAT-TECH = 'X'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-icon = 'X'.
wa_fieldcat-seltext_l = 'ICON'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
* Fieldcatalog for salesorder
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-seltext_l = 'Sales order NO'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for salesordertype
wa_fieldcat-fieldname = 'AUART'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C610'.
wa_fieldcat-seltext_l = 'Sales order type'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for netamount
wa_fieldcat-fieldname = 'NETWR'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-emphasize = 'C501'.
* wa_fieldcat-input = 'X'.
wa_fieldcat-seltext_l = 'Net Amount'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for salesorg
wa_fieldcat-fieldname = 'VKORG'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C310'.
wa_fieldcat-seltext_l = 'Sales Organization'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for salesdistribution
wa_fieldcat-fieldname = 'VTWEG'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C210'.
wa_fieldcat-seltext_l = 'Sales Distribution'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for date
wa_fieldcat-fieldname = 'ERDAT'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C110'.
wa_fieldcat-seltext_l = 'Sales OrderDate'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for salestype
wa_fieldcat-fieldname = 'VBTYP'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C410'.
wa_fieldcat-seltext_l = 'Sales type'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for orderreason
wa_fieldcat-fieldname = 'AUGRU'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C710'.
wa_fieldcat-seltext_l = 'Order reason '.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for itemnum
wa_fieldcat-fieldname = 'POSNR'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C110'.
wa_fieldcat-seltext_l = 'Item No '.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for materialnum
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C710'.
wa_fieldcat-seltext_l = 'Material No '.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ARKTX'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C310'.
wa_fieldcat-seltext_l = 'Description'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
*Fieldcatalog for quantity
if ( ch1 = 'X' and ch2 = 'X' ) or ( ch1 = 'X' and ch2 = ' ' ) or ( ch2 = 'X' and ch1 = ' ' ).
wa_fieldcat-fieldname = 'LSMENG'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C510'.
wa_fieldcat-seltext_l = 'Quantity '.
* WA_FIELDCAT-edit = 'X'.
wa_fieldcat-do_sum = 'X'.
else.
wa_fieldcat-fieldname = 'LSMENG'.
wa_fieldcat-tabname = 'IT_VBAP'.
wa_fieldcat-emphasize = 'C510'.
wa_fieldcat-seltext_l = 'Quantity '.
* WA_FIELDCAT-edit = 'X'.
endif.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
endform. " MAIN_FIELDCAT
form alv_display .
wa_varient-report = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
i_callback_pf_status_set = 'PF_STATUS'
i_save = 'X'
is_variant = wa_varient
it_events = i_event
tables
t_outtab = i_vbap
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " ALV_DISPLAY
form layout .
wa_layout-colwidth_optimize = 'X'.
wa_layout-subtotals_text = 'SUBTOTAL SUM'.
wa_layout-totals_text = 'TOTAL'.
wa_layout-zebra = 'X'.
endform. " LAYOUT
form event .
call function 'REUSE_ALV_EVENTS_GET'
importing
et_events = i_event
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
read table i_event into wa_event with key name = 'USER_COMMAND'.
if sy-subrc = 0.
wa_event-form = 'USER_COMMAND'.
modify i_event from wa_event transporting form where name = 'USER_COMMAND'.
endif.
read table i_event into wa_event with key name = 'TOP_OF_PAGE'.
if sy-subrc = 0.
wa_event-form = 'TOP_OF_PAGE'.
modify i_event from wa_event transporting form where name = 'TOP_OF_PAGE' .
endif.
endform. " EVENT
form user_command using ucomm type sy-ucomm
selfield type slis_selfield.
data: gstring type c.
constants: l_c_repid type sy-repid value 'ZCOE_ALV_SIMPLE'.
data: l_i_seltab type table of rsparams.
case ucomm.
when '&IC1'.
if selfield-fieldname = 'VBELN'.
set parameter id 'AUN' field selfield-value.
call transaction 'VA02' and skip first screen.
endif.
* * CASE ok_code.
when 'SAVE'.
* *A pop up is called to confirm the saving of changed data
call function 'POPUP_TO_CONFIRM'
exporting
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
importing
answer = gstring
exceptions
text_not_found = 1
others = 2.
if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
* *When the User clicks 'YES'
if ( gstring = '1' ).
message 'Saved' type 'S'.
*Now the changed data is stored in the it_pbo internal table
i_pbo = i_vbap.
else.
*When user clicks NO or Cancel
message 'Not Saved' type 'S'.
endif.
**When the user clicks the 'EXIT; he is out
when 'EXIT'.
leave program.
* Clicking on refresh button at toolbar
when 'REF'.
* Calling fm to get refresh data
call function 'RS_REFRESH_FROM_SELECTOPTIONS'
exporting
curr_report = l_c_repid
tables
selection_table = l_i_seltab
exceptions
not_found = 1
no_report = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
* * Calling the screen after refreshing
submit zcoe_alv_simple with selection-table l_i_seltab.
endif.
endcase.
endform. " USER_COMMAND
form top_of_page .
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = i_header.
endform. " TOP_OF_PAGE
form list_header .
* Local data declaration
data: l_date type char10, "Date
l_time(8) type c. "Time
wa_header-typ = 'H'.
wa_header-info = 'Sales Order Information Report'.
append wa_header to i_header.
* Run date Display
clear l_date.
wa_header-typ = 'S'.
write: sy-datum to l_date dd/mm/yyyy.
wa_header-key = 'Run Date :'(002).
wa_header-info = l_date.
append wa_header to i_header.
clear: wa_header.
wa_header-typ = 'S'.
* WRITE: sy-uzeit TO l_time .
l_time+0(2) = sy-uzeit+0(2).
l_time+2(1) = ':'.
l_time+3(2) = sy-uzeit+2(2).
l_time+5(1) = ':'.
l_time+6(2) = sy-uzeit+4(2).
wa_header-key = 'Run Time :'(009).
wa_header-info = l_time.
append wa_header to i_header.
clear: wa_header.
endform. " LIST_HEADER
form pf_status using rt_extab type slis_t_extab.
set pf-status 'SSS'.
set titlebar 'MAIN100'.
endform. "pf_status
form sub_total .
wa_sort-fieldname = 'VBELN'.
wa_sort-tabname = 'I_VBAP'.
wa_sort-spos = 1.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
* wa_sort-group = 'X'.
* WA_SORT-EXPA = 'X'.
append wa_sort to i_sort.
endform. " SUB_TOTAL -
Display of date range in the top-of-page of report
have a question like this.
i have a date range selection on the selection screen where the user will enter the range from this to this.
now whatever period he will enter,that range should be displayed on the output of the report in the top-of page.
can we do like this.
plz explain.
thanks!Hi,
Use the below logic.
data: events type slis_t_event,
event type slis_alv_event,
heading type slis_t_listheader,
hline type slis_listheader,
start-of-selection.
"get the data into the internal table and fill your fieldcatalog table.
then fill the event ... ie top of page like this.
CLEAR event.
event-name = slis_ev_top_of_page.
event-form = form_name.
APPEND event TO events.
then fill the comments to display in the top of page event.
DATA: text(50).
CLEAR hline.
hline-typ = 'H'.
hline-info = "report title".
APPEND hline TO heading.
CLEAR: hline,text.
read table s_pernr index 1.
IF s_pernr-low IS NOT INITIAL.
WRITE: 'Sal Code:' TO text.
WRITE: s_pernr-low TO text+15.
ENDIF.
IF s_pernr-high IS NOT INITIAL.
WRITE: 'to' TO text+25.
WRITE: s_pernr-high TO text+28.
ENDIF.
hline-typ = 'S'.
hline-info = text.
APPEND hline TO heading.
and then...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = ist_fcat[]
it_events = events[]
TABLES
t_outtab = ist_main[]
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
and then create a subroutine for top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading[]
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "TOP_OF_PAGE
regards,
Santosh Thorat
Maybe you are looking for
-
Is someone trying to send SPAM through one of my servers?
Hey all. I had a rather fun start to the week, my boss handed me a couple pages of an email he got that had bounced back from our ISP. Basically it tried to send mail to a "[email protected]" (googled it: apparently people get phishing messages from
-
Internal error in BSP application
Hi All, I am new to BSP and we are working on ROS implemetation. We need to enchace the standard BSP applicaiton (ROS_PRESCREEN) by adding three more tabs in the tabStrip. After adding tabs we are getting following dump , Internal error occured du
-
Hello, I have SAP ERP 6.0 and portal 7.0 with ESS and MSS versión 1.0. We need to update to the versión 1.41 but in this link says that is required the EHP4 in the ERP. Is that true do we have to upgrade the ERP first? http://help.sap.com/erp2005_ehp
-
I am hiving some table field descriptions I need in which table these table
I am having table field descriptions : Order Value,Discount Value,Actual Margin,Actual Margin %. I need in which tables these fields are available.
-
2007 imac shuts down intermittently mountain lion
I recently upgraded my mid 2007 from snow leopard to mountain lion and have noticed a few times since then that my mac shuts itself down if I leave it for a spell without using it (with safari pages open). I have it set to use screensaver after 15 m