CRMXIF_ORDER_SAVE
Hi all,
I saw that I can call CRMXIF_ORDER_SAVE with multiple GUIDS..so I can process more orders by calling the function ones. Is it correct?
I try to do this but sometimes if an error occurs on one order, other orders don't be processed.
Can anyone help me?
Best Regards
Raffaele
Raffaele,
You are correct that multiple orders could be processed by the function module, however this goes back to the basic LUW concept.
If we work on 10 objects all at once and one object fails then the entire block fails since the rollback statement will rollback all entries made.
If you truly need to each entry to be processed independent of one another, then you need to call the function module per order and then commit work per transaction. Each transaction that fails then would be rolled back and logged.
Another concept that I can not guarantee will work is the following:
-Call the CRMXIF_ORDER_SAVE n times for the block of n transactions you want to save
-Commit work regardless of errors per each block
I believe you should get only the "valid" transactions saved and the invalid transactions not saved. This keeps the transactions as "separate" bdocs, but allows for performance benefits of group processing.
When you pass all the orders in at once, you are technically create "one bdoc" that would pass/fail on the whole.
Good luck,
Stephen
Similar Messages
-
How to update a BP status Using CRMXIF_ORDER_SAVE for any transaction .
Hey i am able to perform deleting a transaction or inserting a BP for a transaction using CRMXIF_ORDER_SAVE .
But i am not able to delete or update a BP for a transaction using my program .
REPORT ZCRMBUSIPART1.
data : t_crm type CRMXIF_BUSTRANS_T ,
wa_crm like line of t_crm ,
wa type CRMXIF_PARTNER ,
i_ret type BAPIRETM .
*PARAMETER : p_input type CRMXIF_BUSTRANS-object_id .
wa_crm-OBJECT_TASK = 'U' .
wa_crm-object_guid = '220939E0B523274FB6C0E380766BCEEA' .
wa_crm-partner-datax = 'X'.
wa-partner_fct = '00000031'.
wa-partner_no = '0000000025'.
wa-object_task = 'U'.
wa-kind_of_entry = 'A'.
wa-addr_type = '2'.
wa-display_type = 'BP'.
wa-MAINPARTNER = ''.
wa-input_fields-PARTNER_FCT = 'X'.
wa-input_fields-partner_no = 'X'.
wa-input_fields-kind_of_entry = 'X'.
wa-input_fields-addr_type = 'X'.
wa-input_fields-display_type = 'X'.
wa-input_fields-MAINPARTNER = 'X' .
append wa to wa_crm-partner-data .
append wa_crm to t_crm .
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = t_crm
IMPORTING
RETURN = i_ret
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
write 'done'.
IF any1 can please point out the reason , it wud be appreciated .
THanks guyzHi ,
PUT a break point in CRM_ORDER_MAINTAIN and try to change the partner in order and you will come to know which values needs to be passed.
example.
REF_GUID pass the ref guid
REF_HANDLE 0000000000
REF_KIND pass the ref kind
REF_PARTNER_HANDLE 0000
REF_PARTNER_FCT pass the old partner function
REF_PARTNER_NO pass the old partner no
REF_NO_TYPE BP
REF_DISPLAY_TYPE BP
PARTNER_GUID pass the guid
KIND_OF_ENTRY pass the kind of entry
PARTNER_FCT new partner function
PARTNER_NO new partner no
DISPLAY_TYPE BP
NO_TYPE BP
Regards,
Gangadhar.S
Edited by: gangadhar rao on Mar 7, 2011 11:31 AM -
Error in CRMXIF_ORDER_SAVE - Urgent
I'm Creating a sales order in CRM using CRMXIF_ORDER_SAVE, my program is giving synthetically correct, but when i'm going to activate, it gves Inconsistency between Ditonary type CRMXIF_BUSTRANS_ITEM_T and CRMXIF_BUSTRANS_ITEM.
Please can anyone help me on this.
Thanxs
*& Report Z_SALESORDER_CREATE *
Description : program to create Sales Order using BAPI.
REPORT Z_SALESORDER_CREATE .
TABLES : CRMD_ORDERADM_H , CRMD_ORDERADM_I .
*DATA DECLARATION
CONSTANTS : C_X VALUE 'X'.
*Structures to hold PO header data
*DATA : HEADER TYPE STANDARD TABLE OF CRMXIF_BUSTRANS WITH HEADER LINE ,
RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
data : header type CRMXIF_BUSTRANS_T with header line,
return like bapiret2 occurs 0 with header line.
data : it_item type STANDARD TABLE OF CRMXIF_BUSTRANS_ITEM,
wa_item like line of it_item.
*data : wa_item type CRMXIF_BUSTRANS_ITEM
*DATA : IT_ITEM TYPE STANDARD TABLE OF CRMXIF_BUSTRANS_ITEM ,
WA_ITEM TYPE CRMXIF_BUSTRANS_ITEM.
data : ws_langu like sy-langu.
Parameters
selection-screen begin of block b1 with frame title text-001.
parameters : proc_tp like header-PROCESS_TYPE default 'YOR1',
doc_date like header-POSTING_DATE default sy-datum,
logsysfi like header-LOGICAL_SYSTEM default 'CRDCLNT220'.
co_code like header-co_code default '0103',
p_sold TYPE kunnr default '2000000060',
p_ship TYPE kunnr default '2000000060'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
*parameters : item_num like IT_ITEM-ITEM_NUMBER default '00001',
material like IT_ITEM-product_id default '300000020' .
quantity like it_ITEM-TOTAL_QUANTITY default 10.
parameters : item_num TYPE CRMT_ITEM_NO default '00001',
material TYPE COMT_PRODUCT_ID default '300000020' .
quantity like it_ITEM-TOTAL_QUANTITY default 10.
selection-screen end of block b2.
START-OF-SELECTION.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
HEADER-PROCESS_TYPE = PROC_TP.
HEADER-POSTING_DATE = sy-datum.
HEADER-LOGICAL_SYSTEM = LOGSYSFI.
*POPULATE HEADER FLAG.
*HEADERX-PARENT_GUID = c_x.
*HEADERX-doc_date = c_x.
*POPULATE ITEM DATA.
wa_ITEM-ITEM_number = item_num.
wa_ITEM-product_id = material.
*wa_ITEM-TOTAL_QUANTITY = 10.
append wa_item to it_item.
HEADER-ITEM = IT_ITEM.
*wa_ITEM-ITEM_number = '10'.
*wa_ITEM-product_id = '000000000300000020'.
*wa_ITEM-QUANTITY = quantity.
*append wa_item to it_item.
*BAPI CALL
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = header
IMPORTING
RETURN =
*Confirm the document creation by calling database COMMIT
*CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
**end-of-selection.
***Output the messages returned from BAPI call
LOOP AT RETURN.
WRITE / RETURN-MESSAGE.
ENDLOOP.The CRM_ORDER_MAINTAIN was called
-
CRMXIF_ORDER_SAVE Test Returns Error Exception CX_ST_REF_ACCESS
Hello,
We are on CRM 6.0 Landscape. I create a Web Service from FM CRMXIF_ORDER_SAVE and when I do a Test from WS Navigator by passing existing Quotation Number and a new Product ID in ITEM I get following error SOAP Response:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Server</faultcode>
<faultstring xml:lang="en">CX_ST_REF_ACCESS:XSLT exception.Error accessing the ref. node 'CODEGROUP'</faultstring>
<detail>
<ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">
<Host>undefined</Host>
<Component>APPL</Component>
<ChainedException>
<Exception_Name>CX_SOAP_CORE</Exception_Name>
<Exception_Text>CX_ST_REF_ACCESS:XSLT exception.Error accessing the ref. node 'CODEGROUP'</Exception_Text>
</ChainedException>
<ChainedException>
<Exception_Name>CX_SXMLP</Exception_Name>
<Exception_Text>XSLT exception</Exception_Text>
</ChainedException>
<ChainedException>
<Exception_Name>CX_ST_REF_ACCESS</Exception_Name>
<Exception_Text>Error accessing the ref. node 'CODEGROUP':
Main Program:/1BCDWB/WSSFF1BC1FC25035BB462A| Program:/1BCDWB/WSSFF1BC1FC25035BB462A| Line: 11| Valid:X</Exception_Text>
</ChainedException>
</ns:SystemFault>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
Can anybody tell me what am I doing wrong here? And what and why exactly am I suppose to fill in values for CODEGROUP? This particular field appears in multiple internal tables.
Thanks and Regards,
VasuHi,
Here is a very smart tool for webservice test:
[soapUI|http://www.soapui.org/]
It works fine for me!
bg,
attila -
CRMXIF_ORDER_SAVE - not getting any error log
Hi,
I am using the FM CRMXIF_ORDER_SAVE for creating a quotation in CRM. I have poplulated all the required fileds but the FM is not returning any error value. Kindly help me in solving the problem. Please find the sample code below. Correct answers would be rewarded.
*& Report ZTEST_BAPI
REPORT ztest_bapi.
TABLES : crmd_orderadm_h , crmd_orderadm_i.
*DATA DECLARATION
CONSTANTS : c_x VALUE 'X'.
DATA : lt_header TYPE crmxif_bustrans_t.
DATA : ls_header TYPE crmxif_bustrans.
DATA : ls_item TYPE crmxif_bustrans_item.
DATA : lt_item TYPE crmxif_bustrans_item_t.
DATA : ls_orgdata TYPE crmxif_orgman.
DATA: ls_partner TYPE crmxif_partner,
itab_partner LIKE TABLE OF ls_partner.
DATA: BEGIN OF wa_temp_partner,
partner_no(10) TYPE c,
*partner_fct(8) TYPE c,
*partner_pft(4) TYPE c,
*pft_subtype(4) TYPE c,
END OF wa_temp_partner,
itab LIKE TABLE OF wa_temp_partner.
DATA: wa_bapiretm TYPE bapiretm,
wa_bapireti TYPE bapireti .
DATA: wa_bapiretc TYPE bapiretc.
DATA : it_item TYPE STANDARD TABLE OF crmxif_bustrans_item WITH HEADER LINE ,
wa_item TYPE crmxif_bustrans_item.
DATA : ws_langu LIKE sy-langu.
DATA: idx TYPE sy-tabix.
Parameters
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : proc_tp LIKE crmd_orderadm_h-process_type DEFAULT 'ZSRQ',
doc_date LIKE crmd_orderadm_h-posting_date DEFAULT sy-datum.
*logsysfi like header-LOGICAL_SYSTEM default 'CRDCLNT220'.
co_code like header-co_code default '0103',
p_sold TYPE kunnr default '2000000060',
p_ship TYPE kunnr default '2000000060'.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : item_num LIKE it_item-item_number,
material LIKE it_item-product_id. .
quantity like it_ITEM-TOTAL_QUANTITY default 10.
SELECTION-SCREEN END OF BLOCK b2.
START-OF-SELECTION.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
ls_header-process_type = proc_tp .
ls_header-object_type = 'BUS2000115'.
ls_header-posting_date = sy-datum.
ls_header-descr_language = 'E'.
ls_header-posting_date = sy-datum .
FILLING THE STRUCTURE OF THE PARTNER *
ls_partner-partner_no = '212'.
APPEND wa_temp_partner TO itab.
LOOP AT itab INTO wa_temp_partner.
MOVE-CORRESPONDING wa_temp_partner TO ls_partner.
APPEND ls_partner TO itab_partner.
ENDLOOP.
MOVE itab_partner TO ls_header-partner-data.
FILLING THE STRUCTURE OF THE ORGMAN *
ls_orgdata-sales_org = 'QR04'.
ls_orgdata-dis_channel = '04'.
ls_orgdata-division = '10'.
MOVE ls_orgdata TO ls_header-orgdata-data.
FILLING THE STRUCTURE OF THE ITEM *
ls_item-product_id = item_num.
ls_item-product_id = '000000000010002311'.
ls_item-item_type = 'SQRS'.
crmxif_schedlin_i-order_qty = '6'
CRMXIF_BUSTRANS-VALID_FROM_EXT = 'sy-datum'
APPEND ls_item TO lt_item.
APPEND ls_partner TO lt_partner.
APPEND ls_item TO ls_header-item .
APPEND ls_header TO lt_header.
*BAPI CALL
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = lt_header
IMPORTING
return = wa_bapiretm.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
LOOP AT wa_bapiretm INTO wa_bapireti.
LOOP AT wa_bapireti-object_msg INTO wa_bapiretc.
WRITE: / wa_bapiretc-message , wa_bapiretc-type,wa_bapiretc-number.
WRITE: / wa_bapiretc-message_v1,wa_bapiretc-message_v2.
ENDLOOP.
ENDLOOP.Hi Partha,
Kindly check the following thread.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/406efa7e-388a-2910-f9b8-81913b0ca57f?QuickLink=index&overridelayout=true
XIF adapter
Hope it answers your Query
Regards,
Srikanth.Naga -
CRMXIF_ORDER_SAVE no data in result XML
Hi,
I am trying export order from SAP CRM to another system, I need export XML, not IDoc.
I have made all customizing in tranzactions SM59, SMOEAC, CRMXIF_C1.
But after I create Order and press save, I have no order data in XML file,
I have this file
<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <saprfc:CRMXIF_ORDER_SAVE xmlns:saprfc="urn:sap-com:document:sap:soap:functions:uc-style">
<DATA />
</saprfc:CRMXIF_ORDER_SAVE>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<DATA> is empty
If I do the same steps for Business partner, I have data in XML
What is the differences for export Order and Business partner through XIF adapter?
Why I can't export Order's data?
Best regards,
Alexander.No Idea?
-
Problem with FM CRMXIF_ORDER_SAVE
Ladies and Gentlemen,
I'm experiencing problems when trying to create an Opportunity in CRM using the Function CRMXIF_ORDER_SAVE.
I am calling the function from with the CRM system. As I only require the Opportunity Header to be created, I am populating the following segments in the Data Structure:
Orderadm
Opportunity
Partner
Pricing
The when executing the program calling this function, the FM returns successfully, but no return message is presented back. The following BAPI_TRANSACTION_COMMIT does not find anything to post. Could someone identify from this information, is there a key structure is not being populated that could prevent the opportunity from being created?
Please note that I am doing the following:
- I am not using a BDOC, I am simply populating the Data Structure with the required values
- For every field that I am populating values for, I am populating the corresponding field value 'X' in the input_fields structure associated with the data structure.
In short, any ideas why the opportunity is not being created? Do I need to enter a '?' or someother placeholder in the GUID field?
I'm all out of thoughts. Any assistance will be greatly appreciated and points will be awarded.
Regards,
SteveWasn't populating the segment DATAX field.
-
Using CRMXIF_ORDER_SAVE to update configurations
Dear All,
We are using the function module CRMXIF_ORDER_SAVE from the XIF interface of CRM in order to update configurations in several Order Contracts in CRM. After run we see the configuration correctly in the IPC configuration screen when displaying the contract (Transaction CRMD_ORDER). However, when using the function module crm_config_read_ow to reread the configuration, it is missing most of the characteristics. This is corrected as soon as we open and just save the configuration from the crmd_order. This leads to the conclusion that the FM CRMXIF_ORDER_SAVE produces some instability in the database (CBASE, IPC etc?). Also, it was observed, but not always that some characteristics might disappear (lost) when we use FM CRMXIF_ORDER_SAVE even though we explicitly set values during the FM call. Does anybody had a similar situation or have try to update configuration using this FM? Please HelpHi Socrates,
Can you please tell how you solved this ? Can you please post me a sample code showing the fields which need to be populated for updating the order?
Thank you
Ajith -
How to create Lease Contract in CRM using CRMXIF_ORDER_SAVE
Hi All,
I need to upload CRM Lease contract from Legacy data in a flat file. I have created a test program where I call function module "CRMXIF_ORDER_SAVE".
When I run this FM, it is creating a BDoc of type BUS_TRANS_MSG and I can see them in Txn SMW01
Couls anyone please tell me:
1. What next steps I need to follow to create a Lease Contract. Do I need to do some setting for BDoc consumoption.
2. Is there any other alternative way like BAPI etc to create lease contract in CRM.
<b>Reward point is gurranted for REAL HELPFUL answers.</b>
-Regards
Ashim
I am also attching the code of my test program
*& Report YTESTCRMXIF_ORDER_SAVE
REPORT YTESTCRMXIF_ORDER_SAVE.
DATA WA_CRMXIF_BUSTRANS_T TYPE CRMXIF_BUSTRANS_T.
DATA WA_CRMXIF_BUSTRANS TYPE CRMXIF_BUSTRANS.
DATA WA_CRMXIF_ORGMAN TYPE CRMXIF_ORGMAN.
DATA: WA_CRMXIF_STATUS TYPE CRMXIF_STATUS,
ITAB_STATUS LIKE TABLE OF WA_CRMXIF_STATUS.
DATA: WA_BAPIRETM TYPE BAPIRETM,
WA_BAPIRETI TYPE BAPIRETI .
DATA: WA_BAPIRETC TYPE BAPIRETC.
DATA: WA_PARTNER TYPE CRMXIF_PARTNER,
ITAB_PARTNER LIKE TABLE OF WA_PARTNER.
DATA: BEGIN OF WA_TEMP_PARTNER,
PARTNER_NO(10) TYPE C,
PARTNER_FCT(8) TYPE C,
PARTNER_PFT(4) TYPE C,
PFT_SUBTYPE(4) TYPE C,
END OF WA_TEMP_PARTNER,
ITAB LIKE TABLE OF WA_TEMP_PARTNER.
FILLING THE STRUCTURE OF THE PARTNER *
WA_TEMP_PARTNER-PARTNER_NO = '0010000002'. WA_TEMP_PARTNER-PARTNER_FCT = '00000035'.
WA_TEMP_PARTNER-PARTNER_PFT = '0012'. WA_TEMP_PARTNER-PFT_SUBTYPE = 'CRM '.
APPEND WA_TEMP_PARTNER TO ITAB.
WA_TEMP_PARTNER-PARTNER_NO = '0010000002'. WA_TEMP_PARTNER-PARTNER_FCT = 'Z0000002'.
WA_TEMP_PARTNER-PARTNER_PFT = '0029'. WA_TEMP_PARTNER-PFT_SUBTYPE = 'CRM '.
APPEND WA_TEMP_PARTNER TO ITAB.
LOOP AT ITAB INTO WA_TEMP_PARTNER.
MOVE-CORRESPONDING WA_TEMP_PARTNER TO WA_PARTNER.
APPEND WA_PARTNER TO ITAB_PARTNER.
ENDLOOP.
END FILLING THE STRUCTURE OF THE PARTNER *
FILLING THE STRUCTURE OF THE ORDER HEADER *
WA_CRMXIF_BUSTRANS-OBJECT_TASK = 'I'.
WA_CRMXIF_BUSTRANS-PROCESS_TYPE = 'LEAS'.
WA_CRMXIF_BUSTRANS-OBJECT_TYPE = 'BUS2000114'.
WA_CRMXIF_BUSTRANS-POSTING_DATE = 20061026.
WA_CRMXIF_BUSTRANS-DESCR_LANGUAGE = 'E'.
WA_CRMXIF_BUSTRANS-CREATED_AT = 20061026203200.
WA_CRMXIF_BUSTRANS-CREATED_BY = 'DUTTAK'.
WA_CRMXIF_BUSTRANS-CALC_SCHEMA = 'Z00050'.
WA_CRMXIF_BUSTRANS-SCENARIO = 'A'.
WA_CRMXIF_BUSTRANS-LOGICAL_SYSTEM = 'CDTCLN400'.
WA_CRMXIF_BUSTRANS-CRM_RELEASE = 'BBPCRM 500'.
WA_CRMXIF_BUSTRANS-CLIENT = 400.
END FILLING THE STRUCTURE OF THE ORDER HEADER *
FILLING THE STRUCTURE OF THE ORGMAN *
WA_CRMXIF_ORGMAN-SALES_ORG = 'O 50000000'.
WA_CRMXIF_ORGMAN-SALES_ORG_RESP = 'O 50000000'.
WA_CRMXIF_ORGMAN-DIS_CHANNEL = '10'.
WA_CRMXIF_ORGMAN-DIVISION = '20'.
END FILLING THE STRUCTURE OF THE ORGMAN *
FILLING THE STRUCTURE OF STATUS *
WA_CRMXIF_STATUS-STATUS = 'I1282'.
WA_CRMXIF_STATUS-ACTIVE = 'X'.
WA_CRMXIF_STATUS-TXT04 = 'CONH'.
WA_CRMXIF_STATUS-TXT30 = 'Contract Header'.
APPEND WA_CRMXIF_STATUS TO ITAB_STATUS.
END FILLING THE STRUCTURE OF THE STATUS *
MOVE WA_CRMXIF_ORGMAN TO WA_CRMXIF_BUSTRANS-ORGDATA-DATA.
MOVE ITAB_STATUS TO WA_CRMXIF_BUSTRANS-STATUS-DATA.
MOVE ITAB_PARTNER TO WA_CRMXIF_BUSTRANS-PARTNER-DATA.
APPEND WA_CRMXIF_BUSTRANS TO WA_CRMXIF_BUSTRANS_T.
*LOOP AT WA_CRMXIF_BUSTRANS_T INTO WA_CRMXIF_BUSTRANS.
*LOOP AT WA_CRMXIF_BUSTRANS-PARTNER-DATA INTO WA_PARTNER.
WRITE: / WA_PARTNER-PARTNER_NO,WA_PARTNER-PARTNER_PFT,WA_PARTNER-PARTNER_FCT.
ENDLOOP.
*ENDLOOP.
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING DATA = WA_CRMXIF_BUSTRANS_T
IMPORTING RETURN = WA_BAPIRETM.
IF SY-SUBRC = 0.
WRITE 'CONTRACT CREATED SUCCESSFULLY'.
ELSE.
WRITE: 'SY-SUBRC =', SY-SUBRC.
ENDIF.
LOOP AT WA_BAPIRETM INTO WA_BAPIRETI.
LOOP AT WA_BAPIRETI-OBJECT_MSG INTO WA_BAPIRETC.
WRITE: / WA_BAPIRETC-MESSAGE , WA_BAPIRETC-TYPE,WA_BAPIRETC-NUMBER.
WRITE: / WA_BAPIRETC-MESSAGE_V1,WA_BAPIRETC-MESSAGE_V2.
ENDLOOP.
ENDLOOP.hi, it looks the crm pricing configuration doesn't suitable to the order data you inbounding.
You can try to input a order according to your inbound data in SAP GUI or WEB UI order screen, to check if the same error will also appear like IDOC inbound. If so, then the configuration is in problem.
You can check the pricing related configure, like pricing procedure, procedure assign, pricing condition record ,types, and IPC if it is activated or not.
If not, you can check the data your filled in idoc, maybe it is a data problem. -
COM/DCOM Error for RFC CRMXIF_ORDER_SAVE
Hi everybody,
I'm trying to create a SalesOrder from within a VBA environment on a SAP CRM 3.1 system. There is a SalesOrderCRM object on the system but only the God and probably the SAP knows how the input_field structure of the CreateDetailMulti BAPI/Method is to be filled for the method to work properly. I've been using the CRMXIF_ORDER_SAVE to create new Sales Ordersfrom my ABAP programms it was simple, fast and worked perfectly. Now I wanted to do the same thing from a VBA enviroment but when i try to wrap the function I get this error on the SAP DCOM Connector 'Cannot map RfcType 0x1c'. Access through the "SAP.Functions" Active X control fails too. With other BAPI's I'm not having problems of any kind, they can be mapped and accesed from VBA without problems. It seems to me that the data structure of the parameter DATA is just to complex to be mapped. Does anybody has any other idea's, how is this problem to be confronted?
Cheers
Astrit
P.S.
I'v already updated my workstation to the latest version of the librfc32.dllHello Astrit,
We are also creating sales contract document (object BUS2000121) by calling crmxif_order_save in a ABAP Program but the performance is very bad for example if i have to create a sales contract document containing 1000~1200 items, the function module is taking more than 3 hours.
Have you ever faced such a performance problem?
Have you aware of any flag setting in the input data
structure of crmxif_order_save which will improve the performance?
If you have any tips then pls let me know.
Best Regards
Ravi -
CRMXIF_ORDER_SAVE to create orders
Hi,
I'm trying to find ways to create sales orders in CRM via RFC calls. I would like to know from your experience:
1- Where I can find documentation, for precisely an example of how to fill the structure. I've seen ifr.sap.com but I've got no clue how to fill it all.
2- I need (it would be great) to create orders with custom conditions. I need for example that the value for condition PR00 is contained inside the struture so that when the order is created it uses the custom PR00 not the one from IPC automatic determiantion.
Tks in advanceJoao,
A few hints on how this works: The IPC is basically another RFC destination to CRM. The online processing for sales orders makes ABAP function module calls that eventually call the IPC as an RFC function.
In the structure for CRMXIF_ORDER_SAVE in the ITEMS segment there is a subsegment called PRICE_CONDITIONS. This is where you would actually input a pricing condition manually. You would need to setup your pricing procedure in such a fashion that the PR00 standard is not determined and instead your Z-condition is part of the calculation.
It is possible, to change the configuration or add pricing conditions via CRMXIF_ORDER_SAVE. It is very similiar to how BAPI_SALESORDER_CHANGE works in R/3. I would try seeing if you can first create a order in CRM with a PR00 condition and then see if you can simply add in your new condition via CRMXIF_ORDER_SAVE. If you can do that, then work with a pricing guru to figure out how to set the pricing procedure so no conditions are automatically determined, but require manual entry of the condition. Then you can programmatically come back in and dynamically add the pricing condition to your order.
Good luck,
Stephen -
CRMXIF_ORDER_SAVE for deletion of partner-role
Hello there,
I need to delete a partner-role from an order so I'm using BAPI CRMXIF_ORDER_SAVE. However, the partner is not being deleted. Please have a look at the content of the CRMXIF_BUSTRANS_T structure:
OBJECT_TASK U
OBJECT_GUID 46986070E6C6005702000000C0A8974B
OBJECT_ID
PROCESS_TYPE 0
OBJECT_TYPE BUS2000126
POSTING_DATE 20070730
DESCRIPTION Systemtechnik S1
DESCR_LANGUAGE D
DESCR_LANGUAGE_ISO
LOGICAL_SYSTEM
CRM_RELEASE
CLIENT
CREATED_AT 0
CREATED_BY
CHANGED_AT 0
CHANGED_BY
LOCAL_TIMEZONE
ARCHIVING_FLAG
OBJECT_ID_OK
HIGHEST_ITEM_NO 0
CRM_CHANGED_AT 0
DESCRIPTION_UC
EARLY_ORDER_NO
CALC_SCHEMA
SCENARIO
TEMPLATE_TYPE
VALID_FROM_EXT 0
VERIFY_DATE 0
ACTIVITY
LEAD
OPPORTUNITY
PARTNER
PARTNER_NO 260485
PARTNER_GUID
ALT_PARTNER_NO
ALT_PARTNER_NO_TYPE
IDENT_NUMBERS Table[initial]
PARTNER_FCT 15
PARTNER_PFT
PFT_SUBTYPE
MAINPARTNER
RELATION_PARTNER_NO
RELATION_PARTNER_GUID
CALENDAR
DISABLED
KIND_OF_ENTRY
ADDR_ORIGIN
STD_BP_ADDRESS
ADDR_OPERATION
ADDR_NR
ADDR_NP
ADDR_TYPE
DISPLAY_TYPE
ERROR_FLAG
DOC_ADDRESS
TERRITORY Table[initial]
OBJECT_TASK D
INPUT_FIELDS
ORGDATA
PRICING_PARAMS
BILLPLAN
BILLING
CANCELATION
SUBJECT
REF_OBJECT
SALES
SHIPPING
PAYPLAN
DATES
CUMULATION_HEAD
CONDENSED_STATUS
STATUS
DOC_FLOW
ATTACHMENT_LINK Table[initial]
TEXT
CUSTOMER_H
IPM_RCHAR
ITEM Table[initial]
CONTROL_SWITCHES
INPUT_FIELDS
Adding new partners to the order is working fine though.
Is there anything I got wrong?
Regards,
AnjaI still could use a little help here. For better testing I extracted the relevant coding into an evaluation-report:
DATA data TYPE crmxif_bustrans_t.
DATA is_data TYPE crmxif_bustrans.
data is_data_f type CRMXIF_BUSTRANS_F.
DATA is_actx TYPE crmxif_activity_x.
DATA is_act TYPE crmxif_activity.
DATA is_datesx TYPE crmxif_appointment_xt.
DATA it_dates TYPE crmxif_appointment_t.
DATA is_dates TYPE crmxif_appointment.
DATA is_statusx TYPE crmxif_status_xt.
DATA it_status TYPE crmxif_status_t.
DATA is_status TYPE crmxif_status.
DATA it_partnerx TYPE crmxif_partner_xt.
DATA it_partner TYPE crmxif_partner_t.
DATA is_partner TYPE crmxif_partner.
DATA is_partner_f TYPE crmxif_partner_f.
DATA lv_return TYPE bapiretm.
* HEADER
is_data-object_task = 'U'.
is_data-object_guid = '46AE8865377D005900000000C0A8974B'.
is_data-process_type = '0000'.
is_data-object_type = 'BUS2000126'.
is_data-posting_date = '20070731'.
is_data-description = 'Systemtechnik S1'.
is_data-descr_language = 'D'.
* ACTIVITY
is_act-category = 'Z99'.
is_act-extern_act_id = '420006760000124133'.
MOVE is_act TO is_actx-data.
is_actx-datax = 'X'.
MOVE is_actx TO is_data-activity.
* DATES
is_dates-appt_type = 'ORDERACTUAL'.
is_dates-timestamp_from = '20070801070000'.
is_dates-timestamp_to = '20070802130000'.
APPEND is_dates TO it_dates.
MOVE it_dates TO is_datesx-data.
is_datesx-datax = 'X'.
MOVE is_datesx TO is_data-dates.
*STATUS
is_status-status = 'E0003'.
is_status-user_stat_proc = 'CRMACTIV'.
is_status-active = 'X'.
is_status-language = 'D'.
append is_status to it_status.
move it_status to is_statusx-data.
is_statusx-datax = 'X'.
move is_statusx to is_data-status.
* PARTNER
is_partner-partner_guid = '42004B723E57004300000000C0A89748'.
is_partner-partner_fct = '00000015'.
is_partner-object_task = 'D'.
is_partner_f-partner_guid = 'X'.
is_partner_f-partner_fct = 'X'.
move is_partner_f to is_partner-INPUT_FIELDS.
APPEND is_partner TO it_partner.
MOVE it_partner TO it_partnerx-data.
it_partnerx-datax = 'X'.
MOVE it_partnerx TO is_data-partner.
APPEND is_data TO data.
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = data
IMPORTING
return = lv_return.
COMMIT WORK.
Does s.o. see anything conspicuous?
Regards,
Anja -
CRMXIF_ORDER_SAVE update and delete
dear all, i am trying to understand how to use the CRMXIF_ORDER_SAVE to make changes to orders (edits and deletes). it appears there is an old and new style of using this function module. i only have the documentation on the structure passed to the data table, and that's about it.
any further examples and help etc would be most welcome.
thanks in advancedHi Robert,
Thank you for your reply. Please help me with this requirement.
I will be creating a custom BAPI which will be called from SAP XI. I need to cancel all the existing line items in the existing crm order when this BAPI is called and add the new items from the XML.
If you have any info on this please tell me.
Million thanks in advance!
Ajith -
CRMXIF_ORDER_SAVE: Condition values do not get updated
Hi,
I am trying to change the value of a condition record on a contract using APPL_IDOC_INPUTM (IDOC Type APPL_IDOC_INPUTM; Message Type CRMXIF_ORDER_SAVE_M; Function CRMXIF_ORDER_SAVE). I pass 'U' to the Object_task and populate the new rate in the condition table E101CRMXIF_BT_PRCD_COND. I set the values for the corresponding E101CRMXIF_BT_PRCD_COND_F and E101CRMXIF_PRCD_COND_XT tables too. However, the pricing condition does not get updated on the contract.
Anyone worked on this before and knows the reason or what am I missing?
Thanks
PrayarnaHey,
Did you solved this? can you please let me know how did you do this?
Regadrs,
Sarath. J -
CRMXIF_ORDER_SAVE add or update pricing conditions
Hi Experts,
I'm working in a requirement where I have to add items into a quotation via CRMXIF_ORDER_SAVE this is working now. The problem is that I'm not able to add or update either standar nor "Z" pricing conditions (e.g. XBRT or ZPRU). For this I use the segment E101CRMXIF_PRCD_COND_XT and E101CRMXIF_BT_PRCD_COND where:
COND_TYPE = 'ZPRU'
COND_VALUE = 'value in numbers' e.g. 45
COND_CURRENCY = 'USD'
OBJECT_TASK = 'I'
Do you know if its possible to do it, or if anything is missing?
Thank you in advance
Regards
Donovan L.Yes, it's possible I guess the condition which are you talking are manual conditions, right? and you marked the correponding X fields, right?
Cheers!
Luis
Maybe you are looking for
-
Re: Availabili​ty of this model:
Hello, I'm inquiring into the future availability of the follwoing make and model: Dell - Inspiron Laptop / Intel® Pentium® Processor / 14" Display / 4GB Memory / 500GB Hard Drive - M... Model: I14R-1440MRB | SKU: 1287179 Currently, this item is list
-
Service/maintenance order type SM01 not completely maintained in plant 1001
Dear All, Am trying to configure Service Management where there is a scenario in which , when the user creates a Sales order for a installation item say TV or Fridge, automatically Service order has to be generated. I have checked all the item Catego
-
Hi, i want to add a new fields to the output of transactions FBL5N. I want to show in the output list the fields Credit Limit, Sales Ditrict and description of sales district in transaction. I need know how can i change the layout and in the hidden f
-
Best way to import a wmv file to imovie?
I used handbreak to convert a wmp file to an m4v to import to imovie. Imovie has accepted the format but when i try to import it it says that its going to take 9 hours. Its only a 60 second clip. Is there a better approach to this? I had imported ano
-
Hide CATS lines in data entry screen
Hi, Does anyone know if it is possible to keep certain approved CATS records in the data entry screen (transaction CAT2) from being displayed, while other approved records are still displayed? Suppose we have the customer field ZSTATUS to decide whet