Code: Alles auswählen.
if iv_process_code = 'READ'.
call function 'CRM_BUPA_READ_ORDER_OBJECTS'
exporting
iv_bu_partner = iv_bu_partner
* IV_VALIDFROM =
* IV_VALIDTO =
* IT_REQUESTED_COLUMNS =
importing
et_search_result = lt_search_result.
loop at lt_search_result into ls_search_result
where process_type = '1001'.
append ls_search_result to et_search_result.
move ls_search_result-object_id to ls_appointment1-object_id.
move ls_search_result-process_type to ls_appointment1-process_type.
move ls_search_result-process_type_txt to ls_appointment1-process_type_txt.
move ls_search_result-description to ls_appointment1-description.
move ls_search_result-posting_date to ls_appointment1-posting_date.
move ls_search_result-created_by to ls_appointment1-created_by.
move ls_search_result-prospect_name to ls_appointment1-prospect_name.
move ls_search_result-person_resp to ls_appointment1-person_resp.
move ls_search_result-person_resp_name to ls_appointment1-person_resp_name.
move ls_search_result-contact_person to ls_appointment1-contact_person.
move ls_search_result-contact_person_list to ls_appointment1-contact_person_list.
move ls_search_result-from to ls_appointment1-from.
move ls_search_result-to to ls_appointment1-to.
move ls_search_result-from_time to ls_appointment1-from_time.
move ls_search_result-to_time to ls_appointment1-to_time.
select partner from but000 into ls_appointment1-account_id
where name_org1 eq ls_appointment1-prospect_name.
endselect.
select guid from crmv_ipm_partner into lv_guid
where process_type = '1001' and partner = iv_bu_partner.
data: lv_guid_char type char32.
lv_guid_char = lv_guid.
ls_header_guid = cl_ibase_service=>cl_convert_guid_32_16( lv_guid_char ).
" append ls_header_guid to lt_header_guid.
insert ls_header_guid into table lt_header_guid.
clear ls_header_guid.
append lv_guid to et_guid.
clear lv_guid.
endselect.
call function 'CRM_ORDER_READ'
exporting
it_header_guid = lt_header_guid
it_requested_objects = lt_request_objs
iv_no_auth_check = 'X'
importing
et_orderadm_h = lt_orderadm_h
et_activity_h = lt_activity_h
et_appointment = lt_appointment
et_text = lt_text
et_status = lt_status
et_partner = lt_partner
exceptions
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6.
loop at lt_orderadm_h into ls_orderadm_h.
et_orderadm_h = lt_orderadm_h.
endloop.
loop at lt_activity_h into ls_activity_h.
et_activity_h = lt_activity_h.
move ls_activity_h-priority to ls_appointment1-priority.
move ls_activity_h-act_location to ls_appointment1-act_location.
endloop.
select txt_long from scpriot into ls_appointment1-priority_txt
where priority eq ls_appointment1-priority and langu eq 'D'.
endselect.
loop at lt_appointment into ls_appointment.
et_appointment = lt_appointment.
endloop.
loop at lt_text into ls_text.
et_text = lt_text.
move ls_text-lines to ls_appointment1-lines.
endloop.
loop at lt_status into ls_status.
et_status = lt_status.
exit.
endloop.
loop at lt_partner into ls_partner.
et_partner = lt_partner.
exit.
endloop.
append ls_appointment1 to et_appointment1.
endloop.
endif.
endfunction.
Antworten hängen immer auch von der Fragestellung ab. Deine Frage war: Wieso dumped der Code?AnnaNRW hat geschrieben:Mit deiner Antwort kann ich nichts anfangen. Sie bringt mich kein Stück weiter.