Copy of the Attachments from a Opportunity to a Activity

Hello SAP Experts!!!
I have a requirement when creating a Activity as an Follow-Up Document from an Opportunity that the Attachments of the Opportunity have to be copied to the Activity.
I have looked at BADI: CRM_COPY_BADI but I found out that the Structures of the BADI doesnt have the fields to put information of the attachments,  so I think its useless to my case.
By doing a debugging I found out that by pressing the button "Create Follow Up Document" in the Opportunity that in the component BT111H_OPPT (View: OpportunityOVViewSet) method : EH_ONFOLLOWUP is called. Then in method BT126H_APPT in the Main Window the Method: IP_FOLLOWUP  is called.
Anybody knows what I can do or what method I have to redefine that I can see the Attachments of the Opportunity in my Activity Document?
Does anybody have experience what steps to make to copy attachments and can help me out?
Best Regards
Oliver Schultze
Edited by: Oliver Schultze on Feb 25, 2010 4:53 PM

Hello, just to clase this thread correctly I put the code I have used to copy the documents of an Opportunity to an Activity Document while creating an Follow-Up Document:
DATA: ls_bo_oppt        TYPE sibflporb,
        ls_bo_actv        TYPE sibflporb,
        lv_guid_oppt      TYPE crmt_object_guid,
        lv_guid_actv      TYPE crmt_object_guid,
        ls_new_loio       TYPE skwf_io,
        lt_phios          TYPE skwf_ios,
        ls_error          TYPE skwf_error,
        lt_bad_ios        TYPE skwf_ioerrs,
        lv_all_documents  TYPE skwf_flag.
  MOVE is_ref_orderadm_h-guid TO lv_guid_oppt.
  MOVE cs_orderadm_h-guid     TO lv_guid_actv.
  ls_bo_oppt-instid = lv_guid_oppt.
  ls_bo_oppt-typeid = 'BUS2000111'.
  ls_bo_oppt-catid  = 'BO'.
  ls_bo_actv-instid = lv_guid_actv.
  ls_bo_actv-typeid = 'BUS2000126'.
  ls_bo_actv-catid  = 'BO'.
  lv_all_documents   = 'X'.
  CALL METHOD cl_crm_documents=>copy
    EXPORTING
       business_object      = ls_bo_oppt
       new_business_object  = ls_bo_actv
       all_documents        = lv_all_documents
    IMPORTING
      new_loio              = ls_new_loio
      new_phios             = lt_phios
      error                 = ls_error
      bad_ios               = lt_bad_ios
    EXCEPTIONS
      no_io                 = 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.
ENDMETHOD.

Similar Messages

  • How can I copy all the comments from my picture/s in fotostream to my picture/s in my library?

    How can I copy all the comments from my picture/s in fotostream to my picture/s in my library?

    Hi, first, you should prevent the iTunes library auto sync with iPhone: Launch iTunes > click Preferences... > click Devices. In the window, check the option 'Prevent iPods, iPhones, and iPads from syncing automatically'. Next, connect your iPhone with your computer via the USB cable. Click the mini menu for iTunes on the very top left and click the option 'Show menu bar'. After then you can see iTunes File, Edit, View, Control, Store and Help menus on the ribbon. Click File > Devices > Transfer purchases from (your iPhone name). You can also access to the File menu by holding down Alt (Option on Mac), Shift and F keys. This is how to get your iPhone purcahsed song transferred to iTunes Library.

  • I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?

    Hello everybody,
    I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?
    I share one Itunes account with other people from my family and one person would like to keep the same songs on the new Ipod as the ones which were on the old one.
    Thanks in advance for your answer.
    Yan

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

  • How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    You can use a program like Carbon Copy Cloner.  It will clone your HD to the external.  The format is the same as your internal drive and you can boot from it using Option key at boot time.
    http://www.bombich.com/
    Regards,
    Captfred

  • How can I copy all the info from a contact card in address book to paste into a documnent?

    How can I copy all the info from a contact card in address book to paste into a documnent?

    Tom Wolsky wrote:
    The advantage goes to FCP7 if you allow that it can copy and paste filters, audio and video, transformations, and other attributes separately.
    You can do that in FCPX too, as all the things you cited are listed separately in the inspector.
    Here's a little gotcha. Let's say you've color corrected a few clips and you've applied an effect to one and want to paste it the other clips. You switch off color correction and copy the clip. You select the other clips and paste effects. What do you think happens? The effect is applied, but the color correction is applied as well, only it's switched off as it was in the first clip, so all the color correction on the other clips is lost. Fun, eh?
    I'll try to replicate your gotcha - but no, that doesn't sound like fun at all!

  • I recently transferred my ITunes library to an external hard drive.  I made sure to copy all the data from the saved location.  After the transfer I noticed that a lot of albums are missing the first song and some recently purchased albums are missing.

    I recently transferred my ITunes library to an external hard drive.  I made sure to copy all the data from the saved location.  After the transfer I noticed that a lot of albums are missing the first song and some recently purchased albums are missing.  Is there any way to recover the data?  Thanks for any help.

    I may have found an answer here:
    http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive
    They only thing I can assume is that my external hard drive was slow to start and iTunes defaulted to its old directory (see the last paragraph at the link above). However, once my external was recognized shouldn't everything have fixed itself?
    Message was edited by: williamson42
    Message was edited by: williamson42

  • I want to copy all the objects from one user to another... Please help

    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    Please Explain me in detailed way
    Thank you

    SowmyRaj wrote:
    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    If all what you are interested is Scott schema than no need to use the datapump or CTAS. Run demobld.sql in your schema and it would have all the objects of Scott.
    http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html
    HTH
    Aman....

  • Do we have the option to copy all the jobs from one OEM admin to other ?

    Hi Experts,
    I have a number of jobs created under one administrator account in OEM 10g. And now my requirement is to re-create these jobs under some other adminstrator User account.
    So, is there any process in OEM , where we can copy all the jobs from one user account to the other user accounts.
    I guess create like option can be only Helpful if you are planning to copy a single OEM job. And also , administrator who will copying the jobs , should have a super admins assigned so that the job is visible for him.
    So, can someone Help me out in letting me if there is a process for doing this in a single shot ?
    Thank you very much for your Help.
    Thanks,
    NAV.

    Do you need the jobs to be OWNED by the new admin or just accessible and modified? You can edit the job and grant the user Full permissions in the Access tab. Otherwise, the only option is to Create Like as you mentioned. No batch method.

  • Copy all the objects from the one system that start with (ZANK)

    hi to all,
    I have installed the name space /ank/ in the US system, we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/. problem is how can i copy objects and re-create.
    thanks

    Hi Ankal,
    I guess this is your second thread on the same question. Ok provide these information
    >>I have installed the name space /ank/ in the US system,
    Are you saying that you have a machine (US System) and i has a namespace /ank/ ? What all objects are there in this namespace?
    >>we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/.
    Is the India system on the same US system?
    Also tell me whether you have opened the home page of SAP XI/PI?  If yes , are you able to open Integration Repository? If yes then how these US and India systems are referred in Integration Repository? Are they referred as separate software components?
    Regards
    Suraj

  • Is there a way to download the attachments from the responses all at one time?  Attachments are .doc

    Is there a way to download the attachments from the responses all at one time?  Attachments were uploaded as a  .doc file

    Yes, read this tutorial:
    http://forums.adobe.com/docs/DOC-2656
    Near the bottom it explains how to download multiple files in a ZIP file.
    Randy

  • How to reterive the attachments from a message with message id.

    Hi Friends,
    I want to know that How can i retrieve the attachments from an incoming message.
    Also how can I separate the body part from message. How can I get a list of files attached with a message.

    JavaMail API don't give really method to parse multipart message
    See http://www.jservlet.com/
    Object Pop3.Tools that will help you to parse a multipart message, get file attachment with specific file extension.
    regards,

  • Help.  My daughter backed up her iPod but copied all the info from my iPhone.  So now the iPod and iPhone have exactly the same things.  How do I get all her stuff back on her iPod?

    Help.  My daughter backed up her iPod but copied all the info from my iPhone.  So now the iPod and iPhone have exactly the same things.  How do I get all her stuff back on her iPod?

    Restore her iPod for the the backup of her iPod on the computer that she syncs with. For how to restore from backup see the restore topic of:
    iOS: How to back up

  • Can I use iCloud to copy all the emails from the iPhone to Windows Live Mail on my PC?

    My Windows 8 OS got trashed and I had to "refresh" it which involved losing all my Windows Live Mail emails (i.e. *.eml files in %AppData%). I have a backup from 18 months ago and most of my recent emails are on my phone.
    Is there a way I can copy (en masse) the emails from my iPhone to my Windows Live Mail on my PC?
    Thanks in advance.
    Andy

    Please ignore this question. Or tell me how to delete it.

  • Transferring Photos to an external hard drive. I Copied all the pictures from a folder in iPhoto and Pasted on the Hard Drive. However, only about 50% were Pasted. It will not let me Copy

    I am trying to Transfer my Photos to an External Hard drive as a Back Up. Since I want to be able to Transfer them to a Windows based computer if necassary, I did not use the Automatic Mac Backup program.
    To Transfer them. I Copy all the Pictures in a folder in IPhoto, then Paste them in a Folder of the same name, which I have created on the External Hard Drive. It will Paste about 50% of the Photos. Then, when I try to go back and Copy and Paste the rest, it acts like it has already done that. HELP!!!

    By default, iPhoto keeps pictures in a special library which isn't user friendly - but is effective for the program. The best way to move pictures from iPhoto is to export them from the iPhoto program.
    Start up iPhoto and select all the photos you want to move to your external drive. Go to the File Menu and select Export... For size choose original and then select the external drive as the destination. (It would be good to create a folder for the photos first.)
    Since export doesn't create folders and you may want the photos organized, you can select one event or one album at a time and export each separately, putting them into separate folders on the external.

  • How do I copy only the emails from Address Book?

    I want to easily make and update a big email list.
    With out doing them individually,
    what's the best way to copy all of ONLY the emails from my contacts at once and put them in a text doc?

    paste the following into Script Editor (it's in /Applications/Utilities)
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Address Book"
    set mlist to selection
    repeat with per in mlist
    repeat with eemail in emails of per
    set curemail to value of eemail as text
    if curemail is not equal to "" then do shell script " echo " & curemail & " >>~/desktop/ab.txt"
    end repeat
    end repeat
    end tell</pre>
    select the contacts you want in Address Book and press run in Script Editor. Emails will be exported to the file ab.txt on your desktop.

Maybe you are looking for

  • Using a 27" iMac as Monitor for PC

    I am building a PC for Network Attached Storage (NAS) using FreeNAS: http://www.freenas.org/ Once it's all set up I'll just use the web/network interface to manage it.  But, as I assemble the PC I'll probably need a monitor to make changes to the BIO

  • Printing Purchase Order from ME9F using custom program and smartform

    I was able to use my custom program which calls a smartform to print purchase orders from transaction ME9F. I did this using transaction NACE. However, when I call "Output Message" from ME9F, the output always fails (shown by an 'X' icon after the ch

  • Preview application won't open anything

    Why won't preview open anything? No jpgs, no pdfs. nothing.

  • "iTunes 7.6 or later is supported with any 64-bit edition of Windows Vista.

    "iTunes 7.6 or later is supported with any 64-bit edition of Windows Vista. The installer for 64-bit Vista is named iTunes64Setup.exe instead of iTunesSetup.exe. For more information see http://docs.info.apple.com/article.html?artnum=301301" So now y

  • Impossible to download "big" file : error 3259

    hey everyone, I got an ipad for christmas with the ios 3.2.2 I installed the last version of iTunes 10.1.1.4 Itunes wants me to download and upgrade for ios 4.2... the system is strating to download but after a while the download stops and say error