Email simple list with formating

I wanted to email formated o/p of simple list..
thanks

Hope the below code helps you.
*& Report  ZMUB_EMAIL_TEST                                             *
REPORT  ZMUB_EMAIL_TEST                         .
INCLUDE zmubinc_email.
* DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
* SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
* AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CLEAR p_file.
  CALL FUNCTION 'F4_FILENAME'
    IMPORTING
      file_name = p_file.
* START-OF-SELECTION
START-OF-SELECTION.
  PERFORM ml_customize USING 'Tst' 'Testing'.
  PERFORM ml_addrecp USING receiver 'U'.
  PERFORM upl.
  PERFORM doconv TABLES itab objbin.
  PERFORM ml_prepare USING 'X' extension name.
  PERFORM ml_dosend.
  SUBMIT rsconn01 WITH mode EQ 'INT' AND RETURN.
* FORM
FORM upl.
  file_name = p_file.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = file_name
      filetype                = 'BIN'
    TABLES
      data_tab                = itab
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
      EXPORTING
        complete_filename = path
*   CHECK_DOS_FORMAT =
      IMPORTING
*   DRIVE =
        EXTENSION = extension
        NAME = name
*   NAME_WITH_EXT =
*   PATH =
      EXCEPTIONS
        INVALID_DRIVE = 1
        INVALID_EXTENSION = 2
        INVALID_NAME = 3
        INVALID_PATH = 4
        OTHERS = 5  .
ENDFORM. "upl
*&  Include           ZMUBINC_EMAIL                                    *
* Data
DATA: docdata LIKE sodocchgi1,
      objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
      objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
      objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
      objhex LIKE solix OCCURS 10 WITH HEADER LINE,
      reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
      doc_size TYPE i,
      att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
* FORM
FORM ml_customize USING objname objdesc.
*----------- Clear Variables
  CLEAR docdata.
  REFRESH objpack.
  CLEAR objpack.
  REFRESH objhead.
  REFRESH objtxt.
  CLEAR objtxt.
  REFRESH objbin.
  CLEAR objbin.
  REFRESH objhex.
  CLEAR objhex.
  REFRESH reclist.
  CLEAR reclist.
  REFRESH listobject.
  CLEAR listobject.
  CLEAR tab_lines.
  CLEAR doc_size.
  CLEAR att_type.
*  --------- Set Variables
  docdata-obj_name = objname.
  docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
* FORM
FORM ml_addrecp USING preceiver prec_type.
  CLEAR reclist.
  reclist-receiver = preceiver.
  reclist-rec_type = prec_type.
  APPEND reclist.
ENDFORM. "ml_customize
* FORM
FORM ml_addtxt USING ptxt.
  CLEAR objtxt.
  objtxt = ptxt.
  APPEND objtxt.
ENDFORM. "ml_customize
* FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
  IF bypassmemory = ''.
*--------- Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
*     IMPORTING
*     COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
  ENDIF.
* Header Data
* Already Done Thru FM
* Main Text
* Already Done Thru FM
* Packing Info For Text Data
  DESCRIBE TABLE objtxt LINES tab_lines.
  READ TABLE objtxt INDEX tab_lines.
  docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
  CLEAR objpack-transf_bin.
  objpack-head_start = 1.
  objpack-head_num = 0.
  objpack-body_start = 1.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'TXT'.
  APPEND objpack.
* Packing Info Attachment
  att_type = whatatt_type..
  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 = whatname.
  APPEND objpack.
* Receiver List
* Already done thru fm
ENDFORM. "ml_prepare
* FORM
FORM ml_dosend.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data = docdata
      put_in_outbox = 'X'
      commit_work = 'X' "used from rel. 6.10
*   IMPORTING
*   SENT_TO_ALL =
*   NEW_OBJECT_ID =
    TABLES
      packing_list = objpack
      object_header = objhead
      contents_bin = objbin
      contents_txt = objtxt
*   CONTENTS_HEX = objhex
*   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 <> 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
  ENDIF.
ENDFORM. "ml_customize
* FORM
FORM ml_spooltopdf USING whatspoolid.
  DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
*  -------------- Call Function
  CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid = whatspoolid
    TABLES
      pdf = pdf
    EXCEPTIONS
      err_no_otf_spooljob = 1
      OTHERS = 12.
*  ------------- Convert
  PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
* FORM
FORM doconv TABLES
  mypdf STRUCTURE tline
  outbin STRUCTURE solisti1.
*  -------- Data
  DATA : pos TYPE i.
  DATA : len TYPE i.
*  ------------ Loop And Put Data
  LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
  ENDLOOP.
  IF len > 0.
    APPEND outbin.
  ENDIF.
ENDFORM. "doconv
Above program fetches data from a file into internal
table, format and send it in a mail.
Instead you can directly use from the step after upload.
Kind Regards
Eswar

Similar Messages

  • A simple list with seven time buckets starting from the date report is run.

    Hi All,
    I am new to ABAP.Recently i have planned to write a progam which will help in planning the delivery of scheduled items.For a given sales Org. it will display all the undelivered,delivered items in a simple list and sort them with delivery dates.it will also provide a summary report at material group.For that i have used selection screen(LIKP-VKORG-Obligatory).when i enter VKORG Details i should get all the delivery docs for which delivery is not done or partially done.For this i have taken one more table LIPS
    (LIPS-MATKL,LIPS-MATNR,LIPS-VBELN,LIPS-POSNR,LIPS-WERKS,LIPS-LFIMG,LIPS-MEINS) for tables LIKP and LIPS VBELN is the key field.when i enter VKORG Data in the selection screen ,how can i get the data from LIPS Table.Please explain?
    Also report should be simple list with seven time buckets starting from the date when the report is run.The amount of quantity to be delivered should be displayed under appropriate bucket i.e within the bucket where its delivery date falls in.for ex:If the report is run on Tuesday 15th march 2010 then the start date 1 should be starting date of the week which is Monday 14th March.
    The report will be summarized at Material Group and Material Number.
    Appreciate your help
    Thanks and Regards,
    Shakeer Hussain

    Sorry, sounds too much like a complete requirement you want done for you by the community.
    Please work on it yourself and search for available information before posting specific problems only.
    Thread locked.
    Thomas

  • Contacts issues - send contacts to at&t phone book or sim card? and un able to unsync email contact list with phone contact list

    I have had several issues with my contacts on this phone. I cannot figure out how to send my contacts to the at&t phone book or to my sim card. The options/menu button in contacts is completely useless. It should give me the option on the sim card to transfer contacts form one list to another. I have already written on another forum about the contact list not letting me unsync one of my email contact lists and how I have 3 copies of all of my contacts because my email contacts are mixed in with my phone contacts.
    BB really needs to fix this issue with the contact list because it is beyond frustrating. I even downloaded the new BB software today and it still hasn't been fixed.

    OK...so this post is strictly about wanting to send your contacts to the SIM. That capability is one at a time only. And there's a reason for that.
    The BB Address Book is robust, allowing you to have one name with multiple phone numbers and addresses. The SIM phonebook, on the other hand, is much less capable...if, for instance, you have one contact with three phone numbers in your BB Address Book, the SIM phonebook would require three separate entries to contain the same data (with the obvious duplication of the name on three separate records).
    So, I must ask...why on earth do you want to send your contacts to your SIM? There are much better methods for moving your contacts from the BB to somewhere else...
    Let us know!
    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

  • Send Smart Forms within emails (html) Problems with format

    Dear all,
    the ABAP report SF_XSF_DEMO1 is a demo report which converts a certain smart form into HTML and then sends it as an email in html format.
    Sending the email is possible without any problems but I am wondering about the email format.
    <a href="http://www.imgbox.de/show/img/e4QvgzsS4L.jpg" title="Bilder hochladen">This screenshot shows how the email looks like.</a>
    I am not happy with the email layout as the Smart Form "SF_XSF_DEMO1" is designed in a different way.
    What do I have to adapt within the report in order to send an email that really looks like the Smart Form? Or is it a customizing issue?
    (I would like to avoid having to send the Smart Form as PDF attachment...)
    Thanks for you help!
    Kristian Kindler

    Hi Kristian,
    When ever you send a smartform output as an HTML email, the system generates automatic style sheets which are not supported in many email clients such as Outlook 2007, hence you will face a formatting issue. We faced the same issue and had do it it like this:
    Build a BSP page similar to the output which you want to send as an email. Now you can use the BSP URL to send the html email using cl_bcs class.
    I have documented this in my article below-
    http://divulgesap.com/blog.php?p=NDA=
    Hope it helps.
    Regards,
    Ravikiran

  • EText simple List with column header

    Hi,
    is there somewhere in the www how to create a header for each column?
    Col1 col2
    valcol1 valcol2
    Couldn't be difficould, for me it is.?

    Essentially when you are defining your levels, create one such that it will run only once, so typically at some root tag level.
    Then in this new level, define the Headings.
    Below is a snippet of what a tab delimited eText file could be done.
    Obviously since it won't appear in a proper table, you have to think in terms of a MS Word table with the appropriate headings.
    Hint: Define Data Layout
    <LEVEL>MY_HEADER_LEVEL
    <MAXIMUM LENGTH>     <FORMAT>     <DATA>     <COMMENTS>
    <NEW RECORD>     Tab Delimited Test
    18     Alpha     ‘Transaction Source’
    1     Alpha     chr(9)     
    10     Alpha     ‘Batch Name’     
    1     Alpha     chr(9)     
    <END LEVEL>     MY_HEADER_LEVEL
    <LEVEL>     MY_DETAIL
    <MAXIMUM LENGTH>     <FORMAT>     <DATA>     <COMMENTS>
    <NEW RECORD>     Tab Delimited AR Revenue- DetailRecord
    18     Alpha     G_TRX_SOURCE     
    1     Alpha     chr(9)
    10     Alpha      G_BATCH_NAME     
    1     Alpha     chr(9)          
    <END LEVEL>     MY_DETAIL

  • How do I create a group distribution email list with my contacts?

    I have many contacts and need to create email distribution lists with my contacts. It is too difficult to choose each contact with every email. How do I create a group contact list with my contacts on iCloud?

    Hello there, swcoxdpm.
    The following Knowledge Base article provides information on creating Group Contacts in Mavericks on your Macbook Air:
    Mail (Mavericks): Address messages
    http://support.apple.com/kb/PH14922
    Use a group address
    If you regularly send messages to the same group of people, you can save them as a group in Contacts, then use the group address to email them.
    Group contacts
    The steps to do that, are found here:
    Contacts (Mavericks): Group contacts
    http://support.apple.com/kb/PH15075
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • [svn] 3246: Fix fasttrack bug SDK-16910 - Simple List populated with strings throws RTE .

    Revision: 3246
    Author: [email protected]
    Date: 2008-09-17 15:31:25 -0700 (Wed, 17 Sep 2008)
    Log Message:
    Fix fasttrack bug SDK-16910 - Simple List populated with strings throws RTE. This is fallout from the Group/DataGroup split. DefaultItemRenderer now uses a TextBox instead of a Group to show the list data.
    QE: Any List tests that depended on the default item renderer to support anything other than text must be updated.
    Bugs: SDK-16910
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16910
    http://bugs.adobe.com/jira/browse/SDK-16910
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DefaultItemRenderer.mxml

    BTW, I do not experience the bug you had mentioned at
    http://www.cs.rit.edu/~cxb0025/flex/TreeControlBugs.html
    Can submit a video of my actions recorded

  • Problem with Thunderbird email: When I send email using a mailing list, with my email included in the list, the message shows up in my Sent list and others rece

    Problem with Thunderbird email:
    When I send email using a mailing list, with my email included in the list, the message shows up in my Sent list and others receive it but it does not come to my email Inbox. The same problem occurs when I send the email to the mailing list addresses individually. When I send a simple test message to myself, I do receive it in my Inbox. Can you help me??
    Bob Greenman

    Are you using either cc or bcc? Is googlemail involved? Some email providers suppress cc's and bcc's to oneself since you will have a copy in your Sent folder.

  • I have a new email address and updated it with my apple id/icloud and updated on my iPhone, but i'm getting a pop up to enter my password with my old email address listed for iCloud/Apple id.

    I have a new email address and updated my apple id/icloud  with the new address. I updated on my iPhone, but i'm keep getting a pop up to enter my password with my old email address listed for iCloud/Apple id.  How do I get it to go away?

    Did you create a NEW Apple ID or did you change the email address for your OLD Apple ID? This will affect how you update apps in the future.
    Anyway, go to Settings/iTunes&App Stores, log out, then log in with the new ID.

  • HT2486 How can I send an email to all of the email addresses associated with one contact? Similarly, in regard to group lists, how do you include for distribution all email addresses associated with each contact in the group?

    Often times there are multiple email addresses associated with a single contact in address book.  How can I included all of these email addresses when creating an address book group?

    Don't be surprised.
    Apple offers free, basic Mail and Address Book apps and creates paid, more sophisticated solutions, also allowing Developers to provide more sophisticated solutions for sale in the marketplace.
    When I need to repeatedly email to multiple contacts, I create a blank draft email, and use the Address Book button to list the appropriate address book group. With the Address Book window open, it's easy to click to add multiple email addresses for a single contact name. Each is added to the message email address list. Then I save that blank email to iCloud Drafts, and it retains the email addreses I've entered. Next time I need to send a message I double-click on it in Drafts to open it, and drag it to one of my other email accounts to add Subject and details, then send from the other account.
    Message was edited by: kostby

  • Trying to change reset my Apple ID as I can't remember it, however it is sending an email which says invalid link or a list with the option to change password which can't be clicked on? Can anybody please help?

    Trying to change reset my Apple ID as I can't remember it, however it is sending an email which says invalid link or a list with the option to change password which can't be clicked on? Can anybody please help? Going around in circles! Grrrrrrrrrrr

    Is this your machine or the company's?  Machines that came with Snow Leopard or earlier installed come with system and software install disks that can be used to reisntall the iApps that came with the machine orignally. 
    If this is your machine and it came with Snow Leopard or earlier installed the disk will look slimialr to one of these:
    If it is the company's machine see if they have the disks.
    Do a custom install and then use Software Update to update iPhoto to the highest version that is available.

  • How to Edit Contact List with email

    How to Edit Contact List  with email ID  in the heading
    Regards,
    Charles.KE

    eh? Can you please give some detail of what you're attempting to do ?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Change Pick List Output Format with automated Output format  froTO creation

    hi.,
    When creating TO for delivery using VL06P or LT03 there is no opportunity to print the Company Custom  Format(X1) of the pick list.
    But if it is reprinted in LT31, Print Code X1(Company defined picking list Output format) can be selected. This is our custom formatted TO output format.
    The delivery address is on the document, so if X1 format is used with the automated output from TO creation, Warehouse personel will have the Hardcopy of the delivery address.
    Question: How can i have the Print Code X1 to default when i am creating delivery using VL06P or LT03.
    All help is much appreciated.
    Tx

    Resolved by Myself

  • Issues with Simple Lists in service requests

    We are using Service Manager 2012 and have run into a problem with simple lists within the service requests we created.  We believe the issues started after we upgraded to Service Manager SP1 and Silverlight 5.1.  What happens is you can select
    one of the options in the simple list, but if you decide to change back to the original option, the system won't allow it.  In the case where there might be three options in the simple list (i.e. New, Change, Delete), you can select each one once, but
    if we try to change it back to any of the other options the system won't allow it.  We tested all of this before going live and everything was working, but just before we went live SP1 came out and so we elected to upgrade to it first.  We then needed
    to upgrade to Silverlight SP1 to work with Service Manager SP1.  We retested all of our service requests again just before going live, but didn't think we needed to go through every simple list so we didn't retest this.  Since then the simple lists
    are problematic.  Has anyone else experienced this and if so is there a fix that will correct this issue?

    Yes!
    We submitted a business impact statement back in February and after pushing them on a weekly basis, we finally received word that we will be receiving a hot fix next week.  Until we actually receive the hot fix and confirm that it works, I will wait
    to post another update on this.
    With that said, they came up with a temporary workaround about 2-3 weeks ago.  This is the message regarding the temporary fix that we received from the engineer that has been working on the issue:
    After doing code review I identified the regression was introduced in the binaries that are included as part of this Silverlight XAP file:
    RequestOfferingSilverlightModule.xap. As we discussed on the phone going back to the pre SP1 version means you will lose any enhancements/fixes that were introduced in SP1. Looking at the Change history for this module I only see two changes
    that were introduced in SP1 and those changes are as follows:
    The text field control only shows the first three lines.
    Hierarchical support for List Items in Portal
    To confirm my findings I replaced this XAP file with a pre SP1 version and I couldn’t repro the issue in my lab. I also confirmed implementing this module I lose the
    above fixes that were introduced in Sp1.
    To implement the workaround, please follow the below steps:
    Connect to the Web Content Server,  locate the following directory:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Rename the following file RequestOfferingSilverlightModule.xap
    to RequestOfferingSilverlightModule.xap.org
    Copy the attached file RequestOfferingSilverlightModule.xap to the folder:
    C:\inetpub\wwwroot\System Center Service Manager Portal\ContentHost\Clientbin
    Restart IIS by issuing the following command at the command prompt:
    iisreset
    Clear the client side cache and see if you can reproduce the issue.
    Once confirmed the issue doesn’t reproduce, please proceed with testing all scenarios that make use of the Self Service Portal.
    If you don't have the pre SP1 version of the file I'm sure you can get it from Microsoft.  We are not using hierarchical lists so the temporary fix is currently working for us without any issues.

  • Why won't my ipad send a simple txt message to a phone number that is not listed with imessage. It workls fine from my iphone. Same carrier.

    Why won't my ipad send a simple txt message to a phone number that is not listed with imessage. It works fine from my iphone. Same carrier.

    You can read why here:
    about messages
    http://support.apple.com/kb/HT3529
    Troubleshooting messages
    http://support.apple.com/kb/TS2755

Maybe you are looking for