Current position:  Home > Default > CRM order giving the document could not be saved exception! Please help!

CRM order giving the document could not be saved exception! Please help!

Time:December 10
Advertisement
Hi Experts,
   I am changing the status of a order using CRM_STATUS_CHANGE_EXTERN and CRM_STATUS_CHANGE_INTERN.
   After this I call CRM_ORDER_INITIALIZE and the BAPI_BUSPROCESSND_SAVE.
   Finally commit.
           CALL FUNCTION 'CRM_ORDER_INITIALIZE'
              EXPORTING
                it_guids_to_init  = lt_crmd_guids
                iv_init_frame_log = 'X'
                iv_keep_lock      = 'X'
              EXCEPTIONS
                error_occurred    = 1
                OTHERS            = 2.
            ls_obj_save-guid = v_header_guid.
            append ls_obj_save TO lt_obj_save.
            CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
               EXPORTING
                UPDATE_TASK_LOCAL       = 'X'  "commented. Taking default
                 SAVE_FRAME_LOG          = 'X'
               IMPORTING
                 LOG_HANDLE              = lv_log_handle
                TABLES
                  OBJECTS_TO_SAVE         =  lt_obj_save
                  SAVED_OBJECTS           =  lt_obj_saved
                  RETURN                  =  lt_return.
    The function BAPI_BUSPROCESSND_SAVE is returning error: The document could not be saved in it_return. I am not getting any other details. What am I doing wrong? Please help!
Thanks & Regards
Gopal
Advertisement
Hi Robert,
   The SPRO settings seems to be fine.
   The problem is that the order is not getting saved whenever there is backward status change. However if I see the item status via tcode "crmd_order" then it actually shows the new status. In other words status is changing but still order is not getting saved.
   When I debugged the code I found that first It has successfully executed the FM CRM_STATUS_CHANGE_EXTERN and then when CRM_ORDER SAVE is called the parameter et_saved_objects is empty. I am passing header Guid in  it_objects_to_save. If order is saved properly then et_saved_objects should be filled with order guid.
CALL FUNCTION 'CRM_ORDER_SAVE'
               EXPORTING
                 it_objects_to_save = lt_save
               IMPORTING
                 et_saved_objects   = lt_saved_obj
               EXCEPTIONS
                 document_not_saved = 1
                 OTHERS             = 2.
On further debugging inside CRM_ORDER SAVE I found that the FM CRM_EVENT_PASS_INFO_EXE_OW returns lt_events empty. That means the given guid  is not registered for saving. Why is this so?
  are there objects registered for saving
    call function 'CRM_EVENT_PASS_INFO_EXE_OW'
      exporting
        iv_exetime     = gc_event_exec_time-save_order
        iv_order_guid  = ls_object_to_save
        iv_obj_kind    = gc_object_kind-orderadm_h
      importing
        et_event_calls = lt_events
      exceptions
        others         = 99.
    if lt_events is initial.
      delete ct_objects_to_save.
      continue.
    endif.
   The problem is when the order is not getting saved the status change is not getting transferred to BW or BI.
   What could be the issue?
Thanks
Gopal
Edited by: gopalkrishna baliga on Apr 7, 2011 5:59 AM
Edited by: gopalkrishna baliga on Apr 7, 2011 6:09 AM

CRM order giving message type X

-0001-11-30

In transaction crmd_order. While creating order and while saving we found it is not required and we click on new order again and it dumps out with error X in the function module crm_order_maintain_multi_ow, which again sets in CRM_ORDER_CHECK_RECURSI

Run time error while closing the CRM Order using BAPI

2015-10-11

Hi Experts, Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue. I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep

Terms  of payment  in  CRM  order is not  getting   copied  to  the  Accout

2015-10-11

Hi Experts The terms  of  payment  which has been  selected inthe CRM order  under  the billing  tab is  appearing  up  to  the  invoice created  in CRM . But the same  terms of payment  is not  appearing  inthe  accounting  documents  generated in 

How to lock CRM orders considering the lock scope

-0001-11-30

Hello All, I am currently using Function Modules CRM_ORDER_ENQUEUE and CRM_ORDER_DEQUEUE to lock and unlock these orders respectively. However, these two function modules do not take the lock scope into picture. I need to use function modules which c

Last Purchase Order and FI-Document Number of an Vendor

2015-10-11

Hi, i need for an Vendor the last purchase Order and FI-Document Number. For purchase Order i read EKKO sort this and get the last one. For FI-Document Number i read BSIK and BSAK sort this and get last one. Question: is there any faster way (CLASS,

How to update user status in CRM Order depending the delivery status in R/3

2015-10-11

Hi All, In my scenario the partial delivery allowed to the customer while creating the CRM Order. But as per my requirement the status should be updated when the complete order and delivery takes place.    Let me describe you clearly: Suppose I want

WBS Element in CRM order

2015-10-11

Hi forum!! In the ERP order we assign a item of a order to a WBS element and we need to see that WBS element in CRM but that field does not appear in the CRM order!! Because of that I think about creating an ERP Order in CRM Order because the WBS ele

Sale Order without a Document Flow

2015-10-11

Hallo Everybody, How can i copy a sale Order without a Document Flow ? Thanks.Hi, Try to use the FM BAPI_SALESDOCUMENT_COPY Rgds, BujjjiRead other 2 answers

Purchase orders and sales documents

2015-10-11

hi what r the transaction codes for purchase orders and sales documents.Hi Mohan, ME2C  Purchase Orders by Material Group ME2J  Purchase Orders for Project ME2L  Purchase Orders by Vendor ME2M  Purchase Orders by Material ME2N  Purchase Orders by PO

How to Create Excise Invoice (J1IIN) with order related billing document

2015-10-11

Dear Experts, Is it possible  to Create Excise Invoice (J1IIN) with order related billing document? How? please guide Regards BK GAIKWADSir, We have make the supplementary Invoice (Debit Note) as per below process 1) Create sales order_VA01 2) Create

CRM orders with error "Do not enter a business agreement for sold-to party"

2015-10-11

Dear SDN'ler, after creating orders in SAP CRM via ISA (CRM 4.0) and uploading them to R/3 all orders are created successfully in R/3 but an error message is sent back to SAP CRM in case of ALL orders. Error message is the following: "Do not enter a

Availability check on storages in sales order and delivery documents

2015-10-11

Hi all, I'm verifying if it's possible to find a standard or a custom solution for this type of problem: I have a scenario in which there are more storages relevant for MRP (ex. 01, 02, 03, 04), and, in if I check availability in sales order or deliv

Error in Action when CRM Order is updated as Error from R/3 update

2015-10-11

Hi, Currently we are in CRM 6.0 SP04 and R/3 4.7 SP14 Process: 1) B2B user places order through ISA 2) Order gets replicated R/3 from CRM through middleware (Scenario A setting) 3) If there are any changes in order on either side, changes gets replic

Purchase Order Modification: External Document Number already assigned

2015-10-11

Hello, We're running Extended Classic Scenario in a SRM 4.0 implementation. The problem is the following: When the user modifies a purchase order (this purchase order is already replicated to the backend), sometimes (not always), the next error occur

How can we process the CRM Order again for second time in debugging mode

2015-10-11

Hi, Can anybody please tell me how can we process the CRM ORDER for second time.  that I want to process in debugging mode. Thanks, bsvHi bsv, Are you trying to reprocess a BDOC for debugging purpose? If the BDOC is not with a final status, you will

Status determination in CRM order connected with delivery in R/3

2015-10-11

Hi Experts, I need to determine status "completed" in CRM order always when a delivery took place in R/3. Of course this is no problem, when all positions were delivered. But in R/3 we do have only one delivery per order and a Badi determines th

User exit to copy the data from sales order to billing document

2015-10-11

hi everyone, Is there an user exit to copy the data from sales order to billing document? Regards Prabudhhi copy control would be the better option to choose.. but still u can a give a search in list below and opt for the right one..Refer to the link

Copying Text From Sales order to Billing Document

2015-10-11

Hi all, I have searched all posts for my issue but found nothing so that i am posting this issue. I want to copy the Some text form sales order to billing document is there any cnfig to do this order is there any exit for billing in which i can write

How to pull the Sale order number(sales document) to Accounting document

2015-10-11

Hi Gurus, How to pull the sale order number to the accounting document. Is any configuration needed to this. When i run the FBL5N Repoprt ,Sale order number (Sales document) is not getting updated to accounting document.It is diplaying as blank field