on 02-25-2016 12:12 PM
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
Hi Arun,
There is a planning Status PLAN_STATUS_ROOT, Can you check the planning status.
There is a action also,
io_modify->do_action(
EXPORTING
iv_act_key = /scmtms/if_tor_c=>sc_action-root-determine_Plan_status
it_key = lt_key_root
IMPORTING
eo_message = lo_msg
et_failed_key = lt_failed_key ).
You can use this and filter the unplanned orders.
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
This can be done using.
TABLES : /scmtms/d_torrot.
DATA : lt_tor_key TYPE /bobf/t_frw_key.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : shippid FOR /scmtms/d_torrot-shipperid.
SELECTION-SCREEN END OF BLOCK b1.
SELECT db_key INTO TABLE lt_tor_key
FROM /scmtms/d_torrot
WHERE shipperid IN shippid
AND plan_status_root = '01'
AND tor_cat = 'FU'.
Best regards,
Rohit Mahajan
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.