cancel
Showing results for 
Search instead for 
Did you mean: 

How to map EWM independent stock type to ERP stock type

michael_fallenbchel
Active Participant
0 Kudos

Hi experts,

short and stupid question 🙂

We have a requirement to be able to show stock in EWM as well in ERP. So I created a RFC function to caall EWM out of ERP, read stock (using /scwm/cl_mon_stock). Easy and already done.

Now we need to show stock type (FF/BB/QQ/...) as well. What I miss is a mapping between the independent stock type to ERP stock type.

We have FF, BB, QQ, that's fine. Found some coding like that, here in function /SCWM/GET_STOCKID_MAP_INSTANCE):

APPEND INITIAL LINE TO lt_catlocn_to_erp_cat ASSIGNING FIELD-SYMBOL(<ls_catlocn_to_erp_cat>).
<ls_catlocn_to_erp_cat>-catlcon = 'FF'.
<ls_catlocn_to_erp_cat>-erp_cat = 'F'.

But that's not true - FF in EWM is "empty" in ERP, BB is S, QQ is Q (not X).

Does anyone know a function/class to do a mapping here? Stock type to availabilty group to independent stock type to ERP stock type (F2 to 0002 to FF to space)?

Thanks

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

michael_fallenbchel
Active Participant
0 Kudos

Found a bit more - there is one more mapping in /SCWM/LERP_STOCKID_MAPPINGSMI, method convert_erp_cat:

CASE is_erp_cat. 

WHEN space. 

es_erp_cat = 'F'.

 WHEN '2' OR 'Q'. 

es_erp_cat = 'X'. 

WHEN '3'. 

es_erp_cat = 'S'. 

WHEN OTHERS. 

es_erp_cat = is_erp_cat. 

ENDCASE.

Used combination now of this coding - but to be honest - this is not a nice solution 😉

JuergenPitz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

of course it is not a nice solution. The nice solution would be to use MMBE in ERP to see the ERP stock. Where do you now show the ERP stock?

Brgds

Juergen

michael_fallenbchel
Active Participant
0 Kudos

Sure, what we need is to include EWM beside other solutions. So we one storage location EWM related, the others not.

Now users (SAP would be so nice without users ;-))) want to use their old know programs, so we try to get EWM stock as well into this old overview. At the end we will show EWM stock with storage bin etc. in a ERP program

JuergenPitz
Product and Topic Expert
Product and Topic Expert

Hm, ok, so you want to see the EWM stock from the ERP side. OK...

"Now users want to use their old know programs" ... no comment on that. But then they probably would have prefered to work with pen and paper at the first implementation of any software in their company.

Agreed, without users life would be easier sometimes... 🙂