<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>POPUP_WITH_TABLE_DISPLAY</title>

<!--(Meta)==========================================================-->

<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=686>
<meta name=layout-width content=454>
<meta name=date content="06 13, 2003 0:35:19 AM">


<!--(Links)=========================================================-->

 <LINK rel='StyleSheet' href='../default_ns.css'>
 <SCRIPT language="javascript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<LINK rel='StyleSheet' href='../default.css'>");}
//-->
 </SCRIPT>
 <script language="javascript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
//-->
 </script>
 <style>
<!--
  div.WebHelpPopupMenu {position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;}
  p.WebHelpNavBar {text-align:right;}
-->
 </style>
</head>

<!--(Body)==========================================================-->


<body>


<p class=Coding>REPORT ZEXAMPLE.</p>

<p class=Coding>TABLES USR02.</p>

<p class=Coding>DATA: BEGIN OF IUSR OCCURS 0,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->BNAME 
 LIKE USR02-BNAME,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->TAB1(2),</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->TRDAT 
 LIKE USR02-TRDAT,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->TAB2(2),</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->END 
 OF IUSR.</p>

<p class=Coding>DATA: IUSRDAT LIKE IUSR OCCURS 20 WITH HEADER LINE.</p>

<p class=Coding>DATA: V_USRLINES TYPE I,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->V_BEGROW 
 TYPE SY-CUROW VALUE 1,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->V_ANS 
 LIKE SY-TABIX.</p>

<p class=Coding>PARAMETERS: V_LINES TYPE I DEFAULT 5.</p>

<p class=Coding>IF V_LINES LE 0.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->V_LINES 
 = 5.</p>

<p class=Coding>ENDIF.</p>

<p class=Coding>SELECT * FROM USR02 UP TO V_LINES ROWS.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->IUSRDAT-BNAME 
 = USR02-BNAME.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->IUSRDAT-TRDAT 
 = USR02-TRDAT.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->APPEND 
 IUSRDAT.</p>

<p class=Coding>ENDSELECT.</p>

<p class=Coding>DESCRIBE TABLE IUSRDAT LINES V_USRLINES.</p>

<p class=Coding>V_USRLINES = V_BEGROW + V_USRLINES.</p>

<p class=Coding>CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->EXPORTING</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->ENDPOS_COL 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 30</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->ENDPOS_ROW 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 V_USRLINES</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->STARTPOS_COL 
 = 2</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->STARTPOS_ROW 
 = V_BEGROW</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->TITLETEXT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 'USER DISPLAY'</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->IMPORTING</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->CHOISE 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 V_ANS</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->TABLES</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->VALUETAB 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 IUSRDAT</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->EXCEPTIONS</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->BREAK_OFF 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 1</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OTHERS 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 2.</p>

<p class=Coding>IF SY-SUBRC EQ 0.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->READ 
 TABLE IUSRDAT INDEX V_ANS.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/ 
 IUSRDAT-BNAME, IUSRDAT-TRDAT.</p>

<p class=Coding>ENDIF.</p>

</body>

</html>
