Can any one tell me how to send Body in Email

Hi,
I have a internal table which contain information
Dear Sir,
pls find attached file.
Thanks and Regards
chandra
I want to send  that message with attached PDF file,
my PDF file is going as a attached format if email address is maintained in Customer master table.
Regards
Chandra.

Hi chandrashekar,
DATA:
I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE  TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1  OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1  OCCURS 0 WITH HEADER LINE.
DATA:
  W_OBJHEAD TYPE SOLI_TAB,
  W_CTRLOP TYPE SSFCTRLOP,
  W_COMPOP TYPE SSFCOMPOP,
  W_RETURN TYPE SSFCRESCL,
  W_DOC_CHNG TYPE SODOCCHGI1,
  W_DATA TYPE SODOCCHGI1,
  W_BUFFER TYPE STRING.
DATA:
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    FORMNAME           = '  '
  IMPORTING
    FM_NAME            = V_FORM_NAME
  EXCEPTIONS
    NO_FORM            = 1
    NO_FUNCTION_MODULE = 2.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION '/1BCDWB/SF00000482'
  EXPORTING
    CONTROL_PARAMETERS = W_CTRLOP
    OUTPUT_OPTIONS     = W_COMPOP
    USER_SETTINGS      = 'X'
  IMPORTING
    JOB_OUTPUT_INFO    = W_RETURN
  EXCEPTIONS
    FORMATTING_ERROR   = 1
    INTERNAL_ERROR     = 2
    SEND_ERROR         = 3
    USER_CANCELED      = 4.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
  EXPORTING
    FORMAT                = 'PDF'
    MAX_LINEWIDTH         = 132
  IMPORTING
    BIN_FILESIZE          = V_LEN_IN
  TABLES
    OTF                   = I_OTF
    LINES                 = I_TLINE
  EXCEPTIONS
    ERR_MAX_LINEWIDTH     = 1
    ERR_FORMAT            = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF           = 4.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT I_TLINE.
  TRANSLATE I_TLINE USING '~'.
  CONCATENATE W_BUFFER I_TLINE INTO W_BUFFER.
ENDLOOP.
TRANSLATE W_BUFFER USING '~'.
DO.
  I_RECORD = W_BUFFER.
  APPEND I_RECORD.
  SHIFT W_BUFFER LEFT BY 255 PLACES.
  IF W_BUFFER IS INITIAL.
    EXIT.
  ENDIF.
ENDDO.
REFRESH :
  I_RECLIST,
  I_OBJTXT,
  I_OBJBIN,
  I_OBJPACK.
CLEAR W_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
I_OBJTXT = 'Find attached the output of the smartform.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'Sravanthi'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
W_DOC_CHNG-OBJ_NAME = 'Smartform'.
W_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10 .
W_DOC_CHNG-OBJ_DESCR  = 'Smart form output'.
W_DOC_CHNG-SENSITIVTY = 'F'.
W_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 1.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE  = 'PDF'.
I_OBJPACK-OBJ_NAME = 'Smartform'.
CONCATENATE 'smartform output' 'pdf'
INTO I_OBJPACK-OBJ_DESCR.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = ' '.---------------> email id
I_RECLIST-EXPRESS  = 'X'.
I_RECLIST-REC_TYPE  = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
  EXPORTING
    DOCUMENT_DATA              = W_DOC_CHNG
    PUT_IN_OUTBOX              = 'X'
    commit_work                = 'X'
  TABLES
    PACKING_LIST               = I_OBJPACK
   CONTENTS_BIN                = I_OBJBIN
    OBJECT_HEADER              = W_OBJHEAD
    CONTENTS_TXT               = I_OBJTXT
    RECEIVERS                  = I_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.
      WRITE:/ 'Error When Sending the File', sy-subrc.
    ELSE.
      WRITE:/ 'Mail sent'.
    ENDIF.
After exceuting this program check status of the mail in the SOST   transaction.
Regards,
Sravanthi

Similar Messages

  • Can any one tell me how to send one PO to mutilple mail ids in vendor maste

    Hi Experts,
    Can any one tell me how to send one PO as a mail to multiple vendors who are all maintained in my vendor master record
    Suppose I have 3 mail ids in my Vendor master record and I created a PO with that vendor, will that PO goes to all the three mail ids maintained in the vendor master record  or only to one ?
    Inorder to send to multiple mail ids, Do we need to do any configure any thing in SPRO settings functionally, if so where we have to maintain?
    Or shall an Abaper needs to maintain a code for that.?
    Please suggest me, I would appreciate your feed back.
    Best Regards,
    Sairam

    Go to XK02 enter the vendor code
    go to the communication tab
    Email will be there press the ---> button
    you can add many Emails in the list.
    Please ensure that the  message output is configured by
    the  SAP BASIS team
    No need of any configuration
    G.Ganesh Kumar

  • Can any one tell me how to change or know rescue email?

    Can any one tell me how to change or know rescue email?

    There are instructions on this page on how to see/edit/add it :
    Navigate to appleid.apple.com using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    Note: The option to send an email to reset your security questions and answers will not be available if a rescue email address is not provided. You will need to contact iTunes Store support in order to do so. 
    After you've validated your identity by correctly answering your security questions, click Edit to the right of your rescue email address.

  • TS4268 Can any one tell me how my husband and I can stop receiving text messages sent to him on my phone?

    Can any one tell me how my husband and I can stop receiving text messages sent to him on my phone? His text messages to me are showing up under my number, like he is me?

    Go to settings, messages, send and recieve, scroll to where it says start new conversation from, and make sure you each have a different email address checked instead of the same email address.

  • Can any one tell me how can I move to a different folder pictures, that I've cloned, without them staying aggregated? They all come together to the other folder and I don't want that- thanks

    Can any one tell me how can I move to a different folder pictures, that I've cloned, without them staying aggregated? They all come together to the other folder and I don't want that… thanks

    There's more to it than that.
    Folders in Aperture do not hold Images.  They hold Projects and Albums.  You cannot put an Image in a Folder without putting it in a Project or an Album inside that Folder.
    The relationship between Projects and Images is special:  every Image must in a Project, and can be in only one Project.
    Images can be in as many Albums you want.  Putting an Image in an Album does not move it from the Project that holds it.
    You can make as many Versions from a Master as you want.
    What you want to do may appear simple to you, but it still much adhere to how Aperture works.  I still can't tell exactly what you are trying to do (specifically: Images don't live in Folders; moving an Image from a Folder is non-sensical).
    It can be very confusing (and frustrating) to get going with Aperture -- but it does work, and can be enormously helpful.  If you haven't, take a look at the video tutorials on Apple's Aperture support site.
    I feel as though I haven't helped you much -- but we need to be using the same names for interface items in order to get anything done -- and my sense is that you still haven't learned the names of the parts.

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • Can any one tell me how to use EXISTS clause inplace of IN operator.

    Hi All,
    Can any one tell me how to use EXISTS clause AND (JC.EMPL_ID, JC.EMPL_RCD) inplace of IN operator.
    SELECT COUNT (1)
    FROM SYSADM.OHR_PERS_CURR PC
    , SYSADM.OHR_JOB_CURR JC
    WHERE PC.EMPL_ID = JC.EMPL_ID
    AND (JC.EMPL_ID, JC.EMPL_RCD) in (
    SELECT HS.EMPL_ID, HS.EMPL_RCD
    FROM SYSADM.HU_SCRTY_JOB HS, ODSHR.OHR_SCRTY_USER_CFG OS
    WHERE HS.HU_SCRTY_CFG_ID = OS.HU_SCRTY_CFG_ID
    AND OS.DB_LOGIN = USER)
    Thank you.

    SELECT COUNT (1)
    FROM SYSADM.OHR_PERS_CURR PC
    , SYSADM.OHR_JOB_CURR JC
    WHERE PC.EMPL_ID = JC.EMPL_ID
    AND EXISTS (
    SELECT null
    FROM SYSADM.HU_SCRTY_JOB HS, ODSHR.OHR_SCRTY_USER_CFG OS
    WHERE HS.HU_SCRTY_CFG_ID = OS.HU_SCRTY_CFG_ID
    AND OS.DB_LOGIN = USER
    AND HS.EMPL_ID = JS.EMPL_ID AND HS.EMPL_RCD = JC.EMPL_RCD)
    But why ?
    Rgds.

  • Can any one tell me how can i claim warranty of my my iphone charger online ?

    Can any one tell me how can i claim warranty of my my iphone charger online ?

    See the "Service -> How do I obtain service" section of this page:
    http://www.apple.com/support/iphone/service/faq/
    selecting your country as appropriate.
    Regards.

  • Can any one tell me how to write the properites files and how to acces

    can any one tell me how to write the properites files and how to acces thoose files
    plz let me no
    thanks in advance

    http://www.exampledepot.com/egs/java.util/Props.html

  • Can any one tell me how to break this into separate columns 05/13/2014,"46","48","37","70","74","1","2","121000000.0000"

    Can any one tell me how to break this into separate columns 05/13/2014,"46","48","37","70","74","1","2","121000000.0000"

    Paste your content into TextEdit. Format > Make Plain Text.
    Comand-S to save.
    Command-Click the filename at the top of the TextEdit window. Click on the second line, the name of the folder where you saved the document.
    Select the extension of the document Name in the finder window that is being displayed and replace TXT with CSV.
    Right-Click the csv file and choose Open With > Numbers.
    Numbers will open with a column for each field in your data.
    Jerry

  • Can any one tell me how to install flash player on powerbookg4.i actully uninstall it to upgrade it but now i can not install new one.it always says get flash player for powerpc when i try to install it after downloading.it is 10.5.8 version

    can any one tell me how to install flash player on powerbookg4.i actully uninstall it to upgrade it but now i can not install new one.it always says get flash player for powerpc when i try to install it after downloading.it is 10.5.8 version

    Flash Player version 10.1.102.64 is the last version available to PPC Mac users. However, this Flash version won't work for many videos on Facebook, YouTube and other sites. Adobe's latest version, 10.2.x or later, is only for Intel Macs. Adobe will not provide a newer Flash version for PPC Macs.
    The message requesting that you download Adobe Flash Player takes you to Flash Player requiring an Intel processor. Doesn't work on a PowerPC processor. I found a hack, installed it & it works with Firefox, TenFourFox & Safari.
    Download this http://www.steelbin.com/FPforFBPPC.zip to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.
    Hack Allows PowerPC Macs to Access Flash 11 Content
    http://lowendmac.com/ed/royal/12sr/flash-11-and-powerpc.html
     Cheers, Tom

  • Can any one tell me how to delete pictures on a 3G IPhone?

    Can any one tell me how to delete pictures on a 3G IPhone?

    The same way you put the there.  The sync process.
    Deselect them in itunes and sync.

  • Can any one tell me how to connect my Officejet Pro L7680 to my network

    Can any one tell me how to connect an Officejet Pro L7680 to my network

    Hi,
    Setup guide is in the following link:
      http://h10025.www1.hp.com/ewfrf/wc/manualCategory?cc=us&dlc=en&lc=en&product=2512009&
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Can any one tell me how to get rid of error code ox80010108

    can any one tell me how to get rid of error code ox80010108 when i put a dvd in my hp touchsmart 520 thanks

    Hello @charly6,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that you are getting the error 0x80010108 when you insert your CD into your Optical Drive on your HP Touchsmart 520 Desktop PC. The error you are receiving is related to Windows Essentials and I suggest that you download and install the latest version from the Windows Essentials website. I believe that Windows Essentials was aware of this error and have corrected it in their updates.
    Please re-post if you require additional support. Thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • Can any one tell me how to hide any content in nok...

    can any one tell me how to hide any content in nokia N-72
    plz help me out

    u have Sales order number and sales order item number in RESB table..
    KDAUF   Sales Order Number
    KDPOS   Item Number in Sales Order

Maybe you are looking for

  • How do I know if someone has a spy app on my phone

    How do if low I I have a spy app I my phone ?

  • Some GOOD news at last !!!!

    Hey guys...aftert all that frustration and trying to make iTunes 7.6 work and no luck I downgraded back to 7.4.3...and after downgrading I noticed a tip that I missed earlier saying to check if I have Smart Card installed...I didn't have it...and aft

  • Problem with automatic key generation

    Hi, I'm getting an exception when creating entity EJB's that use automatic primary key generation (I'm using MS SQL Server as the db). The data is being inserted correctly onto the database (including the auto generated key), but the auto generated p

  • Help! Why does Aperture automatically adjust my white balance?

    Hey, Just wondering if anybody knew why Aperture seems to want to automatically adjust the white balance settings of the RAW .NEF images I've been importing. I mean, on an example image, the in camera white balance was about 5900K with no hue adjustm

  • Bug with Flickr Upload

    Has any one else had a problem with the Flickr export will use the wrong date? It seems to be using either the modified or created date of the file at the time it was added to Aperture instead of the date that is in the EXIF info. Also this bug only