cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a service ticket using CRM_ORDER_MAINTAIN?

0 Kudos

Hi,

I'm trying to learn CRM_ORDER_MAINTAIN and so far I managed to create a standard order with partners and their roles, however now i'm having trouble creating a service ticket with its required fields.

I tried debugging the FM when calling it from WEBUI to see what structures and tables are to be filled but I'm having a bit of trouble figuring out which ones to fill and which ones are generated and don't know if I'm missing something small somewhere that's causing it not to save.

I think the error lies in this part of the code that handles Categorization, because the other code that handles adding partners worked for the standard order

*****categorization: motive+submotive******
clear ls_input_fields.
clear ls_fieldsname.

ls_fieldsname-fieldname = 'CONC_KEY'.
INSERT ls_fieldsname INTO TABLE ls_input_fields-field_names.
ls_input_fields-ref_handle = 1."
ls_input_fields-ref_kind = gc_object_kind-orderadm_h.
ls_input_fields-objectname = 'SERVICE_OS'.

ls_subject-ref_handle = ls_orderadm_h-handle.
ls_subject-ref_handle_h = ls_orderadm_h-handle.
ls_subject-katalogart = 'Z1'.
ls_subject-codegruppe = 'ZCA00001'.
ls_subject-code = 'Z044'.
append ls_subject TO ls_osset-subject.
ls_osset-ref_handle = ls_orderadm_h-handle.
ls_osset-profile_type = 'A'.
ls_osset-subject_profile = 'ZCCCAST'.
append ls_osset to ls_service_os-osset.
ls_service_os-ref_handle = ls_orderadm_h-handle.
append ls_service_os to it_service_os.

INSERT ls_input_fields INTO TABLE lt_input_fields.

ls_subject-ref_handle = ls_orderadm_h-handle.
ls_subject-ref_handle_h = ls_orderadm_h-handle.
ls_subject-katalogart = 'Z1'.
ls_subject-codegruppe = 'ZCA00002'.
ls_subject-code = 'Z009'.
append ls_subject TO ls_osset-subject.
ls_osset-ref_handle = ls_orderadm_h-handle.
ls_osset-profile_type = 'A'.
ls_osset-subject_profile = 'ZCCCAST'.
append ls_osset to ls_service_os-osset.
ls_service_os-ref_handle = ls_orderadm_h-handle.
append ls_service_os to it_service_os.

INSERT ls_input_fields INTO TABLE lt_input_fields.

Any help is appreciated

Accepted Solutions (0)

Answers (1)

Answers (1)

yehonatan_boaz
Discoverer
0 Kudos

Hi,

Don't use FM , use BOL\GENIL class structures to READ\UPDATE\CREATE\DELETE anything you need.

Good Luck

Eli