Not receiving email when sending large number of records using a FM?

Hi..
I am using the function module " SO_DOCUMENT_SEND_API1 " to send email....
When a single record is there.. or around 5-6 records are there... email is coming successfully...
But when there are more records..say around 100, the email is not coming... I checked SOST transaction and the status there is in red..and the error message is " Internal error: SO_OBJECT_MIME_GET Exception: 2 ".........
What could be the reason behind this problem....... ??
I have another problem... my output has over 60 fields, but in the email which i am receiving has only around 10 fields... how to solve this problem...??
Plz help...

Well... right now i am tryin to get only the first 2 fields.. but even in this case... i am not getting the email if around 15 records are there......
I am using the code which is given below which i found in SDN only......In this code.. data is getting selected from EKPO... i tried changing the number of rows getting selected.. and in this case, the attachement is coming as desired... but when i use the same code for my prog.. i am not getting the mail.. even if there are only 10 records or so...
*& Report  ZT062108   ALV Header                                    *
REPORT  zt062108.
TABLES: ekko.
PARAMETERS: p_email   TYPE somlreci1-receiver
                                  DEFAULT '<give email here>'.
TYPES: BEGIN OF t_ekpo,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
      wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
  ebeln(10) TYPE c,
  ebelp(5)  TYPE c,
  aedat(8)  TYPE c,
  matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                WITH HEADER LINE.
DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                WITH HEADER LINE.
DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
        t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
        t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        w_cnt TYPE i,
        w_sent_all(1) TYPE c,
        w_doc_data LIKE sodocchgi1,
        gd_error    TYPE sy-subrc,
        gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
*   Retrieve sample data from table ekpo
  PERFORM data_retrieval.
*   Populate table with detaisl to be entered into .xls file
  PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
* Populate message body text
  perform populate_email_message_body.
* Send file by email as .xls speadsheet
  PERFORM send_file_as_email_attachment
                               tables it_message
                                      it_attach
                                using p_email
                                      'Example .xls documnet attachment'
                                      'TXT'
                                      'filename'
                             changing gd_error
                                      gd_reciever.
*   Instructs mail send program for SAPCONNECT to send email(rsconn01)
  PERFORM initiate_mail_execute_program.
*&      Form  DATA_RETRIEVAL
*       Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
  SELECT ebeln ebelp aedat matnr
   UP TO 1000 ROWS
    FROM ekpo
    INTO TABLE it_ekpo.
ENDFORM.                    " DATA_RETRIEVAL
*&      Form  BUILD_XLS_DATA_TABLE
*       Build data table for .xls document
FORM build_xls_data_table.
*  CONSTANTS: con_cret TYPE x VALUE '0D'.  "OK for non Unicode
*             con_tab TYPE x VALUE '09'.   "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
constants:
    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
  CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
         INTO it_attach SEPARATED BY con_tab.
  CONCATENATE con_cret it_attach  INTO it_attach.
  APPEND  it_attach.
  LOOP AT it_ekpo INTO wa_charekpo.
    CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                wa_charekpo-aedat wa_charekpo-matnr
           INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach  INTO it_attach.
    APPEND  it_attach.
  ENDLOOP.
ENDFORM.                    " BUILD_XLS_DATA_TABLE
*&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
*       Send email
FORM send_file_as_email_attachment tables pit_message
                                          pit_attach
                                    using p_email
                                          p_mtitle
                                          p_format
                                          p_filename
                                          p_attdescription
                                          p_sender_address
                                          p_sender_addres_type
                                 changing p_error
                                          p_reciever.
  DATA: ld_error    TYPE sy-subrc,
        ld_reciever TYPE sy-subrc,
        ld_mtitle LIKE sodocchgi1-obj_descr,
        ld_email LIKE  somlreci1-receiver,
        ld_format TYPE  so_obj_tp ,
        ld_attdescription TYPE  so_obj_nam ,
        ld_attfilename TYPE  so_obj_des ,
        ld_sender_address LIKE  soextreci1-receiver,
        ld_sender_address_type LIKE  soextreci1-adr_typ,
        ld_receiver LIKE  sy-subrc.
  ld_email   = p_email.
  ld_mtitle = p_mtitle.
  ld_format              = p_format.
  ld_attdescription      = p_attdescription.
  ld_attfilename         = p_filename.
  ld_sender_address      = p_sender_address.
  ld_sender_address_type = p_sender_addres_type.
* Fill the document data.
  w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
  w_doc_data-obj_langu = sy-langu.
  w_doc_data-obj_name  = 'SAPRPT'.
  w_doc_data-obj_descr = ld_mtitle .
  w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
  CLEAR w_doc_data.
  READ TABLE it_attach INDEX w_cnt.
  w_doc_data-doc_size =
     ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
  w_doc_data-obj_langu  = sy-langu.
  w_doc_data-obj_name   = 'SAPRPT'.
  w_doc_data-obj_descr  = ld_mtitle.
  w_doc_data-sensitivty = 'F'.
  CLEAR t_attachment.
  REFRESH t_attachment.
  t_attachment[] = pit_attach[].
* Describe the body of the message
  CLEAR t_packing_list.
  REFRESH t_packing_list.
  t_packing_list-transf_bin = space.
  t_packing_list-head_start = 1.
  t_packing_list-head_num = 0.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE it_message LINES t_packing_list-body_num.
  t_packing_list-doc_type = 'RAW'.
  APPEND t_packing_list.
* Create attachment notification
  t_packing_list-transf_bin = 'X'.
  t_packing_list-head_start = 1.
  t_packing_list-head_num   = 1.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
  t_packing_list-doc_type   =  ld_format.
  t_packing_list-obj_descr  =  ld_attdescription.
  t_packing_list-obj_name   =  ld_attfilename.
  t_packing_list-doc_size   =  t_packing_list-body_num * 255.
  APPEND t_packing_list.
* Add the recipients email address
  CLEAR t_receivers.
  REFRESH t_receivers.
  t_receivers-receiver = ld_email.
  t_receivers-rec_type = 'U'.
  t_receivers-com_type = 'INT'.
  t_receivers-notif_del = 'X'.
  t_receivers-notif_ndel = 'X'.
  APPEND t_receivers.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
            sender_address             = ld_sender_address
            sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers
       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.
* Populate zerror return code
  ld_error = sy-subrc.
* Populate zreceiver return code
  LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
  ENDLOOP.
ENDFORM.
*&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
*       Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
  WAIT UP TO 2 SECONDS.
  SUBMIT rsconn01 WITH mode = 'INT'
                WITH output = 'X'
                AND RETURN.
ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
*&      Form  POPULATE_EMAIL_MESSAGE_BODY
*        Populate message body text
form populate_email_message_body.
  REFRESH it_message.
  it_message = 'Please find attached a list test ekpo records'.
  APPEND it_message.
endform.                    " POPULATE_EMAIL_MESSAGE_BODY

Similar Messages

  • When I had my old blackberry connected to my computer, all incoming emails were routed to my outlook so I did not get mails on my blackberry.  How do I get it so my iphone4 does not receive emails when connected to my computer?

    I am getting my iphone inbox bombarded so would like it to not receive emails when connected to my computer.  My old blackberry had an app that took care of this which worked really well.  Am wondering if I can do the same with my iphone4.

    Blackberries were/are able to do that with some types of e-mail accounts because the mail is routed to an intermediary (BlackBerry Service).
    There is no equivalent for the iPhone as the phone communicates directly with the mail servers and does not go through a 3rd party.

  • My Iphone 4 will not receive email when connected to wifi,works fine on 3G

    My Iphone will not receive emails when connected to wifi,works perfect on 3G

    Arrr I have this prob to and this has been driving me made i thought it was a network area have changed providers brought different sim cards to get new numbers deleted everything off my iphone to reset it and still no luck..
    After reading your comment it has actually been since I have updated my phone.
    I have to turn off my phone everyday as I fly and i need to recieve messages when my phone is turned on if this isnt resolved quickly I am going to have to switch from Apple but I dont want to...
    Apple can you please advise if this is going to be sorted asap? Alot of people dont turn there phones off all of the time so wont notice however for those of us that do and have to this is a really HUGE ERROR that needs your QUICKEST ATTENTION !
    Thanks ;-D

  • Exchange stops receiving SMTP emails when sending large amount of invoices.

    We have an exchange server and a computer with an invoicing program loaded on it. At various times of the month, the invoicing program will go through our database and generate email invoices. The problem comes when we try to send them all at once. (Roughly
    800 invoices) Each email is slightly different and each email only has one destination, but if we try to send more than about 50 at a time the exchange server will receive the first roughly 100 (amount varies) and then not receive the rest though the sending
    app says all messages were sent. I'm sure the issue lays with exchange because we used a simple free smtp mail server program for testing and it received them all without issue.  Is there a place where you set how many SMTP messages the server will
    accept in a single session/connection?  Looking at the queue I can also see that the messages arrive one after another at roughly 2-3 second intervals.  Any help would be greatly appreciated.

    I would check Message Throttling on the Exchange server.  Specifically the Set-ReceiveConnector settings for MaxInboundConnectionPercentagePerSource
    and MaxInboundConnectionPerSource.
    http://technet.microsoft.com/en-us/library/bb232205(v=exchg.150).aspx

  • Mail not receiving emails but sending them ok. It says updated at 11:28 but that was six hours ago and it won't update.

    my Mail is not receiving on my iPad but is sending fine.  Emails are sent and received fine on my iPhone and when accessing the account directly through safari.  It says updated at 11:28 but that was six hours ago and it is stuck there.
    i have tried restarting multiple times  with no luck.

    Have you tried signing out of your Mail account and then back in again?
    Cheers,
    GB

  • PSE11: unable to customize note in email when sending photo attachments. [was: CT]

    When sending email photo attachment in Windows version of PSE11, it won't let me write my own note in the email as it is supposed to.  How do I fix this?

    Yes, that is a problem in that version of the Adobe Email client.
    A workaround is this:-
    Open Notepad and type the text into that
    Select all the text in Notepad and use Ctrl & C to copy it to the clipboard
    Switch to the new mail message
    Select all the text to be overwritten and use Ctrl & V to paste the contents of the clipboard over the old text.
    I prefer switching to using Windows Live Mail.
    Brian

  • IMAP mail account is not receiving emails, but sending.

    I set up an IMAP mail account 2 years ago and was working properly. But a week or so ago it stopped receiving emails, but it sends out emails. I reentered my password, deleted and recreated the account but nothing changes. Can anyone help?
    Thanks.

    I received email at 9:30 am then again at 11:35 EST (I am in SouthEastern PA)  Is your mailbox size anywhere near the limit?
    If a forum member gives an answer you like, please give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem. Thanks !!!
    http://forums.verizon.com/t5/Verizon-net-Email/Fix-for-Missing-Inbox-sent-folders-etc-with-Internet-Explorer-11/m-p/647399

  • Not receiving emails when assigning a user a task

    Hello friends,
    I am attempting to figure out what I am missing in my configuration here...
    I have a SP2013 site where I added the out of the box task application. When I go to assign a task to an end user, the end user never receives an email informing them that a task has been assigned.
    I believe email is setup correctly because when the site is shared with the same end users an email is sent / received informing the end user they have been granted access to the site in question...
    any thoughts on what I have misconfigured?
    thank you in advance

    Hi,
    As for the incoming settings, not all lists support incoming emails. You could go to Document library settings and see if incoming email setting exist under Communication.
    I’d like to collect more information about the issue. What OOB task application are you using? Did you mean OOB workflow on SharePoint 2010 platform? Does the alert work for the list?
    Please confirm the following for the issue workflow:
    In the start options, try checking Creating a new item will start this workflow.
    In the Approvers box, try only adding one user with mailbox enabled.
    In the Request box, type “Request for the list”
    Regards,
    Rebecca Tu
    TechNet Community Support

  • IPhoto not launching email when sending photos

    After I select photos to email in iPhoto, I hit the email icon and a new email screen doesnt pop up anymore. It used to launch it correctly w/ the photos attached but it has stopped. Does anyone have any suggestions?

    Mary:
    Welcome to the Apple Discussions. Have you checked iPhoto's preferences to make sure there's an email application selected? If there is and it's not working, close iPhoto and delete the iPhoto preference file, com.apple.iPhoto.plist, located in your User/Library/Preferences folder. Next run Disk Utility and repair disk permissions. Then launch iPhoto and reset your preferences, including the email selection.
    OT

  • TS3276 why can I sometimes not receive emails after sending pictures/attachment?

    What is the function of 'recovered messages?  Sometimes I can't delete them and as long as they remain, I can't receive any other messages.

    Hello Michael Levin
    There are multiple options when saving attachment and I have highlighted them below.
    Mail (Mountain Lion): View, save, and delete attachments
    http://support.apple.com/kb/PH11771
    Save an attachment
    Do one of the following:
    In the message header area, click Details, and then click Save. Choose an attachment or Save All, and then specify where to save the attachments.
    Choose File > Save Attachments and select a location.
    Drag the attachment to your desktop to save it there.
    Regards,
    -Norm G.
    <Edited by Host>

  • Processing of large number of records using JDBC Sender Channel

    Hi experts,
    We have a JDBC-File scenario where in the tables contain about 500K records on an average.
    I used multimapping to generate a flat file for every 10K. The problem is ..when I start the JDBC Sender CC, the memory goes up and the J2EE engine restarts. In the Sender CC, I gave the Disconnect from the database option too. The query is SELECT * from TABLE and the Update statement is <TEST>. Please help me out how to solve this.
    Regards.

    Hi
    Use the below query,
    // Oracle
    SELECT Statement :      select colname from tblname where rownum<=1000 ;
    // MSSQL
    select top 1000 colname from tblname
    Regards
    Ramg

  • OWA is not receiving emails // SBS 2003

    Hi Guys!
    I have a following problem on my SBS 2003 Server, I do not receive emails when I access my mailbox with Outlook Web Access from home or any remote location. But if the outlook on my workstation is left on it is ok, mails are popping up right away on the
    OWA too.
    It was working great for me for many years.
    I looked over the internet but nothing seemed to help yet...
    I deleted and then created new .ost file, I have cashed mode switched off, I deleted forwarding rule that I had to my private account.
    Do you have any ideas what might cause this?
    Any help would be appreciated!

    Most interesting. From the sound of it your Outlook is somehow set to trigger the release of mail into the Exchange server, which I have never seen. Whether SMTP or POP3, mail should arrive at the Server and OL or OWA are just "windows" or "periscopes" to
    allow viewing.  Is it possible that your Outlook is popping for the mail and the default mailbox is the Exchange server? 
    For your home copy of OL, consider Outlook Anywhere instead of VPN.  VPN's are old school and expose your business network to any nastiness that creeps into your remote systems.  You will find instructions on the RWW landing page.
    For SMTP... you should have a static IP at the office, forward port 25 from your edge device/firewall/router to the ip of your SBS, then change your MX record at your public DNS host to point to your public IP (some use A records for the IP and the
    MX points to the A record, some use IP numbers, check with your DNS host), then run the CEICW wizard specifying SMTP mail.
    As for mail getting lost or something going wrong.... yes it can.  But so can POP3.  Historically there have been more issues with POP3 than SMTP.  Consider that only the smallest of the organizations would use POP3, that every business larger
    than those in the SBS space uses SMTP and you get the idea.  SMTP is "store and forward", meaning if your system is off line for some little time the mail will still come.  Usually it will not be returned to sender for about 48 hours, which is sufficient
    time to get the SBS back on line or to change the MX record back until it is.  There are also web services that will act as backup mail servers and hold your mail, some that will allow "Web Mail" access to it, and some that will do both and are very low
    cost or even free.
    Larry Struckmeyer[MVP] If your question is answered please mark the response as the answer so that others can benefit.

  • Best way to delete large number of records but not interfere with tlog backups on a schedule

    Ive inherited a system with multiple databases and there are db and tlog backups that run on schedules.  There is a list of tables that need a lot of records purged from them.  What would be a good approach to use for deleting the old records?
    Ive been digging through old posts, reading best practices etc, but still not sure the best way to attack it.
    Approach #1
    A one-time delete that did everything.  Delete all the old records, in batches of say 50,000 at a time.
    After each run through all the tables for that DB, execute a tlog backup.
    Approach #2
    Create a job that does a similar process as above, except dont loop.  Only do the batch once.  Have the job scheduled to start say on the half hour, assuming the tlog backups run every hour.
    Note:
    Some of these (well, most) are going to have relations on them.

    Hi shiftbit,
    According to your description, in my opinion, the type of this question is changed to discussion. It will be better and 
    more experts will focus on this issue and assist you. When delete large number of records from tables, you can use bulk deletions that it would not make the transaction log growing and runing out of disk space. You can
    take the table offline for maintenance, a complete reorganization is always best because it does the delete and places the table back into a pristine state. 
    For more information about deleting a large number of records without affecting the transaction log.
    http://www.virtualobjectives.com.au/sqlserver/deleting_records_from_a_large_table.htm
    Hope it can help.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • New ISP - not receiving email

    I have a relative with an eMac running 10.3.9. She recently switched to a new ISP and is not receiving email in Mail. She has to use web mail to retrieve it. Sent mail goes out ok from Mail, web-surfing works. She revised the account information in the previous email account in Mail, typing in the new email address, password and server info. I believe the problem is that she should create a new email account in Mail and disable the old account (archive and delete). Any ideas to resolve the incoming email issue? I will try my idea tonight and report whether it works or not.

    Hi RarelyDan,
    Welcome to the Apple Discussion forums!
    You may wish to try the troubleshooting tips found in Apple's Mail Help:
    "If you can't receive email, try the following:
    ▪ Send yourself a test email. The mail has to go out through your outgoing mail server and back into your incoming mail server. This is a good basic test of your account and server information.
    ▪ Make sure your computer can perform other Internet tasks, such as opening a webpage. If not, choose Apple menu > System Preferences and click Network. Choose Network Status from the Show pop-up menu. A green dot indicates that you are connected to the Internet or a network. If you aren't connected, go to the Finder and choose Help > Mac Help, then search for "Connecting to the Internet."
    ▪ Choose Mail > Preferences and click Accounts. Verify your account name and password. Your account name will usually be either your email address ([email protected]) or the part of your email address to the left of the "@" (tclark3). If your Internet service provider (ISP) lets you access your email via a web browser, you may be able to verify your name and password there. If the same information does not work using a web browser or your ISP doesn't offer a web-based mail option, confirm your user name and password with your ISP or network administrator. Remember to type your email password, not your Mac OS X user account password or ISP password (if different).
    ▪ Find out if you can reach your incoming mail server from your computer. Open Network Utility, located in Applications/Utilities, and click Ping. Ping is a simple network testing tool that shows whether a server computer is running and can be reached from your computer. Type the mail server name (such as mail.mac.com) or IP address in the address field, and click Ping. If you see 10 repeating lines, then the server can be reached. If you see a message such as "ping: unknown host bogus.apple.com," then the server is either down or unreachable.
    ▪ Mail works with the following account types: POP, IMAP, .Mac, and Exchange (only if configured as an IMAP server). You can't log in directly to Hotmail, AOL, or any service that does not support POP or IMAP access, and retrieve email using Mail.
    ▪ If you have an IMAP account, it may be placed "offline" if Mail can't access it. Choose Mailbox > Online Status. If you see the choices Go Online or Take Account Online, connect to the Internet, and then choose Mailbox > Online Status > Go Online.
    ▪ Make sure there is no firewall software blocking email traffic. A firewall works by selectively blocking network traffic. Mac OS X has a built-in firewall, which you turn on and off using the Sharing pane of System Preferences. Open System Preferences and click Sharing, then click Firewall. Make sure your firewall is off.
    ▪ You may be affected by another firewall, either software installed separately from Mac OS X or built into an Internet sharing router, or administered by your ISP or network administrator. Contact the appropriate person to find out whether a firewall may be in place.
    ▪ If you have changed options (such as Use SSL or Authentication) in the Advanced pane of your email account preferences, check with your ISP or system administrator for the correct settings."
    post back if still no luck or you have additional questions or comments,
    LS

  • I am not receiving text when they are sent to my phone number , I do receive them when they are se to my email address . Any thoughts

    I am not receiving text when they are sent to my phone number , I do receive them when they are se to my email address . Any thoughts

    Alll I can say is try to reset your iphone like, taking out the sims card. ALso try loging out of your Facetime and your email on your phone, telll me if that works, and did you try connecting Apple Support Team?

Maybe you are looking for