cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use /SCWM/CL_DLV_MANAGEMENT_PRD=>CREATE_WHR?

theinternets
Explorer
0 Kudos
2,234

Hello everyone,

I have a requirement to manually create warehouse requests.

So far, I've found Class /SCWM/CL_DLV_MANAGEMENT_PRD which offers a method "CREATE_WHR" to create warehouse requests as well as method SAVE to save the warehouse request.

Unfortunately, saving is not possible, as warehouse request items are required first. There is a method "CREATE_WHR_ITEM" as well, but it requires a non-editable input table it_items to create warehouse items from the input table it_items_to.

Does anyone have an example of how to create WHR using the methods in this class? Unfortunately, the where-use-list on these methods is empty on my sandbox system.

Regards

View Entire Topic
LaurinPS
Explorer

Hi Lukas, try setting a breakpoint in class /SCDL/CL_DL_DOM_PRD method CREATE_NEW_DO. Now create an WHR with transaction /SCWM/IM_ST. Somewhere later in the coding the items will be created aswell.

theinternets
Explorer
0 Kudos

Hi Laurin,

thank you for your answer. CREATE_NEW_DO is called when creating the Document header. So when the debugger ends, the items have not yet been created - Which makes sense, seeing that you can add n items in /SCWM/IM_ST after creating the document itself. I've tried to debug here but i can't find the point at which the items are created (it's quite complex).

Regards,

Lukas

LaurinPS
Explorer
0 Kudos

Hi Lukas,

the items get created with class /SCDL/CL_DL_DO_PRD Method CREATE_NEW_ITEM. hope that helps you

theinternets
Explorer
0 Kudos

Hi Laurin,

thank you very much - ich think i now understand how to use the CREATE_WHR_ITEM.

Have a great day!

Regards,

Lukas