cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to Query by Created On in SAP TM /BOBF/CL_TRA_SERVICE_MGR

former_member185978
Active Participant
0 Likes
1,227

Hi All,

I have to do the Query Parameter with DLV_CREATED_ON using the below code, but its not returning any values.

 APPEND INITIAL LINE TO gt_sel_param ASSIGNING FIELD-SYMBOL(<sparam>).
<sparam>-attribute_name = 'DLV_CREATED_ON'. " 'TOR_ID'.
<sparam>-sign = 'I'.
<sparam>-option = 'BT'.
<sparam>-low = '20220623193644'.
endif.
TRY.
gv_srv_tor->query(
EXPORTING
iv_query_key = /scmtms/if_tor_c=>sc_query-root-fo_data_by_attr
it_selection_parameters = gt_sel_param
IMPORTING
et_key = gt_key
).
CATCH /bobf/cx_frw_contrct_violation INTO DATA(lv_excp1).
DATA(lv_msg1) = lv_excp1->get_longtext( ).
ENDTRY.

Accepted Solutions (1)

Accepted Solutions (1)

GRABLERE
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Bala,

the delivery_created_on field is set on freight units/documents created by the freight unit builder, not on "standard" freight orders and you are running query /scmtms/if_tor_c=>sc_query-root-fo_data_by_attr, which implicitly filters only on freight orders.

The only scenario where this would return something would be shortcuts where you directly build freight orders from the freight unit builder and I don't assume you are using that. So if you actually want to select the freight units you should use the fitting query like fu_data_by_attr.


Regards,

Emanuel

Answers (0)