Skip to Content

Hi! Does anybody know from which table to take base quantity for production orders?

Oct 17, 2017 at 12:39 PM


avatar image

does anybody know from which table to take base quantity for production orders? i think is in AFVV-MGVRG but i am not sure. Thank you !

Kind regards, Julian

I need it in the structure below:

TYPES: BEGIN OF tables_fields,

  AUFNR TYPE AUFK-AUFNR, "Nr comanda productie

*   AUFNR TYPE AUFM-AUFNR, "Nr comanda productie

*  MAKTX TYPE MAKT-MAKTX, "Descriere material

  AUART TYPE AUFK-AUART, "Tip comanda /Sectie

  WERKS TYPE AUFK-WERKS, "Unitate logistica

  TXT   TYPE T003P-TXT,  "Nume sectie

  "MENGE TYPE AUFM-MENGE, "Cantitate buc predata

  GAMNG TYPE AFKO-GAMNG, "Cantitatea totala vrac

  GMEIN TYPE AFKO-GMEIN, "Unitatea de masura kg cantitate totala

  "WEMNG TYPE AFPO-WEMNG, "Cantitatea totala livrata

  ERFMG TYPE AUFM-ERFMG, "Cantitatea totala livrata defalcata

  GSTRP Type AFKO-GSTRP, "Data lansarii comenzii

  GLTRP TYPE AFKO-GLTRP, "Data estimativa a finalizarii comenzii

  BLDAT TYPE AUFM-BLDAT, "Data finalizarii comenzii

  MGVRG TYPE AFVV-MGVRG, "Bucati pe comanda-cant de baza

  "MEINS TYPE AUFM-MEINS,"Unitate bucati pe comanda-rectificat

  MEINH TYPE AFVV-MEINH,  "Unitate de masura bucati pe comanda

  MENGE TYPE AUFM-MENGE, "Cantitate buc predata

*  BMENG TYPE STKO-BMENG, "Cantitatea de baza estimata

*  BMEIN TYPE STKO-BMEIN, "Unitatea de masura cantitatea de baza estimata

  MATNR TYPE AUFM-MATNR, "Cod material


  MAKTX TYPE MAKT-MAKTX, "Descriere material




  SPRAS TYPE T003P-SPRAS,"Restrictionare limba

  ZILEDEP TYPE I,"AFKO-GLTRP, "Filtru date intre care s-au realizat comenzi

  COMDEP(10) TYPE C,"Nr zile comanda depasita

  COMINTRE TYPE AFKO-GSTRP,"Data comenzi termen depasit

* ERDAT TYPE AUFK-ERDAT, "Data lansarii comenzii - campul vechi

* LTRMI TYPE AFPO-LTRMI, "Data finalizarii comenzii noul camp


  "TXT04 type TJ02T-TXT04, "Text scurt stare comanda

  "TXT30 TYPE TJ02T-TXT30, "Text lung stare comanda

  line_color(4) TYPE c,

   END OF tables_fields.

10 |10000 characters needed characters left characters exceeded

You should explain your scenario and which is your aim: the question is pretty... vague.


Dear Simone,

Thank you so much for your reply.Please find below my scenario which i need to bring in my alv report.:

thank you for your reply. The requierement is that i need to bring the base quantity from a production process into my report along with :plant(AUFK-WERKS), type of command (AUFK-AUART),section name (T003P-TXT),material(AUFM-MATNR),required base quantity(AFVV-MGVRG),unit measure(AFVV-MEINH),quantity produced(AUFM-MENGE),required quantity in KG(AFKO-GMEIN),quantity in KG produced(AUFM-ERFMG),date launch order(AFKO-GSTRP),estimated date finish order(AFKO-GLTRP),date effectively finish order(AUFM-BLDAT)


It seems to me you are doing a copy-and-paste around the web without knowing what you are doing.

You are asking for something you already know and have....


If i would have known i wouldn`t have posted this here.


This is your question

does anybody know from which table to take base quantity for production orders? i think is in AFVV-MGVRG but i am not sure. Thank you !

and this the requirement you have

 The requierement is that i need to bring the base quantity from a production process into my report along with :plant(AUFK-WERKS), type of command (AUFK-AUART),section name (T003P-TXT),material(AUFM-MATNR),required base quantity(AFVV-MGVRG),

What am i missing?

Your requirement states which table and field to read and you asked for it!


Simone Milesi , i am the one who wrote the requirment ,what i don`t know if that is the correct table and field , i have process orders that show correctly the result and for others dont.


I'm also curious who is "Julian" since the profile name says differently.


the question in stack overflow is without Julian (after a moderator edited it away)

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Manole Apetroaie Oct 19, 2017 at 12:57 PM

it seems that the base quantity is calculated by AFPO-PSMNG / AFPO-UMREN. in this case the result is same as base quantity.

10 |10000 characters needed characters left characters exceeded
Simone Milesi Oct 18, 2017 at 08:51 AM

Ok, maybe i -finally- understood which field you are looking for: are you referring to this?

If yes, it's on AFKO-BMENGE.


  1. Explain very well with examples and screenshots what you are looking for!
  2. Before posting, go to the standard transaction handling the data you need to manage, identify the field you want to extract, press F1 and then choose "Technical Information": 95% of times you can see the related table-field/domain/structure you need and with a little investigation on SE11/Google you'll find the answer by yourself. This way you start to understand also the links between the tables (at least the main ones).

untitled3.png (24.6 kB)
Show 6 Share
10 |10000 characters needed characters left characters exceeded

Dear Simone,

Thank you for your answer. In my table AFKO there is no field BMENGE neither other field that would hold the value that i am looking. I already did what you advised about pressing F1 on the field but in my case is pointing me to a structure for which i have difficulties in finding the table,please find picture attached.

untitled.jpg (798.3 kB)

Neither on view CAUFV? Which release are you working on?

in my 731 i have that field on AFKO.


Neither on view CAUFV.I`m on ecc.6.0


Last attempt could be to debug CO03 and put a watch point on that field


I'm not familiar with the language but visually there is no such field on that screen in our system. (Please try to post the screenshots in English, you can choose a language when logging in.) We do have AFKO-BMENGE in DB, just like Simone mentioned. My guess would be your system is configured differently, therefore I doubt the SCN members will be able to answer this question.

There are only 3 main tables for production order: AUFK, AFKO, AFPO. Simply by checking SE16 you can probably figure out the source field, unless it's derived at runtime and not actually stored in the database.

image.jpg (85.6 kB)

I tried to debug it using se38 and it says that it doesn`t exist.Thank you for your concern.

Jürgen L
Oct 18, 2017 at 05:48 PM

AFKO-BMENGE is only there if you have the include MILL_OC_AFKO, which means probably after activation of a business function or in a specific Industry solution

My approach in such cases is to take the field name and search for OSS notes. CAUFVD-BMENGE returned 6 notes and in note 1847303 it is said that SAP calculates the base quantity when the user changed the unit of measure in the header while creating the production order and entered a unit which is not equal to the base unit of measure.

The pop-up for technical field help allows forward navigation by double click, this way you may find where it is calculated and to which field and table it is updated, sometimes the screen fields have different names than the table fields.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

i didn't know that, thanks for the sharing!

Sadly who implemented our system (3 years before my arrival here) activated a lot of solutions and modules without a reason and it's hard to disentangle between them. :(


@Jurgen L. Thank you for your reply you were close. I updated the answer to this question.