CRM_ORDER_MAINTAIN Partner is not deleted.

Hi All,
I wanted to remove "employee responsible" partner from Order via Z* program. Following is my code. But i m still not able to delete it. Can anybody have a look at code?
lv_partner-ref_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lv_partner-ref_handle = '0000000000'.
lv_partner-ref_kind = 'A'.
lv_partner-ref_partner_handle = '0000'.
lv_partner-ref_partner_fct = '00000014'.
lv_partner-ref_partner_no = '200010671'.
lv_partner-ref_no_type = 'BP'.
lv_partner-ref_display_type = 'BP'.
lv_partner-partner_guid = 'DDCDB8C50DFC0CF19F94001E6849B4E8'.
lv_partner-kind_of_entry = ''.
lv_partner-partner_fct = '00000014'.
lv_partner-partner_no = '200010671'.
lv_partner-display_type = 'BP'.
lv_partner-no_type = 'BP'.
lv_partner-mainpartner = 'X'.
INSERT lv_partner INTO TABLE lt_partner.
data: l_key type CRMT_LOGICAL_KEY.
***Input Fields
CONCATENATE '000000000014' '200010671' ' BPBP' INTO l_key.
CLEAR lw_field.
CLEAR lt_field.
lw_field-ref_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lw_field-ref_handle = '0000000000'.
lw_field-ref_kind = 'A'.
lw_field-objectname = 'PARTNER'.
lw_field-logical_key = '000000000014200010671       BPBP'.
lw_fp-fieldname = 'PARTNER_FCT'.
INSERT lw_fp INTO TABLE lt_fp.
lw_field-field_names = lt_fp.
INSERT lw_field INTO TABLE lt_field.
data: lt_mode type CRMT_ORDERADM_H_COMT,
      lv_mode type CRMT_ORDERADM_H_COM.
lv_mode-guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lv_mode-mode = 'D'.
append lv_mode to lt_mode.
* For BADI to change EMP Resp, Status, Text Note
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
     it_partner                    = lt_partner
CHANGING
    CT_ORDERADM_H                  = lt_mode
    ct_input_fields                = lt_field
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA: it_guid TYPE crmt_object_guid_tab.
*      Lv_header_guid type crmt_object_guid.
Lv_header_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
APPEND LV_HEADER_GUID TO IT_GUID.
CALL FUNCTION 'CRM_ORDER_SAVE'
  EXPORTING
    it_objects_to_save         = it_guid
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =

Hi
Following is my code look like after all the suggestions. But it does not remove the partner. Can you have a look at code?
DATA: lt_activity TYPE crmt_activity_h_comt,
      lt_field TYPE crmt_input_field_tab ,
      lt_fp TYPE crmt_input_field_names_tab.
DATA: lw_activity TYPE crmt_activity_h_com,
      lw_field TYPE crmt_input_field,
      lw_fp TYPE crmt_input_field_names.
DATA: lt_guid TYPE crmt_object_guid_tab,
      lt_part  TYPE crmt_partner_external_wrkt,
      lv_partn TYPE crmt_partner_external_wrk,
      lv_header_guid TYPE crmt_object_guid.
CALL FUNCTION 'CRM_ORDER_READ'
  EXPORTING
    it_header_guid = lt_guid
  IMPORTING
    et_partner     = lt_part.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: lt_partner TYPE crmt_partner_comt,
      lv_partner TYPE crmt_partner_com.
lv_partner-ref_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lv_partner-ref_handle = '0000000000'.
lv_partner-ref_kind = 'A'.
lv_partner-ref_partner_handle = '0000'.
lv_partner-ref_partner_fct = '00000014'.
lv_partner-ref_partner_no = '200010671'.
lv_partner-ref_no_type = 'BP'.
lv_partner-ref_display_type = 'BP'.
lv_partner-partner_guid = 'DDCDB8C50DFC0CF19F94001E6849B4E8'.
lv_partner-kind_of_entry = ''.
***lv_partner-partner_fct = '00000014'. " Only comment partner_fct
lv_partner-partner_no = '200010671'.
lv_partner-display_type = 'BP'.
lv_partner-no_type = 'BP'.
lv_partner-mainpartner = 'X'.
INSERT lv_partner INTO TABLE lt_partner.
*data: l_key type CRMT_LOGICAL_KEY.
****Input Fields
*CONCATENATE '000000000014' '200010671' ' BPBP' INTO l_key.
CLEAR lw_field.
CLEAR lt_field.
lw_field-ref_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lw_field-ref_handle = '0000000000'.
lw_field-ref_kind = 'A'.
lw_field-objectname = 'PARTNER'.
lw_fp-fieldname = 'PARTNER_FCT'.
INSERT lw_fp INTO TABLE lt_fp.
lw_fp-fieldname = 'PARTNER_NO'.
INSERT lw_fp INTO TABLE lt_fp.
lw_fp-fieldname = 'REF_PARTNER_FCT'.
INSERT lw_fp INTO TABLE lt_fp.
lw_fp-fieldname = 'REF_PARTNER_NO'.
INSERT lw_fp INTO TABLE lt_fp.
lw_fp-fieldname = 'REF_GUID'.
INSERT lw_fp INTO TABLE lt_fp.
lw_field-field_names = lt_fp.
INSERT lw_field INTO TABLE lt_field.
DATA: lt_mode TYPE crmt_orderadm_h_comt,
      lv_mode TYPE crmt_orderadm_h_com.
lv_mode-guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
lv_mode-mode = 'D'.
APPEND lv_mode TO lt_mode.
DATA: it_guid TYPE crmt_object_guid_tab.
     Lv_header_guid type crmt_object_guid.
lv_header_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
APPEND lv_header_guid TO it_guid.
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
  EXPORTING
    iv_initialize_whole_buffer = 'X'
  EXCEPTIONS
    OTHERS                     = 2.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
  EXPORTING
    it_partner      = lt_partner
  CHANGING
    ct_input_fields = lt_field.
IF sy-subrc EQ 0.
  CALL FUNCTION 'CRM_STATUS_UPDATE_DIALOG'.
  lv_header_guid = 'DDCBF5EB8FA58FF19F94001E6849B4E8'.
  APPEND lv_header_guid TO it_guid.
  CALL FUNCTION 'CRM_ORDER_SAVE'
    EXPORTING
      it_objects_to_save = it_guid.
  IF sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
  ENDIF.
endif.

Similar Messages

  • BP Relationship is not deleted in CRM up on deletion of Partner Func in ECC

    Hi,
    We have used CUSTOMER_MAIN and CUSTOMER_REL to download the customers and relationships into CRM system from ECC system. We downloaded the customers and relationships without any issues. The delta like if any partner function is added to the customer in ECC system those changes are flowing into CRM with out any issues but when some partner function is deleted in ECC those changes are not getting replicated in CRM system (if we delete any partner function for a customer in ECC the corresponding relationship is not getting deleted in CRM system). Please let me know your thoughts on this as i dont know whether it is a standard process or do we missing any?
    Thanks in advance.
    Rajinikanth G.

    Hi ,
    Can you check in tcode R3AC4 whether object class BUPA is defined or not.
    We can also run a request load r3ar4 which  is defined in r3ar2.
    Thank you,
    Gangadhar.S

  • EDI partner profile not found

    Hi All,
    We are facing a recurring issue which happens in BW QA system after we refresh is from the BW production system.
    After about a week or so after the refresh, the data loads halt in the BW QA system and the BW team gets an error "EDI partner profile not available".
    After i checked, i found that the logical system name entry for the EDW QA system (i.e. self system entry) is missing from the table EDPP1 and also from transaction WE20.
    I re-created it in WE20 and the entry automatically got created in EDPP1 table.
    My question is :  I suspect that some job or application program is deleting this entry. We checked the background jobs but no luck.
                               How do i resolve this error. The client has come up with this question and he wants an answer as to why this
                               entry is being automatically.
    Can you please help?
    Regards,
    Hari Kishan

    Hi Ruchit,
    Yes. We run BDLS correctly. In fact, ONLY after BDLS jobs complete correctly, then we proceed with the further steps.
    However, as per your sugesstion, i went to BD64 but couldn;t find any relevant distribution model.
    Can you please elaborate this?
    I am still unable to understand how the entry "OBC100" is suddenly disappearing.
    One day, it is there and the BW loads run fine.
    Suddently, one day, its not there. This has happened on 2 occassions one week after the refresh.
    Regards,
    Hari Kishan

  • Partner funtions not coming up after saving the telesales order

    Hi All
    I have saved the sales order with product entry and entering all the manadatory partner functions. If I delete one of the partner fuctions at item level and again try to add that partner function, the related partner functions are not seen again.
    I have checked recurring option for all the access sequences to that partner functions . Please help me in this.

    Hello,
    Did you look for OSS notes on application area CRM-BF-PD? Depending on your CRM version, for example the following may fix your issue:
    Note 1035901 - Partner determination not complete at item level
    Note 716349   - Missing partner functions in the partner dropdown listbox
    Kind regards,
    Nicolas Busson.
    PS: I'm assuming that you are talking about missing partner functions in the corresponding field... and not that you are expecting the system to redetermine partner functions automatically after the order was saved (which is standart behavior).

  • Vendor not deleted

    Hi,
      I have replicated few vendors. Later I found out they were not necessary and I used the report BUPA_TEST_DELETE. But I found the vendors were not deleted in VenMAP and BBPM_BUT_FRG0061 table but their business partner deleted. Please advise as I need those vendors again.

    Hi
    Mostly vendor management must happen in only in ECC . However you deleted BP  via report .
    Can you run BBP_VENDOR_SYNC and see ..

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Can not delete Twitter mentions from the Hub

    Can not delete Twitter mentions from the Hub. When I delete, they reappear in a few minutes.

    I had the same problem,so i just deleted Twitter altogethet. Like was said before it must be bug among many they seem to have,including password compromises

  • IPhoto is not deleting my photo and freezes. Please help.

    I updated my iPhoto and now I am organizing and deleting some photos however it does not delete.
    I tried cutting it and it went to trash in iPhoto, and tried clearing the trash bin and it does not do anything.
    I also tried in the General tab to delete a photo and it freezes.
    It must be a bug on the latest update.
    Any thoughts?

    Oppps. just cheked and open the program while online and it finally worked.

  • Voice memos do not delete (1 hr of recordings)!

    Where I find these "undeleted" voice memos.  When I connect iPhone, itunes opens and on the top right I click iPhone. There are 10 tabs in total (Summary - Info - Apps - Tones - Music - Movies - TV Shows - Books - Photos - On This iPhone). I click On This iPhone.  On the far left side, it lists from top to bottom Music - Movies - Tones - All of my playlists.  The last one lists Voice Memo.  I click on Voice Memo.  I find 10 messages from June and July 2012, which I have deleted off of my iphone AND itunes.  I want to delete these 10 voice memos.  They are NOT on iPhone or iTunes.  I tried searching through computer, but nothing is found. 
    So why not delete them now? I physically can't.  I right click on the voice memo and there is no option to Copy, Paste, DELETE file.  It only gives the option of playing the music.  It is easier to see what I am saying so I am attaching a snapshot.  Notice that the voice memos are on my iphone, but not in itunes.  I looked all over itunes and there is not one voice memo.  Also, under the Music tab, include voice memos is not checked.

    try this one.
    https://discussions.apple.com/message/12383985#12383985

  • On iPhone 5s, I cannot see more than 11 messages.  I have NOT deleted older ones and need to view them.  How?  Scrolling in the list of 11 does not help.

    On iPhone 5s, when I click on "Messages" I can only view eleven when I scroll.  I need to view the older ones which I have NOT deleted.  How can I do that, please?

    You need the version of iPhoto that you wan tot use installed and then follow the IPLM directions
    http://www.fatcatsoftware.com/iplm/Help/downgrading%20a%20library%20to%20an%20ea rlier%20version%20of%20iphoto.html
    Downgrading a library to an earlier version of iPhoto
    If you have a library from a newer version of iPhoto that you simply want "downgrade" to an older version of iPhoto, the easiest way to do that is with the "Rebuild Library" command. You will want to be running iPhoto Library Manager on the machine that has the older version of iPhoto you want to convert the library to. This will create a new library and import the entire contents of the original library into the new one using the older version of iPhoto. As with any rebuild, there are some items that will not be included (most notably, hidden photos, books, calendars, and slideshows), but if you have none of these items or don't mind losing them in the downgrading process, then this is a decent option for converting a library to an older version.
    LN

  • IMAP option to not delete from server OR recommend alternate mail app?

    Using POP in Windows computer and IMAP on iphone.
    In the iphone, POP has the opton to "delete from server: never"
    There seems no way to accomplish this in the stock mail app when using IMAP ?
    Using POP on the iphone is not an option due to the longstanding issue of the Apple mail apps not sending a  proper termination signal back. The mailbox remains locked until the server times it out for inactivity and cleans up the stale lock after 10 minutes. The result is "wrong password" on the computer if it then tries to retrieve during that period. It's a feature of POP by design to use a lock to prevent corruption caused by simultaneous access to the mailbox. BUT, BB,Android,Windows all handle this correctly so that their POP transaction (and the mailbox lock) only lasts seconds! Only ever see this persistent lock with Apple mail clients
    The user likes to keep his phone inbox clean, he will delete messages as he deals with them as well as messages he is postponing to deal with on computer later.
    Moving messages to a 'later' folder won't help, as that 'later' folder will not be available thru POP (for the computer)
    They also don't want to use IMAP on the computer because they don't want their communications stored on the server any longer than necessary.
    Can anyone recommend:
    - Windows IMAP client which downloads all and keeps a local copy of inbox which does not synch with server inbox.
    - Alternate mail app for iphone which allows "delete from device only // never delete from server "

    That's not how IMAP works. If you want to keep the inbox clean, but not delete the messages, create folders and move the messages into them for later review.

  • IPhone 5 can not delete emails. Will not move to trash folder or empty trash

    iPhone 5, I can get mai. I can send mail. I can not delete mail. If i click to send the read mail to trash folder... error ca not move mail to trash folder.
    I can move read mail to the trash folder, but can not empty the folder...
    HELP

    Read this thread https://discussions.apple.com/message/5616151#5616151

  • TS4153 few files and folder are not deleting from trash folder

    i am trying to delete all files and folders from the trash folder by clicking  empty securely, but its not deleteing the files anf folder. please suggest how to clean the trash folder by deleteing all the deleted files and folder.

    Securely deleting items in Trash writes Zeros over the data so that it is completely eradicated.
    This will take quit a long time depending on how much data you have in Trash.
    Unless there is data that needs to be rendered unrecoverable in the Trash, you could choose to just delete the files and folders with out the secure option.
    Once you have Emptied the Trash unsecurely you can always use disk utility to Securely Erase Free Space on the Drive.

  • Trash will not delete from trash folder! What can cause this effect?

    Trash will not delete from trash folder! What can cause this effect?

    u can actually force it to delete, oviously i assume you dont have the application or data etc open neware else?
    try restarting your computer, go into finder close all your open applications etc, servers, **** even clear your data in your web browser, do a disk utility check and verify your drives and repair em if nessicary.
    as chamar suggested look at http://www.thexlab.com/faqs/trash.html
    i had the same problem before but with a good 5-10 minutes of googling i was able to solve it..
    best of luck

  • Epub books show up in ipad on itunes but do not show up on ipad. Also can not delete the books from ipad in itunes

    epub books show up in ipad on itunes but do not show up on ipad. Also can not delete the books from ipad in itunes

    You have no choice but to lose your data back to the last backup you made.
    Here's how to do the recovery.  Note you may have to try to get into recovery mode more than once to succeed:
    HT1808
    I'm sure next time, you'll be more vigilant about keeping current backups.

Maybe you are looking for

  • Can no longer connect to the internet...

    I got my Macbook about 2 years ago and since then, I have been able to connect to the wireless network in my house and various other locations just fine. Yesterday, I took my laptop to school, connected to the wifi there, browsed the web a bit and th

  • Urgent, please help! OLE API from Oracle 7 to Oracle 8

    Hi, Our company has a client application developed basing on VC++, Oracle OLE to communication with Oracle database.(WinNT) Now, we upgrade the client side from Oracle 7 to Oracle 8, then using new version OLE API. My question is: 1. if or not, we ha

  • Semmingly intractable JDBC connect problem

    Greetings, I am having massive difficulties getting our application to talk to our oracle database. We've (probably unwisely) upgraded the OS to RH9, the database to Oracle 9i and the JDK to 1.3.1 (from RH7, 8i and 1.2). The problem is that when I tr

  • Importing into Elements 10 from Digital Photo Professional

    Dont seem to be able to open my RAW files from Digital Photo Professional into Elements 10 - have I missed something or is this not possible Thanks pamay

  • 11 radiobuttons giving different output

    Hi, I'm using 11 radiobuttons on my selection screen. each button gives me output in different format. how to do that? again i want to give one listbox/textbox attach to some perticular radiobuttons. can i do that also? Thanks, Deepika