How to get service processes
Hi,
I have one requirement , where I have to fetch service process attached to the component at Item Level. I am using the below Function Module, which is fetching all the service Process in the given Components but my problem is those are attached to the Component at header level. For example I have one Service Process '9000003078' attached to '2054' component at Item Level. So I have to fetch this data and this component exists on my Service Contract. But the below Function Module gives '9000003078' attached to '2058', instead of '2054'(Item Level).Component '2058' is at header level of that service Process '9000003078' The below LT_SERV_PROC contains Service processes like '9000003078' and the component attached to it.
Function Module is
DATA : LT_SERV_PROC TYPE ibctr_order_tab,
lv_cont_guid = lr_current->get_property_as_string( 'GUID' ).
ls_guid = lr_current->get_property_as_string( 'GUID' ).
INSERT lv_cont_guid INTO TABLE lt_cont_guid.
Retrieving the Items and IBase Components.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_cont_guid
IMPORTING
et_orderadm_i = lt_items
et_ordprp_objl_i_d = lt_comp
et_appointment = lt_appt.
LOOP AT lt_items INTO ls_items WHERE number_parent = ' '.
LOOP AT lt_comp INTO wa_comp WHERE guid = ls_items-guid
AND NOT ibase_component_guid IS
INITIAL.
ls_inst_identifier-instance = wa_comp-ibase_component .
ls_inst_identifier-guid = ls_items-guid.
APPEND ls_inst_identifier TO lt_inst_identifier.
APPEND wa_comp TO lt_comp1.
ENDLOOP.
APPEND ls_items TO lt_items1.
ENDLOOP.
Retrieving the Service Processes(Document Numbers) for IBase
*components
CALL FUNCTION 'IB_SRV_ORDER_TO_COMPONENT'
EXPORTING
it_inst_identifier = lt_inst_identifier
output_popup = space
IMPORTING
et_order_data = lt_serv_proc.
Thanks,
Balaji