Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_ORDER_MAINTAIN

Former Member
0 Kudos

Hi,

I am working on CRM4.0.I am trying to use CRM_ORDER_MAINTIAN function module for writing an interface which updates the activity record in SAP CRM. We have added some customer fields to activity using easy enhancement workbench. Also this interface needs to change dates in appointments tab and add long texts. Can anyone help in this regards or give me a sample code to do it.

I could only successful in updating/changing the header fields(such as description, etc) so far.

Regards,

Vin

1 ACCEPTED SOLUTION

stephenjohannes
Active Contributor
0 Kudos

Vinayak,

Have you tried using FM CRMXIF_ORDER_SAVE instead? The interface is decently documented in the system by SAP and you can use the report CRMXIF_ORDER_TEST to see what data needs to be filled in. The test report allows you to extract an existing business transaction from the system.

One note is that the FM CRMXIF_ORDER_SAVE does not issue commit work, so you will need to call BAPI_TRANSACTION_COMMIT after execution of the FM in your program.

Good Luck,

Stephen

5 REPLIES 5

stephenjohannes
Active Contributor
0 Kudos

Vinayak,

Have you tried using FM CRMXIF_ORDER_SAVE instead? The interface is decently documented in the system by SAP and you can use the report CRMXIF_ORDER_TEST to see what data needs to be filled in. The test report allows you to extract an existing business transaction from the system.

One note is that the FM CRMXIF_ORDER_SAVE does not issue commit work, so you will need to call BAPI_TRANSACTION_COMMIT after execution of the FM in your program.

Good Luck,

Stephen

0 Kudos

Thanks Stephen,

I have gone through the FM CRMXIF_ORDER_SAVE and the program CRMXIF_ORDER_TEST. The function module documentation says about IDOC processing. Unfortunately We are not using Idocs.The test program CRMXIF_ORDER_TEST has a mandatory field call 'Sitename'. I am not sure what value I should be putting there. My requirement is to Change the header fields, Customer fields ( added using EEWB), appointment dates and Long text of the activity based on a input text file.

Regards,

Vin

0 Kudos

Vin,

Unfortuantely you have to setup outbound IDOC processing in order use the program. It really isn't too hard. I would recommend using the directions to setup inbound processing for the LSMW, and then you simply need to add the message type to your partner profile as an outbound parameter. You can setup a receiver port as your local file system. I have been able to succesfully use this technique with the product master XIF adapter and it generally works with most XIF objects.

The LSMW might also be a good testing tool to figure out what fields to change. You can bring in the XIF IDOC and do some rapid mapping and then see if the XIF IDOC posts. If it posts and makes the changes you expect, then you can then translate that mapping to coding. You could also just continue building your(if inbound) interface through the LSMW tool and set it up for periodic transfer.

The site definition is controlled by the middleware setup. Run transaction SMOEAC and choose object type site and create. You will want to create a site that is of type External Interface for IDOCS. In the attributes use the partner number and partner type that you setup previously.

Good luck again,

Stephen

Message was edited by: Stephen Johannes

0 Kudos

Hi Stephen,

Thanks for your reply.

Can I not use this method without IDOC or is there any other way of solving the issue as I have to start from scratch to adapt to IDOC approach.

Regards,

Vin

0 Kudos

Hi,

I've a simmilar requirement in CRM where i've to create sales order using bapi, if you have a sample program could you please mind it sharing.

If you are using IDOC , please also let me the steps.

Regards

Sanju