Recieved quantity

hai gurus,
I need to generate a report for list of GR balances.
i need what is recieved quantity, n Qantity invoiced..
how to calculate them.
any idea plz help me.
regards
Priya

Hi,
As far as i know and a very general concept which i came across....
Recieved Quantity: This is the quantity recieved so far from a vendor/customer or whatever the entity might be...
Quantity Invoiced: This is the quantity which is billed or invoiced to the vendor/customer or whoever the entity is...
Calculations are done based on your price and quantity and the condition here is billed/invoiced quantity accepted by both the parties...
Regards,
Kishore

Similar Messages

  • Text Comment in (MIGO) Recieved Quantity against Purchase Order.

    Hi Experts,
    Would like to take your suggestion on this.
    I Have raised a Purchase Order, With quantity-50.
    As per Purchse order i Suppose to recieve 50-Quantity but i recieved 45 Quantity, The Balance 5 items got theft during Transportation.
    When i am doing my GR, I need to account somewhere the missing Materials Quantity-5, against the recieved Goods 45, But Orderd Quantity is 50.
    Is there any Text Column in MIGO while doing Goods Recipt to Maintain the Comment against the recieved quantity and to send the same Print out to Vendor reflecting the written Text Comment.
    Please Provide your Valuable nputs on this.
    Best Regards
    Javeed

    Hi
    You can maintain the same at Item Level Text at GRN, which can be printed
    Kindly check at MIGO
    Regards
    Prasanna

  • Report for open orders and amount of product confirmed

    Hi All,
    Can some one give me an idea on a report which shows open orders and also shows amount of product confirmed against these open orders?
    Thanks,
    Neelima.

    Hi Veni,
    Incomplete order are the order's in which some data is missing so that particular order can't be further processed, that is what you could check through "Incompletion Log". Whereas Open orders are the orders which are open for further processing viz. deliver billing(but open order is a complete order i.e. no data missing).
    Check this program:
    *& Report ZGM_OPENPO *
    REPORT ZGM_OPENPO NO STANDARD PAGE HEADING LINE-SIZE 132 LINE-COUNT 36(2).
    TABLES: t001w, "Plants/Branches
    ekko, "Purchasing Document Header
    ekpo, "Purchasing Document Item
    marc, "Plant Data for Material
    mara. "General Material Data
    DATA:
    BEGIN OF itab OCCURS 0,
    matnr LIKE marc-matnr,
    werks LIKE marc-werks,
    beskz LIKE marc-beskz,
    mmsta LIKE marc-mmsta,
    END OF itab.
    DATA: BEGIN OF iekpo OCCURS 0,
    ebeln LIKE ekpo-ebeln,
    menge LIKE ekpo-menge,
    aedat LIKE ekpo-aedat,
    wemng LIKE eket-wemng,
    END OF iekpo.
    DATA: BEGIN OF iekko OCCURS 0,
    ebeln LIKE ekko-ebeln,
    lifnr LIKE ekko-lifnr,
    bedat LIKE ekko-bedat,
    ekgrp LIKE ekko-ekgrp,
    END OF iekko.
    selection-screen:begin of block b1 with frame title text001.
    SELECT-OPTIONS werks FOR ekpo-werks OBLIGATORY.
    SELECT-OPTIONS matnr FOR ekpo-matnr.
    SELECT-OPTIONS beskz FOR marc-beskz.
    SELECT-OPTIONS bsart FOR ekko-bsart.
    selection-screen:end of block b1.
    INITIALIZATION.
    AT SELECTION-SCREEN ON werks. "Validate for werks
    SELECT SINGLE * FROM t001w WHERE werks IN werks.
    IF sy-subrc 0. MESSAGE e429(mo). ENDIF.
    AT SELECTION-SCREEN ON matnr.
    SELECT SINGLE * FROM mara WHERE matnr IN matnr.
    IF sy-subrc 0. MESSAGE e429(mo).ENDIF.
    START-OF-SELECTION.
    SELECT * FROM marc INTO CORRESPONDING FIELDS OF TABLE itab WHERE werks IN werks AND beskz IN beskz AND
    matnr IN matnr.
    SELECT ebeln FROM ekpo INTO CORRESPONDING FIELDS OF TABLE iekpo
    FOR ALL ENTRIES IN itab WHERE matnr = itab-matnr AND loekz EQ space.
    SELECT ebeln lifnr bedat ekgrp FROM ekko INTO CORRESPONDING FIELDS OF
    TABLE iekko
    FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln AND bsart IN bsart.
    SELECT ebeln menge aedat FROM ekpo INTO CORRESPONDING FIELDS OF iekpo
    FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln. MODIFY iekpo INDEX sy-dbcnt.
    ENDSELECT.
    SORT iekpo BY aedat.
    DELETE ADJACENT DUPLICATES FROM iekpo COMPARING ebeln.
    SELECT wemng FROM eket INTO CORRESPONDING FIELDS OF iekpo FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln.
    MODIFY iekpo INDEX sy-dbcnt.
    ENDSELECT.
    END-OF-SELECTION.
    DATA : file_name TYPE string.
    file_name = 'c:\pay_det\open_po1.xls'.
    DATA : BEGIN OF it_join_fields OCCURS 0,
    field_name(20),
    END OF it_join_fields.
    CLEAR it_join_fields.
    it_join_fields-field_name = 'ebeln'.
    APPEND it_join_fields.
    CLEAR it_join_fields.
    it_join_fields-field_name = 'menge'.
    APPEND it_join_fields.
    CLEAR it_join_fields.
    it_join_fields-field_name = 'aedat'.
    APPEND it_join_fields.
    CLEAR it_join_fields.
    it_join_fields-field_name = 'wemng'.
    APPEND it_join_fields.
    CLEAR it_join_fields.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = file_name
    filetype = 'ASC'
    APPEND = 'X'
    write_field_separator = 'X'
    TABLES
    data_tab = iekpo
    FIELDNAMES = it_join_fields
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT iekpo.
    IF iekpo-menge NE iekpo-wemng.
    WRITE:/4 iekpo-ebeln,21 iekpo-menge ,46 iekpo-aedat, 56 iekpo-wemng.
    ENDIF.
    ENDLOOP.
    if sy-subrc 0. write / 'no data exist for this plant'. endif.
    TOP-OF-PAGE.
    uline 1(80).
    WRITE :/ sy-vline, 20 ' OPEN purchase ORDERs report' color 5,
    80 sy-vline.
    uline 1(80).
    WRITE:/ sy-vline , 4 'PURSCHASE ORDER' COLOR COL_HEADING,
    20 sy-vline, 21 'ORDER QUANTITY' COLOR COL_HEADING,
    45 sy-vline, 46 'item change' color col_heading, 55 sy-vline,
    56 'RECIEVED QUANTITY' COLOR COL_HEADING, 80 sy-vline.
    uline 1(80).
    END-OF-PAGE.
    WRITE :/ 'PAGE NUMBER' ,SY-PAGNO.
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • Stock in transit to the Original Stock( STO process with Billing)

    HI All ,
    Here is an Issue on Stock Transport Order with Billing
    A STO (Purchase Order) Is raised Which consist of 6 line Items.
    VL10B is Done and Outbond Delivery no generated.
    With this Outbond Delivery no PGI is done for All Line items.
    Goods Receipt is Done(RECIEVED quantity will be in Quality Inspection Stock).
    So through T.code QA32  the End User had done
    a) Accepeted 5 line  Item and 1 line Item he had sent as" Return to Vendor".
    Note: ALL Items in this STO process are Exiceable Items.
    Because of this Return to Vendor of 1 item in QA32 a material document is generated with
    Movement type 122 and 1 Item is found in  material is Transit in recieving plant .
    But now The User wants:
    a)To cancel the Material Doc generated with movement type 122 and
    b)To bring back the Line Item1(Return to Vendor ) STOCK  back to the "Receiving Plant"

    Hi,
    Since your 122 was created from QA, I don't think you can cancel this document in MIGO.
    You may have to perform 101 to receipt from stock in transit again.
    Phyllis.

  • Over Reciept against PO in MTO environment

    Hi All,
    I am using strategy 50, sales order is created with the quantity of 100 KG and somehow the yeild is 120 but at the time of good receipt an error msg is prompted stating that recieved quantity is exceeded by 20Kg and good receipt is terminated.
    Please guide me in avoiding the termination and also suggest how to cater such scenarios where customer should be allocated 100 units and 20 units are transfered to stock.
    Best Regards
    Shah

    Hi
    1) In OPK4 for the order type and plant select Over delivery tolerance not checked for Over delivery
    2) in Work scheduling view or in Prod order Give % Tolerances for over delivery in Goods receipt tab
    Regards
    Brahmaji

  • Problem deleting multiple goods reciepts

    Hi experts,
    I have an internal with the all the purchase orders.
    from this i have to display the po's for that goods is issued and goods reciept is not done within 8 days.
    my problem when goods reciept is done multiple times and the total goods issued quantity is recieved with within 8 days.
    i have to delete these records from my internal table.
    the fields in my internal table are as shown below.
    BEGIN OF I_LIST,
            ZWERKS TYPE ZWERKS,  "from
            TO(4) TYPE C,  " to
            EBELN TYPE EKPO-EBELN, "purchase doc
            MATNR TYPE EKPO-MATNR, "material
            TXZ01 TYPE EKPO-TXZ01, "material doc.
            EBELP TYPE EKPO-EBELP, "item
            VBELN TYPE LIKP-VBELN, " delivery doc
            BELNR TYPE EKBE-BELNR, " material doc shipment
            BUDAT TYPE EKBE-BUDAT, " shipped date
            SENGE TYPE EKBE-MENGE, "shipped quantity
            RELNR TYPE EKBE-BELNR,  "material doc shipment
            RJAHR TYPE EKBE-GJAHR,  "material doc year
            RUDAT TYPE EKBE-BUDAT,  "recieved date
            RENGE TYPE EKPO-MENGE, "recieved quantity
            DAYS TYPE I, " difference days  between  shipped and recieved dates     
            USNAM TYPE MKPF-USNAM, "reciever
            BOLNR TYPE LIKP-BOLNR,   "tracking #
            END OF I_LIST.
    days is calculated as below
            IF I_LIST-RUDAT EQ 0.
              I_LIST-DAYS = SY-DATUM - I_LIST-BUDAT.
            ELSE.
              I_LIST-DAYS = I_LIST-RUDAT - I_LIST-BUDAT.
            ENDIF.
    if goods reciept is done multiple times and completed within 8 days should not be displayed( should be deleted from the internal table).
    can anybody help me solve this issue.
    Thanks & Regards,
    Sudheer Kumar
    Edited by: sudheer kumar on Sep 19, 2008 11:32 AM
    Edited by: sudheer kumar on Sep 19, 2008 11:33 AM

    This issue is solved

  • Drawing collumn line

    Hi
    can anyone let me know how to draw a collumn/vertical line in report display

    hi,
    check this sample example.
    reward points if hlpful.
    *& Report  ZGM_OPENPO                                                  *
    REPORT  ZGM_OPENPO  NO STANDARD PAGE HEADING LINE-SIZE 132 LINE-COUNT 36(2).
    TABLES: t001w, "Plants/Branches
    ekko,  "Purchasing Document Header
    ekpo,  "Purchasing Document Item
    marc,  "Plant Data for Material
    mara.  "General Material Data
         DATA:
    BEGIN OF itab OCCURS 0,
         matnr LIKE marc-matnr,
         werks LIKE marc-werks,
         beskz LIKE marc-beskz,
         mmsta LIKE marc-mmsta,
      END OF itab.
         DATA: BEGIN OF iekpo OCCURS 0,
          ebeln LIKE ekpo-ebeln,
          menge LIKE ekpo-menge,
          aedat LIKE ekpo-aedat,
          wemng LIKE eket-wemng,
          END OF iekpo.
    DATA: BEGIN OF iekko OCCURS 0,
          ebeln LIKE ekko-ebeln,
          lifnr LIKE ekko-lifnr,
          bedat LIKE ekko-bedat,
          ekgrp LIKE ekko-ekgrp,
          END OF iekko.
    selection-screen:begin of block b1 with frame title text001.
    SELECT-OPTIONS werks FOR ekpo-werks OBLIGATORY.
    SELECT-OPTIONS matnr FOR ekpo-matnr.
    SELECT-OPTIONS beskz FOR marc-beskz.
    SELECT-OPTIONS bsart FOR ekko-bsart.
    selection-screen:end of block b1.
    INITIALIZATION.
    AT SELECTION-SCREEN ON werks.              "Validate for werks
    SELECT SINGLE * FROM t001w WHERE werks IN werks.
    IF sy-subrc <> 0.  MESSAGE e429(mo). ENDIF.
    AT SELECTION-SCREEN ON matnr.
    SELECT SINGLE * FROM mara WHERE matnr IN matnr.
    IF sy-subrc <> 0. MESSAGE e429(mo).ENDIF.
    START-OF-SELECTION.
    SELECT * FROM marc INTO CORRESPONDING FIELDS OF TABLE itab   WHERE werks IN werks AND beskz IN beskz AND
                            matnr IN matnr.
    SELECT ebeln FROM ekpo INTO CORRESPONDING FIELDS OF TABLE iekpo
                        FOR ALL ENTRIES IN itab WHERE matnr = itab-matnr AND loekz EQ space.
    SELECT ebeln  lifnr bedat ekgrp FROM ekko INTO CORRESPONDING FIELDS OF
    TABLE iekko
                        FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln AND bsart IN bsart.
    SELECT ebeln menge aedat FROM ekpo INTO CORRESPONDING FIELDS OF iekpo
    FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln. MODIFY iekpo INDEX sy-dbcnt.
    ENDSELECT.
    SORT iekpo BY aedat.
    DELETE ADJACENT DUPLICATES FROM iekpo COMPARING ebeln.
    SELECT wemng FROM eket INTO CORRESPONDING FIELDS OF iekpo FOR ALL ENTRIES IN iekpo WHERE ebeln = iekpo-ebeln.
    MODIFY iekpo INDEX sy-dbcnt.
    ENDSELECT.
    END-OF-SELECTION.
      DATA : file_name TYPE string.
      file_name = 'c:\pay_det\open_po1.xls'.
    DATA : BEGIN OF it_join_fields OCCURS 0,
             field_name(20),
             END OF it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'ebeln'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'menge'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'aedat'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'wemng'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                    =
          filename                        = file_name
          filetype                        = 'ASC'
          APPEND                          = 'X'
          write_field_separator           = 'X'
        TABLES
          data_tab                        = iekpo
          FIELDNAMES                      = it_join_fields
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT iekpo.
    IF iekpo-menge NE iekpo-wemng.
        WRITE:/4 iekpo-ebeln,21 iekpo-menge ,46 iekpo-aedat, 56 iekpo-wemng.
    ENDIF.
    ENDLOOP.
    if sy-subrc <> 0. write / 'no data exist for this plant'. endif.
    TOP-OF-PAGE.
    uline 1(80).
    WRITE :/ sy-vline, 20 ' OPEN purchase ORDERs report' color 5,
              80 sy-vline.
    uline 1(80).
    WRITE:/ sy-vline ,   4 'PURSCHASE ORDER'    COLOR COL_HEADING,
             20 sy-vline, 21 'ORDER QUANTITY'    COLOR COL_HEADING,
             45 sy-vline,  46 'item change' color col_heading, 55 sy-vline,
             56 'RECIEVED QUANTITY' COLOR COL_HEADING, 80 sy-vline.
    uline 1(80).
    END-OF-PAGE.
    WRITE :/ 'PAGE NUMBER' ,SY-PAGNO.

  • Contol events

    hi all,
    this is my interbal table ....
         DATA: begin of t_ekpo1 occurs 0,
          banfn like eban-banfn,
          ebeln like ekpo-ebeln,
          ebelp like ekpo-ebelp,
          werks like ekpo-werks,
          matnr like ekpo-matnr,
          menge like ekpo-menge,
          txz01 like ekpo-txz01,
          meins like ekpo-meins,
          zzissue_date like ekpo-zzissue_date,
          s_menge(13) type c,
          quan(13) type c,
          end of t_ekpo1.
    i am using control break event at the field...
    at new banfn.
    write:/ t_ekpo1-banfn.
    endat.
    write: t_ekpo1-ebeln.
    if i am doing so then it writes only one item if there are 4 0r 5 0r 6.
    but if i write
    at new banfn.
    write:/ t_ekpo1-banfn.
    endat.
    write:/ t_ekpo1-ebeln.
    the diffrence betwee the two statement is of '/' . if i removw this it is not writting the value...but if it is there it writes...
    so plz help on this...
    regards
    parul

    Program ID   : ZHIPMENT                                              *
    Author       :                                                       *
    Date         :                                                       *
    Run Mode     : Online \ Background                                   *
    Frequency    : ANY TIME                                              *
    Special run  ]                                                       *
    instructions ]                                                       *
    Issue #      : ?                                                     *
    Copied From  :                                                       *
    Called From  :                                                       *
    Transaction  :                                                       *
    Input        :                                                       *
    Output       :                                                       *
    Description  :                                                       *
                     M O D I F I C A T I O N    L O G                    *
    User ID|Date    |Issue #   |Transport |Description of change         *
    USER ID|DD/MM/YY|????-???? |CCDK9A1???|Initial Development           *
    REPORT ZHIPMENT NO STANDARD PAGE HEADING LINE-SIZE 175
    tables: eban,
            ekko,
            ekpo,
            eket,
            ekbe.
                         Data Declaration                               *
    *Internal table for purchase requistion
    Data: begin of itab occurs 0,
             ekgrp like eban-ekgrp,  "purchasing group
             werks like eban-werks,  "plant
             flief like eban-flief,  "vendor#
             reswk like eban-reswk,  "supplying plant
             meins like eban-meins,  "Sku#
             TXZ01 like eban-TXZ01,  "product name
             banfn like eban-banfn,  "purchase requistion
             bnfpo like eban-bnfpo,  "item#
             quan(13) type c,        "open quantity
             frgdt like eban-frgdt,  "release date
             lfdat like eban-lfdat,   "Delivery date
             ebeln like eban-ebeln,
             matnr like eban-matnr,
         end of itab.
    *Internal table for purchase order
    Data: begin of itab1 occurs 0,
             ekgrp like ekko-ekgrp,  "purchasing group
             lifnr like ekko-lifnr,  "vendor#
             reswk like ekko-reswk,  "supplying plant
             bsart like ekko-bsart,
             ebeln like ekko-ebeln,  "purchase order
             werks like ekpo-werks,  "plant
             matnr like ekpo-matnr,
             menge like ekpo-menge,
             TXZ01 like ekpo-TXZ01,  "product name
             ebelp like ekpo-ebelp,  "item#
             meins like ekpo-meins,  "Sku#
             eindt like eket-eindt,
             s_menge like ekbe-menge,
             quan(10) type c,        "open quantity
             ship_quan(10) type c,   "ship quantity
             unship_quan(10) type c, "unship quantity
             ZzISSUE_DATE like ekpo-ZZISSUE_DATE,
          end of itab1.
    Data: begin of itab_req occurs 0,
             ekgrp like eban-ekgrp,  "purchasing group
             werks like eban-werks,  "plant
             flief like eban-flief,  "vendor#
             reswk like eban-reswk,  "supplying plant
             meins like eban-meins,  "Sku#
             TXZ01 like eban-TXZ01,  "product name
             banfn like eban-banfn,  "purchase requistion
             bnfpo like eban-bnfpo,  "item#
             quan(13) type c,         "open quantity
             frgdt like eban-frgdt, "release date
             lfdat like eban-lfdat,   "Delivery date
             matnr like eban-matnr,
         end of itab_req.
    DATA: Begin of t_ekko occurs 0,
              ekgrp like ekko-ekgrp,
              ebeln like ekko-ebeln,
              lifnr like ekko-lifnr,
              reswk like ekko-reswk,
              bsart like ekko-bsart,
            end of t_ekko.
    DATA: begin of t_ekpo occurs 0,
          ebeln like ekpo-ebeln,
          ebelp like ekpo-ebelp,
          werks like ekpo-werks,
          matnr like ekpo-matnr,
          menge like ekpo-menge,
          txz01 like ekpo-txz01,
          meins like ekpo-meins,
          zzissue_date like ekpo-zzissue_date,
          end of t_ekpo.
    DATA: begin of t_ekpo1 occurs 0,
          banfn like eban-banfn,
          ebeln like ekpo-ebeln,
          ebelp like ekpo-ebelp,
          werks like ekpo-werks,
          matnr like ekpo-matnr,
          menge like ekpo-menge,
          txz01 like ekpo-txz01,
          meins like ekpo-meins,
          zzissue_date like ekpo-zzissue_date,
          s_menge(13) type c,
          quan(13) type c,
          ship_quan(13) type c,
          unship_quan(13) type c,
          end of t_ekpo1.
    DATA: begin of t_ekbe occurs 0,
             menge like ekbe-menge,
          end of t_ekbe.
    DATA: w_menge like eban-menge,
          w_bsmng like eban-bsmng.
    data: x_menge like ekbe-menge,
          x1_menge type p decimals 2.
    DATA : BEGIN OF zheadtab OCCURS 5.     "text header
            INCLUDE STRUCTURE tline.
    DATA : END OF zheadtab.
    DATA : pagno  LIKE sy-pagno.
    DATA : name   LIKE sy-repid.
    data: xmenge like ekbe-menge.
                           Selection screen                             *
    SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-S01.
    SELECT-OPTIONS : S_ekgrp FOR eban-ekgrp,
                     s_matnr for eban-matnr,
                     s_werks for eban-werks,
                     s_bsart for eban-bsart,
                     s_lfdat for eban-lfdat,
                     s_frgdt for eban-frgdt,
                     s_flief for eban-flief,
                     s_reswk for eban-reswk.
    SELECTION-SCREEN END OF BLOCK A.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-S02.
    PARAMETERS : P_both  RADIOBUTTON GROUP A.   "For both Po and Pur req.
    PARAMETERS : P_req   RADIOBUTTON GROUP A Default 'X' . "For Pur equsit'n
    PARAMETERS : P_order RADIOBUTTON GROUP A. "For Purchase order
    SELECTION-SCREEN END OF BLOCK B.
    TOP-OF-PAGE.
    PERFORM 100_top_of_page.
                           Start-of-selection                           *
    START-OF-SELECTION.
      if P_req eq 'X'.
        perform get_purchase_data .
        loop at itab_req.
          if itab_req-quan gt 0.
            write:/1   itab_req-ekgrp,
                   5   itab_req-werks,
                   12  itab_req-flief,
                   23  itab_req-reswk,
                   29  itab_req-meins,
                   33  itab_req-TXZ01,
                   72  itab_req-banfn,
                   97  itab_req-bnfpo,
                   109 itab_req-quan,
                   154 itab_req-frgdt,
                   166 itab_req-lfdat.
          endif.
        endloop.
      endif.
      if P_order eq 'X'.
        perform get_requistion_data .
        check sy-subrc eq 0.
        loop at itab_req.
    *value collected for recieved quantity
    select sum( menge ) into (xmenge) from ekbe   where ebeln = itab1-ebeln
                        and   ebelp = itab1-ebelp
                        and   werks in s_werks
                        and   vgabe eq '1'.
          check sy-subrc eq 0.
    *S_menge is the value for goods recieved quantity
          move xmenge to itab1-S_menge.
    *value calculated for po open quantity
          itab1-quan = itab1-menge - itab1-S_menge.
          if itab1-quan gt 0.
    *value collected for shipped quantity goods issued(x_menge)
    select sum( menge ) into (x_menge) from ekbe   where ebeln = itab1-ebeln
                        and   ebelp = itab1-ebelp
                        and   werks in s_werks
                        and   vgabe eq '6'.
            check sy-subrc eq 0.
    *value calculated for shipped quantity
            itab1-ship_quan = x_menge - itab1-S_menge.
    *value calculated for unshipped quantity
    *which is equl to the ordered quantity(ekpo-menge)
    *and the goods issued (x_menge)
            itab1-unship_quan = itab1-menge - x_menge.
            write:/1 itab1-ekgrp,
                   5 itab1-werks,
                   12 itab1-lifnr,
                   23 itab1-reswk,
                   29 itab1-meins,
                   33 itab1-txz01,
                   86 itab1-ebeln,
                   97 itab1-ebelp,
                   109 itab1-quan,
                   126 itab1-ship_quan,
                   140 itab1-unship_quan,
                   154 itab1-zzissue_date,
                   165 itab1-eindt.
          endif.
        endloop.
      endif.
      if P_both eq 'X'.
        select * from eban into corresponding fields of table itab
                                             where ekgrp in s_ekgrp
                                             And   matnr in s_matnr
                                             and   werks in s_werks
                                             and   bsart in s_bsart
                                             and   lfdat in s_lfdat
                                             and   frgdt in s_frgdt
                                             and   flief in s_flief
                                             and   reswk in s_reswk
                                             and   ebakz NE 'X'
                                             and   loekz NE 'X'.
        loop at itab.
          select * from ekpo into corresponding fields of table t_ekpo
                         where ebeln = itab-ebeln.
          loop at t_ekpo.
            move t_ekpo-ebeln to t_ekpo1-ebeln.
            move t_ekpo-ebelp to t_ekpo1-ebelp.
            move t_ekpo-werks to t_ekpo1-werks.
            move t_ekpo-matnr to t_ekpo1-matnr.
            move t_ekpo-menge to t_ekpo1-menge.
            move t_ekpo-txz01 to t_ekpo1-txz01.
            move t_ekpo-meins to t_ekpo1-meins.
            move t_ekpo-zzissue_date to t_ekpo1-zzissue_date.
            move itab-banfn to t_ekpo1-banfn.
    *value collected for recieved quantity
    select sum( menge ) into (xmenge) from ekbe where ebeln = t_ekpo1-ebeln
                        and   ebelp = t_ekpo1-ebelp
                        and   werks in s_werks
                        and   vgabe eq '1'.
          check sy-subrc eq 0.
    *S_menge is the value for goods recieved quantity
          move xmenge to t_ekpo1-S_menge.
    *value calculated for po open quantity
          t_ekpo1-quan = t_ekpo-menge - t_ekpo1-S_menge.
         if itab1-quan gt 0.
    *value collected for shipped quantity goods issued(x_menge)
    select sum( menge ) into (x_menge) from ekbe where ebeln = t_ekpo1-ebeln
                        and   ebelp = t_ekpo1-ebelp
                        and   werks in s_werks
                        and   vgabe eq '6'.
            check sy-subrc eq 0.
    *value calculated for shipped quantity
            t_ekpo1-ship_quan = x_menge - t_ekpo1-S_menge.
    *value calculated for unshipped quantity
    *which is equl to the ordered quantity(ekpo-menge)
    *and the goods issued (x_menge)
            t_ekpo1-unship_quan = t_ekpo1-menge - x_menge.
            append t_ekpo1.
          endloop.
        endloop.
        sort t_ekpo1 by banfn ebeln ebelp.
        loop at t_ekpo1.
          at new banfn.
            write:/72 t_ekpo1-banfn.
          endat.
          write:/86 t_ekpo1-ebeln .
        endloop.
      endif.
    *&      Form  100_top_of_page
          text
    -->  p1        text
    <--  p2        text
    FORM 100_top_of_page .
      DATA : xdat1(10) TYPE c,
             xdat2(10) TYPE c.
      DATA prog_nm LIKE sy-repid.
      prog_nm = sy-repid.
      WRITE : s_lfdat-low  TO xdat1 DD/MM/YYYY,
              s_lfdat-high TO xdat2 DD/MM/YYYY.
      MOVE 'H1' TO zheadtab-tdformat.
      CONCATENATE   'Shipment Report Between'
                    xdat1
                    'and'
                    xdat2
                    INTO zheadtab-tdline SEPARATED BY space.
      APPEND zheadtab.
      CALL FUNCTION 'Z_HEADER'
        EXPORTING
          datum      = sy-datum
          pagno      = sy-pagno
          prog_title = sy-title
          repid      = prog_nm
          uname      = sy-uname
          uzeit      = sy-uzeit
        TABLES
          zheadtab   = zheadtab.
      format  intensified on.
      WRITE :/1 'Pur',
              5 'Plant',
              12 'Vendor',
              23 'Sup',
              29 'Sku#',
              33 'Product Name',
              72 'Purchase',
              86 'Purchase',
              97 'item',
              109 'Open',
              126 'shipped ',
              140 'unshipped ',
              154 'Release',
              165 'Delivery'.
      write:/1  'Grp',
             23 'Plant',
             72 'Requistion',
             86 'order',
             109 'Quan',
             126 'quan',
             140 'quan',
             154 'Date',
             165 'Date'.
      Uline.
    ENDFORM.                    " 100_top_of_page
    *&      Form  get_purchase_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_purchase_data .
      select * from eban into corresponding fields of table itab
                                           where ekgrp in s_ekgrp
                                           And   matnr in s_matnr
                                           and   werks in s_werks
                                           and   bsart in s_bsart
                                           and   lfdat in s_lfdat
                                           and   frgdt in s_frgdt
                                           and   flief in s_flief
                                           and   reswk in s_reswk
                                           and   ebakz NE 'X'
                                           and   loekz NE 'X'.
      sort itab by werks matnr.
      loop at itab.
        move itab to itab_req.
        w_menge = eban-menge.
        w_bsmng = eban-bsmng.
        itab-quan = ( w_menge - w_bsmng ).
        itab_req-quan = itab-quan.
        append itab_req.
      endloop.
    ENDFORM.                    " get_purchase_data
    *&      Form  get_requistion_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_requistion_data .
      select ekkoekgrp ekkolifnr ekkoreswk ekkobsart ekko~ebeln
               ekpowerks ekpomatnr ekpomenge ekpoTXZ01 ekpo~ebelp
               ekpomeins eketeindt eketebeln ekpoZZISSUE_DATE
               into corresponding fields of table itab1
               from ekko inner join ekpo
               on ekkoebeln = ekpoebeln
               inner join eket
               on  eketebeln = ekkoebeln
               and eketebelp = ekpoebelp
               where  ekko~bsart in s_bsart
               and eket~eindt in s_lfdat
               and ekko~ekgrp in s_ekgrp
               and ekpo~matnr in s_matnr
               and ekpo~werks in s_werks
               and ekpo~loekz NE 'X'
               and ekpo~elikz ne 'X'.
    ENDFORM.                    " get_requistion_data
    plz if someone can help on this
    regards
    parul

  • No Recieving more than planned Quantity

    Hi All,
    My client want that no user can recieve FG more than planned Quantity in Production Order. I Put a query in SP_Transaction Notification but its not working.
    IF (@object_type = '59' AND @transaction_type= 'A')
    BEGIN
    If exists
    (Select p.Type
    From OIGN b
      inner join IGN1 bs
         On b.DocEntry=bs.DocEntry and bs.LineNum=0
      inner join OWOR p On p.DocEntry=bs.BaseEntry
    Where b.DocEntry = @list_of_cols_val_tab_del
       and p.Type= 'S'
       and bs.BaseType=202
       and p.PlannedQty< p.CmpltQty )
    Begin
    set @error =1
    set @error_message = 'You can not Complete more then planned !'
    End
    Regards
    Piyush

    Hi Piyush,
    Try this:
    If (@object_type = '59' and @transaction_type = 'A')
    Begin
       If (Select CurSource From OIGN Where DocEntry = @list_of_cols_val_tab_del) = 'L'
       Begin
          If((Select Sum(Z.Quantity) From IGN1 Z Where Z.DocEntry = @list_of_cols_val_tab_del) > (Select PlannedQty From OWOR Where DocNum = (Select A.BaseRef From IGN1 A Where A.DocEntry = @list_of_cols_val_tab_del)))
           Begin
                  Select @error = 1
                  Select @error_message = 'Quantity Exceeds Planned Quantity!!'
          End
       End
    End
    Thanks,
    Neetu

  • 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

  • Automatic production order creation for remaining sales order quantity

    Hi All,
    My requirement is to create automatic production order for a particular material when the available quantity ( Stock in MD04) is less than the sales order / Delivery quantity.Automatic production order should only be created for deficit quantity.
    For example if i have stock of material A 100. I have recieved a sales order for 120 pieces. Now automatic production order should be created for 20 pieces only.
    Any inputs/ suggestions, please let me know.
    Thanks in advance !!
    regards
    Pawan.

    Hi Pawan
    In Material Master MM01 / MM02, you need to maintain 20 in MRP3 --> Planning --> Strategy Group.
    If you maintain this, items can be produced only against sale order you are creating.
    Dont forget to reward if this helps you.
    Regards
    G. Lakshmipathi

  • FIFO Query to generate report Which relates the out-quantity to in-quantity

    Dear Experts,
    I am trying to generate a report to find out the Inward documents of Items which are issued or transfered. Items are managed with FIFO. Certain Items are serially managed and certain not.
    I am using the tables OIVL, OIVE and OIVQ for getting the details.
    Now my problem is in certain situations the relation between OIVE and OIVQ returns more line items than required and not able to specifically found out the rows. (Same TreeID is used for several transactions)
    Please help
    Thanks and regards
    Ajith Gopalakrishnan

    Hi,
    This Query help you a lot as I made this query for displaying the recieve and out quantity of an item as per the date i.e. On which date you recieve how much quantity of an item and how much quantity you release of an item. and please amend the remaining transtype from the transaction table (OINM).
    In case of FIFO you know that First IN First OUT is followed so you can easily see that which item on a particular date you recieve and which item on a particular date you release...and if any more further enhancement you required then please let me know ....if will definitely make out some time to help you out.
    select distinct SUM(InQty)as InQty,SUM(OutQty)as OutQty,ItemCode,Dscription,DocDate, TransType,
    case TransType
    when '-2' then 'opening Balance'
    when '20' then 'Goods Reciept PO '
    when '59' then 'Reciept From Production/Good Reciept '
    when '15' then 'Deliveries '
    end as 'TransName'
    from (
    select ItemCode,Dscription,DocDate, InQty,OutQty,TransType from oinm ) as OINM
    group by DocDate,ItemCode,TransType,Dscription order by  docdate asc
    Thanks
    Randy

  • Forecast delivery schedules incorrect cumulative release quantity.

    Hi Gurus,
    We implemented the standard LZM - Scheduling agreement with delivery orders solution for component suppliers.
    The entire SAP standard configuration activated and the functionality is working correct.
    u2022     Scheduling agreement type LZM  / Item category LZMA / Schedule line category  L2
    u2022     Order Type TAM  / / Item category TAMA / Schedule line category  CP
    Example:
    Scheduling agreement forecast delivery schedule for 1000 units./ Md04 show SchAgr of 1000 units
    Delivery order for 250 units (MD04 Shows Order for 250 units and SchAgr for 750 Units)
    Created delivery for the order (MD04 shows Deliv. For 250 units SchAgr for 750 Units)
    Goods issue the delivery / MD04 shows the SchAgr for 750 units.
    *Issue:*
    When we update the Cumulative quantity received by the customer it is summing up with the forecast quantity (double counting the shipped quantity).
    When the Cumulative quantity received by the customer updated to remove the in-transit quantity, the forecast is adding by 250 units and   MD04 shows SchAgr for 1000 units.
    Thanks & Regards
    Suresh

    Hi Suresh
    The *** issued qty gets updated when the PGI for the delivery happens. There is a field called *** received by customer and it gets updated when customer sends the *** back in the 830 or 862 as the case may be.
    The difference between the *** issued and the *** recieved is always shown in transit.
    If you do not want the schedule line to be opened up, then in *** recd change it to the *** issued or ideal option is populate the last delivery PGI'd on the delivery number field next to *** recd field. Hope this helps and let me know if you need any more informataion
    Regards

  • Batch Determination based on date of consig recieve

    Hi,
    I am getting problem when i am trying to do manual batch determination in the outbound delivery.
    I have created a record in VCH1 based on customer/Material/Plant. In this i have maintained a sort rule also. what characteristaics i must use to make my batch determination based on customer consignment recieving date?
    If i go in MSC3n with Material, Plant and batch data then in the screen ( table MCHA, MCH1) onlt data available is for ERSDA, LAEDA  and LWEDT.
    In delivery when i click on batch determination button. my Sort rule is not automatically determined. So i have to maunally entered my soirt rule but at the same time my qty proposal in the same screen is 1 which is nothing but
    FORM CHMVS_001.
      DATA: lv_line TYPE kondh-chasp VALUE '1'.
      LOOP AT disqty.
        CHECK lv_line <= no_of_split.
        IF QUAN_TO_DIS > 0.
          IF DISQTY-AVAL_QUAN > QUAN_TO_DIS.
            DISQTY-QUANTITY = QUAN_TO_DIS.
          ELSEIF disqty-aval_quan > 0.
            DISQTY-QUANTITY = DISQTY-AVAL_QUAN.
          ENDIF.
          IF disqty-quantity > 0.
            quan_to_dis = quan_to_dis - disqty-quantity.
            MODIFY disqty TRANSPORTING quantity.
            ADD 1 TO lv_line.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM
    When i am taking characteristics LOBM_VFDAT for sort rule in Cu70 then i am not getting batch determination as i required even if i maintained Shelf expiry date in MSC3n.
    Please suggest where i must look into so that my batch determination would be based on date of consignment recieved.. currently if it s taking based on max qty available in MMBE.
    Regards
    Nitin

    I have already assigned sort rule in VCH1 but dont know which Characteristics i must assign for customer consignment stock on FIFO basis. Could you please tell me the characteristics for it which i must consider?
    LOMB_VFDAT i have already tried but its not working for me.
    Edited by: Nitin Agarwal on Oct 30, 2008 8:14 AM

  • XML to flat file conversion using file content conversion in reciever CC

    Hi,
    Iam working on Idoc to File scenario.
    Iam having a problem in the communication channel of reciever.
    Iam using File content conversion in Reciever Adapter.
    My xml format is asfollows:--
    - <Header>
      <FILLER1>KTP</FILLER1>
      <YEAR_IDOC>YEAR 2006</YEAR_IDOC>
      <FILLER2>FIRSTWEEKNUMBER</FILLER2>
      <WEEK_IDOC>51</WEEK_IDOC>
      <FILLER3>NUMBER WEEKS 26</FILLER3>
      <PLANT_CODE>FACTORYM019</PLANT_CODE>
      </Header>
    - <Record>
      <First_material>731000</First_material>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0001.9</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0020.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0018.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <Second_material />
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0011.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0049.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0067.0</Second_quantity>
      <Third_material />
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>0008.0</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      </Record>
    The file format should be as follows:--
    KTP   YEAR 2006 FIRSTWEEKNUMBER 51   NUMBER WEEKS 26  FACTORYM019
    731000  0000.0 0001.9 0000.0 0000.0 0020.0 0000.0 0000.0 0000.0 0018.0 0000.0
            0000.0 0011.0 0000.0 0000.0 0000.0 0000.0 0049.0 0000.0 0000.0 0067.0
            0000.0 0000.0 0000.0 0008.0 0000.0 0000.0  
    Could some one help me in resolving this issue.
    Regards
    Praveen

    Hi Praven,
    couldn't you simply modify your target DATA type so it will be easier to handle?
    For example something like:
    <Header>
    </Header>
    <Record>
    <Material>
    <Number>..</Number>
    <quantity>..</quantity>
    <quantity>..</quantity>
    </Material>
    In this way file content conversion will be easier (easy)!
    Regards,
    Sergio

Maybe you are looking for