on 08-08-2012 1:46 PM
Hi ,
I am facing problem when using the FM CRM_ORDER_MAINTAIN to save the dates on service data tab ( at line item level). The dates are not getting saved when the FM is called inside method 'CHANGE_BEFORE_UPDATE' of the BADI ORDER_SAVE. I have tried using the FM ' CRM_ORDER_SAVE' after the FM CRM_ORDER_MAINTAIN but still the dates are not getting saved when any change is made at the line item level in the transaction CRMD_ORDER. Also I have tried using the FM 'BAPI_TRANSACTION_COMMIT' but still the dates are not getting saved . 'Does anybody have a solution to this problem..
Thanks in advance ,
Dipti Joshi
hi
first suggestion would be put a break point in ORDER MAINTAIN function module and change the dates at item level and observe the parameters carefully and then try to code it.
kindly do not use commit statement inside BAIDs.framework automatically commits your work when everything goes fine. i believe this could be due to some mistake in parameters.
CLEAR wa_appointment_maint.
wa_appointment_maint-ref_handle =
'0000000000'
.
wa_appointment_maint-ref_guid = iv_guid 'guid of transaction'.
wa_appointment_maint-ref_kind = 'A'.
wa_appointment_maint-appt_type = 'date type your want to maintain'.
wa_appointment_maint-timestamp_from = date value.
v_timestampi = tme value.
wa_appointment_maint-timezone_from = 'PST'.
INSERT wa_appointment_maint INTO TABLE it_appointment_maint.
wa_input_fields-ref_handle = c_ref_handle.
wa_input_fields-ref_guid = iv_guid.
wa_input_fields-ref_kind = c_headerkind.
wa_input_fields-objectname = ' APPOINTMENT'.
wa_input_fields-logical_key = 'date type'
wa_input_fields-field_names = it_field_names.
INSERT wa_input_fields INTO TABLE it_input_fields.
IF it_input_fields[] IS NOT INITIAL AND v_timestamp_from IS NOT INITIAL.
"maintaining the date value.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_appointment = it_appointment_maint
CHANGING
ct_input_fields = it_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
and also observe that any error messages are appearing on transaction. if order save has another implementations and if there is any error in those implementation, those could stop the transaction from saving.
hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.