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

<html>

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

<head>

<title>SO_NEW_DOCUMENT_ATT_SEND_API1</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=862>
<meta name=layout-width content=454>
<meta name=date content="06 13, 2003 0:21:01 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>DATA: OBJPACK <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->LIKE 
 SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OBJHEAD 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->LIKE 
 SOLISTI1 OCCURS 0 WITH HEADER LINE,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OBJBINLIKE 
 SOLISTI1 OCCURS 0 WITH HEADER LINE,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->OBJTXTLIKE 
 SOLISTI1 OCCURS 0 WITH HEADER LINE,</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->RECLISTLIKE 
 SOMLRECI1 OCCURS 0 WITH HEADER LINE,</p>

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

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

<p class=Coding>PARAMETER P_EADDR LIKE RECLIST-RECEIVER. <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->&quot;EXTERNAL 
 E-MAIL ADDRESS</p>

<p class=Coding>DOC_CHNG-OBJ_NAME = 'SENDFILE'.</p>

<p class=Coding>DOC_CHNG-OBJ_DESCR = 'SEND EXTERNAL MAIL'.</p>

<p class=Coding>OBJTXT = 'LINE 1 OF MESSAGE'.</p>

<p class=Coding>APPEND OBJTXT.</p>

<p class=Coding>OBJTXT = 'LINE 2 OF MESSAGE'.</p>

<p class=Coding>APPEND OBJTXT.</p>

<p class=Coding>DESCRIBE TABLE OBJTXT LINES TAB_LINES.</p>

<p class=Coding>READ TABLE OBJTXT INDEX TAB_LINES.</p>

<p class=Coding>DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT 
 ).</p>

<p class=Coding>CLEAR OBJPACK-TRANSF_BIN.</p>

<p class=Coding>OBJPACK-HEAD_START = 1.</p>

<p class=Coding>OBJPACK-HEAD_NUM = 0.</p>

<p class=Coding>OBJPACK-BODY_START = 1.</p>

<p class=Coding>OBJPACK-BODY_NUM = TAB_LINES.</p>

<p class=Coding>OBJPACK-DOC_TYPE = 'RAW'.</p>

<p class=Coding>APPEND OBJPACK.</p>

<p class=Coding>RECLIST-RECEIVER = P_EADDR.</p>

<p class=Coding>RECLIST-REC_TYPE = 'U'.</p>

<p class=Coding>APPEND RECLIST.</p>

<p class=Coding>CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'</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>}}-->DOCUMENT_DATA 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 DOC_CHNG</p>

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->PUT_IN_OUTBOX 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 'X'</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>}}-->PACKING_LIST 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 OBJPACK</p>

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

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

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->RECEIVERS 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 RECLIST</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>}}-->TOO_MANY_RECEIVERS 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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>}}-->DOCUMENT_NOT_SENT 
 <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->= 
 2</p>

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

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/ 
 'E-MAIL MESSAGE SENT TO', P_EADDR.</p>

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

<p class=Coding><!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->WRITE:/ 
 'COULD NOT SEND E-MAIL TO', P_EADDR.</p>

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

</body>

</html>
