COPY ITEM ( CRMD_ORDER ) + crm_order_maintain

Hello friends,
I am trying to copy the last item, and add a new item in the transcation.....
I used the following code, does any one has any idea, what is wrong..
REPORT  ZTEST_ITEM.
Data:
  lt_item  type  CRMT_ORDERADM_I_COMT,
  ls_item  type  CRMT_ORDERADM_I_COM
Data:
  lt_crmt  type  CRMT_EXCEPTION_T,
  ls_crmt  type  CRMT_EXCEPTION
  Data:
  lt_save  type  CRMT_OBJECT_GUID_TAB,
  ls_save  type  CRMT_OBJECT_GUID
ls_save = '4B4B486C52CE6743B0DF366432DCF90F'.
append ls_save to lt_save.
ls_item-HEADER       = '4B4B486C52CE6743B0DF366432DCF90F'.
ls_item-ORDERED_PROD = 'HT-1010'.
append ls_item to lt_item.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
  IT_OPPORT_H                   =
  IT_LEAD_H                     =
  IT_ACTIVITY_H                 =
  IT_SALES                      =
  IT_PRICING                    =
  IT_PRICING_I                  =
  IT_PRIDOC                     =
  IT_ORGMAN                     =
  IT_SHIPPING                   =
  IT_ACTIVITY_I                 =
  IT_PRODUCT_I                  =
  IT_BATCH                      =
  IT_FINPROD_I                  =
  IT_STRUCT_I                   =
  IT_CONFIG                     =
  IT_PAYPLAN                    =
  IT_PAYPLAN_D                  =
  IT_CUSTOMER_H                 =
  IT_CUSTOMER_I                 =
  IT_SERVICE_H                  =
  IT_SERVICE_I                  =
  IT_SERVICE_ASSIGN             =
  IT_QUALIF                     =
  IT_APPOINTMENT                =
  IT_TEXT                       =
  IT_SCHEDLIN_I                 =
  IT_PARTNER                    =
  IT_SERVICE_OS                 =
  IT_REFOBJ                     =
  IT_SUBJECT                    =
  IT_CANCEL                     =
  IT_CANCEL_IR                  =
  IT_CANCEL_DATES               =
  IT_STATUS                     =
  IT_BILLPLAN                   =
  IT_BILLING                    =
  IT_ORDPRP_I                   =
  IT_ORDPRP_I_D                 =
  IT_ORDPRP_OBJL_I_D            =
  IT_CUMULATED_I                =
  IT_SERVICEPLAN_I              =
  IT_SERVICEPLAN_IE             =
  IT_PRICE_AGREEMENTS_BBP       =
  IT_PRICE_AGREEMENTS_CRM       =
  IT_CONFIG_FILTER              =
  IT_AC_ASSIGN                  =
  IT_SURVEY                     =
  IT_EXTENSION                  =
  IT_ACTIVE_SWITCH              =
  IT_UBB_CTR_I                  =
  IT_UBB_CR_I                   =
  IT_UBB_VOL_I                  =
  IT_APO_I                      =
  IT_CHNGPROC_I                 =
  IT_EXT_REF                    =
  IT_DOC_FLOW_PNT               =
  IT_CHNGPROC_H                 =
IMPORTING
   ET_EXCEPTION                  = lt_crmt
CHANGING
  CT_ORDERADM_H                 =
   CT_ORDERADM_I                 = lt_item
  CT_INPUT_FIELDS               =
  CV_LOG_HANDLE                 =
  CT_PARTNER_ATTRIBUTES         =
  CT_DOC_FLOW                   =
EXCEPTIONS
   ERROR_OCCURRED                = 1
   DOCUMENT_LOCKED               = 2
   NO_CHANGE_ALLOWED             = 3
   NO_AUTHORITY                  = 4
   OTHERS                        = 5
Data:
   lt_CRMT_RETURN_OBJECTS  type CRMT_RETURN_OBJECTS,
   lt_CRMT_EXCEPTION_T    type CRMT_EXCEPTION_T,
   lt_CRMT_OBJECT_GUID_TAB  type CRMT_OBJECT_GUID_TAB.
CALL FUNCTION 'CRM_ORDER_SAVE'
  EXPORTING
    IT_OBJECTS_TO_SAVE         = lt_save
  IV_UPDATE_TASK_LOCAL       = FALSE
  IV_SAVE_FRAME_LOG          = FALSE
  IV_NO_BDOC_SEND            = FALSE
IMPORTING
   ET_SAVED_OBJECTS           = lt_CRMT_RETURN_OBJECTS
   ET_EXCEPTION               = lt_CRMT_EXCEPTION_T
   ET_OBJECTS_NOT_SAVED       = lt_CRMT_OBJECT_GUID_TAB
CHANGING
  CV_LOG_HANDLE              =
EXCEPTIONS
   DOCUMENT_NOT_SAVED         = 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.
   Write 'test'.
Message was edited by:
        Shah H

Hi Shah,
Did you solved this problem? I am trying to use this function moudle crm_order_maintain to create service order confirmation.
kindly send the code which you did. so that i can check.
Its urgent.
Points will be awarded.
Regards,
vinoth.

Similar Messages

  • Syncing iPad2: PLEASE HELP ME! My iPad2 has been stuck on step 8 of 8 for a day now - waiting to copy items. What can I do to fix this? Nothing is actually happening! I'm running ios5 on an iPad 2.

    I recently upgraded to to the iOS 5 on my iMac and iPad. Now when i sync my iPad it get stuck on step 8 with a prompt that says "waiting to copy items" it stays on like that for hours. When I eventually do disconnect my iPad it says sync is not complete. Now, some of my album artwork is not copied into my iPad but on iTunes in my iMac desktop everything is still there. Pulling my hair out with this one. Please help!

    my iPad it get stuck on step 8 with a prompt that says "waiting to copy items" it stays on like that for hours
    Reset your iPad.
    Hold the On/Off Sleep/Wake button and the Home button down at the same time for at least ten seconds, until the Apple logo appears.
    I recently upgraded to to the iOS 5 on my iMac and iPad
    You don't need to manually sync using iOS 5.
    Help here >  Apple - iCloud - Learn how to set up iCloud on all your devices.
    Message was edited by: Carolyn

  • Bug while copying items on a page.

    When I create a new page item via copying from existing page item it fails with the below error code, if there is &gt; or &lt; character in the source of the existing item.Error Source contains <, > or " which are invalid characters. It works fine if I create new item using wizard and then have the same source. I use div tags in the source of my display only items.
    If this is a bug, can we get it fixed in the upcoming release.
    Thanks,
    Manish

    Hi Manish and Scott,
    I also concur and have filed bug #14724684. Specifically this appears to occur when the 'Source' value contains either <,> or ", and only when copying items as you say. I'm afraid this will not be fixed for 4.2, but we will aim to fix it for the first patch set. Interestingly, the item does still get copied despite the error, (which I'm sure you noticed anyway), but just thought I'd mention it in case that's of use to you or others as the error won't stop you from copying items containing these characters in their source.
    And yes, Scott I agree with the DA copy wizard and have made a note to improve this for our next release. Thanks for mentioning it.
    Regards,
    Anthony.

  • Using a text file to provide paths for copy-item

    OK, please don't beat me over the head too much for this.  I've been trying various methods all day and nothing seems to be working.  I have a text file that has a list of folders (full paths including drive letters).  I want to copy all of
    the folders and their contents to another path.  The destination path does not change (d:\temp\destination) but each of the folders in the text file should end up being subfolders of the destination
    Sources:
    d:\source1 (has file01.txt, file02.txt)
    d:\source2 (has file03.txt, file04.txt)
    Destination
    d:\temp\destination
    Should end up with something like
    d:\temp\destination\source1\file01.txt
    d:\temp\destination\source1\file02.txt
    d:\temp\destination\source2\file03.txt
    d:\temp\destination\source2\file04.txt
    I've tried
    Copy-Item -Path D:\Temp\paths.txt -Destination D:\Temp\attachments -recurse -Force
    which just copies the file that contains my paths.
    I've tried
    foreach($line in (Get-Content -Path D:\Temp\paths.txt)){$dest_folder="D:\Temp\destination" | Copy-Item -path $line -destination $dest_folder -force -recurse}
    I get an error that says
    Copy-Item : The input object cannot be bound to any parameters for the command either because the command does not take
     pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    Would anyone mind helping me out here?  If I need to create a file that has the source foldername as well as the destination path, I can do that, I just figured there has to be a way to specify a base directory and let powershell do its thing from there.

    try
    $SourcesFile = ".\sources.txt"
    $Root = "d:\temp\destination"
    foreach ($Source in (Get-Content -Path $SourcesFile)) {
    $Destination = Join-Path -Path $Root -ChildPath (Split-Path -Path $Source -Leaf)
    Copy-Item -Path $Source -Destination $Destination -Recurse -Force
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • Can't download music from PC to IPhone 5. Error message says "Cannot copy item. The device has either stopped responding or has been disconected. Help?

    Can't download music from PC to IPhone 5. Error message says "Cannot copy item. The device has either stopped responding or has been disconected. But the phone is connected. Help!!

    Hello iyurdin,
    We've an article that can help keep your iPhone connected in Windows' eyes.
    iOS: Troubleshooting USB connection
    http://support.apple.com/kb/TS1286
    Cheers,
    Allen

  • Error while Copy Item Category

    Dear Gurus,
    I'm facing a problem in SPRO.
    When I'm trying to copy Item Category "BVN" to a new one ie ZB14(for example) ,I gets an error stating that "Billing Plan Type is invalid".
    Could anyone please help me what is the reason for the error as well as where we can set the Base settings for SPRO.
    Thanks
    Balaji

    Mr.Kishore,
    Thanks for your reply.
    Could you please write me in detail. Already the Billing Plan in BVN is empty only.
    How to set up the Routine in Copy Control for this error.Your reply will be highly appreciated.
    Thanks
    Balaji

  • Where has 'do you want to replace this file' gone when copying items in lion?

    Hello, can anyone tell me if I can still have the option when copying items from one folder to another to be asked ' do you want to replace this file' instead of only having the new options to: stop / keep both / or replace all?  thanks for your help.

    If you don't mind losing them, it's all right to do it.
    Maybe you just want to delete them instead?
    Or do you mean you want to replace the faulty one in your Projects folder with a correct one from your Applications folder?
    Is this the Application you're talking about moving?

  • I set up iPhoto v9.6 to copy items to library. Now I would like to change it to not copy. Do I have to start completely over? I have 106GB of photos and tags in my library. Will I lose all that work?

    I set up iPhoto v9.6 to copy items to library. Now I would like to change it to not copy. Do I have to start completely over? I have 106GB of photos and tags in my library. Will I lose all that work? Originally I thought by copying items to library I would be making an exact copy of my originals and that would serve as a duplicate or backup copy. My originals are on my EHD#1 and my iPhoto library is on my EHD#2. But now I realize that I can not view my iPhoto library unless my EHD#2 is connected to my computer (duh!!) So now I would like to NOT copy times to library and I want to have the library in the Pictures folder on my laptop HD. So I guess my question is do I have to start completely over? Is there some way to salvage all the work I've done so far?

    Yes you would have to start over from scratch.
    But you should really think this through very carefully. Experienced users do not recommend iPhoto used in this mode, and with very good reasons. Among them
    1. It's more work for exactly no gain
    2. It's unreliable - especially - when the library is on one volume and the photos are on another. One change to the path between the files and the library and you'll be reconnecting every photo in the Library back to the database, one by one.
    For more on iPhoto and file management see this User Tip:
    https://discussions.apple.com/docs/DOC-6361

  • I go to sync my Iphone 3Gs (IOS 5) with iTunes on my pc and is is stuck on step 8 "waiting to copy items" it has been like this for over an hour.

    I go to sync my Iphone 4 (IOS 5) with iTunes on my mac and is is stuck on step 8 "waiting to copy items" it has been like this for over an hour. What can i do to fix this problem????

    If you are stuck at the blue screen then you can try booting into safe mode (hold shift during boot) and then run disk repair. If that still doesn't fix it then you might have to reinstall OS X. What version of OS X are you running?

  • Copy Clipboard in OSX - Can I access a history of "copied" items?

    Hi-
    It sure would be cool if there were a feature that allowed one to view a list of the past 10 or so copied items / photos / text, etc. - so that he didn't have to keep reverting back to various original sources in order to work with and paste a number of various pieces of information.
    A clipboard is the common term for it I suppose --
    But how do I access it in OS X? Or can I at all?
    Thanks!

    Just search macupdate.com or versiontracker.com for "clipboard". You'll find many useful utilities.

  • Switching to "Copy items to the iPhoto library"

    I created a new iPhoto library out of several folders of photos on my hard drive with "Copy items to the iPhoto library" unchecked. I've changed my mind about this method of organizing those photos. Can I now have iPhoto import them in the traditional way? I could simply create a new library but I don't want to lose the keywords.

    You can use AliasHerder
    AliasHerder to replace the alias files in the library with the source files.
    OT

  • Photos App Copying items to Photos Library regardless of checked option

    I have been trying for hours to start my Photos App. It keeps saying via thermometer that it's either Preparing, Updating or Uploading, and this happens for hours with absolutely no progress on the "thermomether". I have been monitoring on Activity Monitor and there ARE packets going out.  My System Photo Library is about 1.5 Gb.  I have read on so many forums that a huge number of people are having this problem. So I gave up on updating the library as I have my photos in other database applications, except for a select few I use for various reasons.
    I restarted photos while holding the Option Key and creating a new System Photo Library. I imported four test JPEG files and they did import properly into the App. However, even with all iCloud settings on, none of these photos made it to either my iPhone nor to the iCloud website. I then imported other test photos directly into my iCloud on a web browser. They immediately showed up and within moments were also available on my iPhone.
    Furthermore, there is an option in Photos' Preferences that allows you to "copy items to the Photos Library".  Whether I have this checked or Not, Photos keeps importing the photos to the Library, as I can see the library's size increase with every photo imported. This is really baffling, and really disappointing that this application has so many bugs.

    Welcome to the Apple Discussions. I think you'll be better off starting with a new library. There are two ways you could do that.
    1 - create a new library and use the paid version of iPhoto Library Manager to copy the events and albums from the old library to the new one. That way you can keep keywords, comments, titles and albums.
    2 - follow Tutorial #1 to write the keywords and comments to the original files of the old library and then create a new library and import those files into it.
    After either method once you're satisfied that you have all your photos safely in the new library you can delete the old library and its source image files.
    I recommend using the iPhoto Library Manager method. It would be easier but both will do the job.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Copying items in Apple Remote Desktop

    According to the manual, you should be able to copy items between the local and remote computer, either by dragging or by selecting "Copy Items" button.
    But each time I try, it gave me an error message saying the "This task is not supported on the remote computer" or "Copying to this computer: Failed on all"
    Is there any privileges that I need to turn on before I can copy to and from the computers? I can't find it anywhere in either the manual or preferences.

    Yes, you have to enable copying on the client Mac by going to System Preferences, selecting Sharing and clicking the Services tab. Select Apple Remote Desktop from the list and click the Access Priveleges button (authenticating first if required). Then check the Copy Items box.
    Macbook Pro Core 2 Duo
      Mac OS X (10.4.9)  

  • Copy items(like task list, pages..) from one workspace to anothe

    How do I copy items(like task list, pages..) from one workspace to another?
    I am the admin for both the workspaces, but I am not the oracle workspace administrator.
    Thank you

    Anonymous,
    No this is not a bug. Working with multi-select lists or any item which stores colon delimited values can be tricky to work with in APEX. There are a few work arounds for this. One is to replace the colons with something else like you described and then replace the colons on the landing page. Another solution is to send the primary key for that record and have an automatic row fetch or a computation pull the colon delimited value.
    Cheers,
    Tyson Jouglet

  • VOFM copy item text from STO to delivery

    Hello,
    Has anyone succesfully copied item text from a stock transport purchase order to the delivery by using a rule defined in VOFM data transfer > text  ?
    I can do it  for the 1st item of the PO, but the second item just pulls the info from the sales order text from material master.
    I know that SAP has an OSS note saying that this way is not anymore necessary, you can adopt text from STO with customizing settings. However I have to add some more text, not just copying the PO text, so I have to use this way.

    Hi Jurgen,
    Can you tell me step-by-step process to copy sto text to delivery?
    I have been able to customize copying of text from sales order to delivery to billing but sto to delivery is not happening.
    Your help will be highly appreciated.
    Thanks.
    Warm regards,
    Rahul Mishra

Maybe you are looking for