cancel
Showing results for 
Search instead for 
Did you mean: 

EWM Tables for Pick HU and Ship HU connection

ruturaj
Explorer
0 Kudos

Hello EWM Experts,

I have a custom EWM transaction to pack a Pick HU into Ship HU. I have to incorporate a validation in this transaction to check if the Pick HU already exists in the Ship HU. Can you please advice which EWM tables I can check to find if the Pick HU is already contained in the Ship HU? (I have checked tables /SCWM/HUHDR and /SCWM/HUREF, however, I cannot find this Pick HU - Ship HU connection).

Alternatively, if any specific function module can be used for this purpose, please let me. Thanks.

Regards,

Ruturaj

Accepted Solutions (1)

Accepted Solutions (1)

former_member230160
Active Participant
0 Kudos

Hi Ruturaj,

maybe check function  /SCWM/HU_READ. Use IV_APPL = WME and either use IV_GUID_HU or IV_LGNUM+IV_HUIDENT.

Direct DB selects should if possible be avoided.

Best regards

Markus

Answers (2)

Answers (2)

shimank_jain3
Explorer
0 Kudos

Hi Raj,

There is no direct DB tables in which you get the linkage between HU header and HU items.

I have done this in a way:

Via QUERY method, you will get the delivery HU Header and HU Items contents.

<OBJ> TYPE REF TO /scwm/cl_dlv_management_prd.

CALL METHOD <OBJ>->query
EXPORTING
it_docid       
= <docid>
iv_doccat      
= <doccat>
is_exclude_data
= <exc_data>
IMPORTING
et_hu_top      
= <hu_top>
et_hu_headers  
= <hu_headers>
et_hu_items    
= <
hu_items>.


Then:


LOOP AT lt_hu_top INTO ls_hu_top.
    
LOOP AT lt_hu_items INTO ls_hu_items
     
WHERE guid_parent = ls_hu_top-guid_hu.
     .....


     endloop.

    

     LOOP AT lt_hu_headers INTO ls_hu_headers
     
WHERE higher_guid = ls_hu_top-guid_hu.

                   LOOP AT lt_hu_items INTO ls_hu_items
               
WHERE guid_parent = ls_hu_headers-guid_hu.
     ......

          endloop.


      endloop.


endloop.



You will check by passing some dummy delivery data how it works. if suits, implement the same.


If you will find any other solutions or tables, request you to post the same.

Thanks,

Shimank Jain


ruturaj
Explorer
0 Kudos

Hello Shimank,

Thanks for your feedback.

I understand that in your code above, it_docid and iv_doccat refer to ODO document number and ODO document category. However, in my custom transaction I have only the Header HU number (Ship HU) and Item HU number (Pick HU). I do not have ODO number to fetch the contained HUs (header and item HUs). Is there a method or function that can be called directly by passing HU number which returns the contained HU items?

Thanks,

Ruturaj



Former Member
0 Kudos

Hello Ruturaj,

Pick HU and Ship HU don't have different table as I know.

Number range can be a used to differentiate the same.

You have to also check the status of HU to work for this transaction.

     

Check the below HU Tables :            


BR,

Olet

ruturaj
Explorer
0 Kudos

Hello Olet,

Thanks for your answer.

I have checked the recommended tables, however, I cannot find connection between Pick and Ship HU in any of the tables.

For greater clarity, I will explain my business scenario with an example.

I have a Pick HU, say, X and Ship HU, say Y.

I would like to incorporate a validation in my custom repacking transaction to check whether X is already packed into Y, (For e.g. in /SCWM/PACK transaction I can see structure as: Top Level HU is Y inside which HU X is contained)

Is there a standard EWM table that contains this relation/connection between two HUs?

Or is there an FM which can be used to validate this fact?

If the Pick HU is not packed into Ship HU, I would like to allow the repack operation.

If the Pick HU is already paked into Ship HU, I want to throw appropriate error, e.g. 'Pick HU is already packed inside Ship HU.'

Your help on this matter is appreciated.

Thanks.

Ruturaj