Send Word / Excel / PPF to Spool

Hy there,
I need to create a Smartform to send via email with the PO as an attachement in PDF format, and that, i can do. No problem.
But.....in the EBP system you can add attachements to the PO in Word, Excel, PPF format, and i need to send this files as an attachement too, i have the name and url of file but i can´t add them.
Thanks..

Dear Nuno:
Is very dificult to make and Excel or Word File to send by e-mail. You just have to test and develop, take any of these function module's:
SX_OBJECT_CONVERT_ALI_HTM
SX_OBJECT_CONVERT_ALI_PRT
SX_OBJECT_CONVERT_ALI_RAW
SX_OBJECT_CONVERT_INT_RAW
SX_OBJECT_CONVERT_OBJ_R3O
SX_OBJECT_CONVERT_OTF_PDF
SX_OBJECT_CONVERT_OTF_PRT
SX_OBJECT_CONVERT_OTF_RAW
SX_OBJECT_CONVERT_RAW_SCR
SX_OBJECT_CONVERT_SCR_OTF
SX_OBJECT_CONVERT_TO_AFX 
SX_OBJECT_CONVERT_TXT_INT
Good luck.
Saludos,
Mariano.

Similar Messages

  • For one of our users the option to send a document as attachment has dissapeared in office programs such as word, excel etc

    Hi,
    For one of our users the option to send an email as attachment has disappeared in office programs such as word, excel etc
    As you can see from the above these are the normal options you expect to see but for the user affected they get the option to send as a Text document, a pdf or an XPS the option to send as a attachment has gone.
    I have logged into her PC with my account and it was fine, i have had a look and no one else has reported this throughout the company and looking for answers online has proven fruitless.
    Any Ideas on why this option would have changed to only allow the user to send it as text.

    Hi,
    The "Send as Attachment" option only works when Outlook and word are installed from the same suite. That is required.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Send/export the background job spool in Excel (in MHTML format) in ECC 6.0.

    Hello All,
    I have a requirement to send/export the background job spool in Excel (in MHTML format) in ECC 6.0. Please help.
    Thank you.
    Nalini

    Hi Jigar,
    Thanks for your response.
    Anything is like download to desktop or email is fine. But in MHTML format.
    We can download the ALV report in MHTML spreadsheet format when we run the program online. But the program is running for long time and going to dump.
    So i scheduled it as background job and downloading the output in  .HTML format. But user wants the spool/report output in .MHTML spreadsheet format.
    I can write the code. Instead of changing the existing program I would like to know is there any way (from standard SAP) that I can get the background spool in MHTML spreadsheet format.
    Thanks,
    Nalini

  • Sending an excel spreadsheet attachment on an E-Mail

    Afternoon,
    Based upon program BCS_EXAMPLE_5 I have created a program that generates an e-mail and creates a spreadsheet attachment. The problem I have is how do get the contents of an internal table into the spreadsheet attachment?
    My attempt at resolving the problem has been as follows:-
    I have declared a variable document which points to the class cl_document_bcs. I have then instantiated the variable using a static method. I then call the method add_attachment (document->add_attachment) and pass the text content which contains two lines of text.
    This creates a spreadsheet will the two lines of text in the first cell.
    Could I use the binary content instead? If so how do I declare a variable that has the same type as a work area of binary content because this has a data type of RAW.
    Any assistance would be very much appreciated. A copy of my code can be seen below:-
    Thanks and regards
    John.
    REPORT bcs_example_5.
    This example shows how to send
      - a simple text provided in an internal table of text lines
      - and an attached MS word document provided in internal table
      - to some internet email address.
    All activities done via facade CL_BCS!
    DATA: send_request       TYPE REF TO cl_bcs.
    DATA: text               TYPE bcsy_text.
    DATA: text_content       TYPE soli_tab.
    DATA: wa_text_content    TYPE soli.
    DATA: binary_content     TYPE solix_tab.
    DATA: wa_binary_content  TYPE solix.
    DATA: document           TYPE REF TO cl_document_bcs.
    DATA: sender             TYPE REF TO cl_sapuser_bcs.
    DATA: recipient          TYPE REF TO if_recipient_bcs.
    DATA: bcs_exception      TYPE REF TO cx_bcs.
    DATA: sent_to_all        TYPE os_boolean.
    Data to be included in the spreadsheet
    DATA:  text2(100) TYPE c VALUE 'ABC'.
    DATA:  int TYPE i VALUE 258.
    DATA:  buffer TYPE xstring.
    DATA:  conv TYPE REF TO cl_abap_conv_out_ce.
    START-OF-SELECTION.
      PERFORM main.
          FORM main                                                     *
    FORM main.
      TRY.
        -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
        -------- create and set document with attachment ---------------
        create document from internal table with text
          APPEND 'Hello world!' TO text.
          document = cl_document_bcs=>create_document(
                          i_type    = 'RAW'
                          i_text    = text
                          i_length  = '12'
                          i_subject = 'test created by BCS_EXAMPLE_5' ).
        add attachment to document
        BCS expects document content here e.g. from document upload
        binary_content = ...
    *TRY.
         conv = cl_abap_conv_out_ce=>create(
              encoding                      = 'UTF-8'
              endian                        = 'L'
       REPLACEMENT                   = '#'
       IGNORE_CERR                   = ABAP_FALSE
    CATCH CX_PARAMETER_INVALID_RANGE .
    CATCH CX_SY_CODEPAGE_CONVERTER_INIT .
    **ENDTRY.
         CALL METHOD conv->write( data = text n = 4 ).
         CALL METHOD conv->write( data = int ).
         buffer = conv->get_buffer( ).
          wa_text_content = '1234567890ABCDE'.
          APPEND wa_text_content TO text_content.
          wa_text_content = '1234567890ABCDE'.
          APPEND wa_text_content TO text_content.
          wa_binary_content = buffer.
         APPEND wa_binary_content TO binary_content.
         wa_binary_content = '11111111'.
         APPEND wa_binary_content TO binary_content.
          CALL METHOD document->add_attachment
            EXPORTING
              i_attachment_type    = 'XLS'
              i_attachment_subject = 'c:\temp\book2'
              i_att_content_text   = text_content.
             i_att_content_hex    = binary_content
        add document to send request
          CALL METHOD send_request->set_document( document ).
        --------- set sender -------------------------------------------
        note: this is necessary only if you want to set the sender
              different from actual user (SY-UNAME). Otherwise sender is
              set automatically with actual user.
          sender = cl_sapuser_bcs=>create( sy-uname ).
          CALL METHOD send_request->set_sender
            EXPORTING
              i_sender = sender.
        --------- add recipient (e-mail address) -----------------------
        create recipient - please replace e-mail address !!!
          recipient = cl_cam_address_bcs=>create_internet_address(
                                            '[email protected]' ).
        add recipient with its respective attributes to send request
          CALL METHOD send_request->add_recipient
            EXPORTING
              i_recipient = recipient
              i_express   = 'X'.
        ---------- send document ---------------------------------------
    set send immediately flag
          CALL METHOD send_request->set_send_immediately( 'X' ).
          CALL METHOD send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = sent_to_all ).
          IF sent_to_all = 'X'.
            WRITE text-003.
          ENDIF.
          COMMIT WORK.
    *                     exception handling
    * replace this very rudimentary exception handling
    * with your own one !!!
        CATCH cx_bcs INTO bcs_exception.
          WRITE: 'Fehler aufgetreten.'(001).
          WRITE: 'Fehlertyp:'(002), bcs_exception->error_type.
          EXIT.
      ENDTRY.
    ENDFORM.                    "main

    Hi,
    See the Blog..
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    Here is the example program to send the EXCEL as a attachment in a email
    http://www.erpgenie.com/sap/abap/code/abap58.htm
    Regards
    Sudheer

  • I thought apple is user friendly. That is why I bought it. I do not have a use to download my boot camp assistant for a compatible to microsoft words, excel, powerpoint. They told me I have iWork's for all of this products but mine is not working.

    To whom it may concern.
    I bought an apple product which is MacBook Air about 7 mths. ago . Anyway I would like to download a compatible words, excel, powerpoint. they told me that I do not need it since IWORKS is all I needed. I tried my keynote , numbers does not worked. Somebody emailed me sending me this mumbo jumbo for it to work. Well, if I was a computer wiz, I probably will not be asking for help.
    I followed the tutorials for windows for mac, followed every instructions, hold and behold another problem. I have to have a usb, when I bought this at Best Buy, I asked them what do I need , they said that I do not need anything else because it is all in there. So to make a long story short. I am just so frustrated .
    How can I download the windows for mac, I know I have to start in utilities , boot camp assistant, then the usb problem. Please I need help, it is much needed for my job. Ipages does not saved anything, I mean nothing it just disappeared , and you do not have any idea how much I have the long hrs. I have put in.
    Thank you so much for your help. I really appreciate this .

    You can buy Microsoft Office for Mac, it includes Word, Excel and Powerpoint. Or you can download a free copy of LibreOffice which contains substitutes (good ones) for the Microsoft Office programs.
    Do not even think of using Boot Camp unless you have a complete and current TM backup or a clone to restore if it goes wrong. You will also need to buy Windows and Microsoft Office for it. And you MUST read the directions very carefully.

  • Good day!   On the ultrabook Asus (System Settings: WIN 8.1 64-bit, Core I5-3317U CPU @ 1.70 Ghz, Memory 4 Gb), set Adobe Acrobat XI Pro 11.0.09  When you convert to any format via SaveAs in WORD, EXCEL, or via the Export file in ... throws the error "Una

    Good day!
    On the ultrabook Asus (System Settings: WIN 8.1 64-bit, Core I5-3317U CPU @ 1.70 Ghz, Memory 4 Gb), set Adobe Acrobat XI Pro 11.0.09
    When you convert to any format via SaveAs in WORD, EXCEL, or via the Export file in ... throws the error "Unable to process the document in the module Save As. File not created"

    This happens with any file .
    Send a file with the screen errors and system data . Also send a couple of files PDF.
    Translates only txt format.
    Acrobat установлен: C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:43:46
    Браузер по умолчанию:
    Версия BIOS: _ASUS_ - 1072009
    Версия ОС: 6.2.9200 
    Всего виртуальной памяти: 4194176 KB
    Всего физической памяти: 4077252 KB
    Графическая плата: Intel(R) HD Graphics 4000
        Версия: 10.18.10.3412
        Отметить: Не поддерживается
    Доступная виртуальная память: 3638168 KB
    Доступная физическая память: 1689940 KB
    Имя пользователя: Vazgen
    Имя системы: VAZGENTAICHI
    Монитор:
        Название: Intel(R) HD Graphics 4000
        Разрешение: 1920 x 1080 x 60
        Бит на пиксел: 32
    Название ОС: Microsoft Windows Vista
    Папка Windows: C:\WINDOWS
    Папка для временных файлов: C:\Users\Vazgen\AppData\Local\Temp\
    Почтовая программа по умолчанию: Microsoft Outlook
        mapi32.dll
        Версия: 1.0.2536.0 (winblue_rtm.130821-1623)
    Производитель ОС: Microsoft Corporation
    Процессор: Intel64 Family 6 Model 58 Stepping 9 GenuineIntel  ~1696  Mhz
    Сведения о Windows:
       Планшетный ПК: Да
       Начальная версия: Нет
       Media Center Edition: Нет
       Медленный компьютер: Нет
    Сведения о сеансе:
       Тип загрузки: Обычный
       Завершение работы: Нет
       Сеть: Доступно
       Внутри Citrix: Нет
       Внутри VMWare: Нет
       Удаленный сеанс: Нет
       Удаленное управление: Нет
       Использование JAWS: Нет
       Использование Windows-Eyes: Нет
       Использование NVDA: Нет
    Сведения об Acrobat:
       Изолирование программной среды: Отключить
       Связанная программа для чтения: Нет
       Multi-Reader с поддержкой Desktop: Отключить
    Сведения об отображении:
       Ширина экрана: 1920
       Высота экрана: 1080
       Число мониторов: 2
       Число кнопок мыши: 2
       Мышь с колесом прокрутки: Нет
       С маркером Windows: Нет
       Двухбайтовая кодировка: Нет
       С редактором метода ввода: Да
       В программе для чтения с экрана: Нет
    Сведения об учетной записи:
       Права пользователя: Администратор
       Управление учетной записью пользователя: Ограниченное
       Целостность процесса: Не определено
       Тип профиля: Отсутствует
    Установленные приложения:
       Версия Office: Office 2013 32-bit
    Файл подкачки: 4194303 KB
    Часовой пояс: Московское время (зима)
    Язык: Русский (Россия)
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Accessibility.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:20
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Annots.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:22
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\IA32.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:18
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\PaperCapture.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:43:36
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SaveAsRTF.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:20
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\SendMail.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:20
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\plug_ins\Updater.api
        Версия: 11.0.9.29
      Дата создания: 2014/09/12
        Время создания: 13:44:22

  • Error when starting Word & Excel

    Hi all,
    I am able to successfully open word docs, but I consistently get this error:
    [IMG]http://tiferes.co.il/wp-content/uploads/2013/08/image.png[/IMG]
    Does anyone know how to fix this?
    I am also asked to sign in every time I open Word or Excel:  
    [IMG]http://tiferes.co.il/wp-content/uploads/2013/08/image-1.png[/IMG]
    Does anyone know how to fix these problems?
    Windows 7 64 bit, Home Premium, SP1.  Word & Excel 2013

    Here's is an update on the issue:  
    I re-registered my copy of word 2013. Entered some code - product #, registration #, sorry I forget which, & now neither word
    nor excel ask me to sign in!
    The only issues left is the error message: There was a problem sending the command to the program. 
    This is when that error occurs:
    I get this only in Word, not Excel. It happens when I click on a word doc via a file explorer window or from the desktop. (When
    I open a document from within word, i.e. from their list of recently used programs, I don't get the error!)  If
    I Open as read only I still got the error.   If
    I Open in protected view i don't get the error.
    Here's what I've tried so far:
    I tried repairing it from the uninstall screen. 
    Tried right clicking on a word file & selecting 'Run
    as Administrator', but there was no such option
    I tried un-checking: Ignore
    other applications that use Dynamic Data Exchange (DDE), but it was already unchecked.
    Since the problem only exists when I start it from the file explorer, starting the program in safe mode wont help.
    tried removing office viewer, but there was none installed
    I deleted the word data reg key.
    I deleted the normal.dotm
    So far, no luck.  Any more ideas?

  • Opening Winmail.dat files in Mail on iPad (Ms Windows Word, Excel, Ppt)

    I thought I'd share my findings on what to do if your Word, Excel, Powerpoint attachments come into your Mail as winmail.dat files. In my experience I downloaded the following Apps:
      Pages
      Numbers
      DocsToGo
    WinMailViewer
      Letter Opener
    To open the winmail.dat file hold the icon until asked how you want to open the file: WinMailViewer or Letter Opener (assuming you've previously downloaded both Apps).
    WinMailViewer is exactly what it says ... a 'viewer' of the file.  The file is sent to the relevant App which you subsequently open to see a list of the files.
    Letter Opener will bring up the attachment(s) in a separate window and gives you choices on which App you'd like to use to open or view the file with. Depending on what Apps you've previously downloaded:
      For Excel it might list: Quick Look, DocsToGo, Csv File Editor, PDFReaderLite
      For Word, it might list: Pages, DocsToGo, PDFReaderLite
    DocsToGo is an excellent option for working on Word, Excel files (N.B. If you have a big Excel file with 'frozen' window panes, I recommend clicking on the 4th tool (bottom toolbar) UnFreezing the panes while you work or move around the file as I haven't figured how to work with it on!!)
    Pages is the best option to use for editing Word files.
    Numbers is probably the best option to use for editing Excel files.
    Csv File Editor is another Excel editing option.
    I hope that helps.

    I should further say the files I sent are .xlsx and .docx files.  They look fine my end and I send such files all the time without problems.
    However, I did try to cheat by going in via the Safari onto my 'live' online email account and the Safari automatically transfers them to winmail.dat files with the same result.
    Ahh - have just been on using my PC this time and you are right, it seems that the service provider does the transfer and then when my outlook opens the file (on the PC), it must reconvert to .xlsx etc again.
    Very strange.
    Ergo, I guess the question should be how I open wimail.dat files ??

  • Could iphone use word,excel file?

    I knew that iphone can process .txt and .csv when you had downloaded a Free software (Document). However, i can save as a word file through iphone which i mean .doc. For my purpose, i want to save as word file in my iphone and send it back to my computer. It is helpful for me to complete my assignment.
    Second, although i can't use word or excel file, i would like to see the pdf file. Does it support the adobe reader software?
    If sb knows anything, please send me an email([email protected]) or reply.Thx a lot!

    The iPhone can view pdf files natively. To edit MS Office (Word/Excel), you need an app, such as:
    http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=310723177&mt=8

  • App to Edit Microsoft word, excel

    Hi their,
    I want a great app to edit Microsoft word & excel files. If possible it should also be able to retrieve files from my email attachments that i receive or send. I really need an app as I already have the iPhone with other brilliant apps, but still lack this feature. I am also doing this for my father who is looking for ward to buy the iPhone instead of other business devices.
    Please do answer me..............

    QuickOffice's MobileFiles Pro was released last week, which currently allows editing of excel spreadsheets, word doc editing is coming in a future update (I don't know when exactly). It also allows viewing of all the usual office, iwork, PDF, image files etc. as well as playback of audio/video files. You can access your MobileMe iDisk with the app, and download files to the iPhone's local storage, as well as uploading xls files you have created/edited locally with the app. If you don't use MobileMe, the app has the ability of transferring files over your wifi network.
    I've got it and highly recommend it. What it does, it does very well, however there are features I'd like to see added, like cut/copy/paste of cells, ability to email files as attachments, fast-scrolling/bookmarking in large PDFs/docs, word doc & ppt file editing/creation.
    QuickOffice have been in the game for a long time with native apps on Palm, Windows Mobile, Symbian & BlackBerry, so I'd expect the app to get better and better over time.
    Here's the link to the app:
    http://linktoapp.com/mobilefiles+pro
    And info on their website:
    http://www.quickoffice.com/mobilefiles
    And the quickoffice forums, for other opionions/feedback:
    http://forums.quickoffice.com

  • I have Microsoft Office X on my Imac with OS 10.6, I cannot get the Ctriilic font in office to work in word or excell. Where do I get the cyrillic font to work in word/excel

    I have Microsoft Office X on my Imac with OS 10.6, I cannot get the Ctriilic font in office to work in word or excell. Where do I get the cyrillic font to work in word/excel

    "Could you explain where you think you have to pay something?"
    I signed up for the site and posted a question their response was that they had an answer and they required credit card imformation.
    "If your problem is to read existing Excel files, then I am very surprised that OpenOffice would not open them.  If you could send me one or provide a url I could see what the problem is (tom at bluesky dot org)."
    I can down load the files just fine and they open. the numbers in the documents will display but text will not what I get is this : "__________" where there should be text.
    Try this site and download the the Doc (rar). it will open on my computer as an excel file but there will be no text just "__________" Open office will not open this file, but excel will.
    http://militera.lib.ru/h/sovaviation/index.html

  • Hoe to edit Word, Excell and Powerpoint documents

    Hello 
    I had installed the BlackBerry Device Software 4.5 on my BlackBerry 8310 and would like to know how to edit Word, Excel and Powerpoint documents. 
    Can I edit files that i sent from the computer to the device memory card and then send it by email.
    Thankyou 
    sluizoliv 

    Hi there!
    If your BB came with the DataViz ToGo apps, then you can indeed do what you desire. Check under (usually) Applications for Word-to-go, sheet-to-go and other ToGo apps. You can edit a file you save to your device or media card memory. You can send them as attachments. Etc.
    Hope that helps!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to open and show a word, excel, ppt file in Adobe AIR application?

    Dear All,
    I have a requirement to open a MS- word/ Excel file in the AIR application.
    On click of a brows button a file reference box opens...on any file
    selection...it should open in the application itself...
    so plz let me know the solutions u have...

    Here is your basic issue: setting a classpath (and presumably compiling and executing a program) is one of the most basic, fundamental concepts in Java. I would advise you to follow JVerd and Annie's links and get started on a tutorial. Try writing a simple HelloWorld application before delving into POI. When you are more comfortable writing and compiling programs, and post a specific question, it will be much easier to help you.
    - Saish

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • New to PDF Portfolios - Need to Link between PDF, Word & Excel Docs

    Hello All,
         Thanks in advance for your help.  I'm new to the Adobe X Pro & making portfolios.  I have figured out how to create a portfolio.  My portfolio has a main pdf document and several folders with pdf, word & excel files in them.  What I’m trying to do is link from my main document (pdf file) to the other files (word, excel & pdf) that I’ve added to the portfolio.  I’ve tried linking to a pdf file and a thumbnail of the word doc (because I did find that I can’t link to the actual word or excel doc).  When I create & test the link (for both the pdf file & the thumbnail of the word doc) it is there; I can click the link I created and it will go to the word doc.  If I close the portfolio & reopen it the link to the pdf file is there, but the link to the word doc isn’t there anymore.  That link now goes to the main pdf file and not the word thumbnail or even the folder where the word doc is saved.  Any ideas on what to do?  Thanks.

    As Dave has noted you can not do this.
    Acrobat/Reader would need to know what program to use to read the data in the document and since there can be many different programs that could read your document,  Acrobat/Reader would need to know exactly which program to use on one's system. You might only have MS Office but others might have both MS Office and OpenOffice.org and might prefer to use OpenOffice.org unless there is a feature that is only available to MS Office. Yes it is possible to create a program that can be configured to use specific helper programs, but it can have a real impact on system efficiency. It is easy enough to download or extract the non-PDF document and then use your program of choice. Just look to MS Outlook for a program that can not always open an attachment, especially PDF files.

Maybe you are looking for