Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How exclude stock from MARC-EISBE in select statement

Former Member
0 Likes
972

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.

3 REPLIES 3
Read only

eduardo_hinojosa
Active Contributor
0 Likes
776

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

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
776

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.

Read only

0 Likes
776

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.