Вы находитесь на странице: 1из 3

Business transaction maintanance:

T-code - CRMD_ORDER

Initial Steps when we want to modify any data in BT programetically.


-----------------------------------------------------------------------------------
--------------------------------------
1. Identify the transaction object
- using CRM_ORDER_READ report ( Manual Process )
- press F1 in the field -technical information ( 50% )
- Put breakpoint in CRM_ORDER_MAINTAIN and look for CT_INPUT_FIELDS
table parameter

2. Open the transaction in Debug mode and put break point in the corresponding
Maintain FM
CRM*objectname*maintain*ow.

3. Find out and copy the parameters, what the system is passing. Use the same
approach while calling the maintain FM manually.
Note: when the IV_CHECK_ONLY = 'X', do not consider the parameters.

External BT Programming: Steps to Modify the data in Business transactions


----------------------------------------------------
1. Get the Header/Item GUID
2. call CRM_ORDER_READ (Optinal), or specific Read FM , to get the current data
related to the object, which we want to modify
3. Construct the Export Parameters for the Maintain FM
4. Call the Maintain FM
5. Call CRM_ORDER_SAVE FM
6. Call BAPI_TRANSACTION_COMMIT FM

External:
1. when the transaction is saved/or it is in the database.
2. No link with the session of Transaction.
3. Need to call FMs CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT explicitly.

Internal/Session:
1. We are in the session of any transaction.
2. doesnot matter whether the transaction is saved or not.
if not saved means we are in create mode
if saved means we are in change mode
3. No need to call FMs CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT explicitly.

Finding database tables based om Business objects:


CRMD*PARTNER*

Finding FMs based on business objects.


CRM*PARTNER*READ*
CRM*PARTNER*MAINTAIN*
-----------------------------------------------------------------------------------
-----------------
-----------------------------------------------------------------------------------
-----------------
BADi are used in Session BT Programming:
BADis in one order framework:

CRM_ORDER_MAINTAIN --> Call the corresponding object maintains --> Corresponding


BADI

OBJECT NAME: data set

database: CRMD_<objectname >

read FM: CRM_<objectname>_READ_OW

modify FM: CRM_<objectname>_maintain_ow

Badi: *<object_name>*_BADI

Finding/Searching BADis:
1. Based on the Business object name.
*objectname*badi
EG: PARTNER
*PARTNER*BADI

2. In the session, put a breakpoint in the method GET_INSTANCE of the class


CL_EXITHANDLER

3. Performance trace, TCode ST05

Acivating the trace:


Start the Performance trace
Start transaction ST05 (Performance Analysis)
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BAdI database tables are
buffered.
(especially view V_EXT_IMP and V_EXT_ACT)
Push button "Activate Trace"
Execute the Business transaction
Start transaction BP in a new GUI session
Push button "Organization"
Fill in your test data

Performance trace
Go back to the Performance trace session
Push button "Deactivate Trace"

Showing the Trace List


Push button "Display Trace"
The popup screen "Set Restrictions for Displaying Trace" appears
Now we are going to filter the trace on Objects: V_EXT_IMP and V_EXT_ACT.
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT

Push button "Copy (F8)"


Fill Operations: OPEN
Push button Enter
See the result:
Error/Message Handling in Business transactions.

1. CRM_MESSAGE_COLLECT - this fm is used to log error messages.


2. CRM_MESSAGES_DELETE - this fm is used to delete the messages from the log.
3. CRM_MESSAGES_SEARCH - this will search for a particular message class and
message id.
4. CRM_MESSAGES_CHECK_FOR_ERRORS - generic FM for checking whether errors exist.

Вам также может понравиться