Open quantity field

Hi,
   could any one let me know if there is any table and field that stores teh value of the open quantity in deliery.suppose say for a partcular sales order there were N number of delivery made and when N+1 th delivery is done i want to make validation say want to compare teh delivery quantity entered with the open item(the items tht are pending to be delivered as per the sales order).For this i want to know the field and the table in which the open item(the pending delivery item for the sales order ) is stored.
Cn any on ehelp me iwth this.

Hi Sudha,
If partial delievry is allowed in the system, then multiple deliveries may exist for each sales order.
Using the sales order and item number as the key, you can get the delivery quiantities for each of those partial deliveries.
select vbeln vbelp LFIMG
  from lips into table it_lips
for all entries in it_vbap
where KDAUF = it_vbap-vbeln
   and KDPOS = it_vbap-POSNR.
loop at it_vbap.
lv_index = sy-index.
clear quant_delivered.
loop at it_lips where KDAUF = it_vbap-vbeln
   and KDPOS = it_vbap-POSNR.
quant_delivered = quant_delivered + it_lips-LFIMG.
endloop.
it_vbap-openqty = it_vbap-KWMENG - quant_delivered.
modify it_vbap index lv_index.
endloop.
Regards,
Ravi

Similar Messages

  • BAPI for PURCHASE ORDER with OPEN QUANTITY field

    Hi All,
    I wanted to use the BAPI_PO_GETDETAIL to get the Purchase Order details upon triggering from Warehouse management system,
    But the details required contains a field called OPEN QUANTITY...which is not used in this BAPI.
    I request to let me know if any BAPI exits for PO details having the structure for this field:Open Quantity.
    Am using SAP version 4.0B.
    If not exists please advise how to customize the existing BAPI to meet the requirement.
    thanks
    mahi

    Hi,
    Open quantity is a calculated field. I guess the BAPI gives the details of the delivery, so take the ordered qty and substract the delivered qty from that.
    Delivery data is EKET table.
    Regards,
    Ravi

  • Open quantity in credit memo and debit memo

    Dear Friends,
    I am facing one problem in billing cycle. I am creating credit memo directly with ref to invoice(With out cr memo request). I am describing  scenario below.
    I have created Invoice 8012003 with one item with 10 quantity, after that I am creating credit note with ref to Invoice no 8012003, here I am creating credit note with 3 qty. Sub subsequently when i create credit note with ref to invoice number 8012003, in open billing quantity system is showing 10 quantity instead of 7.
    I have used copy requirements 027 and billing quantity field is disabled.
    Kindly advice.
    Kaushal

    Hello ,
    you could check the field VBRP-POSAR in your credit note .
    If it's 'A' , it's only a value position.
    That could come from table TVAU , field VAUNA -
    the last part in copy requirement 027 .
    Regards Wolfgang
    Dear Wolfgag,
    Thanks a lot for your kind reply, k've checked, VBRP-POSAR is 'A' in and VBRP - AUGRU AUFT is blank. Please let me know whether order reason is affecting open quantity field or i've modify routine 27 for  passing value ' '(Standard Item) instead of 'A'(Value item).
    Please note that i am creating credit memo direct ref to invoices.
    Thanks a lot in advance.
    Kaushal

  • Field "Open Quantity" is empty on ME23N

    Hello,
    I am running the BAPI_GOODSMVT_CREAT for "Purchase Order", and when i go to ME23N, the field "Open Quantity" of item is empty.
    I'm usind this parameters:
          t_bapiitem-material             = v_ematn.                
          t_bapiitem-plant                = t_ba-werks.          
          t_bapiitem-stge_loc          = t_ba-lgort.          
          t_bapiitem-move_type      = t_ba-bwart.          
          t_bapiitem-entry_qnt        = t_ba-erfmg.         
          t_bapiitem-entry_uom      = v_meins.              
          t_bapiitem-po_number     = t_ba-po_number.     
          t_bapiitem-po_item           = t_ba-ebelp.         
          t_bapiitem-shipping          = '01'.                 
          t_bapiitem-comp_ship     = t_ba-norm_exp.       
          t_bapiitem-no_more_gr   = 'X'.
          t_bapiitem-mvt_ind          = 'B'.
          t_bapiitem-unload_pt       = t_ba-unload_pt.
          t_bapiheader-ref_doc_no = t_ba-nota_de_remessa.
          t_bapiheader-header_txt = t_ba-txt_cab.
          t_bapiheader-pstng_date = t_ba-dtlanc.
          t_bapiheader-doc_date   = t_ba-dtdoc.
    Anyone Help me ?
    With regards,
    Reginaldo Borges

    Hi,
    Try use:
    t_bapiitem-no_more_gr = ' '.
    Best regards,
    Leandro Mengue

  • Purchase Order Open quantity calculation.

    Hi All..
    I would like your help in finding out the logic behind calculating the open quantity for a given line item of a purchase order.
    Iam aware that i should go to the EKBE table to see purchase order history. Can someone tell me what are all the conditions i need to consider to calculate the Open quantity.
    Iam able to give a value E to field BEWTP (Purchase Order History Category) in EKBE and for all the recieved records iam adding the quantity for movement type 101 and removing the quantity for movement type 102 that finally gives my total GR qty. Then iam doing Original PO qty - GR qty to get the Open qty.
    Let me know if this logic is wrong or else is there any other conditions to consider.
    Appreciate your help and will reward.
    THanks.

    subtract the PO quantity EKPO-MENGE with the delivery quantity field EKET-GLMNG
    Thanks
    Seshu

  • Purchase order open quantity

    Hi,
    I am making one report for open purchase order quntity.But there is some problem
    In delivery shedule tab of  purchase order,If delivery date is in future, that purchase order quantity
    also shown by system as open quantity. So whether this open quantity is taken into account or not.
    So please guide me.
    Thanks and Regards
    Anil

    Hi,
    You can also user other transaction for open purchase order quantity.
    Enter ME2M t-code.
    Then select WE101 in selection parameter option and click on execute button.
    Then go in change layout option and take To Be Delivery quantity field in display mode.
    You can see open purchase order quantity.
    I hope it is useful for u.
    Regards,
    Mahesh Wagh

  • SO open quantity

    Hi,
    I need to get open quantity for each sales order in my Z report. Is there any field to store it or i need to calculate it. How can i do that, Thanks!

    Hi..
    check the below code to get the open quantity.
    open quantity = ordered quantity - delivered quantity
    Fetch delivery information
          SELECT vbeln posnr vgbel vgpos lfimg
                       FROM lips
                       INTO TABLE gt_lips
                       FOR ALL ENTRIES IN gt_vbap
                       WHERE vgbel = gt_vbap-vbeln AND
                             vgpos = gt_vbap-posnr.
    *Compute delivered qty
                LOOP AT gt_lips INTO st_lips WHERE vgbel = st_details-vbeln AND
                                                   vgpos = st_details-posnr.
                  gv_lfimg = gv_lfimg + st_lips-lfimg.
                  CLEAR st_lips.
                ENDLOOP.
                st_details-open_qty = st_details-ord_qty - gv_lfimg.
    i guess you know how to get the ordered quantity for the sales order item.
    Award points if found useful.
    Regards
    Divakar

  • Open Qty Field in Outbound Delivery

    Hi All,
    I would appreciate any assistance that you could offer on this issue.
    It is concerning the little known 'Open Qty' field in the outbound delivery.
    The business process here is to create outbound deliveries, which are then continually added to as and when stock becomes available.
    The Open Qty field should display the open qty from the sales order line, which includes the qty just delivered.
    So for example, a user attempts to add several lines to an existing outbound delivery (ie outbound delivery > deliver sales order).
    The user would then compare the qty delivered against the Open Qty - if they match then ok.  If the qty delivered is less than the open qty, then the user would delete this line as they are only interested in delivering the full qty.
    However the 'Open Qty' is not working as expected.  Eg if open qty on sales order is 2000.  But qty delivered is only 1500, the open qty would = 1500.  This is incorrect.  After the user saves the deliver and then re-checks he would see qty delivered = 1500 and Open Qty = 2000, so then he would know that the full qty was not delivered.
    This business has just migrated from 4.6c (where this field behaved correctly) to ECC 6.0.
    Thanks for any advice.
    Regards
    Guy

    Delivery qty - LIPS-LFIMG.
    You cannot get open quantity directly.
    use this way.
    Delivery qty   - LIPS-LFIMG.
    order qty       - VBAP-KWMENG.
    open qty = delivery qty - order qty.

  • Material Confirmed quantity and Open quantity

    Hi All,
      I am working on a report where the user wants the material confirmed quantity and open quantity at the batch level. I know for open quantity VBBE-OMENG can work. Just need confirmation that this is the correct field. However for confirmed quantity I am not able to narrow it down to one field. I have the following fields as possibilities but not sure which is the right one.
    1) VBBE-VMENG
    2) VBEP-BMENG (This is the at the sales order level though. We need it at the batch level)
    Can you please let me know if i have the right approach here? The report has Material, plant, sloc and batch along with a bunch of other fields.
    Regards.
    Sid

    Hello,
    you should extract the quantities from all the deliveries selected for material and batch, and selecting only open deliveries.
    Use a selection like this:
        SELECT lips~MATNR lips~WERKS
               lips~CHARG lips~LFIMG
          INTO TABLE lt_lips
          from lips as lips
          INNER JOIN vbup as vbup
            on lips~VBELN = vbup~VBELN AND
               lips~POSNR = vbup~POSNR
         WHERE lips~MATNR = p_matnr
           AND lips~WERKS = P_WERKS
           AND lips~CHARG = P_CHARG
           AND ( vbup~WBSTA eq 'A' or
                 vbup~WBSTA eq 'B' ).
    Best regards,
    Andrea

  • Netting the open quantity

    Hi Guys,
                 I have PO quantity(EKPO-MENGE)  and goods receipt quantity(MSEG-ERFMG). Here i want to calculate the open PO quantity which is  EKPO-MENGE - MSEG-ERFMG .But here if  multiple material docements r getting created for the same for one PO and partial goods receipt quantity is done thru these multiple material documents. then how to net the open quantity.
    For example :
    PO no   PO quantity material documents GR quantity
    10            10             100                              1
                                    200                              2
                                    300                             -2
                                    400                              3
    Now i need  the open quantity as  9
                                                      7
                                                      9
                                                      6.
    Even i tried with At new Ebeln.but i am not getting it.
    Can anybody help me in this.

    Hi,
    Open PO Line Item Qty = PO Line Item Qty - ( Sum(All GR Qty for PO Line Item ) -
                                                                        Sum(All GR Return Qty for PO Line Item) ).
    PO Line Item Qty = EKPO-MENGE.
    GR QTY for PO Line Item = EKBE-MENGE with Movement Type = '101'.
    GR Return QTY for PO Line Item = EKBE-MENGE with Movement Type = '102'.
    SELECT  EKPOMENGE EKPOMEINS
    FROM EKKO   INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
                           INNER JOIN EKET ON EKETEBELN = EKPOEBELN AND
                                                             EKETEBELP = EKPOEBELP
                           INNER JOIN LFA1 ON LFA1LIFNR = EKKOLIFNR
      INTO CORRESPONDING FIELDS OF TABLE I_PO
      WHERE  EKKO~BUKRS =  P_BUKRS AND
        EKPO~WERKS =  P_WERKS AND
        EKKO~LIFNR IN S_LIFNR AND
        EKPO~MEINS IN S_MEINS AND
        EKET~EINDT IN S_EINDT AND
        EKKO~BSTYP =  'F'     AND "Select PO Only"
        EKKO~LOEKZ = ' '      AND "PO should not be deleted"
        EKPO~LOEKZ = ' '  .       "Line Item Should not be DEL
    Fetch the PO History Details for the Records of the Internal Table i_po.
      LOOP AT I_PO.
        SELECT   EBELN EBELP BWART MENGE WRBTR
        FROM    EKBE
        APPENDING CORRESPONDING FIELDS OF TABLE   I_EKBE
        WHERE  EBELN = I_PO-EBELN AND
                  EBELP = I_PO-EBELP AND
                  BEWTP IN ('E','F').
      ENDLOOP.
    Edited by: AJAY TIWARI on Oct 19, 2008 5:00 PM

  • How to change the open quantity of PO / STO using  BAPI_PO_CHANGE

    Hi Friends,
    How can I change the open quantity in ME22 using the BAPI BAPI_PO_CHANGE...
    I am getting some errors..The values I am passing to the BAPI are:-
    *-- Purchase Order document
        lv_purchaseorder = tbl_join-ebeln.
    *-- Calculate Open quantity
        lv_quantity = ( tbl_join-menge - tbl_join-wemng ).
    *-- Fills Schedule quantity to be processed.
        tbl_poschedule-po_item      = tbl_join-ebelp.
        tbl_poschedule-sched_line   = tbl_join-etenr.
        tbl_poschedule-quantity     = lv_quantity.
        APPEND tbl_poschedule.
    *-- Marks the Schedule quantity to be processed.
        tbl_poschedulex-po_item     = tbl_join-ebelp.
        tbl_poschedulex-sched_line  = tbl_join-etenr.
        tbl_poschedulex-po_itemx    = c_true.
        tbl_poschedulex-sched_linex = c_true.
        tbl_poschedulex-quantity    = c_true.
        APPEND tbl_poschedulex.
    CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            PURCHASEORDER                = lv_purchaseorder
          POHEADER                     =
          POHEADERX                    =
          POADDRVENDOR                 =
            TESTRUN                      = 'X'
       IMPORTING
          EXPHEADER                    =
          EXPPOEXPIMPHEADER            =
         TABLES
           RETURN                       = tbl_return
           POSCHEDULE                   = tbl_poschedule
           POSCHEDULEX                  = tbl_poschedulex.
    Is there any other required fields needs to be passed to change the open quantity..
    I am checking in ME22...
    The scheduled quantity is 20.
    Delivered quantity is 15.
    Open quantity is 5   and ( this field is in non-editable display )
    Delivery date  is 10.10.2002  ( which is in past )
    Now using this BAPI ..I want to post the remaining open quantity which is " 5 "
    How can i do this ?? Please help.

    Hi Hari
    Please check after making the following changes:
    *-- Marks the Schedule quantity to be processed.
    tbl_poschedulex-po_item = tbl_join-ebelp.
    tbl_poschedulex-sched_line = tbl_join-etenr.
    <b>tbl_poschedulex-po_itemx = 'U'. "c_true.
    *tbl_poschedulex-sched_linex = c_true.</b>
    tbl_poschedulex-quantity = c_true.
    APPEND tbl_poschedulex.
    If still you do not get the desired function working add the below code:
    tbl_poitem-po_item = tbl_join-ebelp.
    tbl_poitem-quantity = lv_quantity.
    append tbl_poitem.
    tbl_poitemx-po_item = tbl_join-ebelp.
    tbl_poitemx-po_itemx = 'U'.
    tbl_poitemx-quantity = c_true.
    append tbl_poitemx.
    Hope this helps.
    Kind Regards
    Eswar

  • Remaining Open Quantity on PO

    Hi..
    I would appreciate your help on how i can derive the open quantity for a given PO at the line item level. I cannot find any field in the EKPO table.
    Also if there is batch specified for the material at the line item level on the PO , how i can retrieve the Batch number.
    I would like if someone can explain what tables are linked and how it can be extracted.
    Thanks and will reward the helpful answers.

    Look for the goods receipts and invoice receipts in table EKBE.
    Rob

  • Best practice for "Quantity" field in Asset Master

    Hi
    I want to know what is the best practice for "Quantity field" in asset master. It should be made displayed only or required field in Asset Master creation.
    Initially I made this field as required entry. So user entered 1 quantity. At the time of posting F-90, he again entered quantity. So my quantity in asset master got increased. Hence i decided to make that field display only in asset master creation.
    Now i made that field as display only in asset master creation. At the time of posting F-90, that quantity field is not coming only. I check my field status group for posting key as well as GL account. Its optional field. Inspite of that user is able to make entry in F-90. Now quantity field is '0' only in asset master even though there is some value in asset.
    Please help what is the best practice wrt quantity field. Should be open in asset master or it should be display only.

    Hi:
               SAP Standard does not recommend you to update quantity field in asset master data.  Just leave the Qty Field Blank , just mention the Unit of Measure as EA. While you post acquisition through F-90 or MIGO this field will get updated in Asset master data automatically. Hope this will help you.
    Regards

  • Confirmed quantity field

    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

    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 !!

  • Production order quantity field

    Dear all,
    I add a operation (rework operation) in my production order. But I don't know how to change operation quantity. because this field close ,  how  can I open this field for enter new quantity of this operation? and which contol key do I have to use for rework operation?
    thanks in advance,
    regards,

    Okey.
    I donot think at this stage you can change the operation qty.
    if it is released...I think you have inserted the RW operation during confirmation i suppose.
    If that is the case, when you cinfirm this rework opration you can confirm the actual quantity and confirm the opration with final confirmation tick..

Maybe you are looking for

  • Bridge not functioning in PhotoShop CS3 Extended

    I deactivated Photoshop CS3 on a computer I was no longer using and installed it (CS3) another computer.  I activiated CS3 on the new computer.  However, when trying to use Bridge, I get a message that says that Adobe no longer supports Bridge Home a

  • Guide to migrating a HV 2012 cluster managed by VMM to HV 2012 R2 + VMM R2

    Hello everyone, I have a task on hand and even after searching the ‘net for quite some time, I have not come across a solution listed on one page. I hope this thread becomes a “Guide to migrating a Hyper-V 2012 cluster managed by VMM 2012 to Hyper-V

  • Cascading LOV not working when the page is public

    Hi , I have a cascading LOV in a tabular form which I have built using Denes Kubicek example from http://apex.oracle.com/pls/otn/f?p=31517:176:2702932664861989::::: Thanks to this wonderful examle I was able to make my cascading lov work. However whe

  • Advise for adding larger internal hard drive & faster processor

    After five years it is time to make some upgrades to my G4 Quicksilver 733 MHz Tower. The hard drive is nearly full and the processor doesn't seem as fast as it once did (especially after using my faster PowerBook G4). I want to replace the 40GB hard

  • Set group policy by computers

    I'm trying to separate computers by location so I've moved computers from the Computer Container to several OU's in the AD that have the name of each location. Now I'm trying to get a group policy to apply to each OU. How do I do that? Thanks in adva