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

Open Order quantity?

Former Member
0 Likes
736

Hi everyone,

I have a question about stock overview.

When you enter transaction MMBE and enter a certain material, you will see, as a result, the stock overview for that material.

When you click on 'Choose (F2)' while selected the total unrestricted use quantity, a new window will appear. In this window some (calculated) stock quantities will be shown.

One of those items shows the 'Open Order qty'.

Does anybody has a query or FM which will give me this 'Open Order quantity', so I can use this value in another program/report.

Does anybody know how to calculate this quantity (which tables, fields, ... )

Many thanks in advance.

Guy.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
556

Hi try this:

PARAMETERS: P_WERKS LIKE MARD-WERKS DEFAULT '0001'.

*

PARAMETERS: P_MATNR LIKE MARA-MATNR.

DATA MDEZX TYPE TABLE OF MDEZ WITH HEADER LINE.

START-OF-SELECTION.

*

CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

EXPORTING

MATNR = P_MATNR

WERKS = P_WERKS

TABLES

MDEZX = MDEZX

EXCEPTIONS

MATERIAL_PLANT_NOT_FOUND = 1

PLANT_NOT_FOUND = 2

OTHERS = 3.

.

IF SY-SUBRC <> 0.

WRITE: / SY-SUBRC.

EXIT.

ENDIF.

*

LOOP AT MDEZX.

WRITE: / MDEZX-DELB0, MDEZX-EXTRA, MDEZX-MNG01, MDEZX-MNG02.

ENDLOOP.

*

END-OF-SELECTION.

perhaps it helps.

Regards, Dieter

2 REPLIES 2
Read only

Former Member
0 Likes
557

Hi try this:

PARAMETERS: P_WERKS LIKE MARD-WERKS DEFAULT '0001'.

*

PARAMETERS: P_MATNR LIKE MARA-MATNR.

DATA MDEZX TYPE TABLE OF MDEZ WITH HEADER LINE.

START-OF-SELECTION.

*

CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

EXPORTING

MATNR = P_MATNR

WERKS = P_WERKS

TABLES

MDEZX = MDEZX

EXCEPTIONS

MATERIAL_PLANT_NOT_FOUND = 1

PLANT_NOT_FOUND = 2

OTHERS = 3.

.

IF SY-SUBRC <> 0.

WRITE: / SY-SUBRC.

EXIT.

ENDIF.

*

LOOP AT MDEZX.

WRITE: / MDEZX-DELB0, MDEZX-EXTRA, MDEZX-MNG01, MDEZX-MNG02.

ENDLOOP.

*

END-OF-SELECTION.

perhaps it helps.

Regards, Dieter

Read only

0 Likes
556

Dear Mr. Gröhn,

This is what I need!!! Thanks you very much. I'm going to give you a BIG 10 for this one!

In my case I need the sum of all the values in the MNG01 fields in table MDEZX where DELB0 = PchOrd.

Thanks.