How to Attach files in background .

HI all ,
How can I attach files in background in CRM .
Thanks ,
Naval Bhatt .

DATA: ls_bor type sibflporb,
      lv_bor TYPE SWO_OBJTYP,
      lv_loio TYPE skwf_io,
      lv_phio TYPE skwf_io,
      lv_error TYPE skwf_error.
DATA: wa_result_tab TYPE string,
      result_tab TYPE STANDARD TABLE OF string,
      lin TYPE i,
      long_nombre TYPE i,
      long_total TYPE i,
      desplazamiento TYPE i,
      filename_aux TYPE skwf_descr.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
  EXPORTING
    iv_orderadm_h_guid               = guid
  IMPORTING
    EV_OBJECT_TYPE                   = lv_bor
  EXCEPTIONS
   ADMIN_HEADER_NOT_FOUND           = 1
   OTHERS                           = 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.
MOVE:lv_bor TO ls_bor-typeid,
'BO' TO ls_bor-catid,
guid TO ls_bor-instid.
CALL METHOD cl_crm_documents=>create_with_file
EXPORTING
file_name = filename  
directory = path     
business_object = ls_bor
IMPORTING
loio = lv_loio
phio = lv_phio
error = lv_error.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
more details here ..
http://scn.sap.com/community/crm/webclient-ui-framework/blog/2013/09/30/attachment-to-business-partner-or-product-in-crm

Similar Messages

  • How to attach files in the new BT Yahoo system

    Can anyone tell me how to attach files to an email in the new system, please? I have a particular reason which is too complicated to go into here why occasionally I want to send files using web-mail rather than an email client (yes, I do know that's the best way). When I click the "attach" tab, I get an (apparently) helpful page which enables me to add several files at once. But there's no "continue" or "do it" button to get me back to the email I've started, and since ther's no tabs in the new system, I'm stumped.
    Solved!
    Go to Solution.

    Have you seen this thread? Not an elegant solution, but it appears to work for some bizarre reason.
    https://community.bt.com/t5/Email/Email-won-t-accept-attachments-error-18-temporary-It-isn-t/td-p/14...

  • How to attach files in the SMTP mail?

    Hi All
    Anyone know how to how to attach files into the mail configured
    with SMTP while changing the workstatus. The SMTP mail is working
    fine, but my requirement is to attach a file which is having static information
    like instructions for users or something like that.
    Please help me on this..
    My Version of BPC is MS 7.X
    Regards,
    Baijuchandran.B

    Have you seen this thread? Not an elegant solution, but it appears to work for some bizarre reason.
    https://community.bt.com/t5/Email/Email-won-t-accept-attachments-error-18-temporary-It-isn-t/td-p/14...

  • How to attach files from "Office" to E Mail

    Hi,
    I am using a Nokia Lumia 720. and I have an outlook account, which I use with regularity.
    I have faced a problem which is still not resolved - how to attach files in the mail.
    1. You open Outlook Mail or any mailbox that you are using and then you click on the "attach file" icon and you are taken directly to Albums. But the word, excel files which you want to use are stored in "Office". There is no way you can attach a file from "Office"  after you have typed your mail.
    2. So I used to go to "Office" first, select the file, share it in Outlook or any mail I am using, and then type out my mail. But in this way I could send only one attachment.
    I believe that there is a way to address this issue and I would like to know how?
    Shall be obliged for your suggestion/solutions.
    Regards
    Biplab Paul

    hi mate, in the upcoming Lumia Black update, the Microsoft part of the update (GDR3) has enhanced support for attaching Office format files. the Lumia black update is expected to start rolling out in early 2014.

  • How to attach files to the thread we post in this forum?

    How to attach files to the thread we post in this forum?
    I’m wondering why there is no feature that allows attaching files from our hard drives! It is not practical to upload our file first in a certain web to provide it as a link in the post.
    Is there a way to attach our files directly from our hard drive to the post?
    Please, have a look on the screenshot below that shows a forum which includes all the very basic features!
    Thank you for the help
    Best
    Jamal

    Pierre,
    Just a guess on my part, but I would suspect non-image files in this case.
    As Ted points out, that WAS possible early on, and then the capbility to attach non-image files, was actually retained by a certain few forums, though not for long. This change was coincidental with a major spam attack, and at least one disgruntled user attempting to attach some rather nasty "stuff." I do ot know if those events prompted the change, as I was not part of the decision making group, that initiated the change.
    Though 95% of the files that I wish to attach, ARE image files, there are times, where a TXT file would be ideal, say for a crash log, or similar. Now, I can convert that TXT to a PNG, but then one has to work with pixel x pixel dimensions, and some files, like those crash logs, can be rather long.
    Personally, I find the loss of the Attach File (was via a button at the bottom-left of the editing screen) to be a sad comment on the actions of some, on these forums, but then that just reflects life outside of the forums.
    Hunt
    PS - I am glad that you found that little article useful Especially in the PS, PrPro, PrE and Encore forums, screen-caps can tell so very much about what is going on with a person's program, system or their Projects/Images.

  • How to attach file with an email in travel and expenses

    Hi Experts,
    I am new to sap cloud application studio.
    We have requirement that need to attach any type of files in the mail,
    I have gone through this : How to send an email with attachments in SAP Cloud Application Studio
    But compilation error at import AP.FO.ACTIVITY.GLOBAL., so not able to work with that lines of code.
    I am using these lines of code to send email.
    EMailUtilities.SendEMail(lang, bcc, cc, toAddress, htmlContent, from name, subject);
    So am not able to getting how to attach file with this code.
    Please help me regarding this.
    Thanks & Regards,
    Preethi Ande

    Hi Preethi,
         I am trying to send mail from custom BO in Travel on Demand System.I am getting  compilation error.please look into the attached screenshot for the code.
    Please assist me on this,                                Thanks in advance
    regards,
    Sendhilazhagan

  • How to attach file with PR and PO?

    Hi all
    How to attach file (Drawings ,execl,etc..) with PR and PO
    Please help on this
    Thanks
    Regards
    Dhinesh

    Hi
    Thanks
    But If i select  system > service for object in change mode i am getting error "No
    service availale" like that ,how to sort it out and attach the file
    And more ever that icon (service for object) is not coming in change mode ,i selected
    by menu path .How to make it display as icon in bar
    Regards,
    Dhina

  • How to attach files in a Oracle BPM Studio process?

    Hi,
    I'm trying to design a process with some screenflows for entering information and I'm creating presentations for each screen. The thing is that I don't know if it's possible to have an attaching file option in the presentations or if I have to do it handcoding.
    Thanks everyone.

    You can use methods listed inside Fuego.IO, but they don't work if you run your process in a client, I mean not the server.
    You can use JSP or methods developed in java in order to upload your files and Fuego.IO methods to access them after you upload them.
    Another thing you should consider is that if you upload files using Fuego library, there's a size limit for files.
    Take a look on How to Use FileChooser on for Client files
    Hope this help.
    Pablo

  • How to attach files using an applet

    hi,
    i want to know how can i use an applet to upload or attach files in my application
    help me

    Hallo there,
    I am intrested on the same topic but I am not so good to modify the sound sdk demo. Is there anyone willing to share some code?
    Thanks
    Matteo

  • How to attach files to a business partner in CRM

    Hi experts,
    The aim is to develop a program with the same functionality as the way CRM  attaches files to business partners (via a browser).
    For example, I want to attach an excel file ( or whatever ) to a given Account ID via a program, so when refreshing the browser it appears there.
    What steps do I have to do to achieve this?
    I read that I should use the class CL_CRM_DOCUMENTS and the method CREATE_WITH_FILE, but I don't know how to link the document with the Account ID (BP)

    Going ahead in the development of the program I have found a new problem to face.
    When seeing the details of a business partner, if I execute the program to attach new files and afterwards go back and get in again in the BP details to see the new attached files, these files aren't refreshed in the DocList.
    To see them i have to log out and log in again. In that case i can see the new attached files.
    I have seen the method CRM uses to do this. The name of the  method  triggered when pushing on the button is OP_ADDDOC2DOCLIST( ).
    Do I have to use this method to refresh the DocList so i can see the attached files without having to log out?
    Thank you again.

  • How to attach files to mail

    When I attach files to mails (.pdf, .jpg, .docx etc.), they arrive in Windows Outlook embedded. My mail settings are "Always Send Windows-Friendly Attachments" and "Always Insert Attachments at End of Message".
    I know how to open these attachments in Windows Outlook but my recipients do not. To suggest that they learn how to, as I have seen in some places, is arrogant. If I apply for a job by email and attach my resume with instructions on how to open it will reduce my chances of getting that job close to zero.
    How can I attach files that will be received as files and can be opened by the MS Windows recipient with left mouse clicks?

    Another way to send files to others is to use Dropbox.
    In your email you don't attach the file, but rather include a link that you reciepeints then use to download the file.
    I use this method for particularly large files, but it can be used for any file.
    Matt

  • How to attach files to the threads?

    Hi all,
    I m new to SDN.and i dont how to send the files to the threads.
    can any one please tell me how to attach the files to threads?
    and also i want post some useful files.please tell me how to post those files?
    Thanks,
    Usha

    Hi yugandar,
    as u said ,i copied and pasted the XML code of smartform for one thread.
    But it is merged.and i think it cant upload again to SAP.
    how can i post that one?
    Thanks,
    usha

  • How to attach files in a mail from user4s PC in a Portal aplication

    Hello,
    I am trying to send a mail with attachments from PL/SQL but I don4t know what must I do to attach files from the user's PC. Our aplication is developed with Portal.
    Does anybody knows any java program than can be used like portlet who opens the Outlook??
    Thank you.

    You can use methods listed inside Fuego.IO, but they don't work if you run your process in a client, I mean not the server.
    You can use JSP or methods developed in java in order to upload your files and Fuego.IO methods to access them after you upload them.
    Another thing you should consider is that if you upload files using Fuego library, there's a size limit for files.
    Take a look on How to Use FileChooser on for Client files
    Hope this help.
    Pablo

  • How to attach file(CV) from pages to online form in safari

    When i want to attach a file from pages in any online form the select file button gives only two options 1. Take photo and 2. Choose from existing photos. So how can i attach files other than photos from pages or other apps .

    You need to use another web browser.  You will have to look for a free one if necessary.  icab is a web browser that lets you download & uploads files.
    https://itunes.apple.com/us/app/icab-mobile-web-browser/id308111628?mt=8
    Robert

  • How to attach file to web page

    how to attach a file to a web page

    Do you mean upload a file to a website, such as uploading a picture to Facebook? Normally there's an "upload" or "attach" button, which you click, and an open file window appears to let you choose the file you want. You can often also just drag a file into an area on a site, such as a new post in Facebook or a message in Gmail.
    Matt

Maybe you are looking for