2014 Jan 03 1:43 PM
Dear Experts,
We have background job for T CODE MB1B to reserve stock for sales order and to select stock of storage location we have program as below but we have safety stock maintained in table MARC-EISBE system should exclude this value to reserve stock since it is safety stock. please help.
SELECT Matnr
werks
lgort
labst
klabs
from mard
into corresponding fields of table gi_mard
for all entries in gi_items
where matnr = gi_items-matnr
and werks = gi_items-werks
and lgort NE 'FT04'
AND (labst > 0 or klabs > 0 ).
in this I want to exclude value of MARC-EIBSE please help how to exclude.
Dear Experts,
We have background job for T CODE MB1B to reserve stock for sales order and to select stock of storage location we have program as below but we have safety stock maintained in table MARC-EISBE system should exclude this value to reserve stock since it is safety stock. please help.
SELECT Matnr
werks
lgort
labst
klabs
from mard
into corresponding fields of table gi_mard
for all entries in gi_items
where matnr = gi_items-matnr
and werks = gi_items-werks
and lgort NE 'FT04'
AND (labst > 0 or klabs > 0 ).
in this I want to exclude value of MARC-EIBSE please help how to exclude.
2014 Jan 03 4:43 PM
Hi
MARC is related with plant, MARD with storage location. You can split the stock for all plant with a criteria of ponderation between SLoc (for instante, the same percentage per total stock, compare with MBEW if the valuation area is the plant)
I hope this helps you
Regards
Eduardo
2014 Jan 03 5:57 PM
Did you mean you need to subtract the value in MARC-EISBE from some other value? In such case I believe you'd have to do all the selection first and do the math later, e.g. in an internal table loop. Read ABAP help for SELECT statement, all the possible options are there.
Otherwise please clarify the question.
2014 Jan 03 8:54 PM
Thank you for your reply I would like to know is there any table which shows only unrestricted stock without safety stock MARC-EISBE. I want to exclude MARC-EISBE value which is safety stock while calling MB1B T CODE in background job.