Hi All,
I am trying to fetch the Freight Units which are not planned based on locations , but I am getting only Freight units which are already to some FO/FB.
IF s_fu_loc IS NOT INITIAL.
REFRESH lt_selpar.
ls_selpar-attribute_name = /scmtms/if_tor_c=>sc_query_attribute-stop-query_by_attributes-log_locid.
ls_selpar-option = s_fu_loc-option.
ls_selpar-sign = s_fu_loc-sign.
ls_selpar-low = s_fu_loc-low.
ls_selpar-high = s_fu_loc-high.
APPEND ls_selpar TO lt_selpar.
CLEAR : ls_selpar.
* Use method QUERY of the service manager to start the query
lo_srv_mgr->query( EXPORTING iv_query_key = /scmtms/if_tor_c=>sc_query-stop-query_by_attributes
it_selection_parameters = lt_selpar
IMPORTING eo_message = lo_msg
es_query_info = ls_query_inf
et_key = lt_key_root ).
lo_srv_mgr->retrieve(
EXPORTING
iv_node_key = /scmtms/if_tor_c=>sc_node-stop
it_key = lt_key_root
iv_edit_mode = /bobf/if_conf_c=>sc_edit_read_only
iv_fill_data = abap_true
IMPORTING
eo_message = lo_msg
et_data = lt_stop_fu ).
DELETE lt_stop_fu WHERE stop_seq_pos NE 'F'.
lt_key_stop[] = lt_stop_fu[].
REFRESH lt_key_root.
CALL METHOD lo_srv_mgr->retrieve_by_association
EXPORTING
iv_node_key = /scmtms/if_tor_c=>sc_node-stop
it_key = lt_key_stop
iv_association = /scmtms/if_tor_c=>sc_association-stop-assigned_capa_tor_root
iv_fill_data = abap_true
iv_edit_mode = /bobf/if_conf_c=>sc_edit_read_only
IMPORTING
et_data = lt_root
et_target_key = lt_key_root.
CALL METHOD lo_srv_mgr->retrieve_by_association
EXPORTING
iv_node_key = /scmtms/if_tor_c=>sc_node-root
it_key = lt_key_root
iv_association = /scmtms/if_tor_c=>sc_association-root-assigned_fus
iv_fill_data = abap_true
IMPORTING
eo_message = lo_msg
et_data = lt_root_fu.
* et_target_key = lt_key_root.
REFRESH lt_key_root.
lt_key_root[] = lt_root_fu[].
IF lt_key_root IS NOT INITIAL.
APPEND LINES OF lt_key_root TO lt_key_root_fu.
ENDIF.
ENDIF.
please help me out how to fetch the FU's which are not in planned state
Thanks,
Arun