<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: file from application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000043#M955696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*This program will allowed you to send email with attachment.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First, specify the attachment file from your local hardisk and execute.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Next, specify the sender email address and click the send button.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_mail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data method1 like sy-ucomm.&lt;/P&gt;&lt;P&gt;data g_user like soudnamei1.&lt;/P&gt;&lt;P&gt;data g_user_data like soudatai1.&lt;/P&gt;&lt;P&gt;data g_owner like soud-usrnam.&lt;/P&gt;&lt;P&gt;data g_receipients like soos1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_document like sood4 .&lt;/P&gt;&lt;P&gt;data g_header like sood2.&lt;/P&gt;&lt;P&gt;data g_folmam like sofm2.&lt;/P&gt;&lt;P&gt;data g_objcnt like soli occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objhead like soli occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objpara like selc occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objparb like soop1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_attachments like sood5 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_references like soxrl occurs 0 with header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data g_authority like sofa-usracc.&lt;/P&gt;&lt;P&gt;data g_ref_document like sood4.&lt;/P&gt;&lt;P&gt;data g_new_parent like soodk.&lt;/P&gt;&lt;P&gt;data: begin of g_files occurs 10 ,&lt;/P&gt;&lt;P&gt;text(4096) type c,&lt;/P&gt;&lt;P&gt;end of g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : fold_number(12) type c,&lt;/P&gt;&lt;P&gt;fold_yr(2) type c,&lt;/P&gt;&lt;P&gt;fold_type(3) type c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters ws_file(4096) type c default 'c:\debugger.txt'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can me any file fromyour pc ....either xls or word or ppt etc ...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_user-sapname = sy-uname.&lt;/P&gt;&lt;P&gt;call function 'SO_USER_READ_API1'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;user = g_user&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PREPARE_FOR_FOLDER_ACCESS = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;user_data = g_user_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_NOT_EXIST = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PARAMETER_ERROR = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_ERROR = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fold_type = g_user_data-outboxfol+0(3).&lt;/P&gt;&lt;P&gt;fold_yr = g_user_data-outboxfol+3(2).&lt;/P&gt;&lt;P&gt;fold_number = g_user_data-outboxfol+5(12).&lt;/P&gt;&lt;P&gt;clear g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : g_objcnt,&lt;/P&gt;&lt;P&gt;g_objhead,&lt;/P&gt;&lt;P&gt;g_objpara,&lt;/P&gt;&lt;P&gt;g_objparb,&lt;/P&gt;&lt;P&gt;g_receipients,&lt;/P&gt;&lt;P&gt;g_attachments,&lt;/P&gt;&lt;P&gt;g_references,&lt;/P&gt;&lt;P&gt;g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method1 = 'SAVE'.&lt;/P&gt;&lt;P&gt;g_document-foltp = fold_type.&lt;/P&gt;&lt;P&gt;g_document-folyr = fold_yr.&lt;/P&gt;&lt;P&gt;g_document-folno = fold_number.&lt;/P&gt;&lt;P&gt;g_document-objtp = g_user_data-object_typ.&lt;/P&gt;&lt;P&gt;*g_document-OBJYR = '27'.&lt;/P&gt;&lt;P&gt;*g_document-OBJNO = '000000002365'.&lt;/P&gt;&lt;P&gt;*g_document-OBJNAM = 'MESSAGE'.&lt;/P&gt;&lt;P&gt;g_document-objdes = 'sap-img.com testing by program'.&lt;/P&gt;&lt;P&gt;g_document-folrg = 'O'.&lt;/P&gt;&lt;P&gt;*g_document-okcode = 'CHNG'.&lt;/P&gt;&lt;P&gt;g_document-objlen = '0'.&lt;/P&gt;&lt;P&gt;g_document-file_ext = 'TXT'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_header-objdes = 'sap-img.com testing by program'.&lt;/P&gt;&lt;P&gt;g_header-file_ext = 'TXT'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = sy-uname&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOLMEM_DATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RECEIVE_DATA =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File from the pc to send...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;method1 = 'ATTCREATEFROMPC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_files-text = ws_file.&lt;/P&gt;&lt;P&gt;append g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = g_owner&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header&lt;/P&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method1 = 'SEND'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_receipients-recnam = 'MK085'.&lt;/P&gt;&lt;P&gt;g_receipients-recesc = 'B'.&lt;/P&gt;&lt;P&gt;g_receipients-sndex = 'X'.&lt;/P&gt;&lt;P&gt;append g_receipients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = g_owner&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- End of Program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2008 09:58:01 GMT</pubDate>
    <dc:creator>JoffyJohn</dc:creator>
    <dc:date>2008-06-09T09:58:01Z</dc:date>
    <item>
      <title>file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000036#M955689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to pick file from application server as an attachment and send as mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000036#M955689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000037#M955690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you search the forums for information or try it yuorself?  This has been discussed lots of times before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000037#M955690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000038#M955691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds interesting, please tell us how you did it in the end.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000038#M955691</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-06-09T09:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000039#M955692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use OPEN_DATASET to fetch the file to internal table and use the FM SO_DOCUMENT_SEND_API1 to send mail with attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000039#M955692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000040#M955693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first try to understand my question than reply....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000040#M955693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000041#M955694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand your question perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you try to understand how the search function on SDN works and then maybe help yourself a bit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000041#M955694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000042#M955695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Report ZSD_EXCEL_INT_APP&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZSD_EXCEL_INT_APP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: file_nm type localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of it_tab1,&lt;/P&gt;&lt;P&gt;f1(20),&lt;/P&gt;&lt;P&gt;f2(40),&lt;/P&gt;&lt;P&gt;f3(20),&lt;/P&gt;&lt;P&gt;end of it_tab1.&lt;/P&gt;&lt;P&gt;data : it_tab type table of ALSMEX_TABLINE with header line,&lt;/P&gt;&lt;P&gt;file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_tab2 type it_tab1 occurs 1,&lt;/P&gt;&lt;P&gt;wa_tab2 type it_tab1,&lt;/P&gt;&lt;P&gt;w_message(100) TYPE c.&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;u2022	PROGRAM_NAME = SYST-REPID &lt;/P&gt;&lt;P&gt;u2022	DYNPRO_NUMBER = SYST-DYNNR &lt;/P&gt;&lt;P&gt;u2022	FIELD_NAME = ' ' &lt;/P&gt;&lt;P&gt;STATIC = 'X'&lt;/P&gt;&lt;P&gt;u2022	MASK = ' ' &lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;file_name = file_nm&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;MASK_TOO_LONG = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh it_tab2[].clear wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file = file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = file&lt;/P&gt;&lt;P&gt;i_begin_col = '1'&lt;/P&gt;&lt;P&gt;i_begin_row = '1'&lt;/P&gt;&lt;P&gt;i_end_col = '10'&lt;/P&gt;&lt;P&gt;i_end_row = '35'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;intern = it_tab&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INCONSISTENT_PARAMETERS = 1&lt;/P&gt;&lt;P&gt;UPLOAD_OLE = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case it_tab-col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '002'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab2-f1 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab2-f2 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab2-f3 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_tab2 to it_tab2.&lt;/P&gt;&lt;P&gt;clear wa_tab2.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : p_file TYPE rlgrap-filename value 'TEST3.txt'.&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;u2022	&lt;/P&gt;&lt;P&gt;o	&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;	Display error messages if any. &lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e001(zsd_mes).&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Data is downloaded to the application server file path&lt;/P&gt;&lt;P&gt;LOOP AT it_tab2 INTO wa_tab2.&lt;/P&gt;&lt;P&gt;TRANSFER wa_tab2 TO p_file.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Close the Application server file (Mandatory).&lt;/P&gt;&lt;P&gt;CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_tab2 into wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sarada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000042#M955695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T09:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000043#M955696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*This program will allowed you to send email with attachment.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First, specify the attachment file from your local hardisk and execute.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Next, specify the sender email address and click the send button.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_mail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data method1 like sy-ucomm.&lt;/P&gt;&lt;P&gt;data g_user like soudnamei1.&lt;/P&gt;&lt;P&gt;data g_user_data like soudatai1.&lt;/P&gt;&lt;P&gt;data g_owner like soud-usrnam.&lt;/P&gt;&lt;P&gt;data g_receipients like soos1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_document like sood4 .&lt;/P&gt;&lt;P&gt;data g_header like sood2.&lt;/P&gt;&lt;P&gt;data g_folmam like sofm2.&lt;/P&gt;&lt;P&gt;data g_objcnt like soli occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objhead like soli occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objpara like selc occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_objparb like soop1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_attachments like sood5 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data g_references like soxrl occurs 0 with header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data g_authority like sofa-usracc.&lt;/P&gt;&lt;P&gt;data g_ref_document like sood4.&lt;/P&gt;&lt;P&gt;data g_new_parent like soodk.&lt;/P&gt;&lt;P&gt;data: begin of g_files occurs 10 ,&lt;/P&gt;&lt;P&gt;text(4096) type c,&lt;/P&gt;&lt;P&gt;end of g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : fold_number(12) type c,&lt;/P&gt;&lt;P&gt;fold_yr(2) type c,&lt;/P&gt;&lt;P&gt;fold_type(3) type c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters ws_file(4096) type c default 'c:\debugger.txt'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can me any file fromyour pc ....either xls or word or ppt etc ...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;g_user-sapname = sy-uname.&lt;/P&gt;&lt;P&gt;call function 'SO_USER_READ_API1'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;user = g_user&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PREPARE_FOR_FOLDER_ACCESS = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;user_data = g_user_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_NOT_EXIST = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PARAMETER_ERROR = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_ERROR = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fold_type = g_user_data-outboxfol+0(3).&lt;/P&gt;&lt;P&gt;fold_yr = g_user_data-outboxfol+3(2).&lt;/P&gt;&lt;P&gt;fold_number = g_user_data-outboxfol+5(12).&lt;/P&gt;&lt;P&gt;clear g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : g_objcnt,&lt;/P&gt;&lt;P&gt;g_objhead,&lt;/P&gt;&lt;P&gt;g_objpara,&lt;/P&gt;&lt;P&gt;g_objparb,&lt;/P&gt;&lt;P&gt;g_receipients,&lt;/P&gt;&lt;P&gt;g_attachments,&lt;/P&gt;&lt;P&gt;g_references,&lt;/P&gt;&lt;P&gt;g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method1 = 'SAVE'.&lt;/P&gt;&lt;P&gt;g_document-foltp = fold_type.&lt;/P&gt;&lt;P&gt;g_document-folyr = fold_yr.&lt;/P&gt;&lt;P&gt;g_document-folno = fold_number.&lt;/P&gt;&lt;P&gt;g_document-objtp = g_user_data-object_typ.&lt;/P&gt;&lt;P&gt;*g_document-OBJYR = '27'.&lt;/P&gt;&lt;P&gt;*g_document-OBJNO = '000000002365'.&lt;/P&gt;&lt;P&gt;*g_document-OBJNAM = 'MESSAGE'.&lt;/P&gt;&lt;P&gt;g_document-objdes = 'sap-img.com testing by program'.&lt;/P&gt;&lt;P&gt;g_document-folrg = 'O'.&lt;/P&gt;&lt;P&gt;*g_document-okcode = 'CHNG'.&lt;/P&gt;&lt;P&gt;g_document-objlen = '0'.&lt;/P&gt;&lt;P&gt;g_document-file_ext = 'TXT'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_header-objdes = 'sap-img.com testing by program'.&lt;/P&gt;&lt;P&gt;g_header-file_ext = 'TXT'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = sy-uname&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOLMEM_DATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RECEIVE_DATA =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File from the pc to send...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;method1 = 'ATTCREATEFROMPC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_files-text = ws_file.&lt;/P&gt;&lt;P&gt;append g_files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = g_owner&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header&lt;/P&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method1 = 'SEND'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_receipients-recnam = 'MK085'.&lt;/P&gt;&lt;P&gt;g_receipients-recesc = 'B'.&lt;/P&gt;&lt;P&gt;g_receipients-sndex = 'X'.&lt;/P&gt;&lt;P&gt;append g_receipients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SO_DOCUMENT_REPOSITORY_MANAGER'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = method1&lt;/P&gt;&lt;P&gt;office_user = g_owner&lt;/P&gt;&lt;P&gt;ref_document = g_ref_document&lt;/P&gt;&lt;P&gt;new_parent = g_new_parent&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;authority = g_authority&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;objcont = g_objcnt&lt;/P&gt;&lt;P&gt;objhead = g_objhead&lt;/P&gt;&lt;P&gt;objpara = g_objpara&lt;/P&gt;&lt;P&gt;objparb = g_objparb&lt;/P&gt;&lt;P&gt;recipients = g_receipients&lt;/P&gt;&lt;P&gt;attachments = g_attachments&lt;/P&gt;&lt;P&gt;references = g_references&lt;/P&gt;&lt;P&gt;files = g_files&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;document = g_document&lt;/P&gt;&lt;P&gt;header_data = g_header. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- End of Program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 09:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000043#M955696</guid>
      <dc:creator>JoffyJohn</dc:creator>
      <dc:date>2008-06-09T09:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000044#M955697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this link also&lt;/P&gt;&lt;P&gt;[http://www.abapcode.info/2007/05/convert-spool-request-to-pdf-and-send.html|http://www.abapcode.info/2007/05/convert-spool-request-to-pdf-and-send.html]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000044#M955697</guid>
      <dc:creator>JoffyJohn</dc:creator>
      <dc:date>2008-06-09T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000045#M955698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto AL11, Select the required file ,then u can see data in the file,then goto the LIST&lt;DEL&gt;&amp;gt;SAVE/SEND&lt;/DEL&gt;&amp;gt;Then u'l into the another screen " Create document &amp;amp; send "(In attachemnts u can see o/p file) in the recipient column give the mail id &amp;amp;  in Reci type specify 'EXTERNAL SCREEN'. Then click on the send.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The mail id which u wann to send is dependent on the version, if it is ecc 6.0 u hav to maintain the mail id in the su01 or u r s/m is ECC 5 no need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Narasimhulu P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-from-application-server/m-p/4000045#M955698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:48:24Z</dc:date>
    </item>
  </channel>
</rss>

