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.

You must login to send a message.

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.

Welcome To SAPEWM HELP

Ask questions and get real answers from real Experts. Get instant solutions for your SAP Extended Warehouse Management ABAP FICO BASIS and other Modules challenges. Experts from SAP community will help you resolve you issues, optimize processes, and provide guidance.

Our Statistics

  • Questions 215
  • Answers 7
  • Best Answers 0
  • Users 9
  1. Hi Marianne, You can get it. follow these steps. Get DOCID from /SCDL/PROCH_I or /SCDL/PROCH_O table by passing document number Pass DOCID in /SCWM/ORDIM_O and /SCWM/ORDIM_C table and get all open/confirmed tasks. let me know if you need further help on this.

    Hi Marianne,

    You can get it. follow these steps.

    Get DOCID from /SCDL/PROCH_I or /SCDL/PROCH_O table by passing document number

    Pass DOCID in /SCWM/ORDIM_O and /SCWM/ORDIM_C table and get all open/confirmed tasks.

    let me know if you need further help on this.

    See less
  2. DATA: lo_spfd TYPE REF TO /scdl/cl_sp_fd_out. DATA: lt_key TYPE /scdl/t_sp_k_head. DATA: lt_key_itm TYPE /scdl/t_sp_k_item. DATA: lv_aspect TYPE /scmb/sp_aspect VALUE '/SCDL/S_SP_A_HEAD'. DATA: lv_aspect_itm TYPE /scmb/sp_aspect VALUE '/SCDL/S_SP_A_ITEM'. DATA: lv_rejected TYPE abap_bool. DATA: lt_rRead more

    DATA: lo_spfd TYPE REF TO /scdl/cl_sp_fd_out.

    DATA: lt_key TYPE /scdl/t_sp_k_head.

    DATA: lt_key_itm TYPE /scdl/t_sp_k_item.

    DATA: lv_aspect TYPE /scmb/sp_aspect VALUE ‘/SCDL/S_SP_A_HEAD’.

    DATA: lv_aspect_itm TYPE /scmb/sp_aspect VALUE ‘/SCDL/S_SP_A_ITEM’.

    DATA: lv_rejected TYPE abap_bool.

    DATA: lt_ret TYPE /scdl/t_sp_return_code.

    DATA: lt_return TYPE bapiret2_t.

    DATA: lv_msg TYPE msgtx.

    DATA: lt_outrec TYPE /scdl/t_sp_a_head.

    DATA: lt_outrec_itm TYPE /scdl/t_sp_a_item.

    DATA: lt_docid TYPE /scwm/dlv_docid_item_tab.

    DATA: lt_key_docid TYPE /scdl/t_sp_k_head.

    DATA: lo_sp TYPE REF TO /scdl/cl_sp_prd_out.

    DATA: lo_dlv TYPE REF TO /scwm/cl_dlv_management_prd.

    DATA: lt_sp_k_head TYPE /scdl/t_sp_k_head.

    DATA: lt_sp_k_item TYPE /scdl/t_sp_k_item.

    DATA: lt_a_head_eew TYPE /scdl/t_sp_a_head_eew_prd.

    *–Append messaage for queue start

    MESSAGE s171 INTO lv_msg.

    PERFORM add_message TABLES lt_return

    USING lv_msg.

    CREATE OBJECT lo_spfd.

    *–Get OD

    SELECT docid,

    itemid

    FROM /scdl/db_dlvi_o

    INTO TABLE @lt_key_itm

    FOR ALL ENTRIES IN @it_docid

    WHERE refdocid = @it_docid-docid.

    IF sy-subrc = 0.

    lt_key = CORRESPONDING #( lt_key_itm MAPPING

    docid = docid ).

    *–Fetch corresponding FDO Details

    SELECT docid,

    itemid,

    doccat

    INTO TABLE @lt_docid

    FROM /scdl/db_dlvi_o

    FOR ALL ENTRIES IN @it_docid

    WHERE refdocid = @it_docid-docid.

    IF lt_docid[] IS NOT INITIAL.

    lt_key_docid = CORRESPONDING #( lt_docid MAPPING

    docid = docid ).

    ENDIF.

    DO 5 TIMES.

    SELECT *

    INTO TABLE @DATA(lt_msl)

    FROM /scwm/messagelog

    FOR ALL ENTRIES IN @lt_key

    WHERE docid EQ @lt_key-docid

    AND doccat = ‘FDO’.

    IF sy-subrc EQ 0 AND lt_msl IS NOT INITIAL.

    READ TABLE lt_msl INTO DATA(ls_msl)

    WITH KEY message = /scwm/if_mapping_constants=>sc_m_obdlv_change_revgi.

    IF sy-subrc NE 0.

    WAIT UP TO 2 SECONDS.

    CONTINUE.

    ELSE.

    LOOP AT lt_msl ASSIGNING FIELD-SYMBOL().

    IF -message = /scwm/if_mapping_constants=>sc_m_obdlv_change_revgi.
    -status = ‘X’.

    ELSEIF -message = /scwm/if_mapping_constants=>sc_m_obdlv_confirm_dec.
    -status = ‘X’.

    ENDIF.

    ENDLOOP.

    MODIFY /scwm/messagelog FROM TABLE lt_msl.

    COMMIT WORK AND WAIT.

    MESSAGE s167 INTO lv_msg.

    PERFORM add_message TABLES lt_return

    USING lv_msg.

    ENDIF.

    ENDIF.

    ENDDO.

    *–Check for errors

    IF VALUE #( lt_return[ type = ‘E’ ]-type OPTIONAL ) NE ‘E’.

    *–create service provider

    DATA(lo_message_box) = NEW /scdl/cl_sp_message_box( ).

    *–Create object to instantiate

    CREATE OBJECT lo_sp

    EXPORTING

    io_message_box = lo_message_box

    iv_doccat = /scdl/if_dl_doc_c=>sc_doccat_out_fd “sc_doccat_out_prd

    iv_mode = /scdl/cl_sp=>sc_mode_classic.

    *–Get real warehouse

    /scwm/cl_tm=>set_lgnum( iv_lgnum ).

    *–Lock dlv

    lo_sp->lock(

    EXPORTING

    inkeys = lt_key

    aspect = /scdl/if_sp_c=>sc_asp_head

    lockmode = /scdl/if_sp1_locking=>sc_exclusive_lock

    IMPORTING

    rejected = lv_rejected

    return_codes = DATA(lt_return_codes) ).

    *–read item details into buffer

    lo_sp->select(

    EXPORTING

    inkeys = lt_key_itm

    aspect = /scdl/if_sp_c=>sc_asp_item

    IMPORTING

    outrecords = lt_outrec_itm

    rejected = lv_rejected

    return_codes = lt_ret ).

    *–read header details into buffer

    lo_sp->select(

    EXPORTING

    inkeys = lt_key

    aspect = /scdl/if_sp_c=>sc_asp_head

    IMPORTING

    outrecords = lt_outrec

    rejected = lv_rejected

    return_codes = lt_ret ).

    *–Delete the FDO

    lo_sp->delete(

    EXPORTING

    inkeys = lt_key

    aspect = /scdl/if_sp_c=>sc_asp_head

    IMPORTING

    rejected = lv_rejected

    return_codes = lt_ret

    ).

    *–Check if any error occurred

    IF line_exists( lt_return_codes[ failed = abap_true ] ) OR lv_rejected EQ abap_true.

    *–Error to fail queue

    ELSE.

    lo_sp->save(

    IMPORTING

    rejected = lv_rejected ).

    *–Commit / rollback based on errors

    IF lv_rejected IS INITIAL.

    CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’

    EXPORTING

    wait = abap_true.

    CALL METHOD lo_sp->(‘CLEANUP’)

    EXPORTING

    reason = /scmb/if_sp_transaction=>sc_cleanup_commit.

    *–Clear buffers and release locks

    /scwm/cl_tm=>cleanup( ).

    ELSE.

    CALL FUNCTION ‘BAPI_TRANSACTION_ROLLBACK’.

    *–Clear buffers and release locks

    /scwm/cl_tm=>cleanup( ).

    ENDIF.

    ENDIF.

    See less
  3. I think this is not how PARAMETER ID is intended to be used. For transfering values from and to memory you should use MEMORY ID (EXPORT TO or IMPORT FROM).

    I think this is not how PARAMETER ID is intended to be used. For transfering values from and to memory you should use MEMORY ID (EXPORT TO or IMPORT FROM).

    See less
  4. Here is the sample code to read HU Create Instance for /scwm/cl_wm_packing class *--Get docid from the source HU       CALL METHOD /scwm/cl_wm_packing=>get_instance         IMPORTING           eo_instance = DATA(lo_wm_pack). * --init warehouse,application       CALL METHOD lo_wm_pack->init_pacRead more

    Here is the sample code to read HU

    Create Instance for /scwm/cl_wm_packing class
    
    *--Get docid from the source HU
          CALL METHOD /scwm/cl_wm_packing=>get_instance
            IMPORTING
              eo_instance = DATA(lo_wm_pack).
    
    
    
    * --init warehouse,application
          CALL METHOD lo_wm_pack->init_pack
            EXPORTING
              iv_badi_appl = 'WME'
              iv_lgnum     = is_ltap-lgnum
            EXCEPTIONS
              error        = 1
              OTHERS       = 2.
    
    
    
    * --get hu data, in this case only item data
          CALL METHOD lo_wm_pack->get_hu
            EXPORTING
              iv_guid_hu = is_ltap-sguid_hu                 " Unique Internal Identification of a Handling Unit
            IMPORTING
              et_huitm   = DATA(lt_huitm)                   " Material Items in the HU
            EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.

     

    See less

Recent Posts on sapewmhelp.com

SAP EWM Help Latest Articles

Create TU in SAP Extended Warehouse Management – EWM

TRY.          lo_tu_cntrl->create_new_bo_tu( EXPORTING is_bo_tu_new = ls_new_tu_head                                         IMPORTING eo_bo_tu     = eo_bo_tu ). IF eo_bo_tu IS BOUND.             es_tu_act_num = eo_bo_tu->get_num( ).             APPEND es_tu_act_num TO lt_inkeys.          ENDIF.             lo_tu_cntrl->save( ). *--Commit work             COMMIT WORK AND WAIT.             tu_num = es_tu_act_num-tu_num.             "Log something in case of success           CATCH /scwm/cx_sr_error INTO lo_tu_exception.             ROLLBACK WORK. *--Log something in case of error

How can you extract specific fields from an internal table using FOR … WHERE inside a VALUE expression?

This creates a new string table containing only the names of users whose status = ‘ACTIVE’—short, clean, and readable. — REDUCE Example —Total Amount: 500 Output: — FILTER Example —Alice ACTIVECharlie ACTIVE — FOR Expression Example —AliceCharlie

Explore Our Blog