SO_NEW_DOCUMENT_ATT_SEND_API1 Error (Email not received)

Hi all,<br><br>
I am using following code just to send out an email to Users Notifying that Directory is Not empty. No attachment is required.
<br><br><pre>
data: p_file type salfile-longname.
data: ifile type table of  salfldir with header line.
data: lt_mailrecipients  type standard table of somlrec90 with header line,
      lt_mailtxt         type standard table of soli      with header line,
      lt_attachment      type standard table of solisti1  with header line,
      lt_mailsubject     type sodocchgi1,
      lt_packing_list    type standard table of sopcklsti1 with header line,
      gv_cnt             type i.
data: v_spool          like tsp01-rqident.
p_file = '/usr/sap/tmp'.
call function 'RZL_READ_DIR_LOCAL'
  exporting
    name            = p_file
  tables
    file_tbl        = ifile
  exceptions
         argument_error = 1
         not_found      = 2
         others         = 3.
if ifile[] is initial.
  write: 'Empty'.
elseif ifile[] is not initial.
  lt_mailrecipients-rec_type  = 'U'.
  lt_mailrecipients-com_type  = 'INT'.
  lt_mailrecipients-receiver  = '*******''.
  append lt_mailrecipients.
  clear lt_mailrecipients.
  lt_mailtxt = 'Hi How are you'.
  append lt_mailtxt. clear lt_mailtxt.
  lt_mailtxt = 'direcory not empty'.
  append lt_mailtxt. clear lt_mailtxt.
  lt_mailsubject-obj_name     = 'MAILATTCH'.
  lt_mailsubject-obj_langu    = sy-langu.
  lt_mailsubject-obj_descr    = 'You have got mail'.
  lt_mailsubject-sensitivty   = 'F'.
  call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
      document_data              = lt_mailsubject
      put_in_outbox              = 'X'
      commit_work                = 'X'
    tables
      packing_list               = lt_packing_list
      contents_bin               = lt_attachment
      contents_txt               = lt_mailtxt
      receivers                  = lt_mailrecipients
    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 eq 0.
    commit work.
    write: 'Non Empty'.
    submit rsconn01 with mode = 'INT' and return.
  endif.
endif.</pre><br><br>
The code runs fine without any error and writes "Non empty" as output but no email is received. We also have "INT - Internet" configured in SCOT, which shows no request.<br>
Please let me know if anything more needs to be configured.<br><br>
Thanks<br><br>
Diksha.<br><br>
<br><br><br><br> Edited by: Matt on Nov 4, 2009 7:58 AM - fixed formatting

Hi all,
Thanks for your help. I really appreciate it.
Here is my code which works.
*& Report  ZBW_KHALIX_BI_CHECK_PRG
report  zbw_khalix_bi_check_prg.
data: p_file type epsf-epsdirnam.
data: ifile type table of epsfili with header line.
data: lt_mailrecipients  type standard table of somlrec90 with header line,
      lt_mailtxt         type standard table of soli      with header line,
      lt_attachment      type standard table of solisti1  with header line,
      lt_mailsubject     type sodocchgi1,
      lt_packing_list    type standard table of sopcklsti1 with header line,
      gv_cnt             type i.
data: v_spool          like tsp01-rqident.
data: oref type ref to cx_root.
data text type string.
p_file = '/userdata/home/bw_outbound1/temp'.
try.
    call function 'EPS_GET_DIRECTORY_LISTING'
      exporting
        dir_name               = p_file
      tables
        dir_list               = ifile
      exceptions
        invalid_eps_subdir     = 1
        sapgparam_failed       = 2
        build_directory_failed = 3
        no_authorization       = 4
        read_directory_failed  = 5
        too_many_read_errors   = 6
        empty_directory_list   = 7
        others                 = 8.
  catch cx_root into oref.
    text = oref->get_text( ).
endtry.
if ifile[] is initial.
  write: 'Empty'.
elseif ifile[] is not initial.
  lt_mailrecipients-rec_type  = 'U'.
  lt_mailrecipients-com_type  = 'INT'.
  lt_mailrecipients-receiver  = '*****'.
  append lt_mailrecipients.
  clear lt_mailrecipients.
  lt_mailtxt = 'Hi How are you'.
  append lt_mailtxt. clear lt_mailtxt.
  lt_mailtxt = 'direcory is not empty'.
  append lt_mailtxt. clear lt_mailtxt.
  lt_mailsubject-obj_name     = 'MAILATTCH'.
  lt_mailsubject-obj_langu    = sy-langu.
  lt_mailsubject-obj_descr    = 'You have got mail'.
  lt_mailsubject-sensitivty   = 'F'.
  lt_packing_list-transf_bin  = space.
  lt_packing_list-head_start  = 1.
  lt_packing_list-head_num    = 0.
  lt_packing_list-body_start  = 1.
  lt_packing_list-body_num    = lines( lt_mailtxt ).
  lt_packing_list-doc_type    = 'RAW'.
  append lt_packing_list. clear lt_packing_list.
  call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
      document_data              = lt_mailsubject
      put_in_outbox              = 'X'
      commit_work                = 'X'
    tables
      packing_list               = lt_packing_list
      contents_bin               = lt_attachment
      contents_txt               = lt_mailtxt
      receivers                  = lt_mailrecipients
    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.
  case sy-subrc.
    when 1.
      write: / 'No authorization for sending to the specified number',
      'of recipients'.
    when 2.
      write: / 'Document could not be sent to any recipient'.
    when 4.
      write: / 'No send authorization'.
    when 5.
      write: / 'Parameter error'.
    when 6.
      write: / 'x_error'.
    when 7.
      write: / 'enqueue error'.
    when 8.
      write: / 'Error occurred while sending'.
  endcase.
endif.
Can anyone tell me if we can create a .txt file through ABAP?
Thanks
Diksha
Edited by: Diksha Chopra on Nov 4, 2009 8:08 PM

Similar Messages

  • Change domain of the email not received email from apple

    update my ipad 2 and  then ask activate, im loss my id and password change domain of the email not received email from apple I can not activate my ipad please help, my little girl put false  information fuel the only thing certain email

    If you're using the tell a friend tag ({tag_tellafriend}) you can modify the subject of the email that is sent out by Site Manager > System E-mails > Tell-a-Friend.
    If you're not using this, please let us know how eaxactly you're achieving this functionality.

  • Apple ID verification email not received - anybody have latest / newer fix?

    Apple ID verification email not received - anybody have latest / newer fix?

    Check the following:
    1. Spam folder
    2. Junk folder
    3. Rescue email

  • Mail POP outgoing emails not received (seemingly random) - Experts needed!

    Please, please help...
    I'm having a very strange, very frustrating problem that I believe comes down to the Mail application on my Mac. I am running Snow Leopard (10.6.4) and using three email accounts I access through Mail via POP, and have done so without a hitch for years.
    Recently, friends and colleagues alerted me to the fact they have not been receiving emails I've sent. Emails that appear in my Sent box. It seems that some people have received ALL emails I've sent them, some people have received SOME but not ALL emails I've sent, and other people have received NONE of the emails I've sent them in the past couple of months (this I only discovered a few days ago, much to my dismay).
    I can see no pattern to which emails have and have not been received. It appears to be occurring across the three separate accounts, and with different outgoing mail servers. This is what leads me to believe the problem lies with Mail, and not the servers themselves, though I may be wrong. I cannot tell which emails have not been received, and can no longer trust that emails I send will end up at their intended destination.
    I cannot find any information on this kind of problem. Please help me. I'm desperate, and at a complete loss!!
    P.S. I just sent some test emails to a friend using different combinations of my three email accounts and outgoing servers. Two of the emails were not received, each sent via different outgoing servers (and different accounts). However, all the emails appear in my Sent box.

    Hello, and welcome to the Discussions.
    This sort of random experience seems likely to be caused by the use of Rich Text Format. To test this, take a previously sent email that a friend did not receive, click on Message/Send Again, then click on Format/Make Plain Text, and then resend it. If they now receive, it is likely the RTF when it converts to a form of HTML is triggering a SPAM filter somewhere in the path to this recipient, and blocking the message.
    Ernie

  • Email not received and email delayed

    My friends tell me that they have sent messages to me that I have not received. The messages bounce back to the sender.  Some messages get through but are delayed as much as 18 to 36 hours.  Sometimes senders will send a message to my wife and me (both @verizon.net)  and only only one of us will receive it.  The sender with the most problems getting their email to us has a @yahoo.com account.  This has been going on for a few weeks.  The problem is the same whether reading messages on webmail, my computer or my iPhone.  What is the problem and how can it be fixed?

    I had been in touch with customer support from east to west coast's and very few supervisors are aware of this. One recent week ago, a high level support person said the servers are too few and they are designing and planing to upgrade them but without any complete date. So, the reply was, maybe a few months or a year.
    For the time being, they are throttling email speeds to 1.5 down/1.5 up on webmail at all times and via email client software (outlook etc) it will vary depending on time of day. Faster at night, slower in daytime or business hours.
    I believe this is decieving to all customers as I'm sure no one is getting any discount on their Fios Internet billing. I have asked for credits however, trouble tickets need to be generated first to make it easy for billing to verify there is a tech issue filed/pending on your account.  I have at least 100 hours of phone time and loss of capacity when it comes to my work due to very slow email speeds, something I rely on for my business. I really don't want to creat a gmail account that is free but unsupported however, will send and recieve emails perfectly fast. Did I mention that was free?  Verizon is charging a portion of the total ISP fee's for their email and news but can't deliver since September 2012.
    All I can say is, send written letters to the CEO of Verizon, Lowell C. McAdam:
    http://about.verizon.com/index.php/about/leadership-team/mcadam

  • CUP-Password Self Service-Email not received by user

    Hi,
    I confidured SMTP server with Mail server information.
    I raised a request for Password Self-service for a User.
    Request executed successfuly with a message " Password was reset and send to email id of user"
    Password in backend system has reset successfully,
    but No Email has received by user regarding reset PW.
    What si the problem, why the user not received email? even in CUP it shows that email sent successfully.

    Hi,
    Yes i scheduled email dispatcher.
    Now Email is received by the user.
    User received a link for password, when user click on that a blank page with header Password is displayed.
    no other information is appearing.
    Thanks
    Ram.

  • Apple gift card email not received (not iTunes). How do I resend?

    I sent an email Apple gift card but the person has not received it. I have received a confirmation and invoice and the money has been debited from my account. I can find links to resend iTunes vouchers but not Apple. How do I do this?

    ?? I don't know how to resend it. I can only find iTunes links not apple store gift card links

  • Re: Verification Emails - Not receiving

    I'm having the same problems.
    1) BestBuy.com not recognizing the account I've had for years.
    2) Trying to use Password Reset - not receiving any verification emails.
    Please help.

    Hello MGALLA13,
    Shopping on BestBuy.com should be a fun and painless experience, and not being able to sign in to your account would definitely cut into that joy. While our recent security requirements have been implemented rather successfully, it sounds like it may have inadvertently caused some issues with your password and I sincerely regret any inconvenience this has caused!
    In these instances, there are a series of steps we suggest performing which should help alleviate the issue you’re having with your password reset. Using your email address on file for the forums, I have located your BestBuy.com account and have initiated a password reset from our end and a link will be sent to your email. Please perform these actions, in order, prior to visiting the reset link in your email:
    Log out of your BestBuy.com account completely
    Delete your browser history, cache, and cookies
    Visit the password reset link in your email (please be sure to check your spam folder)
    Create a new password that fits the accepted criteria (use a password you’ve never used before)
    Logout of your account as it will log you in automatically after creating the new password
    Wait 5-10 minutes and then attempt to login to your account
    After performing these steps, you should be able to successfully access your account! If not, please let me know and I’ll happily assist further.
    Sincerely,
    John|Social Media Specialist | Best Buy® Corporate
     Private Message

  • ITunes Account Verification Email Not Received

    I tried setting my itunes account up, but have not been sent my account verification email. I've checked my spam folder and have clicked on resend verification email - within itunes - 6 times now, but still nothing. It has been 24 hours since trying to set it up, and I have a gift card entered into that account which I cannot use. Please help, as this is pretty annoying.
    Thanks in advance.

    Hi Danielleg1990,
    Welcome to the Apple family! If you have not received the verification email, let's try resending it:
    Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    How to verify the primary email address for your Apple ID
    When you first create an Apple ID (using your email address) a verification email will be sent to that address. If you sign in to your Apple ID from the link in that email, the email address will be verified as the primary email address for your Apple ID. You can also resend the email verification if the email address is not verified:
    1. Sign in to My Apple ID to manage your account information.
    2. Click Resend under Primary Email Address.
    3. Verify your changes by following the link in the email you will receive from Apple and signing back in to your account.
    Cheers!
    Matt M.

  • Verificati​on email not received

    Hello,
    When I try to log into my account on bestbuy.com, it says I need to verify my account. I've tried to log in a few times, but I never get an email. The email address with my best buy account is the same email with this account. I've checked the spam folder, and haven't seen it there either.
    Thanks,
    Dan

    Greetings Dan,
    Thank you for taking the time to sign up for the forum and connect with us.
    Are you not receiving the verification code needed to login to BestBuy.com or the verification email needed to link a BestBuy.com account to a My Best Buy™ account?  I am not showing that your accounts are currently linked, so I have a feeling it is the verification email.  A potential reason why you are not receiving the email is because the information being entered on BestBuy.com does not match what we have on file.  Please send me a private message with the information listed below, by clicking on the blue button in my signature, and I will make sure everything is up-to-date.
    Name
    Phone #
    Mailing address
    Email address
    How to Link a My Best Buy™ membership to your BestBuy.com Account
    I hope you have a wonderful day!
    Derek|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Microsoft Exchange sending emails not receiving for a user

    I have a Windows Server 2003 Enterprise Edition SP2 we are using as our exchange server. One user that has been working fine for years all of sudden can send emails but not receive any emails.  I have checked outlook settings, use the HTML direct connection
    to the user in the same network I can access his email and send emails from either source but not receiving emails from anywhere. Can someone please advise thanks
    We have many users working just fine including myself. Just one of the users which had been working fine for years all of sudden stopped receiving emails. 

    Hi Luis,
    " use the HTML direct connection to the user in the same network I can access his email and send emails from either source but not receiving emails from anywhere. "
    1) Do you mean that you logged on the mailbox via OWA but still can not see the received emails ?
    2) Just only this user , the others are working well ?
    3) Did try to send an email from the same server to this issue account ,still can not receive it ?
    4) Please try to send an email from an "external" mailbox , if the email can not achieve the target mailbox , the "external " mailbox should receive an NDR email  come with  some useful infomation .
    Also please open event log to check if there is any useful infomation .
    As for this issue , you may get more accurate assistance in the exchange forum:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home?category=exchangeserver
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Unable to access BB ID or reset password (email not received to email ID)

    BB ID inaccessable (email address recognised asks correct reset Question) but do not receive password reset email in googlemail account....when trying to recreate indicates that it already exists.......in a loop any next step I can try????

    Hello Ayres_G
    Welcome to BlackBerry Support Forums
    Are you using any Gmail account as your BlackBerry ID or an host email account ?
    Try those KB and see if you're able to reset your BlackBerry ID password :
    KB26361  :How to change or reset a BlackBerry ID password.
    KB28232 : BlackBerry ID reset email is not being delivered to the associated mailbox
    KB28685 : How to reset the BlackBerry ID password using the password recovery question
    Or let us know .
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • TS4268 Verification email not received to activate FaceTime from additional gmail accounts on ipad. I have checked the spam folders and tried sending the activation email from my Mac as well but I'm still not getting them.

    I'm not receiving the verification email to activate two additional gmail addresses for Facetime on my ipad air. I have been trying for over a week and the emails are not in my spam or junk folders. I have also logged into my Apple id from my Mac and tried to verify from there but I'm still not receiving the verification emails. Anyone know how to resolve this please?

    In Mail Preferences/Accounts/each GMail account, set up the SMTP Outgoing Server for each account separately, going into SMTP name/edit/Advanced and specify the Username of each account.  The Outgoing servers must be two different servers, authenticated by the Username and Password of each.
    Otherwise, the GMail SMTP server will change the from address to that of the account where the SMTP server was setup.
    Ernie

  • ICloud emails not received

    Hi,
    I am experiencing 2 types of issues with my iCloud mailbox for the past +/- 1 week.
    1. Some emails sent to my iCloud account are received on my iOS devices as well as on iCloud.com but not in OSX Mail.
    It appears it affects messages randomly as OSX Mail is perfectly synced with iCloud.com for all the other messages (before and after). Tried to sync accounts manually, it didn't change anything.
    2. More generally, I realised that a few messages sent to my iCloud account (main email or aliases) are not being delivered to me on any of my devices.
    Having people asking why I don't reply emails... Or me asking people why they don't reply my emails...
    Although I have never received any email and/or people have actually replied to me...
    Their messages are not being delivered to any sub-folder mailbox or junk (I checked).
    Any insight would be appreciated.
    Thanks
    Chak

    Just had a chat with apple support and my point 1 has been solved doing the following :
    1. backup to time machine
    2. turn off iCloud (in system preferences > iCloud > sign out)
    3. during the signing out process keep as many things as you can on your mac
    4. sign in again
    It forced a complete re-sync of Mail and it pulled back the missing emails in.
    My second point about emails not being delivered at all remains.
    Hope this helps
    Chak

  • Emails not receiving.

    Hi can anyone help please.
    I have a sub account that will not receive any incoming emails since the beginning of this year. I can send email out but just not receiving any .
    Main account is ok.
    The runner

    Hi therunner,
    Welcome to the forum.  Are you using an email client or logging into webmail to view you emails?
    Thanks
    Neil
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

Maybe you are looking for