cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi or FM to find Products Like Monitor

Mcesar209
Explorer
0 Kudos
891

Hi people.

Can anyone tell me which and how I use a function to search for available stock by selection criteria like /scwm/mon ?

Thanks

Marcos

Accepted Solutions (0)

Answers (2)

Answers (2)

PatrickMueller
Product and Topic Expert
Product and Topic Expert

Hello Marcos,

the monitor queries are realized via class /SCWM/CL_MON_STOCK.

You will find public methods for physical stock, available stock, and for the stock overview.

Keep in mind that this class is not released for custom developments like BAPI / FM.

Best regards,

Patrick

Mcesar209
Explorer
0 Kudos

Hi Patrick thanks, I ´ll check how to use this.

yaping_wang2
Active Participant

Can't you just use /SCWM/AQUA table for this purpose? Not really need FM, right?

Daniil
Active Contributor
0 Kudos

direct selects could be useful in some areas, but in general correct way would be usage of provided APIs (FMs). For Aqua, sure it is almost the same, but if it is for real use, you still would need maybe to recalculate units of measure, get product texts, documents by guids and so on. Why in this case one would write all this code instead of usage of the standard. If it is only for some intermediate steps (technical use, e.g. check if product has aval. qty), than it could be a direct select.

Mcesar209
Explorer
0 Kudos

Hi Yaping , and I thought about this. My idea is to look for materials in the positions according to the user's criteria and create tasks moving produt to a work center. But I was afraid of not being the right way. Then I would just need a function to create the task. In this case would be need to use other tables beyond AQUA ?

Thanks Marcos

yaping_wang2
Active Participant
0 Kudos

Hi Marcos,

Table AQUA is the correct one which shows the available stock only - same table used by SAP internal WT creation as well. At the same time, you might have to check /SCWM/LAGP table for storage bin block check as well as the inventory blocking during WT creation. These 2 tables are also checked by standard SAP WT creation FM.

yaping_wang2
Active Participant
0 Kudos

Also Marcos, I will suggest to use FM /SCWM/AVL_STOCK_PER_RSRC_MON which is used for available stock selection from the monitor. You might have to copy to a new one to update according to your requirement.

Mcesar209
Explorer
0 Kudos

OK, Thank you so much