on 08-25-2021 10:07 AM
I want to report stock quantity (which I have in (LIME/NQUAN.QUAN) by Storage Type (/SCWM/LAGP.LGTYP) but I'm struggling to find a set of tables to relate the two. LIME/NQUAN has a GUID_STOCK which I can only think is the only identifier to link somewhere to get LGTYP but I cannot find that set of table(s) to join them.
Frustratingly for 'Available' stock it's all in one place /SCWM/AQUA, here we have LGTYP and QUAN in one table, but it's only 'Available' stock not total stock.
Any help would be gratefully appreciated
Without knowing your actual use case:
1) Warehouse Management Monitor -> Stock and Bin -> Physical Stock
^^ That query can just be started by storage type. although you did not mention it in your request, I guess you are not interested on the single bins but you are looking for an aggregation among the storage type.
2) EWM also offers BI extractor 0WM_STOCK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Patrick, I am trying to build a HANA Calculation view to report directly ontop of EWM in Webi. So I cannot use a T-Code as that uses a function module nor 0WM_STOCK as I cannot use BW.
So I'm trying to work out what EWM tables in need to use/join to get LIME/NQUAN by MATID and LGTYP. I have no ABAP skills so trying to interrogate the function module /SCWM/SELECT_STOCK behind the warehouse monitor is beyond my knowledge
derekjones thanks for your answer! I tried your suggestion and indeed could succesfully join NTREE.GUID with the PARENT_GUID of NQUAN. Unfortunately, if I use NTREE-PARENT_GUID to the GUID_LOC of /SCWM/LOC_IW01 I'll get 0 results.
Question remains where we can find the storage bin of the physical stock to connect to /SCWM/LAGP, can be either a GUID or the storage bin number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Derek,
You can use physical stock method to get storage type stocks.
I shared example code below.
CREATE OBJECT lcl_mon_stock
EXPORTING
iv_lgnum = p_lgnum.
IF NOT s_lgtyp IS INITIAL.
ls_lgtyp-sign = 'I'.
ls_lgtyp-option = 'EQ'.
ls_lgtyp-low = s_lgtyp.
APPEND ls_lgtyp TO lt_lgtyp_r.
ENDIF.
IF s_matnr IS NOT INITIAL.
ls_matnr-option = wmegc_option_eq.
ls_matnr-sign = wmegc_sign_inclusive.
ls_matnr-low = s_matnr.
APPEND ls_matnr TO lr_matnr.
SORT lr_matnr BY low.
DELETE ADJACENT DUPLICATES FROM lr_matnr COMPARING low.
ENDIF.
CALL FUNCTION '/SCWM/ENTITLED_FOR_LGNUM_READ'
EXPORTING
iv_lgnum = mv_lgnum
IMPORTING
et_entitled = gt_entitled_all.
CALL METHOD lcl_mon_stock->get_physical_stock
EXPORTING
it_entitled_r = gt_entitled_all
it_matnr_r = lr_matnr
it_lgtyp_r = lt_lgtyp_r
IMPORTING
et_stock_mon = ET_STOCK_MON.
Best regards,
Atılay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue here, in trying to get the physical stock by storage bin, thus linking LIME/NQUAN with /SCWM/LGAP. All is available in /SCWM/AQUA, but I cannot join NQUAN and AQUA by GUID_STOCK, since there is no clear 1:1 relationship between these. Hope someone can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there. I did manage to solve this.
To get Stock Quantity
is in /LIME/NQUAN field 'QUAN' (I've put a condition where > 0 to remove 0 stock records)
To get Material ID
/LIME/NQUAN has GUID_STOCK, that can join to tables /SCWM/STOCK_IW01 + /SCWM/STOCK_IW02 + /SCWM/STOCK_IW03 + /SCWM/STOCK_IW04, each one of these has MATID
To get Storage Bin (or Resource or Warehouse or TU as not all stock is on Bin/LGTYP)
/LIME/NQUAN has GUID_PARENT, join to LIME/NTREE.GUID where "TYPE_PARENT" = 'H' to get GUID_PARENT, join this GUID_PARENT to 'GUID_LOC' in /SCWM/LOC_IW01 (for LGTYP) + /SCWM/LOC_IW02 (for RSRC) + /SCWM/LOC_IW03 (for LGNUM) + /SCWM/LOC_IW04 (for TU_NUM)
Hopefully yours should be structured similarly
User | Count |
---|---|
9 | |
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.