cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmed quantity field

carlos_zhang3
Participant
0 Kudos

Dear Guru ,

We are developing an abap program that can do the the production order confirmation ( like CO15 ) .

In order to calculate the open quantity ( "Current to Confirm" field in CO15 ) , we need the "Already Confirmed" field .

Is the "Already Confirmed" field saving in table "AFRU" ? I saw there have two fields : GMNGA & LMNGA , But i am not sure which one can be used .

And i am also not sure the relation-ship between AFPO & AFRU , because in my abap program , i only have the production order number as a parameter .

If i search the record on AFRU table with production order number , the performance will be very bad ... Does another solution can improve the performance ?

Many thanks .

Best Regards,

Carlos

Accepted Solutions (1)

Accepted Solutions (1)

carlos_zhang3
Participant
0 Kudos

Thanks S.

Does SAP provide the standard function module for the open production order quantity ?

Thanks again .

Former Member
0 Kudos

Hi Carlos,

table AFRU provides the confirmed quantity per confirmation. If there is more than one confirmation per order, you either need to add the confirmed quantities or you may read the total confirmed quantity from table CAUFV field IGMNG.

The other option is to call BAPI_PRODORDCONF_GET_HDR_PROP. It automatically proposes the open quantity (planned minus confirmed quantity).

Regards,

Andreas

Former Member
0 Kudos

Hi Carlos,

There is no fuction module for check open order quantity. You can check into Table AFKO. Put your order no. and it will give you the quantity already confirmed ( Field Name : IGMNG).

Fuction Module to create confirmation: BAPI_PRODORDCONF_CREATE_HDR

Hope it soles your problem

Thaks,

SISL !!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Carlos,

As AFRU is the confirmation table for production/Process orders. and if u want to use the order confirmation from some ABAP development then u should use AFRU for the quantity field.

Are u using any fuction module for this?

AFPO is just the Order item table, that u can use to verify the production order no. but not the confirmed quantity. Use the field "GMNGA" and also take care of the reversal too.

Thanks,

SISL !!

carlos_zhang3
Participant
0 Kudos

Can i use below code to get the production order open quantity ?


* Get Confirmed Qty 
 select sum( LMNGA ) into cur_openqty from afru
         where
             AUFNR = i_afpo-aufnr
           and
             stokz = ' '
           and
             stzhl = ' '.

* Total Qty - Confirmed Qty
    cur_openqty = i_afpo-psmng - cur_openqty .