Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

  • 0
  • 0
admin

Query TU by Delivery (DOCID and Warehouse Number) in SAP EWM

*--Check BOL is assigned to TU or not, if not raise error message
    DATA  lo_tu_query     TYPE REF TO  /scwm/cl_sr_tu_query.
    DATA  lo_log          TYPE REF TO  /scwm/cl_log.

*--Assign Warehouse and Delivery in range variable
    DATA(ls_whse)   = VALUE /scwm/s_sel_whse( 
                      sign = /scmb/cl_search=>sc_sign_i 
                      option = /scmb/cl_search=>sc_eq 
                      low = iv_whse ).
    DATA(ls_docid) = VALUE /scwm/s_sel_dlv_id( 
                      sign = /scmb/cl_search=>sc_sign_i 
                      option = /scmb/cl_search=>sc_eq 
                      low = iv_docid ).
    lo_tu_query->add_whse( is_whse = ls_whse ).
    lo_tu_query->add_dlv_id( is_sel_dlv_id = ls_docid ).

*----------------------------------------------------------------------
*- Read TU
*----------------------------------------------------------------------
    TRY.
        DATA(lo_sr_bom) = /scwm/cl_sr_bom=>get_instance( ).
        lo_sr_bom->query(
          EXPORTING
            io_tu_query = lo_tu_query                     " Class for Searches in Shipping/Receiving
          IMPORTING
            et_bo_tu    = DATA(lt_bo_tu)                  " Table of Business Objects for a Transportation Unit
        ).
      CATCH /scwm/cx_sr_error.                            " Class for Exceptions in Shipping/Receiving
    ENDTRY.

*--Get TU IDENT
    LOOP AT lt_bo_tu INTO DATA(ls_bo_tu).
      ls_bo_tu-bo_ref->get_ident(
        IMPORTING
          et_bo_tu_ident = DATA(lt_ident)                 " Table for Seals for a Transportation Unit
      ).
    ENDLOOP.

Get TU from delivery (DOCID), from BO_TU object you can get all the TU details, for reference I am showing here to get the TU IDENT. you can get following details

GET_CONTAINERS
GET_DATA
GET_DLV_INCOMPLETNESS
GET_HU_ID
GET_ID
GET_IDENT
GET_MAX_SEAL_NUM
GET_MTR
GET_NUM
GET_NUM_EXT
GET_OBJ_STATE
GET_PLAN_YMOVE
GET_ROUTE
GET_SEAL
GET_SR_ACT_DIR
GET_SR_ACT_STATE
GET_STATUSES
GET_STATUS_BY_ID
GET_STATUS_CHANGE_BY_ID
GET_TIMES
GET_TU_DLV
GET_TU_DLV_DATA
GET_TU_DOOR
GET_TU_HU
GET_TU_VEH
GET_VEHICLE_BO

Related Questions

Leave an answer

Leave an answer