on 10-04-2011 3:21 PM
Hi All,
I am trying to create followup document from activity,
but unable to get successful, actually debugged standard order maintain function module also,
I populated & followed the same in my zprogram too,
but for the same values from standard program i.e CRMD_ORDER tcode linked GUID got generating, but from my code it is not
generating followup document GUID....please help me out where I am doing mistake.......
thanking you
by code is like below :-
******followup document create
*****header
CLEAR : wa_ct_orderadm_h, ct_orderadm_h.
wa_ct_orderadm_h-handle = '0000000001'.
wa_ct_orderadm_h-mode = 'A'.
wa_ct_orderadm_h-process_type = 'Z4D2'.
APPEND wa_ct_orderadm_h TO ct_orderadm_h.
*****input fields
CLEAR : wa_crmt_input_field, wa_crmt_input_field_names, wa_crmt_input_field-field_names.
REFRESH : ct_input_fields.
wa_crmt_input_field-ref_handle = '0000000001'.
wa_crmt_input_field-ref_kind = 'A'.
wa_crmt_input_field-objectname = 'ORDERADM_H'.
wa_crmt_input_field_names-fieldname = 'MODE'.
INSERT wa_crmt_input_field_names INTO TABLE wa_crmt_input_field-field_names.
wa_crmt_input_field_names-fieldname = 'PROCESS_TYPE'. "MANUAL
INSERT wa_crmt_input_field_names INTO TABLE wa_crmt_input_field-field_names.
APPEND wa_crmt_input_field TO ct_input_fields.
document link
CLEAR : ct_doc_flow, wa_ct_doc_flow, wa_doc_link, it_doc_link.
wa_ct_doc_flow-ref_handle = '0000000001'.
wa_ct_doc_flow-ref_kind = 'A'.
wa_doc_link-objkey_a = wa_et_doc_flow-objkey_b.
wa_doc_link-vona_kind = 'A'.
wa_DOC_link-handle_b = '0000000001'.
*wa_doc_link-reltype = 'VONA'.
wa_doc_link-brel_kind = 'A'.
wa_doc_link-brel_mode = 'A'.
INSERT wa_doc_link INTO TABLE wa_ct_doc_flow-doc_link.
INSERT wa_ct_doc_flow INTO TABLE ct_doc_flow.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
IMPORTING
et_exception = it_exception
CHANGING
ct_orderadm_h = ct_orderadm_h
ct_orderadm_i = ct_orderadm_i
ct_input_fields = ct_input_fields
cv_log_handle = cv_log_handle
ct_partner_attributes = ct_partner_attributes
ct_doc_flow = ct_doc_flow
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
******followup document end
READ TABLE ct_doc_flow INTO wa_ct_doc_flow INDEX 1.
IF sy-subrc EQ 0.
READ TABLE wa_ct_doc_flow-doc_link INTO wa_doc_link INDEX 1.
IF sy-subrc EQ 0.
v_guid16 = wa_doc_link-objkey_b.
ENDIF.
ENDIF.
done
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 |
---|---|
7 | |
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.