Você está na página 1de 2

6/27/2014 BAdI ORDER_SAVE

http://www.stechno.net/sap-notes.html?view=sapnote&id=810477 1/2
SAPTECHNO
CONTACT ACCUEIL Integration Sap Sap Java Sap Screen Sap BW
Vous tes ici : Home SAP Top Notes Note 810477
Note 810477 - BAdI ORDER_SAVE
Header
Version / Date 6 / 2009-10-14
Priority Correction with medium priority
Category Program error
Primary Component CRM-BTX-OPP Opportunities
Secondary Components CRM-BTX Business Transactions
Summary
Symptom
If you use the BAdI ORDER_SAVE (PREPARE method) to check the field
input and trigger the exception DO_NOT_SAVE, then after the exception
occurs
(In PCUI),
PROBLEM 1: The system doesn't call the SAVE method anymore to check
whether the document can be saved, unless we make some change and
then click SAVE again.
PROBLEM 2: The data loss pop up is not shown, if we are navigating to
some other document without saving the current document.
Other terms
EV_RETURN_CODE, ORDER_SAVE BAdI, PREPARE, DO_NOT_SAVE,
CL_CRM_BSP_PM_GENERIC_1O, CHECK_BEFORE_SAVE, data loss
popup CHECK_BEFORE_SAVE
Reason and Prerequisites
EV_RETURN_CODE is always set to ZERO (in class
CL_CRM_BSP_PM_GENERIC_1O METHOD if_crm_bsp_process_il~save).
Important Information
BAdI ORDER_SAVE's PREPARE method works only with the SAPGUI and it
should not be called outside other than from ORDER_SAVE API. The new
method would really be a check method which can be called multiple times
to validate the user input and stop the ORDER SAVE. This method works for
both the SAPGUI and PC-UI and the CRM Web UI.
Solution
Manual Steps:
Create the function module (Txn: SE37)
CRM_ORDER_CHECK_BEFORE_SAVE_OW in function group
CRM_ORDER_OW with the description 'Check Before Save' and with the
following parameters.
Import Parameters:
IV_ORDER_GUID TYPE CRMT_OBJECT_GUID
IV_LOG_HANDLE TYPE BALLOGHNDL OPTIONAL
Exceptions:
SAVE_CANCELLED
Save this function module and activate it.
Now, Create one method in BAdI definition ORDER_SAVE as follows:
In transaction SE18, enter the definition name as ORDER_SAVE and click on
display. Go to 'Interface' Tab and doubleclick on the interface name. Go to the
change mode and create the method 'CHECK_BEFORE_SAVE' with the
following parameters:
IV_GUID Importing Type CRMT_OBJECT_GUID
CV_OWN_MESSAGE Changing Type CRMT_BOOLEAN OPTIONAL
Exception: DO_NOT_SAVE
Now save this method and activate it.
After carrying out all the manual steps, now apply the source code
corrections.
If you get 'Call Method Not Implemented' error, then please regenerate the
BAdI (ORDER_SAVE) definition by clicking the menu entry (Txn: SE18)
'Utilities' --> Regenerate.
Accueil
FAQ
SAP Functions
SAP Top Notes
SAP Tables
SAP Messages
SAP Programs
Contact
Rechercher
Plan du site
Liens Web
RechercherRecherche...
6/27/2014 BAdI ORDER_SAVE
http://www.stechno.net/sap-notes.html?view=sapnote&id=810477 2/2
Affected Releases
Software
Component
Release
From
Release
To
Release
And
subsequent
BBPCRM 4.0 400 400
Correction delivered in Support Package
Support Packages Release Package Name
BBPCRM 400 SAPKU40009
Related Notes
500205 BAdI prior to saving
Powered by Joomla!. Valid XHTML and CSS.

Você também pode gostar