Showing results for 
Search instead for 
Did you mean: 

Is it possible to create WareHouse Product using CIF interface from ECC (Y/N)?

Former Member
0 Kudos

Hi there,

I have seen this issue being discussed in the past in the SCM community a couple of times, but I did not find a clear answer. Most topics were about 2 years old, so maybe things have changed.

My question is: Is it possible to create a WareHouse Product automatically using the CIF interface from ECC?

Our situation is like this:

Materials are created in ECC they are being transferred to EWM using the CIF interface. The EWM products are created fine, but we also need them to be created/extended as Warehouse products.

I have found a BAdi which is executed by the CIF Create-product-interface on EWM, where I actually can populate and add the structures for MATLWH and MATLWHST, but then the Product Creation ends in error in SMQ2.

My second question is then:

What is the best way to create Warehouse Products from existing Products? In other words, is there a BAPI or other FM which I can use in my own Report to create the entries in the /SAPAPO/MATLWH and ~/MATLWHST tables? I think a recording BIM can do the job, but I would create a job for it.

I tried /SAPAPO/DM_PRODUCTS_MAINTAIN, but this is also not working, or I do not know how to use it...

Has anybody solved this issue, or any new ideas?

Thank you so far,

regards, Walter.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


I posted this question 8 days ago and I just got notified by the moderators that this message was approved to be posted....???

Don't know why that takes so long, but meanwhile the issue has been solved (by me).

Solution for those who are interested:

EWM has some BAdi's which are called by the different CIF-interfaces.

The BAdi's are called: SMOD_APOCF***; the description of the BAdi points to the type of CIF-interface. For this Product interface I used the BAdi SMOD_APOCF005.

In this BAdi I populated and added the structures ET_MATLWH(X) and ET_MATLWHST(X) (which correspond to the warehouse product tables  /sapapo/matlwh  and  /sapapo/matlwhst), and that's it.

I looped over the structure ET_MATLOC to get the actual Locations which is needed for the 2 structures to be processed correctly. It took some trial and error for finding that out.

Good luck, Walter.

0 Kudos

Hi Walter,

I personnely beliveve that SAP is process driven rather technology driven.

I would like to understand why do you want to create warehouse products from CIF?

Once the product is maintained this is extended to eWM to maintain additional master data of eWM. If you CIF the data you are getting only ERP data from the system.

by the way I am not moderator..



Former Member
0 Kudos

Hello Sastry,

I cannot answer that question exactly, because it was a requirement of the customer...

Like you say: If you CIF the data you are getting only ERP data from the system.

So obviously, the warehouse product-data is missing, but according to the spec's it is required.

( I do not know which eWM process uses the warehouse product-data...)

So to save some time doing Master Data maintenance in eWM afterwards, this option of extending the CIF-interface was chosen..

Btw., there are a lot SCN-forums discussing this subject, so this is a 'common''  requirement.

reg., Walter.

Former Member
0 Kudos

Hi Walter - thanks for your inputs. can you please share the code for lt_sc_unit  ?


Rama Krishna.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Walter - can you please share the code used in BADI implementation to populate table  /sapapo/matlwh?


Rama Krishna.

Former Member
0 Kudos

Hi there,

        LOOP AT lt_sc_unit  INTO ls_sc_unit.

            CLEAR: ls_matlwh, ls_matlwhx.

*           Vullen en toevoegen van structuur ext_matlwh (tabel /SAPAPO/MATLWH)

*           Verplichte velden tbv. correcte verwerking

            ls_matlwh-method        = ls_sc_unit-upd_code_matlwh.

            ls_matlwh-ext_matnr     = lv_extmatnr.

            ls_matlwh-ext_entity    = ls_sc_unit-scguid_ext.

            ls_matlwh-scutype       = '1001'.

            ls_matlwh-ext_entitled  = ls_sc_unit-entitled.

             ls_matlwh-ptdetind      = '01'.

            ls_matlwh-put_stra       = '0001'.

            ls_matlwh-ccind          = 'C'.

            APPEND ls_matlwh TO lt_matlwh.

*           Verplichte velden tbv. correcte verwerking

            ls_matlwhx-method       = ls_sc_unit-upd_code_matlwh.

            ls_matlwhx-ext_matnr    = lv_extmatnr.

            ls_matlwhx-ext_entity   = ls_sc_unit-scguid_ext.

            ls_matlwhx-scutype      = '1001'.

            ls_matlwhx-ext_entitled = ls_sc_unit-entitled.

*           Data-velden / scherm-velden

            ls_matlwhx-ptdetind     = 'X'.

            ls_matlwhx-put_stra     = 'X'.

            ls_matlwhx-ccind        = 'X'.

            APPEND ls_matlwhx TO lt_matlwhx.

*           Vullen en toevoegen van structuur ext_matlwhst (tabel /SAPAPO/MATLWHST)

*           Verplichte velden tbv. correcte verwerking

            CLEAR: ls_matlwhst, ls_matlwhstx.

            ls_matlwhst-method        = ls_sc_unit-upd_code_matlwhst.

            ls_matlwhst-ext_matnr     = lv_extmatnr.

            ls_matlwhst-ext_entity    = ls_sc_unit-scguid_ext.

            ls_matlwhst-scutype       = '1001'.

            ls_matlwhst-ext_entitled  = ls_sc_unit-entitled.

*           Data-velden / scherm-velden

            ls_matlwhst-lgtyp         = '0001'.

            APPEND ls_matlwhst TO lt_matlwhst.

            ls_matlwhstx-method       = ls_sc_unit-upd_code_matlwhst.

            ls_matlwhstx-ext_matnr    = lv_extmatnr.

            ls_matlwhstx-ext_entity   = ls_sc_unit-scguid_ext.

            ls_matlwhstx-scutype      = '1001'.

            ls_matlwhstx-ext_entitled = ls_sc_unit-entitled.

*           Data-velden / scherm-velden

            ls_matlwhstx-lgtyp         = 'X'.

            APPEND ls_matlwhstx TO lt_matlwhstx.


*       Schrijf de gevulde structuren weg tbv. de verwerking

        et_matlwh     = lt_matlwh.

        et_matlwhx    = lt_matlwhx.

        et_matlwhst   = lt_matlwhst.

        et_matlwhstx  = lt_matlwhstx.

Former Member
0 Kudos

Hi, Greetings.

Thanks for your quick response.

Please let me know what the below variables are in your code?



for now i have imported it_matkey, but i get an error : System D15CLNT300 not assigned to any business system. (D15CLNT300 is source system and i am getting this error in target system)

Please assist.


Rama Krishna.

Former Member
0 Kudos


Regarding the variables, you can check the corresponding field in tables /SAPAPO/MATLWH and /SAPAPO/MATLWHST yourself.

Reg. the error:

Assign the Logical System D15CLNT300 to a Business System:

spro -> ewm -> interfaces -> erp integration -> general setting -> define Business system

But that's part of the CIF configuration, please search SCN for that.

Good luck, Walter.

Former Member
0 Kudos

Hi Walter - I am implementing this BADI to insert data into /sapapo/matlwh, so i wouldn't find any rows.


Rama Krishna.