Query on TO cancellation  in  delivery

Hello Experts ,
I have one query on SD-WM part during the delivery.
Scenario is:
Delivery Done  >    Picking & TO Done      >  PGI Done
Now the goods are ready to dispatch , if I found that some mistake is done in Delivery doc and I want to reverse the same in this case how the reverse flow goes?
1. The PGI was reversed  using VL09 , and we were able to cancel the delivery (Without Canceling the TO)
In this case what is the position of the stock ?
2. Is it possible to reverse/Cancel the confirmed TO in this scenario using LT15?
We tried cancelling the TO using LT15 but we had an error u2018 To already cancelled/ confirmedu2019
Query: I want new delivery to be done and how can I handle the items that I have already picked and PGI done for the previous delivery.
Thanks & regards,
Onkar B

Hi,
Scenario is:
Delivery Done > Picking & TO Done > PGI Done
If you want to create new delivery, then you shd follow the belwo given procedure.
1) Cancel Goods Issue, which to reverse the GOODS movement(VL09)
2) Cancel TO
2) Delete the delivery (VL02N)
3) Create new delivery.
If you want u can use the same delivery.
1) Cancel Goods Issue, which to reverse the GOODS movement(VL09)
2) Cancel TO
2) Create TO(LT03)
3) Create new delivery.
REgards,
Student

Similar Messages

  • How to cancel the delivery number in the billing due list

    Hi Gurus,
    My User has created the Consignment Fillup order and Dlivery for that order.
    Now User asking that the delivery number coming into Billing Due list (VF04).
    As you know all for Consignment Fillup there is no invoice. Please suggest me
    how to cancel the Delivery number in Billing Due list for above scenario.
    Br,
    Satish

    What you have faced is not at all an issue.  Its a standard behaviour only.  Though you are not generating commercial invoice here, you can generate (F8) proforma via VF04 in bulk.  Either you can generate one proforma per delivery or consolidate multiple deliveries into one proforma which it depends on VTFL copy control for the field Data VBRK/VBRP.   There if you maintain 001 or 007, you can club multiple deveries and if you maintain 003, one proforma per delivery can be created.
    thanks
    G. Lakshmipathi

  • Reverse/Cancel Outbound Delivery and Billing documents

    Hi all,
    My question is...How do you reverse/ Cancel Outbound delivery and billing documents and what will be the reversals in  Accounting document and how are they updated.
    Regards

    Hi,
    If billed delivery is to be reversed,  Then
    1. First cancel the billing with transaction code vf11
    2.Then reverse the PGI with the transaction code VL09
    3.Cancel or delete the Delivery in vl02n
    4.Delete the sales order.
    Accounting entries will be reversed by cancellation of the invoice and material movement will get reversed after doing VL09.
    Reward points if it is helpful

  • Query for dispatch details in Delivery

    Hi all,
    I require simple query which will display item wise dispatch details for delivery.
    Query Output required based on delivery document is as follows
    Doc Num, Doc Date,Card Name, Item Code, Item Description, Quantity, Batch Number, Comments
    Input for query will be From date and To date.
    Solution appreciable

    Hi
    Try this:
    SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName,
    T1.ItemCode, T1.Dscription, T2.Quantity, T2.BatchNum, T0.Comments
    FROM ODLN T0
    inner join DLN1 T1 on T1.DocEntry = T0.DocEntry
    LEFT JOIN IBT1 T2 ON T2.BsDocEntry = T0.DocEntry and T2.BsDocType = 15 and T2.BsDocLine =  T1.LineNum
    WHERE T0.DocDate >= '[%0\]' and T0.DocDate <= '[%1\]'
    Thanks,
    Gordon

  • How to cancel a delivery note when all plant transferts have been confirmed?

    Hello,
    I need to cancel a delivery note. The good issue has been cancelled but the delivery note remains blocked because the plant transferts have been confirmed. I tryed to cancel them via LT15 transaction but it does not work. There are splitted batches for each plant transfert.
    Does anyone have an idea about how to cope with it?

    Call apple...
    Apple Phone Numbers
    btabz

  • Can we create cancellation/return delivery with BAPI_CONFEC_CREATE

    hi experts,
    i want to use the above BAPI to create cancellations and return deliveries in SRM 7. i am not able to figure out the exact data that needs to be passed to the BAPI to create cancellation/return delivery. i have used class approach to do the same and able to create them, but i am specifically interested in FM/BAPI
    does anybody used this BAPI to create cancellations?
    thanks

    hi,
    i could not make this BAPI work for cancellations but found another way of doing confirmations and cancellations using std FMs
    here is the code for confirmation
    CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
       EXPORTING
         I_OBJECT_ID                      = is_conf_header-po_number
         I_WITH_ITEMDATA                  = 'X'
       IMPORTING
         E_HEADER                         = ls_header
         ET_ATTACH                        = lt_attach
       TABLES
         E_ITEM                           = lt_item
         E_ACCOUNT                        = lt_account
         E_PARTNER                        = lt_partner
         E_LONGTEXT                       = lt_longtext
         E_ORGDATA                        = lt_orgdata
         E_TAX                            = lt_tax
         move-corresponding ls_header to ls_new_header.
    ls_new_header-process_type = 'CONF'.
    ls_new_header-subtype = 'CF'.
    ls_new_header-src_object_type = 'BUS2201'.
    ls_new_header-src_guid = ls_header-guid.
    clear ls_new_header-object_id.
    loop at lt_item into ls_item.
      read table it_conf_items into ls_conf_items with key po_item_number = ls_item-number_int.
    if sy-subrc ne 0.
      continue.
      endif.
      move-corresponding ls_item to ls_new_item.
      ls_new_item-src_object_type = 'BUS2201001'.
      ls_new_item-src_guid = ls_item-guid.
      ls_new_item-final_entry = ls_conf_items-final_entry.
      ls_new_item-quantity = ls_conf_items-quantity.
      append ls_new_item to lt_new_item.
      endloop.
    loop at lt_partner into ls_partner.
       move-corresponding ls_partner to ls_new_partner.
       append ls_new_partner to lt_new_partner.
       endloop.
       loop at lt_orgdata into ls_orgdata.
         move-corresponding ls_orgdata to ls_new_orgdata.
         append ls_new_orgdata to lt_new_orgdata.
         endloop.
    loop at lt_account into ls_account.
       move-corresponding ls_account to ls_new_account.
       append ls_new_account to lt_new_account.
       endloop.
    lv_src_guid = ls_header-guid.       .
    CALL FUNCTION 'BBP_PD_CONF_CREATE'
    EXPORTING
      I_SAVE                           =  'X'
       I_HEADER                         = ls_new_header
       I_SRC_GUID                       = lv_src_guid
       IT_ATTACH                        = lt_new_attach
    IMPORTING
       E_HEADER                         = ls_e_header
       ET_ATTACH                        = lt_e_attach
      TABLES
      I_ITEM                           = lt_new_item
       I_PARTNER                        = lt_new_partner
       I_ORGDATA                        = lt_new_orgdata
       E_ITEM                           = lt_e_item
       E_ACCOUNT                        = lt_e_account
       E_PARTNER                        = lt_e_partner
       E_ORGDATA                        =  lt_e_orgdata
        e_messages                       = lt_new_message
    et_msg[] = lt_new_message[].
    ls_conf_documents-doc_number = ls_e_header-object_id.
    append ls_conf_documents to et_conf_documents.
    CALL FUNCTION 'BBP_PD_CONF_SAVE'
    EXPORTING
        IV_USERTYPE               = 'X'
       IV_HEADER_GUID            = ls_e_header-guid
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT
    code for cancellation
    get all the confirmations created for the PO
        CALL FUNCTION 'BBP_PD_CONF_GETLIST'
          EXPORTING
            i_for_po_id = is_conf_header-po_number
          TABLES
            e_pdlist    = lt_pdlist
            e_messages  = lt_msgs.
    delete GRS which are cancelled
        LOOP AT lt_pdlist INTO ls_pdlist WHERE subtype EQ 'CA'.
          DELETE lt_pdlist WHERE guid = ls_pdlist-src_guid.
        ENDLOOP.
    delete the cancelllation documents. we don't need them anymore
        DELETE lt_pdlist WHERE subtype EQ 'CA'.
        loop at lt_pdlist into ls_pdlist.
          CALL FUNCTION 'BBP_PD_CONF_GETDETAIL'
           EXPORTING
              I_GUID                           =  ls_pdlist-guid
              I_WITH_ITEMDATA                  = 'X'
          IMPORTING
             E_HEADER                         =  ls_conf_hdr
           TABLES
             E_ITEM                           =  lt_con_items
             E_PARTNER                        =  lt_con_partner
    move-corresponding ls_conf_hdr to ls_new_header.
    ls_new_header-process_type = 'CONF'.
    ls_new_header-subtype = 'CA'.
    ls_new_header-src_object_type = 'BUS2203'.
    ls_new_header-src_guid = ls_conf_hdr-guid.
    clear ls_new_header-object_id.
    loop at lt_con_items into ls_con_items.
      move-corresponding ls_con_items to ls_new_item.
      ls_new_item-src_object_type = 'BUS2203001'.
      ls_new_item-src_guid = ls_con_items-guid.
      append ls_new_item to lt_new_item.
      endloop.
    loop at lt_con_partner into ls_con_partner.
       move-corresponding ls_con_partner to ls_new_partner.
       append ls_new_partner to lt_new_partner.
       endloop.
          lv_src_guid = ls_conf_hdr-guid.
    after that call BBP_PD_CONF_CREATE as we did for the confirmation followed by BBP_PD_CONF_SAVE and commit work.
    Edited by: SRM7CON on Mar 7, 2012 12:04 PM
    Edited by: SRM7CON on Mar 7, 2012 12:25 PM

  • How do I cancel crossword delivery

    how do I cancel daily crossword delivery by fax?

    Many HP printers are Web Enabled and can connect to the 'cloud' to receive content or ‘Print Apps’. These Print Apps can be setup to be delivered on a Scheduled Delivery schedule. Some customers are inadvertently signing up for this service and think that they are getting a fax or unwanted print app sent to their printer.
    Methods of stopping a Scheduled Delivery Print App
    1. From the printers front panel go to the 'Apps' section and scroll through until you find the desired print app. Select the print app and then choose 'Pause' subscription. This will pause the subscription until a user selects it again and 'resumes' printing. If the print app is not visible on your printer it may have been removed, please go to method 2.
    2. Go to www.hpeprintcenter.com and login to your account, create an account if necessary. Go to the 'Apps' section and select the desired print app. Select 'setup' and then 'update settings', at the bottom of the settings page you will see in blue text 'Cancel Scheduled Delivery'.
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Error while posting a cancelling a delivery through VL09 in WM

    Hi Guru's,
    We have WM set up i have created a return sales order and the return deliivery to the customer and i have made a trnasfer and the stock is place in the permanent from the interim bins (904) and then PGR.
    Now i want to cancel that material document and the delivery, while doing VL09 reversal of material document i am getting an error "Storage bin 101 904 5190000000 does not exist.
    But for the reversal movement type 652 i have set it has a dynamic bin creation means it should take delivery number 5190000000 has the dynamic bin but it is not creating.
    Can any one help me in this

    you just have a big problem.
    I think the only way you have is to create the quant with zero quantity in this interim bin with IT options: direct table maintenance. 
    Then you do a LT01 to move the stock from permanent bin to the interim bin.
    For this table maintenance you have to be very carefull as you need to create the LQUA entry with exact the content that is stored as WM data in LIPS table to your delivery.

  • SALES ORDER LINE IS CANCELLED BUT DELIVERY DETAIL IS SHOING AS BACKORDERED

    SALES ORDER LINE IS CANCELLED BUT still the DELIVERY DETAIL IS showing as BACKORDERED it should be in cancelled
    status.The Sales order (only one ex:3904854) is cancelled , however order in shipping transactions screen indicates order is on backorder.
    at that time of order cancellation the line level workflow error out due to the Workflow package is inactive .
    I tried to resubmit the error out workflow using retry option from the responsibility “Workflow Administrator” the workflow is completed with forcible option but still the delivery detail is in back order status not changing it to cancel status.
    Error Name :-4068 [Error Process Error: WF Error Message: ORA-04068: existing state of packages has been discarded  
              ORA-04061: existing state of package body "APPS.XRX_SUPPLIES_NEW_WF_PKG" has been invalidated    
              ORA-04065: not executed, altered or dropped package body "APPS.XRX_SUPPLIES_NEW_WF_PKG"                         
              ORA-06508: PL/SQL: could not find program unit being called: "APPS.XRX_SUPPLIES_NEW_WF_PKG" [Error Process           Error: 3114: Activity 'WFERROR/R_ERROR_RETRY' is not a process.]
    Error Stack: Wf_Engine_Util.Function_Call(XRX_SUPPLIES_NEW_WF_PKG.XRX_CLOSE_LINE_DETAILS, OEOL, 55098479, 195982, RUN)
    [Error Process Error:   Wf_Engine.CreateProcess(WFERROR, WF5147218, R_ERROR_RETRY) ]

    Mohan
    You need a simple script to get the status corrected. Log an SR or search metalink for the script. I am sure there is one out there (if you search with the orphan reservations). This script supported, but not exactly targeted at your problem But it will solve it. You can log an SR and confirm.
    Thanks
    Nagamohan

  • During cancellation of delivery document using VL09

    Hi,
    I want to cancel only 3 items out of 5 items from the delivery document at the time of cancellation by using VL09..
    How can i do that??
    Rgds,
    Pavan.

    No. Not other way out. The method suggested above is the best possible method.
    As PGI is done for whole Delivery Document, Cancel / reverse of PGI is also done for the whole Delivery Document. You cannot cancel / Reverse partial Line items in Delivery.
    Hope this clarifies,
    Thanks,
    Jignesh Mehta

  • Your advise on canceling a delivery order from stock perspective

    Dear all,
    I have a situation a sales return order is created, and later a movement type 657 (Returns from customer to blocked stock) is posted for the return delivery of 8pcs. Thus, there is an 8pcs appear in our blocked stock.
    THen one week later, one logistic guy perform a stock transfer of this block stock of 8pcs to UU stock using movement 343. Thus, we have 8pcs of UU stock and 0pcs of block stock in our stock overview.
    Then another week later, an outbound delivery for a goods issue of movement 645 (i..e. Goods issue for a cross-company stock transport order) of 1 pcs from our warehouse. Now, our stock situation become 7pcs in UU, and still 0pcs in block stock.
    My question is our business want to perform a cancelation of the initial sales return order of the 8pcs. Which is impossble as there is no 8pcs of blocked stock that can be used to cancel out the intial material document of 657 movement with 658 reversal. Then I was thinking we can reverse back the stock transfer movement which is incured with 343 movement with 344 (i.e. move the 8pcs of UU to blocked). However, this is also impossible because our stock situation is now 7pcs in UU.
    What is your advise if our business really want to cancel our initial return delivery document?
    THere is no way to do this right base on my sitautaion i just describe? what is the alternative solution? thanks
    tuff

    Hi,
    This is a production, those goods already issue out for stock transfer to other plant, cannot just reverse like that.
    Does anyone have a best solution?
    I was thinking about perform a physical inventory to make the 8pcs back into the blocked stock, then I will perform a VL09 to reverse the delivery.
    But using this physical inventory method will lead to increase in stock value... but  does perform the VL09 which reverse the stock will cancel out the increase stock value cause by the phsyical inventory?
    please advise. thanks

  • SQL query: select billaddress if no delivery address exist.

    hi sql expert,
    The Query shall filter all invoices by date, articles and show the delivery address. Problem: Not every customer has deposited a delivery address. In this case the billing address is to be taken.
    How can this be done ?
    This query
    SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    and T1.Itemcode = [%0] GROUP BY T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    UNION ALL
    SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0  INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
    GROUP BY  T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    Thanks a lot!

    hi,
    I think I got it now :-)
    First: Show me priority all  delivery addresses . Otherwise billing addresses:
    SELECT T1.[CardCode], T2.[Street] FROM OCRD T1  INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode WHERE NOT EXISTS
      SELECT *
      FROM CRD1 as T2
      WHERE T2.[AdresType] = 's' and t1.CardCode = t2.Cardcode
    union
    SELECT T1.[CardCode], T2.[Street] FROM OCRD T1  INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode
    where T2.[AdresType] = 's'
    secondly:
    Filter all invoices by date, articles and show priority the delivery address else billingaddress and subtract the credits:
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    and T1.Itemcode = [%0] and not exists  (
      SELECT *
      FROM CRD1 as T3
      WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
    GROUP BY T0.[Cardcode], T0.[DocNum],T0.[CardCode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    -- ab hier werden die Gutschriften abgezogen
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0  INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
    and not exists  (
      SELECT *
      FROM CRD1 as T3
      WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
    GROUP BY  T0.[Cardcode], T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'

  • System allow to cancel the delivery  before  cancel the Billilng Doc

    Dear Guru's,
    System allow to cancel delivery Doc & Reverse PGI Before Cancel The Billing Document ,How to Control It P;ease Quide me.
    Regards.
    Rishaban.U

    i think it may happened if your item category is order related billing not delivery related billing
    check your item category in VOV7 ... check that the Billing Relevance is "A"
    hope it may help

  • System allow to cancel the delivery with cancel the Billilng Doc

    Dear Guru's,
                           System allow to cancel delivery Doc & Reverse PGI  Before Cancel The Billing Document ,How to Control It P;ease Quide me.
    Regards.
    Sundhar.U

    i think it may happened if your item category is order related billing not delivery related billing
    in VOV7 check that the Billing Relevance in your item category is "A"

  • Help in get query id for cancel query

    xmlService.cancelQuery(QueryID, m_sessionID);
    QueryResults xmlresult= xmlService.executeXMLQuery(reportRef, XMLQueryOutputFormat.SAWRowsetData, executionOptions, rp, m_sessionID);
    I want to cancel the query that is currently being executed . It requires QueryID  and sessionID but the “executeXMLQuery” returns the query id only after it has been executed. How to get the “ query id”  while the executeXMLQuery is still in process. Any one help me pls...

    with
    the_data as
    (select 'CRE' segment,'CRE - MUMBAI' units,3 total_items from dual union all
    select 'CTA','CTA - CHENNAI',13 from dual union all
    select 'CTA','CTA - DELHI',37 from dual union all
    select 'CTA','CTA - HYDERABAD',10 from dual union all
    select 'CTA','CTA - KOLKATTA',22 from dual union all
    select 'CTA','CTA - MUMBAI',110 from dual
    select segment,
           case grouping_id(segment,units) when 0
                                           then units
                                           when 1
                                           then 'Sub total'
                                           else 'Grand total'
           end units,
           sum(total_items) total_items
      from the_data
    group by rollup(segment,units)
    SEGMENT
    UNITS
    TOTAL_ITEMS
    CRE
    CRE - MUMBAI
    3
    CRE
    Sub total
    3
    CTA
    CTA - DELHI
    37
    CTA
    CTA - MUMBAI
    110
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - HYDERABAD
    10
    CTA
    Sub total
    192
    Grand total
    195
    Regards
    Etbin

Maybe you are looking for

  • I need a Kind of 3 dimensional report (not sure if it s the right term)

    Post Author: rtutus CA Forum: General Hi, I have category, Products and sales data. I want a report that displays products and categories, grouped by categoriy ID. Each category of each group has a number of products. Here is the challenge:I want the

  • Considering switching to Firefox - help!

    Whilst I do love Safari (over Explorer) I am interested in trying Firefox as everybody keeps on about how good it is! I've had a basic look and it seems fairly similar (although i like the ability to add email alert links on the brower etc and a few

  • Change language back to english

    i have adobe reader 9.2. how can i change its language back to english? Help!

  • Using Numbers to shedule sort problem

    I am using Numbers to schedule the times that groups perform at an event I am organizing. If I make a time change to a group Numbers has also tagged this with the date of my entry and this affects the sorting. Is there a way to turn this off? I have

  • Adobe Flash plugin has crashed and help pages don't solve it

    I have ensured that I have the latest version of Firefox 9.0.1 and the latest version of Flash 11,1,102,55 but now whenever I try to load a page that uses Flash it crashes. I have tried reloading the page as suggested in the help pages and disabling