DATA: lt_header_guid TYPE crmt_object_guid_tab,
lt_orderadm_h TYPE crmt_orderadm_h_wrkt,
ls_orderadm_h TYPE crmt_orderadm_h_wrk,
lt_orderadm_i TYPE crmt_orderadm_i_wrkt,
ls_orderadm_i TYPE crmt_orderadm_i_wrk,
lt_appointment TYPE crmt_appointment_wrkt,
ls_appointment TYPE crmt_appointment_wrk,
lt_text TYPE crmt_text_wrkt,
ls_text TYPE crmt_text_wrk,
lt_orgeh TYPE crmt_orgman_wrkt,
ls_orgeh TYPE crmt_orgman_wrk,
ls_tline TYPE tline,
lt_partner TYPE crmt_partner_external_wrkt,
ls_partner TYPE crmt_partner_external_wrk,
lt_status TYPE crmt_status_wrkt,
ls_status TYPE crmt_status_wrk,
lt_refobj TYPE crmt_refobj_wrkt ,
ls_refobj TYPE crmt_refobj_wrk ,
lt_schedlin_i TYPE crmt_schedlin_i_wrkt,
ls_schedlin_i TYPE crmt_schedlin_i_wrk,
lt_product_i TYPE crmt_product_i_wrkt,
ls_product_i TYPE crmt_product_i_wrk,
lt_doc_flow TYPE crmt_doc_flow_wrkt,
ls_doc_flow TYPE crmt_doc_flow_wrk,
lt_activity_h TYPE crmt_activity_h_wrkt,
ls_activity_h TYPE crmt_activity_h_wrk,
lt_pricing TYPE crmt_pricing_wrkt,
ls_pricing TYPE crmt_pricing_wrk,
lt_requested_objects TYPE crmt_object_name_tab.
DATA LT_REQUESTED_OBJECTS TYPE CRMT_OBJECT_NAME_TAB.
CONSTANTS: gc_orderadm_h TYPE crmt_object_name VALUE 'ORDERADM_H',
gc_orderadm_i TYPE crmt_object_name VALUE 'ORDERADM_I',
gc_appointment TYPE crmt_object_name VALUE 'APPOINTMENT',
gc_partner TYPE crmt_object_name VALUE 'PARTNER',
gc_orgeh TYPE crmt_object_name VALUE 'ORGMAN',
gc_status TYPE crmt_object_name VALUE 'STATUS',
gc_refobj TYPE crmt_object_name VALUE 'REFOBJ',
gc_schedlin_i TYPE crmt_object_name VALUE 'SCHEDLIN_I',
gc_product_i TYPE crmt_object_name VALUE 'PRODUCT_I',
gc_doc_flow TYPE crmt_object_name VALUE 'DOC_FLOW',
gc_opport_h TYPE crmt_object_name VALUE 'OPPORT_H',
gc_texts TYPE crmt_object_name VALUE 'TEXTS',
gc_pricing TYPE crmt_object_name VALUE 'PRICING',
gc_activity_h TYPE crmt_object_name VALUE 'ACTIVITY_H'.
refresh lt_requested_objects .
INSERT iv_guid INTO TABLE lt_header_guid.
INSERT gc_orderadm_h INTO TABLE lt_requested_objects.
* INSERT gc_orderadm_i INTO TABLE lt_requested_objects.
INSERT gc_appointment INTO TABLE lt_requested_objects.
INSERT gc_partner INTO TABLE lt_requested_objects.
INSERT gc_orgeh INTO TABLE lt_requested_objects.
INSERT gc_status INTO TABLE lt_requested_objects.
* INSERT gc_refobj INTO TABLE lt_requested_objects.
* INSERT gc_schedlin_i INTO TABLE lt_requested_objects.
* INSERT gc_product_i INTO TABLE lt_requested_objects.
INSERT gc_texts INTO TABLE lt_requested_objects.
* INSERT gc_doc_flow INTO TABLE lt_requested_objects.
* INSERT gc_opport_h INTO TABLE lt_requested_objects.
INSERT gc_activity_h INTO TABLE lt_requested_objects.
INSERT gc_pricing INTO TABLE lt_requested_objects.
REFRESH:lt_orderadm_h, lt_appointment,lt_text,lt_orgeh,lt_partner,
lt_status,lt_refobj,lt_orderadm_i,lt_schedlin_i,lt_product_i,
lt_doc_flow,lt_activity_h ,lt_pricing.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
it_requested_objects = lt_requested_objects "重点在这里
IMPORTING
et_orderadm_h = lt_orderadm_h
et_appointment = lt_appointment
et_activity_h = lt_activity_h
et_text = lt_text
et_orgman = lt_orgeh
et_partner = lt_partner
et_status = lt_status
et_pricing = lt_pricing
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
阅读(850) | 评论(0) | 转发(0) |