Sie sind auf Seite 1von 3

6/28/2014 Change Order - CRM_ORDER_MAINTAIN - Toolbox for IT Groups

http://sap.ittoolbox.com/groups/technical-functional/sap-crm/change-order-crm_order_maintain-916753 1/3
Create an Account Log In
Topics SAP Groups
ASK A NEW QUESTION
SAP CRM
Change Order - CRM ORDER MAINTAIN
Alin asked Feb 2, 2006 | Replies (6)
Join this group
0
Hi Experts,
this is a technical question. I was tring to change few fields in an Order using the
Function module CRM_ORDER_MAINTAIN. i did the proper mapping & then filled the
internal table - CT_INPUT_FIELDS
but still the order is not getting changed. do we need to do anything extra ?
OR do you know a better way to change an order document?
Regards,
Alin
Popular White Paper On This Topic
ERP Solutions: Winners and Losers
6 Replies
james.r.cutchall replied Feb 2, 2006
You may also have to issue one (or all) of these: (Also, see my comment at the
bottom of these code snippets.)
*-- Setup for CRM_ORDER_SAVE()
DATA: Lt_SaveGuid TYPE CRMT_OBJECT_GUID_TAB,
Lt_SavedObjs TYPE CRMT_RETURN_OBJECTS,
Lt_SavedExc TYPE CRMT_EXCEPTION_T,
Lt_SavedNot TYPE CRMT_OBJECT_GUID_TAB.
*-- Must save order!
INSERT L_Guid INTO TABLE Lt_SaveGuid.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE = Lt_SaveGuid
* IV_UPDATE_TASK_LOCAL = FALSE
* IV_SAVE_FRAME_LOG = FALSE
* IV_NO_BDOC_SEND = FALSE
IMPORTING
ET_SAVED_OBJECTS = Lt_SavedObjs
ET_EXCEPTION = Lt_SavedExc
ET_OBJECTS_NOT_SAVED = Lt_SavedNot
* CHANGING
* CV_LOG_HANDLE EXCEPTIONS
DOCUMENT_NOT_SAVED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
EI_SUBRC = 5.
IT_RETURN-ID = '5'.
CONCATENATE 'CRM_ORDER_SAVE()' 'failure.'
Related
Discussions
BAPI_SLSTRANSACT_CHANGEMULTI
Update Condition Price in CRM Contract for a Condition
type
Copy text from R/3 to CRM
Changing Partner: CRM_DNO_UPDATE_PARTNER /
CRM_ORDER_MAINTAIN
Changing Partner Function ICAGENT with
CRM_ORDER_MAINTAIN
Updating an order in CHANGE_BEFORE_UPDATE
Looking for BADI or User exit that happens after BADI
ORDER_SAVE
Need Help with FM COM_PRODUCT_IL_MAINTAIN
White Papers & Webcasts
Comparison Guide: On-Premise CRM
Enterprise On-Demand CRM Comparison Guide
Hosted CRM: Your Secret Weapon to Success
Hitachi IT Operations Analyzer Streamlines Infrastructure
Availability and Performance Management
Blog Articles
SAP and the Business Object
Mind the Stopgap!
Who moved my (cream) cheese? I did!
Blogs Discussions Research Directory
6/28/2014 Change Order - CRM_ORDER_MAINTAIN - Toolbox for IT Groups
http://sap.ittoolbox.com/groups/technical-functional/sap-crm/change-order-crm_order_maintain-916753 2/3
0
0
0
INTO IT_RETURN-MESSAGE SEPARATED BY SPACE.
APPEND IT_RETURN.
ENDIF. "SY-SUBRC = 0
*-- Changes will not appear until you commit.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
*-- Dequeue any 'Exclusive' lock we may have set on this opportunity.
CALL FUNCTION 'DEQUEUE_E_CRM_ORDER'
EXPORTING
MODE_CRMD_ORDERADM_H = 'E'
CLIENT = SY-MANDT
GUID = L_Guid.
You might also want to consider using one of the BAPI's instead of
CRM_ORDER_MAINTAIN() These include:
BAPI_OPPORTUNITY_GETDETAILMUL() - Gets opp info.
BAPI_OPPORTUNITY_CREATEMULTI() - Creates
BAPI_OPPORTUNITY_DELETEMULTI() - Deletes
BAPI_OPPORTUNITY_CHANGEMULTI() - Updates BAPI_TRANSACTION_COMMIT() -
Flush buffer.
If you search on one of these BAPI's here in ITToolbox you should find a complete
prototype prg that exercises all of these. (I uploaded to thank other people here who
helped me get pieces working.)
Qian Yuan replied Jan 2, 2009
I have a very urgent quesiton about using FUCTION crm_order_save in CRM system.
I modified
quantity of item in CRM system.Firstly,I used function CRM_ORDER_MAINTAIN,At this
time,it's all right.
But then when I used function " CRM_ORDER_SAVE" to publish data in system, there
is one mistake.
When program executed at this function,sy-subrc = 1. I don't know what stand for
about SY-SURRC EQUAL 1. And modified information was failure to update in
system.Could you tell me the reason.
kanwenxin replied Jan 2, 2009
If you want to change the quantity of the product in orders. The first, need to find the
product GUID in the order. Check in table CRMD_ORDERADM_I, key in the header
GUID(for header GUID, you could find in CRMD_ORDERADM_H), and find the
product GUID in the order(search by ordered_prod). The second using the BAPI(but I
do not support "CRM_ORDER_MAINTAIN",if change opportunity order, it's better to
use "BAPI_OPPORTUNITY_CHANGEMULTI", and there are many special BAPI for
each order.), quantity field maintain in the input table "SCHEDULELINE",
SCHEDULELINE-ITEM_GUID and SCHEDULELINE-LOGICAL_KEY correspond to the
product GUID which you find previous. The third maintain the input
table"INPUT_FIELDS", for this table, need maintain two rows because there are two
value for fieldname of INPUT_FIELDS. INPUT_FIELDS-REF_GUID and
INPUT_FIELDS-LOGICAL_KEY also correspond to the product GUID. OBJECTNAME's
value "SCHEDLIN", REF_KIND's value "B", FIELDNAME's value "QUANTITY" and
"QUANTITY". At last call function "BAPI_TRANSACTION_COMMIT" to commit work.
User116023 replied Jan 2, 2009
Hi Linda,
I don't think you can really tell without further debugging. However, a 'normal' failure
6/28/2014 Change Order - CRM_ORDER_MAINTAIN - Toolbox for IT Groups
http://sap.ittoolbox.com/groups/technical-functional/sap-crm/change-order-crm_order_maintain-916753 3/3
More White Papers
0
0
could result from custom validations from e.g. BAdI order_save or from an event
handler function---so I'd check if you have any such code in place that could stop the
save.
Regards,
Edwin
White Papers and Webcasts
Popular
ERP Solutions: Winners and Losers
Related
Hosted CRM: Your Secret Weapon to Success
Hitachi IT Operations Analyzer Streamlines Infrastructure ...
The Benefits of Integrated CRM
Marisa replied Jan 5, 2009
Hi ,
Are you sure that CRM_ORDER_MAINTAIN is working fine?
Sometines when the mantain is not succesfull then save doesn't work.
Wich table are you updating with CRM_ORDER_MAINTAIN?
Regards,
Marisa
krshari77 replied Jan 5, 2009
I agree with Marisa,
Recheck on the save option thru ORDER_MAINTAIN.
create a simple scenario check the saved data.
This thread has been closed due to inactivity.
Start a new thread here
Collaboration Tools
Discussion Groups
Blogs
Wiki
Toolbox for IT
My Home
Topics
People
Companies
Jobs
White Paper Library
Follow Toolbox.com
Toolbox for IT on
Twitter
Toolbox.com on Twitter
Toolbox.com on
Facebook
Data Center
Data Center
Development
C Languages
Java
Visual Basic
Web Design & Development
Enterprise Applications
CRM
ERP
PeopleSoft
SAP
SCM
Siebel
Enterprise Architecture & EAI
Enterprise Architecture & EAI
Information Management
Business Intelligence
Database
Data Warehouse
Knowledge Management
Oracle
IT Management & Strategy
Emerging Technology & Trends
IT Management & Strategy
Project & Portfolio Management
Cloud Computing
Cloud Computing
Networking & Infrastructure
Hardware
Networking
Communications Technology
Operating Systems
Linux
UNIX
Windows
Security
Security
Storage
Storage
Topics on Toolbox for IT Toolbox.com
About
News
Privacy
Terms of Use
Work at Toolbox.com
Advertise
Contact us
Provide Feedback
Help Topics
Technical Support
PCMag Digital Group
AdChoice
Other Communities
Toolbox for HR
Toolbox for Finance
Copyright 1998-2014 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.

Das könnte Ihnen auch gefallen