on 11-12-2010 11:38 AM
Hi,
The requirement I have as of now is like this:
An Activity which has been 'Completed' needs to be changed back to the 'Open' Status for the user to make some change and then again change it back to 'Completed' status. I am looking for a BAPI to do the same. Can anyone help me if I can get a BAPI / BADI to do the same ?
hi all,
what ive done is to create an entity. Then i was able to set the property of the attribut ACT_STATUS. everything works fine!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to implement this code in badi order_save.
DATA: gt_crmd_orderadm_h TYPE TABLE OF crmd_orderadm_h,
gs_crmd_orderadm_h TYPE crmd_orderadm_h.
DATA: et_objects_to_save TYPE crmt_object_guid_tab,
es_objects_to_save TYPE crmt_object_guid.
DATA: it_saved_objects TYPE crmt_return_objects.
DATA: gt_field_names TYPE crmt_input_field_names_tab,
gs_field_names TYPE crmt_input_field_names.
DATA: cv_log_handle TYPE balloghndl.
DATA: p_act TYPE crmd_orderadm_h-object_id ,
p_guid TYPE crmd_orderadm_h-guid ,
p_proty TYPE crmd_orderadm_h-process_type ,
p_stat TYPE crmt_status_com-status .
p_guid = ACTIVITY GUID
p_stat = STATUS
p_proty = STATUS SCHEMA
IF p_guid IS NOT INITIAL.
SELECT SINGLE * FROM crmd_orderadm_h INTO gs_crmd_orderadm_h
WHERE guid = p_guid.
ENDIF.
es_objects_to_save = gs_crmd_orderadm_h-guid.
APPEND es_objects_to_save TO et_objects_to_save .
es_status-ref_guid = gs_crmd_orderadm_h-guid.
es_status-ref_kind = 'A'.
es_status-status = p_stat.
es_status-user_stat_proc = p_proty.
es_status-activate = 'X'.
APPEND es_status TO et_status.
cs_input_fields-ref_guid = gs_crmd_orderadm_h-guid.
cs_input_fields-ref_kind = 'A'.
cs_input_fields-objectname = 'STATUS'.
CONCATENATE es_status-status es_status-user_stat_proc INTO cs_input_fields-logical_key.
gs_field_names-fieldname = 'ACTIVATE'.
APPEND gs_field_names TO gt_field_names.
cs_input_fields-field_names = gt_field_names[].
APPEND cs_input_fields TO ct_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_status = et_status
IMPORTING
et_exception = it_exception
CHANGING
ct_orderadm_h = ct_orderadm_h
ct_orderadm_i = ct_orderadm_i
ct_input_fields = ct_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
Best regards,
Caíque Escaler
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.