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

<html>

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

<head>

<title>CONVERSION_EXIT_LUNIT_INPUT</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=702>
<meta name=layout-width content=495>
<meta name=date content="06 12, 2003 11:08:23 PM">


<!--(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: MARA, T006, T006T.</p>

<p class=Coding>DATA: UNIT_INT LIKE T006-MSEHI,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->UNIT_EXT 
 LIKE T006A-MSEH6,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->NO_UNIT(60) 
 VALUE 'NO ENTRY MAINTAINED FOR UNIT &amp;1 IN LANGUAGE &amp;2', <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}--></p>

<p class=Coding>NO_UNIT_MSG(60).</p>

<p class=Coding>WRITE:/ 'INTERNAL UNIT', 20 'EXTERNAL UNIT', 40 'DIMENSION'.</p>

<p class=Coding>SELECT * FROM T006.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->CALL 
 FUNCTION 'CONVERSION_EXIT_LUNIT_OUTPUT'</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&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;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->INPUT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 T006-MSEHI</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&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;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OUTPUT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 UNIT_EXT</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&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;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->UNIT_NOT_FOUND 
 = 1.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->IF 
 SY-SUBRC NE 0.</p>

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->REPLACE 
 '&amp;1' WITH T006-MSEHI INTO NO_UNIT_MSG.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->REPLACE 
 '&amp;2' WITH SY-LANGU INTO NO_UNIT_MSG.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/5 
 T006-MSEHI, 25 NO_UNIT_MSG.</p>

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->CALL 
 FUNCTION 'CONVERSION_EXIT_LUNIT_INPUT'</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->INPUT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 UNIT_EXT</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OUTPUT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 UNIT_INT</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->UNIT_NOT_FOUND 
 = 1.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->IF 
 SY-SUBRC NE 0.</p>

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->REPLACE 
 '&amp;1' WITH UNIT_EXT INTO NO_UNIT_MSG.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->REPLACE 
 '&amp;2' WITH SY-LANGU INTO NO_UNIT_MSG.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/5 
 UNIT_EXT, 25 NO_UNIT_MSG.</p>

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->SELECT 
 SINGLE * FROM T006T WHERE SPRAS = SY-LANGU AND DIMID = T006-DIMID.</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/5 
 UNIT_INT, 25 UNIT_EXT, 45 T006T-TXDIM.</p>

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

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

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

</body>

</html>
