Custom Report - Open Order

Dear All,
We are in a Process to Develop certain Z-Reports.
One of the Z-Reports is Open Order Status, which includes following informations:
Sales Office--Customer Code-Sales Order No.--Item No.Material Description-Booking Qty--Delivered QtyOpen QtySales Unit of MeasurementRate/ Unit--Total Open Value (Open Qty*Rate)
Everything is fine, except Two columns, i.e.
1. Delivered Qty
2. Sales Unit of Measurement
The Problem is:
In Report, we are able to capture the Booking Qty (in terms of Sales Unit).
For example: If, in Sales Order Booking qty is 20 Months, Report shows 20.000 in Column: Booking Qty.
But, 5  Months have been delivered, then, instead of 5.000 Report shows 150.000 as in Column: Delivered Qty. Apparently, Column: Open Qty, shows -130.000 as open Qty.
Also, instead of picking Sales Unit of Measurement as Month, System is showing DAY/ TAG in Column: Sales unit of measurement.
My second Query is:
Is there any way to get information from Structure, in to Program? As, I referred few Standard Program (related to Sales UoM and Delivered Qty). In Standard Program, value is getting referred to Structure (say, VBMTV, for example).
Best Regards,
Amit

Hi Amit,
I guess, you have maintained/Created UoM in CUNI.
Sales Office(1)--Customer Code(2)-Sales Order No(3).--Item No(4).Material Description(5)-Booking Qty(6)--Delivered Qty(7)Open Qty(8)Sales Unit of Measurement(9)Rate/ Unit(10)--Total Open Value (Open Qty*Rate)(11)
8 = 6-7
11= 8*10 ( as you already said)
UoM_sales, VBAP_VRKME / VBEP_WMENG ( i think it will be fine, if we take Sch.Line order qtty, rather than Item level order qtty/Booking qtty, Delivery qtty LIPSD-G_LFIMG or you can take the same from document flow table too)
Hope you have done the same as above. or it would be helpful,how you are deriving/extracing the desired values from which tables
How you are calculating Open Qtty?
not sure about your second query. Trying to give some input in your first query.

Similar Messages

  • Help needed to report open orders from R/3 SD!

    Hello all,
    I need to report net open order value from SAP R/3 SD to BW. I'm using cube 0SD_C05 to report inquiry vs. quotation vs. orders. Is there any standard ods object in business content which can be used to report open orders? If not, will it be a good idea to create a ODS object and use it directly for reporting open orders? This BW installation is for a small IT company and we don't generate a lot of quotations or orders on a daily basis. Please guide.
    Thanks and Regards,
    Sumit

    hi Sumit,
    check if you can use 0SD_O01 - order item data
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/2b4f815f153014e10000000a114e5d/content.htm
    other business content ods objects are 0sd_o02-05.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0b/f5cc3c7dea9006e10000000a114084/frameset.htm
    (expand left side 'ods')
    hope this helps.

  • Custom report Open goods receipt like transaction ME2L, param 'WE101''

    Good morning,
    I have develop a report to process the same Open goods receipt extracted by the transaction ME2L using the parameter 'WE101';  I know where is the customizing to see the criterions of selection 'WE101' (  IMG under Materials Management -> Purchasing ->Reporting -> Maintain Purchasing Lists -> Scope of List -> Define Scope of List. Select any one option & double click ) but I don't know ho create a report that use the same selection.
    There is a function or which is the query to select Open goods receipt like transaction ME2L?
    I need it because i have to extract data like ME2L and after continuing to elaborate it...
    very thanks for any help.
    Marco

    Hi Kaveri,
    For Open PO Reports try using these standard reports:
    ME2N, ME2M, ME2L, ME80FN.
    Also, when you run them, try to execute these reports in the background with immediate Job. Later, you can check the spool for results.
    Hope this helps!
    Regards,
    Shilpa

  • Report open order

    I have REport in this report i want one more column  that is in stock item for corresponding warehouse that is sale order for item
    SELECT  T0.[DocNum] as 'SO No.', T1.[Project], T6.[PrjName] as 'Project Name' , T1.[CogsOcrCo2] as 'Branch',T1.[WhsCode] as 'Warehouse',  T1.[Dscription],T1.[LineStatus] as 'Status',T1.[Quantity] as 'Qty.', T1.[OpenQty] as 'Bal Qty.',T0.[DocCur] as 'Sale Curr.', T1.[Price], T2.DocNum as 'PO No.', T2.[TaxDate] as 'PO Date',T3.[Dscription],  T3.[Quantity] as 'Qty.',T2.[DocCur] as 'Pur. Curr.', T3.[PriceBefDi], T2.[U_OrderAkNo] as 'OA No.',T3.[ShipDate] as 'CDD', T0.[U_OrderStatus],T0.[U_OrderStatusas]  FROM dbo.ORDR T0
    INNER JOIN dbo.RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OPRJ T6 ON T1.Project = T6.PrjCode
    LEFT JOIN dbo.POR1 T3 ON T1.Docentry = T3.Baseentry and T1.LineNum=T3.Baseline
    LEFT JOIN dbo.OPOR T2 ON T3.Docentry = T2.Docentry
    LEFT JOIN dbo.PDN1 T4 ON T4.BaseEntry = T2.DocEntry AND T4.BaseLine = T3.Linenum
    LEFT JOIN dbo.OPDN T5 ON T5.DocEntry = T4.DocEntry
    WHERE  T1.[OcrCode] >=[%0] AND T1.[OCRCODE ]<=[%1] and T0.[DocStatus] = 'O'

    Hi Try This...........
    SELECT T0.DocNum as 'SO No.', T1.Project, T6.PrjName as 'Project Name' , T1.CogsOcrCo2 as 'Branch',
    T1.WhsCode as 'Warehouse', T1.Dscription,T1.LineStatus as 'Status',T1.Quantity as 'Qty.',
    T1.OpenQty as 'Bal Qty.',T0.DocCur as 'Sale Curr.', T1.Price, T2.DocNum as 'PO No.', T2.TaxDate as 'PO Date',
    T3.Dscription, T3.Quantity as 'Qty.',T2.DocCur as 'Pur. Curr.', T3.PriceBefDi, T2.U_OrderAkNo as 'OA No.',
    T3.ShipDate as 'CDD', T0.U_OrderStatus,T0.U_OrderStatusas, T6.OnHand FROM dbo.ORDR T0
    INNER JOIN dbo.RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OPRJ T6 ON T1.Project = T6.PrjCode
    LEFT JOIN dbo.POR1 T3 ON T1.Docentry = T3.Baseentry and T1.LineNum=T3.Baseline
    LEFT JOIN dbo.OPOR T2 ON T3.Docentry = T2.Docentry
    LEFT JOIN dbo.PDN1 T4 ON T4.BaseEntry = T2.DocEntry AND T4.BaseLine = T3.Linenum
    LEFT JOIN dbo.OPDN T5 ON T5.DocEntry = T4.DocEntry Inner Join OITW T6 On T1.WhsCode=T6.WhsCode and T1.ItemCode=T6.ItemCode
    WHERE T1.OcrCode >=%0 AND T1.OCRCODE <=%1 and T0.DocStatus = 'O'
    Hope this will help you
    Regards,
    Rahul

  • Add fields in Drilldown customer reporting open items

    Hello,
    I have made a copy of the standard Drill down report 0SAPDUEAN-01,but I want to add fields that are not in the pooll list (like Reference - BKPF-XBLNR) or Assignment (BSEG-ZUONR).
    How can I do this?
    Any help will be rewarded
    Best regards,
    Victor

    <P>Hi Austin<P>
    <P>I need to do the same. I need to bring Bill of Lading number (which is Shipment number in our case). I need to bring that to the assignment field in the gl account. I know this can be done through sort key, but the field TKNUM is not avilable for sort key. I was wondering if you have found any solution of this.<P>
    <P>Thank you<P>
    John

  • VA05 open orders in a internal table of custom program  (

    Hi
    I would want to be able to use in a program custom, transaction VA05 for having in an internal table the open orders. It exists un' other instrument for having these data without must write of the code?
    Thanks
    Davide.

    Hi,
    The report SDORDE01 it would be Ok if it had the search for material code.
    I must have inside of the program custom the open orders of a material.
    Thanks
    Davide.

  • Is there a way I can add sales tax to the custom report I'm creating for orders?

    We have two customers that want to implement sales tax to the order details when generating a custom report for orders. I don't see any option to do so, but maybe I'm missing something. Is it possible?

    Hi,
    Nope your not missing anything its just not available at this stage.
    I'll pass this feedback to our dev team while I can’t guarantee this request will be developed right away, please keep an eye on the BC Blog and forums for the latest news on upcoming updates, including feature requests such as yours.
    Our product management team are monitoring a range of channels and speaking with a large group of existing Partners to ensure we’re headed in the right direction.
    Kind regards,
    -Sidney

  • Custom Report for CO04n Mass Printing

    Hi,
    In CO04n for a given order number, production plant and order type when we click from main menu mass printing->execute. We get a list of outputs together for the order number.
    Object List.
    Job Ticket
    Pick List
    Goods Issue
    Goods receipt
    Confirmation slip.
    I want to create a custom report with order number as input and according to radio button selected the layout should be displayed. Is it possible.
    I know the driver program and form name. How can I develop this custom report.

    Hi ,
    You can develop Custome Report   , but for that 
    you will require  help from your Functional Team  , which will guide you thorug data selection  and processing
    i.e from which table data to be taken what to process .
      in that Report you can  display all details  which you reqired and also add one check box  in alv grid   in order to  select order no  .
      also take one button  on display Grid menu   using PF-status  .
      You have to  go through it step by step .
    Regards
    Deepak.

  • Custom report question

    Hi all,
    We have a custom report which pulls sales data. In the output of custom report in order to hide a column i right clicked on one of the columns and selected column attribute and made width=0. After that when ever i execute the report the column is not appearing in the output. How to unhide it??  i checked all the menu options.
    Any input is highly appreciated!!
    Thanks,
    Avani.

    Hi,
    As it is a custom report, kindly coordinate with your ABAper, he ill do the need full.
    Regards,
    Ramesh

  • Open Order value for Customer in Credit Master

    Hi All,
    For ABC customer, if I check for Credit master(F.35), credit management(FD33) & Sales Summary, the Open order value(sales Value) is 10, 30,000.00 EUR.
    If I calculate adding
    Back orders - 83681.98
    Open orders - 196763.43
    Open Contract - 9,669.79
    Open Delivers u2013 9,245.23
    Receivables - 37,938.77.
    Total will be 3, 37, 299.20
    Please any one can tell where I can find the difference value(mean which tcode or report).
    Thanks & Regards
    Sunil

    Hi,
    Check with transaction code VKM1 or VKM4 or FCV3. The columns will show the details.
    Regards

  • Open Orders Report.

    Hello,
    Can anyone give me the code for the open orders report??Using the tables VBAP,VBAK and VBUK.
    Thanking you in anticipation.
    Regards,
    Sirisha.

    hi sirisha ,
    check this code for open sales order(basic list) + open items (secondary list).
    check the status as A--not yet processed..  
                        B--partially processed
                        C--completely processed
    hope this helps u out in getting the functionality.
    u can take the header data from vbakuk ( vbak + vbuk )
    and items from vbap as shown ..
    fetching the data from vbakuk minimizes joins on vbak and vbuk.
    execute the below code.
    REPORT ZEX2  MESSAGE-ID arc NO STANDARD PAGE HEADING.
    Tables :kna1,vbak.
    SELECT-OPTIONS : so_vkorg FOR  vbak-vkorg OBLIGATORY,
                     so_vtweg FOR  vbak-vtweg OBLIGATORY,
                     so_spart FOR  vbak-spart,
                     so_kunnr FOR  kna1-kunnr.
    DATA : BEGIN OF sales_open OCCURS 0 ,
           vbeln LIKE vbak-vbeln,
           auart LIKE vbak-auart,
           kunnr LIKE kna1-kunnr,
           bstnk LIKE vbak-bstnk,
           lfstk LIKE vbuk-lfstk,
           fkstk LIKE vbuk-fkstk,
           gbstk LIKE vbuk-gbstk,
           END OF sales_open.
    DATA : BEGIN OF itm_sales OCCURS 0,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           matnr LIKE vbap-matnr,
           lfsta LIKE vbup-lfsta,
           lfgsa LIKE vbup-lfgsa,
           fksta LIKE vbup-fksta,
           fksaa LIKE vbup-fksaa,
           gbsta LIKE vbup-gbsta,
           END OF itm_sales.
    DATA : l_kunnr LIKE kna1-kunnr,
           l_vkorg LIKE vbak-vkorg,
           l_vtweg LIKE vbak-vtweg,
           l_spart LIKE vbak-spart.
    DATA: v_statusl(20) TYPE c,
          v_statusb(20) TYPE c,
          v_statusf(20) TYPE c,
          v_statusg(20) TYPE c,
          v_status(20) TYPE c,
          v_field(1) TYPE c.
    **Selection Screen Validations.
    AT SELECTION-SCREEN.
      PERFORM validations.
    *&      Form  Validations
          text
    -->  p1        text
    <--  p2        text
    FORM validations.
    **Customer
      IF NOT so_kunnr[] IS INITIAL.
        SELECT SINGLE kunnr INTO l_kunnr
               FROM kna1
               WHERE kunnr IN so_kunnr.
        IF sy-subrc NE 0.
          MESSAGE e002 WITH text-005.
        ENDIF.
      ENDIF.
    **Sales Organization
      IF NOT so_vkorg[] IS INITIAL.
        SELECT SINGLE vkorg INTO l_vkorg
               FROM tvko
               WHERE vkorg IN so_vkorg.
        IF sy-subrc NE 0.
          MESSAGE e003 WITH text-006.
        ENDIF.
      ENDIF.
    **Distribution Channel
      IF NOT so_vtweg[] IS INITIAL.
        SELECT SINGLE vtweg INTO l_vtweg
                FROM tvkov
                WHERE   vkorg IN so_vkorg
                 AND    vtweg IN so_vtweg.
        IF sy-subrc NE 0.
          MESSAGE e004 WITH text-007.
        ENDIF.
      ENDIF.
    **Division
      IF NOT so_spart[] IS INITIAL.
        SELECT SINGLE spart INTO l_spart
                FROM tvta
                WHERE   vkorg IN so_vkorg
                AND     vtweg IN so_vtweg
                AND     spart IN so_spart.
        IF sy-subrc NE 0.
          MESSAGE e005 WITH text-008.
        ENDIF.
      ENDIF.
    ENDFORM.                    " Validations
    Top-of-page.
    PERFORM sales_top_of_page.
    Start-of-selection.
    PERFORM sales_sel.
    *&      Form  sales_sel
          text
    -->  p1        text
    <--  p2        text
    FORM sales_sel.
    SELECT vbeln auart kunnr bstnk
         lfstk fkstk gbstk
         INTO TABLE sales_open
         FROM vbakuk
         WHERE vkorg IN so_vkorg
         AND   vtweg IN so_vtweg
         AND   spart IN so_spart
         AND   kunnr IN so_kunnr
         AND gbstk NE 'C'.
      LOOP AT sales_open.
        WRITE:/4 sy-vline,
               5 sales_open-vbeln HOTSPOT ON COLOR 2 INTENSIFIED OFF,
               16 sy-vline,
               17 sales_open-auart COLOR 2 INTENSIFIED OFF,
               27 sy-vline,
               28 sales_open-kunnr COLOR 2 INTENSIFIED OFF,
               40 sy-vline,
               41 sales_open-bstnk COLOR 2 INTENSIFIED OFF,
               55 sy-vline,
               56 sales_open-lfstk,
               76 sy-vline,
               77 sales_open-fkstk,
               96 sy-vline,
               97 sales_open-gbstk ,
               117 sy-vline.
        HIDE sales_open-vbeln .
      ENDLOOP.
    ENDFORM.                    " sales_sel
    *&      Form  sales_top_of_page
          text
    -->  p1        text
    <--  p2        text
    FORM sales_top_of_page.
      WRITE:/4 sy-uline(114),
         50 'OPEN SALES ORDERS' COLOR 7 INTENSIFIED ON .
      WRITE: /4 sy-vline,
              5 'SalesOrder' COLOR 1 ,
              16 sy-vline,
             17  'OrderType' COLOR 1,
             27  sy-vline,
             28  'Customer' COLOR 1,
             40  sy-vline,
             41  'PoNumber' COLOR 1,
             55  sy-vline,
             56  'Delivery Status' COLOR 1,
             76  sy-vline,
             77  'Billing Status' COLOR 1,
             96  sy-vline,
             97  'Processing Status' COLOR 1,
             117  sy-vline .
      WRITE:/4 sy-uline(114).
    ENDFORM.                    " sales_top_of_page
    AT LINE-SELECTION.
      SELECT       a~vbeln
                   a~posnr
                   a~matnr
                a~kwmeng
                   b~lfsta
                   b~lfgsa
                   b~fksta
                   b~fksaa
                   b~gbsta
                   INTO TABLE itm_sales
                   FROM vbap AS a JOIN vbup AS b
                   ON avbeln EQ bvbeln
                   AND aposnr EQ bposnr
                   AND b~gbsta NE 'C'
                   WHERE a~vbeln EQ sales_open-vbeln.
      IF NOT sales_open IS INITIAL.
        LOOP AT itm_sales.
          WRITE:/5  itm_sales-vbeln,
                    itm_sales-posnr,
                    itm_sales-matnr,
                    itm_sales-lfsta,
                    itm_sales-lfgsa,
                    itm_sales-fksta,
                    itm_sales-fksaa,
                    itm_sales-gbsta.
        ENDLOOP.
      ENDIF.
    Regards,
    Vijay
    check the entries with t-code va05 for the same criteria.
    Message was edited by: Vijay

  • Material Order Status Report - Custom report error

    Hi,
    It is a Custom report to list Open PO's with the following logic.
    1. If validity date is less than today, PO is considered closed and that PO wont appear in the report.
        If point 1 failed, (means validity date in future) then goes to point 2.
    2. At item level,
       (a) Check if the quantity ordered is delivered (in service PO if planned/unplanned limit got reached)
                                     or
       (b) if Delivery completed indicator is checked
    in point 2 if either a or b is there, the PO is considered closed and should not appear in the report.
    We checked the program logic is fine.
    Problems:
    1.But the list shows few Closed PO's with Delivery comp ind checked.(Material PO's)
    2.In some service PO's the unplanned limit is not reached but so far some thing is delivered and Del   comp is marked. But still it appears in the report.
    In both cases the PO should not appear in the report. How to check?
    Regards
    Ramprakash

    Hi,
    If the logic that you checked proved correct, then you will have to get your ABAPer to debug your program to find out if change shall be made in the program logic coding.
    Cheers,
    HT

  • Retrive open order and open delivery value x custome

    Hi,
    how can i obtain a list of open order value and open delivery value per customer?
    10x
    bye

    Check the following code which give details of pending orders & values and it can be modified as per ur requirement.
    REPORT  ZPEND_ORDER no standard page heading line-size 255.
    *& Purpose : Details of Sale order having pending deliveries           *
    *&           ( For Rake order handling )                               *
    tables : vbak, vbap, likp, lips, kna1, vbuk, vbpa, vepvg, vbfa, vbup.
    data : pend_qty like  vbap-kwmeng,
           dlv_qty like  vbap-kwmeng,
           ord_qty like vbap-kwmeng.
    data: begin of itab_vbak occurs 0,
          vbeln like vbak-vbeln,           "sales order no
          audat like vbak-audat,           " created date
          auart like vbak-auart,           " Sales Document Type
          vkorg like vbak-vkorg,           "Sales Organization
          vtweg like vbak-vtweg,           " distribution channel
          spart like vbak-spart,           " Division
          vkgrp like vbak-vkgrp,           " Sales group
          vkbur like vbak-vkbur,           " Sales office
          kunnr like vbak-kunnr,           " sold to party
          kunag like vbak-kunnr,           " ship to party
          cust like vbak-kunnr,            " sold to party
          ship like kna1-name1,            " ship to party
          city like kna1-ort01,            " ship to party location
          deliv like likp-vbeln,           " delivery
          matnr like vbap-matnr,
          arktx like vbap-arktx,           " mat description
          kwmeng like vbap-kwmeng,
          kbmeng like vbap-kbmeng,
          fkrel like vbap-matnr,
          vstel like vbap-vstel,
          route like vbap-route,
          chln_no like likp-xabln,
          grn_no like likp-bolnr,
          truck_no like likp-traid,
          dlv_dt like vbfa-erdat,           "dlvy date
          ord_qty like vbap-kwmeng,
          dlvd_qty like vbap-kwmeng,
          pend_qty like vbap-kwmeng,
          kzwi5 like vbap-kzwi5,
          posnr like vbap-posnr,
    end of itab_vbak.
    data  posnr like vbap-posnr.
    *FOR ALV DISPLAY
    type-pools: slis.
    constants: formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
    *Data Decelararion for alv display
    data: i_fieldtab type slis_t_fieldcat_alv,
          i_heading  type slis_t_listheader,
          i_layout   type slis_layout_alv,
          i_sort     type slis_t_sortinfo_alv,
          i_print    type slis_print_alv,
          i_events   type slis_t_event,
          i_repname  like sy-repid,
          f2code   like sy-ucomm value  '&ETA',
          i_save(1) type c,
          i_exit(1) type c,
          i_variant like disvariant,
          h_text(50).
    start-of-selection.
      selection-screen skip 1.
      selection-screen begin of block v1 with frame title text-001.
      selection-screen skip 1.
      select-options:
                     ord_no for vepvg-vbeln,
                     audat for vbak-audat obligatory,
                     matnr for vbap-matnr,
                     spart for vbap-spart obligatory,
                     vstel for vepvg-vstel obligatory,
                     sale_org for vbak-vkorg obligatory,
                     sale_off for vbak-vkbur.
      selection-screen skip 1.
    check box for ALV display
      parameters p_alv as checkbox.
      selection-screen end of block v1.
      selection-screen skip 1.
      data:   ftab(72) occurs 5 with header line.
      refresh ftab.
      ftab = 'VBELN'. append ftab.
      refresh itab_vbak.
    initialization.
      i_repname = sy-repid.
    start-of-selection.
      select vbeln audat vkorg vtweg spart vkbur kunnr from vbak
           into
           (itab_vbak-vbeln, itab_vbak-audat,
            vbak-vkorg, vbak-vtweg, vbak-spart,
            itab_vbak-vkbur, itab_vbak-kunnr)
           where vbeln in ord_no
           and audat in audat
           and vbtyp = 'C'
           and vkorg in sale_org
           and spart in spart
           and vkbur in sale_off.
        if sy-subrc = 0.
          select posnr kwmeng kbmeng matnr arktx  "added for mat description
                   fkrel vstel route kzwi5 spart
                   from vbap into corresponding fields of itab_vbak
                   where vbeln = itab_vbak-vbeln .
            check ( itab_vbak-fkrel = 'A' or  "Delivery-related billing document
                    itab_vbak-fkrel = 'D' )   "Relevant for pro forma
              and itab_vbak-vstel in vstel
              and itab_vbak-matnr in matnr
              and itab_vbak-spart in spart.
            select single * from vbup where vbeln = itab_vbak-vbeln
                                        and posnr = itab_vbak-posnr.
            check vbup-gbsta ne 'C'.
            dlv_qty = 0.
            select single kunnr from vbpa into itab_vbak-kunnr
                   where vbeln = itab_vbak-vbeln
                   and parvw = 'WE'.
            select single name1 ort01 from kna1 into
                   (itab_vbak-cust, itab_vbak-city)
                    where kunnr = itab_vbak-kunnr.
          in case of partially processed sale order get delivery details
            clear : dlv_qty, itab_vbak-dlv_dt, itab_vbak-dlvd_qty, itab_vbak-chln_no,
                    itab_vbak-grn_no, itab_vbak-truck_no.
            if vbup-gbsta eq 'B'. "partially processed
              dlv_qty = 0.
            get details from delivery
              select vbfavbeln vbfarfmng vbfavbtyp_n vbfaerdat
                 into (vbfa-vbeln, vbfa-rfmng, vbfa-vbtyp_n, vbfa-erdat)
                 from vbfa
                 where vbelv = itab_vbak-vbeln
                   and posnv = itab_vbak-posnr.
                check vbfa-vbtyp_n = 'J'.
                clear : dlv_qty, itab_vbak-dlv_dt, itab_vbak-dlvd_qty, itab_vbak-chln_no,
                        itab_vbak-grn_no, itab_vbak-truck_no.
                select single erdat xabln bolnr traid kunag
                   into (itab_vbak-dlv_dt, itab_vbak-chln_no, itab_vbak-grn_no,
                         itab_vbak-truck_no, itab_vbak-kunag)
                   from likp
                   where vbeln = vbfa-vbeln.
                if sy-subrc = 0.
                  dlv_qty = dlv_qty + vbfa-rfmng.
                  itab_vbak-dlv_dt = vbfa-erdat.
                  itab_vbak-dlvd_qty = dlv_qty.
                  itab_vbak-deliv = vbfa-vbeln.
                endif.
                append itab_vbak.
              endselect.
            elseif vbup-gbsta eq 'A'.
            for unprocessed sale order
            ship to party details
              itab_vbak-kunag = itab_vbak-kunnr.
              itab_vbak-ship = itab_vbak-cust.
              append itab_vbak.
            endif.
          endselect.
        endif.
        clear itab_vbak.
      endselect.
      loop at itab_vbak.
      clear with change in document / item no
        on change of itab_vbak-vbeln or itab_vbak-posnr.
          clear: dlv_qty,ord_qty,pend_qty.
        endon.
        at new posnr.
        In case full qty not delivered
          if itab_vbak-kwmeng > itab_vbak-dlvd_qty.
            select single vbpa~kunnr into vbpa-kunnr
               from vbpa
               where vbeln = itab_vbak-vbeln
                and  posnr = itab_vbak-posnr
                and  parvw = 'WE'.
            if sy-subrc eq 0.
              itab_vbak-kunag = vbpa-kunnr.
              select single name1 ort01 from kna1 into
                    (itab_vbak-ship, itab_vbak-city)
                     where kunnr = itab_vbak-kunag.
              if sy-subrc ne 0.
                select single vbpa~kunnr into vbpa-kunnr
                   from vbpa
                   where vbeln = itab_vbak-vbeln
                   and parvw = 'WE'.
                itab_vbak-kunag = vbpa-kunnr.
                if sy-subrc ne 0 and p_alv ne 'X'.
                  write :/ 'vbpadetls' , itab_vbak-vbeln, itab_vbak-posnr, itab_vbak-vbeln.
                endif.
              endif.
            endif.
          endif.
          itab_vbak-ord_qty = itab_vbak-kwmeng.
        Delivered Qty & Pending qty
          dlv_qty = dlv_qty + itab_vbak-dlvd_qty.
          itab_vbak-pend_qty = itab_vbak-kwmeng - dlv_qty.
          modify itab_vbak transporting kunag ship city dlvd_qty ord_qty pend_qty .
        endat.
      endloop.
    end-of-selection.
      sort itab_vbak by vbeln posnr audat kunnr matnr.
      if p_alv ne 'X'.
        loop at itab_vbak.
          select single kna1name1 kna1ort01
                 into
                 (kna1-name1, kna1-ort01)
                 from kna1
                 where kunnr = itab_vbak-kunnr.
          pend_qty = itab_vbak-ord_qty - itab_vbak-dlvd_qty.
          format color col_normal.
          write : /01(10) itab_vbak-vbeln,
                  12(10)  itab_vbak-audat,
                  24(8)  itab_vbak-kunag no-zero,
                  34(6)  itab_vbak-posnr no-zero,
                  42(10) itab_vbak-matnr no-zero,
                  54(15) itab_vbak-arktx,
                  72(25) itab_vbak-ship,
                  100(15) itab_vbak-city,
                  118(8)  itab_vbak-ord_qty,
                  128(10) itab_vbak-route,
                  140(10) itab_vbak-dlv_dt,
                  152(10) itab_vbak-dlvd_qty,
                  164(10)  itab_vbak-chln_no,
                  176(10)  itab_vbak-grn_no,
                  188(10)  itab_vbak-truck_no,
                  200(10) itab_vbak-pend_qty,
                  218(15) itab_vbak-kzwi5 left-justified.
          format reset.
          at end of audat.
            sum.
            pend_qty = itab_vbak-ord_qty - itab_vbak-dlvd_qty.
            format color col_background.
            write: /118(8) itab_vbak-ord_qty,
                   152(10) itab_vbak-dlvd_qty,
                   200(10) pend_qty,
                   218 itab_vbak-kzwi5 left-justified.
            format reset.
          endat.
          at last.
            sum.
            pend_qty = itab_vbak-ord_qty - itab_vbak-dlvd_qty.
            format color col_total.
            write : /5 'Grand Total : '.
            write: /118(8) itab_vbak-ord_qty,
                  152(10) itab_vbak-dlvd_qty,
                  200(10) pend_qty,
                  218 itab_vbak-kzwi5 left-justified.
            format reset.
          endat.
        endloop.
      else.
      for ALV Display
        i_repname = sy-repid.
        perform fieldcat using i_fieldtab[].
        perform eventtab using i_events[].
        perform comment using i_heading[].
        perform call_alv.
        perform build_layout using i_layout.
      endif.
    top-of-page.
      if p_alv ne 'X'.
        format color col_heading.
        write: /01 'Ord No',
                12 'Ord Date',
                24 'Sold to Party',
                34 'Item No',
                42 'Mat No',
                54 'Mat Descp',
                72 'Ship to Party',
                100 'City',
                118 'Qty',
                128 'Route',
                140 'Dlv Date',
                152 'Dlv Qty',
                164 'Challan No',
                176 'GRN No',
                188 'Truck No',
                200 'Pend Qty',
                218 'Total Value'.
        format reset.
      endif.
    *&      Form  fieldcat
          text
         -->P_I_FIELDTAB[]  text
    form fieldcat using p_fieldtab type slis_t_fieldcat_alv.
      data: l_fieldcat type slis_fieldcat_alv.
      clear l_fieldcat.
      l_fieldcat-tabname    = 'ITAB_VBAK'.
      l_fieldcat-fix_column = 'X'.
      l_fieldcat-no_out     = ' '.
      l_fieldcat-fieldname  = 'VKBUR'.
      l_fieldcat-outputlen  = 6.
      l_fieldcat-seltext_l  = 'Sales Office'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'VSTEL'.
      l_fieldcat-outputlen  = 5.
      l_fieldcat-seltext_l  = 'Shipping Point'.
      l_fieldcat-no_zero = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'VBELN'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Order No.'.
      l_fieldcat-no_zero = 'X'.
      l_fieldcat-hotspot = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'AUDAT'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Doc Date'.
      l_fieldcat-hotspot = ''.
      l_fieldcat-no_zero = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'POSNR'.
      l_fieldcat-outputlen  = 5.
      l_fieldcat-seltext_l  = 'Item'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'MATNR'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Material No'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'ARKTX'.
      l_fieldcat-outputlen  = 15.
      l_fieldcat-seltext_l  = 'Mat. Description'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'KUNNR'.
      l_fieldcat-outputlen  = 8.
      l_fieldcat-seltext_l  = 'Sold to Party'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'CUST'.
      l_fieldcat-outputlen  = 15.
      l_fieldcat-seltext_l  = 'Sold to Party Descp.'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'KUNAG'.
      l_fieldcat-outputlen  = 8.
      l_fieldcat-seltext_l  = 'Ship to Party'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'SHIP'.
      l_fieldcat-outputlen  = 15.
      l_fieldcat-seltext_l  = 'Ship to Party Descp'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'CITY'.
      l_fieldcat-outputlen  = 13.
      l_fieldcat-seltext_l  = 'City'.
      l_fieldcat-no_zero = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'DELIV'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Delivery No.'.
      l_fieldcat-no_zero = 'X'.
      l_fieldcat-hotspot = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'ORD_QTY'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Qty'.
      l_fieldcat-no_zero = ' '.
      l_fieldcat-hotspot = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'ROUTE'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Route'.
      l_fieldcat-no_zero = 'X'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'DLV_DT'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Delivered date'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'DLVD_QTY'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Delivered Qty'.
      l_fieldcat-no_zero = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'CHLN_NO'.
      l_fieldcat-outputlen  = 15.
      l_fieldcat-seltext_l  = 'Challan No'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'GRN_NO'.
      l_fieldcat-outputlen  = 15.
      l_fieldcat-seltext_l  = 'GR Number'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'TRUCK_NO'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Truck No'.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'PEND_QTY'.
      l_fieldcat-outputlen  = 10.
      l_fieldcat-seltext_l  = 'Pending Qty'.
      l_fieldcat-no_zero = ' '.
      append l_fieldcat to p_fieldtab.
      l_fieldcat-fieldname  = 'KZWI5'.
      l_fieldcat-outputlen  = 13.
      l_fieldcat-seltext_l  = 'Value'.
      append l_fieldcat to p_fieldtab.
      clear l_fieldcat.
    endform.                    " FIELDCAT
    *&      Form  EVENTTAB
          text
         -->P_I_EVENTS[]  text
    form eventtab using p_events type slis_t_event.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type = 0
        importing
          et_events   = p_events.
      read table p_events with key name = slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move formname_top_of_page to ls_event-form.
        append ls_event to p_events.
      endif.
    endform.                    " EVENTTAB
    *&      Form  BUILD_LAYOUT
          text
         -->P_LAYOUT   text
    form build_layout using p_layout type slis_layout_alv.
      p_layout-f2code       = f2code.
      p_layout-zebra        = 'X'.
      p_layout-detail_popup = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  COMMENT
          text
         -->P_I_HEADING[]  text
    form comment  using    p_i_heading type slis_t_listheader.
      data: hline type slis_listheader,
            text(60) type c,
            sep(20) type c.
      clear: hline, text.
      hline-typ  = 'H'.
      write : 'Pending Sale Order Details' to hline-info.
      append hline to i_heading.
    endform.                    " COMMENT
    *&      Form  TOP_OF_PAGE
          text
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = i_heading
          i_logo             = 'ALV_REPORT'.
    endform.                    " TOP_OF_PAGE
    *&      Form  call_alv
          text
    -->  p1        text
    <--  p2        text
    form call_alv .
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_interface_check        = ' '
          i_buffer_active          = ' '
          i_callback_program       = i_repname
          i_callback_pf_status_set = ' '
          i_callback_user_command  = 'FRM_ALV_USER_COMMAND'
          i_structure_name         = 'ITAB_VBAK'
          i_background_id          = ' '
          is_layout                = i_layout
          it_fieldcat              = i_fieldtab
          it_sort                  = i_sort[]
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = i_variant
          it_events                = i_events[]
          is_print                 = i_print
        tables
          t_outtab                 = itab_vbak.
      if sy-subrc <> 0.
        write: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.
      endif.
    endform.                    " call_alv
    *&      Form  frm_alv_user_command
          text
         -->UCOMM      text
         -->SELFIELD   text
    form frm_alv_user_command using ucomm like sy-ucomm
                  selfield type slis_selfield.
      case ucomm.
        when '&IC1'.
          if selfield-tabname = 'ITAB_VBAK'.
            if selfield-fieldname = 'VBELN'.
              read table itab_vbak index selfield-tabindex.
              if sy-subrc = 0.
                set parameter id 'AUN' field itab_vbak-vbeln.
                call transaction 'VA03' and skip first screen.
              endif.
            elseif selfield-fieldname = 'DELIV'.
              read table itab_vbak index selfield-tabindex.
              if sy-subrc = 0.
                set parameter id 'VL' field itab_vbak-deliv.
                call transaction 'VL03N' and skip first screen.
              endif.
            endif.
          endif.
      endcase.
    endform.                    "frm_alv_user_command

  • 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

  • Report for open order and shipped qty  summary

    Dear Folks,
               Can any one please help me.
    Report for open order summary Vs shipped quantity
    what are the related programs to it.
    throw some light on it.

    >
    arpita b wrote:
    > Dear rohit
    >    
    >     Iam asking about any report which compares or give details of open order vs shipped qty.
    >
    > Any sis report is available for this?
    Hi Arpita,
    There is no such sis report available. You will have to configure and create two seperate reports and do the comparison.
    If you want, I will send you the list of all T.codes used to generate reports in SD.
    Revert back to me if you need the same.
    Regards,
    Swapna D.

Maybe you are looking for

  • How to get information about cluster disk using powershell

    Hi How can I list all cluster disks in my Hyper-V cluster using Powershell? I see two cluster disk "Cluster Disk 1" and "Cluster Disk 1" in my cluster management console but I would like to see them using powershell. Kind Regards Tomasz

  • Menu items linking to other pages?

    I have built a menu using the forms menu tool in Dreamweaver, and now I would like to link each menu item to a different page. Can this be done and how? does it require SPRY?

  • Connection between webdynpro java and ECC.

    Hi experts, I am very new to webdynpro java, I want to learn webdynpro java since I know little bit of java. So here is my question, I want to connect my webdynpro java to ECC  to get data from ECC and display it on front end and as well i want to se

  • TDS posing

    Hi, Help me out on the below issue. We have a labour Contractor - Vendor. whom we pay with TDS and deduct the ESIC contribution also. While post payment for this vendor in FB60 with TDS, we Debit the expense Account GL, The calculation happens correc

  • Downgrading quad G5 to 40GB SATA - Kernel Panic

    Howdy folks - I own a G5 Quadcore that came with a 250GB SATA HD. I purchased a second drive (both are Western Digital Caviar SE) and installed it as my backup drive. Everything works great, no issues. I bought a Western Digital 40G SATA (also a Cavi