Skip to Content
author's profile photo Former Member
Former Member

unable to create followup document

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2011 at 03:07 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2011 at 05:57 AM

    done

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.