SO_DOCUMENT_SEND_API1 - Filename extension

Hi Experts,
I am using FM SO_DOCUMENT_SEND_API1 to send an excel attachment. I am passing filename 'UPDATE_LOGS' in packing list but when I check in SO01(Outbook) file name for extension is UPDATE_LOGS_YYMMDDHHMMSS.xls".
How to I correct this.Heres the code I am using.
*----Attachment details....
  DESCRIBE TABLE p_attach.
  lwa_doc_data-doc_size = ( sy-tfill - 1 ) * 255 + STRLEN( lwa_attach ).
  lwa_doc_data-obj_langu = sy-langu.
  lwa_doc_data-obj_name = 'SAPRPT'.
  lwa_doc_data-obj_descr = 'BOM Component Update ~ Explosion Type'(t07).
  lwa_doc_data-sensitivty = 'F'.
*-----Message Body & Packing List
  lwa_message = 'Please find attached a list Updated Explosion Type'(t04).
  APPEND lwa_message TO lt_message.
  CLEAR lwa_packing_list.
  REFRESH lt_packing_list.
  lwa_packing_list-transf_bin = space.
  lwa_packing_list-head_start = 1.
  lwa_packing_list-head_num = 0.
  lwa_packing_list-body_start = 1.
  DESCRIBE TABLE lt_message LINES lwa_packing_list-body_num.
  lwa_packing_list-doc_type = 'RAW'.
  APPEND lwa_packing_list TO lt_packing_list.
*-----Create attachment notification
  lwa_packing_list-transf_bin = 'X'.
  lwa_packing_list-head_start = 1.
  lwa_packing_list-head_num = 1.
  lwa_packing_list-body_start = 1.
  DESCRIBE TABLE p_attach LINES lwa_packing_list-body_num.
  lwa_packing_list-doc_type = 'xls'.
  lwa_packing_list-obj_name = c_filename.
  lwa_packing_list-obj_descr  = c_filename.
CONCATENATE c_filename sy-datum INTO lwa_packing_list-obj_name.
  lwa_packing_list-doc_size = lwa_packing_list-body_num * 255.
  APPEND lwa_packing_list TO lt_packing_list.
*---Add recivers
  LOOP AT p_adr6 INTO wa_adr6.
    CLEAR lwa_receiver.
    REFRESH lt_receiver.
    CONDENSE wa_adr6-smtp_addr.
    lwa_receiver-receiver = wa_adr6-smtp_addr.
    lwa_receiver-rec_type = 'U'.
    lwa_receiver-com_type = 'INT'.
    APPEND lwa_receiver TO lt_receiver.
  ENDLOOP.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data                    = lwa_doc_data
      put_in_outbox                    = 'X'
  sender_address                   = sy-uname
  SENDER_ADDRESS_TYPE              = 'B'
      commit_work                      = 'X'
IMPORTING
  sent_to_all                      = ''
  NEW_OBJECT_ID                    =
  SENDER_ID                        =
    TABLES
      packing_list                     = lt_packing_list
  OBJECT_HEADER                    =
   contents_bin                     = p_attach
   contents_txt                     = lt_message
  CONTENTS_HEX                     =
  OBJECT_PARA                      =
  OBJECT_PARB                      =
      receivers                        = lt_receiver
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 sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    MESSAGE i000 WITH 'Log sent via email!!!'(m03).
  ENDIF.
Thanks,
Chirantan

Thanks, however, if I change those setting, it could potentially have adverse effects on other jobs.  Our BASIS team says I can't change 'em.
FYI from SCOT, drilling into the email "node" will present a pop up window.  The "Set" push button for internet (under the Supported address types) displays the values of "Output formats for SAP Documents" that are available. 
I have changed the settings for:
SAPscript/Smart Forms
ABAP List
Business Object/Link
Raw Text
there, but does not accomplish what I'm trying to do.  And, that was only to test - I can't modify the settings on the production box.
I'm of the opinion that it is not possible to use a user defined file extension with the FM.
Thanks,
Allen

Similar Messages

  • Filename Extensions When Saving

    I recently had a system crash requiring that I start over from scratch. I was on 10.8.2 before the crash, and am on 10.8.2 after restoration.
    Prior to the crash, when I saved a document the Save dialog included a check box at the lower left that read "Hid File Extension." Checking this box, of course, hid the filename extension while unchecking it added the extension (naturally).
    After restoration, when I save files, that box is no longer there. The filename will only save with our without the extension depending on how the Finder setting for extensions (Finder > Preferences > Advanced) is set.
    I want my files to show extensions, but not my applications. The Finder preference is unchecked which leaves old files alone (Get Info > Name & Extension > Hide extension is unchecked in the old files), but new files won't show an extension, and without the check box in the Save dialog, I can't easily add one.
    How do I get that check box back?
    Thanks!

    Are you looking at the expanded Save dialog? Click the triangle button next to the file name entry box.

  • "Show all filename extensions" does not work!

    I want to be able to see the file extensions of all my files.  I go to Finder->Preferences->Advanced, and then I check the "Show all filename extensions" checkbox, yet it still does not work!  I tried rebooting my computer and double checking if that checkbox is still checked, and it is, and it still does not work!
    Any help?

    Nevermind.  I figured it out.

  • Receiving attachments with carriage return / enter after filename extension

    Hello All,
    For a while already I am seeing carriage return / enter / newline after the filename extension of (some of) my attachments.
    Clicking the attachment fails to open it. The only remedy I have is to save the attachment, navigate to it, click the filename, and remove the extra newline after the filename.
    It then asks me if i want to use the new extension, for example
    Would you like to use
    ".pdf"
    instead of
    ".pdf
    (I had to cut up the sentence above to make the bogus CR visible)
    After agreeing the file works fine and opens normally ( + Icon changes back to preview icon).
    The file shows up as "symposium 2010.pdf??" in Terminal.
    and
    /Users/vincent/Desktop/symposium\ 2010.pdf
    when pasted in vi - yes the third white line is included.
    Did anyone see/solve this issue before? Wading through the forum here did not turn up a solution...
    Regards, Vincent

    Hi Thomas,
    I am getting following error:
    Only one top level element is allowed in an XML document. Error processing resource 'file:///C:/Users/guptavis/AppData/Loca...
    <SupportCaseID>0055000018</SupportCaseID>
    -^
    for the below code
    DATA: LV_NEWLINE TYPE ABAP_CR_LF.
    LV_NEWLINE = CL_ABAP_CHAR_UTILITIES=>CR_LF.
    CONCATENATE
      V_XML '<TimeStamp>' wa_XML-TimeStamp '</TimeStamp>' INTO V_XML.
    CONCATENATE
      V_XML lv_newline INTO V_XML.
    CONCATENATE
      V_XML '<SupportCaseID>' wa_XML-SupportCaseID '</SupportCaseID>' INTO V_XML.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
      EXPORTING
        TEXT           = V_XML
      MIMETYPE       = ' '
      ENCODING       =
    IMPORTING
       BUFFER         =  V_XML1
    EXCEPTIONS
       FAILED         = 1
       OTHERS         = 2.
    CALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE
      EXPORTING
        I_FILENAME      = 'C:/TEMP/TEST.XML'
        I_CONTENT       = V_XML1
        I_MIME_TYPE     = 'XML'.
    Do you have anyu idea how can I rectify this error. As per my requirement I have conncatinate so many more lines.
    Regards,
    Vishal.

  • Filename variable w/out filename extension

    Hi,
    Is there a less kludgy way to create a variable that returns the filename without the filename extension, than putting a small, filled white box on top of it?
    Thanks,
    Mats Broberg

    I had this problem a year or two ago and Shlomo of Microtype.com came up with a PostScript snippet that I embedded in the file and it erased the extension for me.
    You may want to ping him through his site and see it he'd be willing to share, or if you know a PostScript programmer, they could fix you up. I will look around and see if I can find the snippet, but I haven't used it for a while....
    Art

  • Suggest a filename extension in a save file dialog

    Hello guys,
    does any of you know, how to suggest the user a certain filename extension in a save file dialog?
    I'm using both the normal save file dialog:
         javax.swing.JFileChooser.showSaveDialog,
    and the Java Web Start save file dialog:
         javax.jnlp.FileSaveService.saveFileDialog.
    For both ways I seem not to be able to suggest the user a certain extension for the filename.
    For the normal dialog, I call setFileFilter on the JFileChooser instance.
    The filter shows up in the dialog, and is used by default, but when the user types a name and approves, the returned filename does not have the extension added.
    Of course I can add the extension programmaticaly, but not when inside the JAWS sandbox.
    For the JAWS dialog, I pass an array containing my extension, but it is ignored as if I didn't specify any extensions. The API specs already say that this parameter "might be ignored by the JNLP Client".
    So how to tell the user what extension to use?
    More people must have encountered this problem.
    I'm making an application that saves and opens xml files and exports html files.
    I'm using this code to test the behavior:import java.io.ByteArrayInputStream;
    import java.io.File;
    import javax.jnlp.FileContents;
    import javax.jnlp.FileSaveService;
    import javax.jnlp.ServiceManager;
    import javax.jnlp.UnavailableServiceException;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.FileFilter;
    public class ChooseFile
        static final String[] EXTENSIONS = { "xml" };
        static final String DESCRIPTION = "XML files";
        public static void main(String[] args)
         try {
             ServiceManager.lookup("javax.jnlp.FileOpenService");
             // we're running with JAWS
             System.out.println("JAWS filechooser:");
             System.out.println(choose_JAWS());
         catch (UnavailableServiceException x)
             // we're NOT running with JAWS
             System.out.println("normal filechooser:");
             System.out.println(choose_normal());
        static String choose_normal()
         JFileChooser fc = new JFileChooser();
         fc.setFileFilter(new CustomFileFilter(EXTENSIONS, DESCRIPTION));
         if (JFileChooser.APPROVE_OPTION == fc.showSaveDialog(null))
             return "selected " + fc.getSelectedFile().getName();
         else
             return "cancelled";
        static String choose_JAWS()
         try {
             FileSaveService fos = (FileSaveService)ServiceManager.lookup(
                         "javax.jnlp.FileSaveService");
             ByteArrayInputStream stream = new ByteArrayInputStream(new byte[] {});
             FileContents fc = fos.saveFileDialog(null, EXTENSIONS, stream, null);
             if (fc != null)
              return "selected " + fc.getName();
             else
              return "cancelled";
         } catch (Exception x)
             x.printStackTrace();
            return "";
    class CustomFileFilter extends FileFilter
        String[] extensions;
        String description;
        public CustomFileFilter(String[] extensions, String description)
         this.extensions = extensions;
         this.description = description;
        public boolean accept(File f)
         if (f.isDirectory())
             return true;
         String extension = getExtension(f);
            if (extension == null)
                return false;
         for (int i=extensions.length; i-->0; )
             if (extension.equals(extensions))
              return true;
         return false;
    public String getDescription()
         return description;
    private String getExtension(File f)
    String ext = null;
    String s = f.getName();
    int i = s.lastIndexOf('.');
    if (i > 0 && i < s.length() - 1)
    ext = s.substring(i+1).toLowerCase();
    return ext;
    }Any help is greatly appreciated!
    Tom Jansen

    @tjacobs01
    Hi Tom,
    I have a question regarding your classes
    tjacobs.ui.fc.FileExtensionFilter and
    tjacobs.ui.fc.FileChooser.
    When I look at your code, I see the filename extension is appended in showSaveDialog:     public int showSaveDialog(Component c) {
                        setSelectedFile(new File(f.getAbsolutePath() + "." + ((FileExtensionFilter)filter).getType()));
        }It gets the extension by calling getType on the filter. But getType is implemented as:    public String getType () {
            return mExtensionList.get(0).toString();
        }So this returns the first type in the list. It does not check what filetype is selected by the combobox.
    Am I missing something?
    Also, in getDescription:    public String getDescription() {
            if (mDesc == null) {
                mDesc = "";
                for (int i = 0; i < mExtensionList.size(); i++) {
                    mDesc += (i != 0 ? ", " : "") + "." + mExtensionList.get(0).toString();
                mDesc+= " files";
            return mDesc;
        }you seem to iterate through the list, but only take the first entry every iteration.
    Can you explain mExtensionList.get(0)?
    Do you know how to test what type is selected in the JFileChooser's combobox?

  • Importing without filename extensions?

    I need to import files that do not have filename extensions.
    Please don't tell me "Get with the modern world!" or "Just rename them!" or some such. This is an archive of some 200 rolls of film scans burned to DVD. They are NOT going to get renamed! Portfolio deals with this just fine.
    But I really would rather use Aperture. I just need a push in the right direction to hack some .plist or something to get it to import extension-less files. There's gotta be a way...
    Help!

    But type and creator codes are currently supported! As far as I can tell, they have not been officially deprecated. If you know differently, I'd appreciate a reference. (The only thing I've seen is a "suggestion" that they be avoided, as they might not be supported in the future by some applications.)
    As far as I can tell, it's not "legacy," either. It's a supported part of the file system. When you select a JPEG in the Finder, do "Get Info," and set it to open in Photoshop, then select a different JPEG, and set it to open in Preview, you're setting the creator code. MacOS X has no "registry" like Windows (thank god!) to track such stuff, and I consider it a strong feature of MacOS X that you can open files of the same type with different applications by default.
    I'm not sympathetic to arguments that something might happen in the future, so I should go to a lot of extra trouble to deal with someone who's jumping the gun now.
    I have hundreds of client CD-ROMs that I may have to re-burn if this is the case. If that's so, I'll stick with Portfolio, which is doing an adequate job. No one is going to pay me for tens of hours spent examining, copying, renaming, and re-burning. Aperture is supposed to improve my productivity, so I spend less time behind the Finder and more time behind the viewfinder!

  • How to make Safari stop adding filename extensions

    If I use Right-click->Download Linked File As... with a link to a text file whose name has no extension or an unrecognized extension, Safari adds ".txt" to the name without showing in the Save dialog that it is going to do so. I think this is a regression in Safari 7 and/or Mavericks to a bad behavior from the Tiger era, although it is possible that it is an edge case that wasn't fixed along with the fix for more common modes of downloading/saving files and I just haven't run into it recently. I understand the mechanics of what Safari is doing (mapping the HTTP Content-Type header to a filename extension) and I don't see any good workaround short of a master switch making Safari stop doing that at all and instead trusting that I really do want unextended filenames and the ability to use a period in a filename without informing LaunchServices.
    As an antique Mac user I've never been entirely comfortable with the adoption of the Windows filename extension botch, but I do accept that battle as lost. I'm just looking for a way to make Safari save files with the name shown in the Save dialog.

    Hi,
    This may be what you are looking for.
    http://www.howtodothings.com/computers-internet/how-to-disable-favicons-to-speed -up-safari
    Carolyn

  • Finder Preferences Advanced show/hide filename extensions

    Hi all,
    When I go to Finder Preferences Advanced and uncheck the Show all filename extensions I expect not to see file extensions thereafter, but this doesn't happen.
    I've restarted, but still no joy.
    Any ideas,please?
    Thanks in advance

    rains33 wrote:
    Hi all,
    When I go to Finder Preferences Advanced and uncheck the Show all filename extensions I expect not to see file extensions thereafter,
    no, that's not quite how it works. when you uncheck that option it will hide some extensions but not all. I don't know how it decides which type of extensions to keep showing. it always shows .jpg extensions for some strange reason for example. if this happens you pretty much have to hide extensions on files individually using the "get info" panel. there is no automated way to hide all extensions on all files. it makes sense in some situatuions like for files with multiple extensions (e.g. all plists) but I can't think of a good reason why jpg files won't hide extensions automatically.
    but this doesn't happen.
    I've restarted, but still no joy.
    Any ideas,please?
    Thanks in advance

  • Cannot hide filename extension with Finder Advanced Hide Extensions

    I am unable th hide filename extensions enmass with the Finder>Advanced>Hide Extensions option. All extensions, key, pdf, page, etc show. This behavior began about three weeks ago. I sync my files through an external drive and MobileMe with another MAC at home. I can hide individual extensions with the File Info command, but not hide all with Finder Preferences.
    Does anyone have a suggestion.
    Thanks

    Take a look at this thread:
    http://discussions.apple.com/thread.jspa?messageID=4762701

  • Uppercase Filenaming Extensions help

    I've just recently migrated from PS7/OS9  to  PS CS4, and Mac OS X (10.5.8)
    I'm trying to "save for web"... and due to existing conventions here, would like all the .JPG files to come out UPPERCASE.
    Save For Web and Devices --> Optimize Menu -->Edit Output Settings -->Saving Files
    It appears that I should be able to set the .JPG filename extension to upper or lowercase. However, I only get lower case, regardless.
    I could never get it to work in PS7 either. Am I misunderstanding what it is for or doing something wrong?
    Is there a way I can get it to output the extensions in UPPERCASE?  Or do I just need to turn that off altogether and manually type it in the way I want it when I save?  (Faster than renaming them all in the Finder, unless I use an auto-renamer...  at this point I just NEED to get some stuff done and the endless automating/tweaking the workflow needs to take a back seat for a bit).
    Thanks in advance for any pointers! (Even if the answer is no, I'd rather know it and move along)

    I don't understand what you mean by "Adobe software will not run on a Case Sensitive system"  ?
    The case is for my own visual references regarding my website... which isn't case sensitive, but I sure am
    As to Bridge... well, I had to go look to see what it was for. At present I'm simply trying to replicate the apps and functions on OSX that I had in OS9 and still slogging through the details of getting a grip on a new workflow. (Which is proving to be rather slow at this stage).
    It's definitely been a very huge leap at this point.
    Getting along with most everything else in PS so far hasn't been an issue though, but this one niggling detail has persisted for a decade
    Regards,
    Pic

  • Filename extensions will not disappear

    Ever since I've had my Mac, (since 4th January), it has displayed filename extensions to every file, despite my having read somewhere that the OS 'comes with filename extensions turned off by default'.
    I have, naturally, tried to turn them off myself via Finder>Preferences>Advanced>'Show all filename extensions'. That tick box was already un-ticked when I looked, (despite all the extensions being shown), so I ticked it, closed the window, re-opened it and re-un-ticked the box in an effort to 'force' it to do as I wanted, but to no avail.
    At a recent One-to-One session the tutors seemed to think that this was a bug in 10.6.6, (or at least what they described as the most recent manifestation of it), and cited another instance that they had come across since Christmas which was the opposite of my problem- the owner couldn't get his Mac to show filename extensions, no matter whether the box was ticked or not.
    Were they correct in this belief, or is there a secret way to get shut of the extensions hidden somewhere in the OS?

    My advice is to just get used to it. These filename extensions are important in OSX land, just like they are in the rest of the Free World.
    Here's some interesting information you should know that I found at this link:
    http://arstechnica.com/reviews/2q00/macos-qna/macos-x-qa-2.html
    "The situation for plain files is somewhat less perfect. There are only two popular methods for representing concrete types: HFS/HFS+ type/creator codes and filename extensions. Mac OS X supports both, but Apple "strongly encourages developers to use file extensions as alternative means for identifying document types." Apple's reasoning is that the Internet, the new "lowest common denominator" of interoperability, does not support HFS-style attributes and forks; it deals only in flat files. Where the overwhelming majority of "flat file" volume formats (i.e. Windows/FAT, Unix/UFS) failed to change Apple's thinking, the pervasive connectivity of the multi-million-node Internet has succeeded.
    On the other hand, Apple itself provides a method for preserving HFS/HFS+ resource forks and meta-information across flat file systems. When a file with HFS/HFS+ attributes and/or a resource fork is copied or moved to a flat file system like UFS, the Mac OS X Finder creates a hidden file containing the meta-information and the resource fork data. When that file is copied or moved back to HFS/HFS+, those hidden files are read and re-incorporated back into the file. So while Apple encourages the use of file name extensions, it also provides a mechanism that allows the "old ways" to continue functioning more or less transparently within Mac OS X.
    Unfortunately for Apple, the matter of filename extensions is not entirely in their hands. Mac OS X will initially ship with HFS+ as the default volume format. This is necessary to enable the transition of classic Mac OS users to Mac OS X. Requiring users to reformat their drives in order to upgrade to Mac OS X is not exactly good business. Furthermore, Mac OS X's backwards compatibility with classic Mac OS apps requires an HFS/HFS+ volume somewhere from which to run its copy of classic Mac OS inside Classic.app (yes, they could use a disk image, but that's a sub-optimal solution).
    Given this situation, Mac OS developers could simply continue business as usual, using type/creator codes (instead of the un-Mac-like filename extensions) to identify the files their applications save. (They could even continue to use resource forks, but that's much less likely. A file that relies on its resource fork will be irreparably broken if it is copied to a flat volume format via any method other than the Finder (FTP, HTTP, etc.), whereas a file's type/creator codes are simple to restore.)
    The deciding factor may be the users. Will Mac users accept filename extensions or will they complain bitterly to their favorite application developer that they don't want ".psd" or ".doc" files on their Mac? *Remember that the Finder will not hide any filename extensions* (other than ".app"), so they will be visible to (and editable by) the user."

  • Filename extension

    What is the filename extension for a view?

    are you talking about view in BSP context? if yes it can be htm
    Raja

  • How to hide filename extensions Bridge Web Gallery

    HI,
    I am creating several web galleries using Bridge and I would like to display an individual title under each image to be seen when viewed in a browser.
    I am aware that you can switch the display of individual image filenames on and off in some gallery templates, but these still show the .jpg (or whatever) file extension. This kind of ruins the effect if you want to have an image title such as "the view from the top of the hill".
    I have tried adding IPTC titles, headlines and descriptions but cannot find a way to display them instead of the image filename.
    Of course, I could just do away with the .jpg (or whatever) file extension on each image but that seems a bit radical (even though Bridge still displays the images happily...)
    Any ideas?
    Thanks in advance.
    Pete

    Hey
    I dont know if this is still an issue seen as its kinda old but it yet to be answered
    create your gallery as normal, when saved go into the resources folder that is created along with your gallery and open up a file called group.xml in dreamweaver. For each image you should get the following code.
        <item>
            <title>5 rue Rossetti, Nice</title>
            <description />
            <metadata></metadata>
            <photographer></photographer>
            <copyright></copyright>
            <imageId image='' dbtype='' dbname='' />
            <mediaType category='image' format='jpeg' />
            <renditions>
                <rendition src='images/large/5%20rue%20Rossetti,%20Nice.jpg' height='1024' width='842' size='large' />
                <rendition src='images/medium/5%20rue%20Rossetti,%20Nice.jpg' height='768' width='631' size='medium' />
                <rendition src='images/thumb/5%20rue%20Rossetti,%20Nice.jpg' height='48' width='39' size='thumb' />
            </renditions>
        </item>
    put the title that you want to be displayed in between the <title> and </title> tags
    hope this helped =]

  • Xine and divx filename extension

    I am trying without much luck to get my mediaPC to play divx files. The problem is they never show up in the videos list in oxine.
    Playing the files with xine from xfce on the same PC is working fine.
    If I rename the files to have an extension of avi, they show up in the videos list in oxine and can be played just fine there too.
    So basically this is a setup problem for the mediafiles shown in the oxine "play video" section.
    Does anyone have any ideas to solve this?

    >
    Sourabh Nirmal wrote:
    > Hi Experts
    >
    > I have two different requirements for two files
    > 1. I need to add the current date and time to the name of the file
    > 2. I need to add first field data of the file to the filename
    >
    > how can I acheive it
    Hi Niramal,
    data: w_file type rlgrap-filename.
    concatenate 'c:\temp\' sy-datum sy-uzeit  '.dat' into w_file.
    concatenate 'c:\temp\'   itab-field1 '.dat'  into w_file1.
    Regards,
    Prabhduas

Maybe you are looking for