Error mensage: F5734 Item 1000 should be created, a maximum 999.......

Hello Friends!!!
We're using NewGL and Document splliting actived ECC 6.0
When we're trying to execute the T-code F-51, show error mensage below:
Error mensage: F5734 Item 1000 should be created, a maximum 999 items are allowed
We selected in GL account one line item no case it can't exceed more than 999 line items
The system creates exchange rate difference lines automatically per account combination.
We want to clear this FI document, but It's impossible.
Please suggest to solve the problem
Best Regards, Delfim

Hello Delfim,
Usually the system seems to detect that an FI document shall be created with more than 999 line items (= message F5138). Then the system seems to cancel automatic postings (= message F5311).
Finally, the system concludes that item 1000 should be created and rejects the posting (= message F5734).
In order to locate the reason for this, can you please check whether the number of line items in the posting would truly exceed 999 in the entry view.
You have to add the line item for the bank account plus line items to be cleared plus line items for cash discounts plus possibly line items for VAT adjustment of cash discounts.
If the number of line items in the posting would truly exceed 999 in the entry view, please view the following notes:
note 166487
note 25727
Please check also note 36353 for further information about Summarization.
I hope it helps to resolve your problem
Best Regards,
Vanessa Barth.

Similar Messages

  • Item 1000 should be created; a maximum of 999 item

    Hi Experts,
    while creating the idoc in ECC we are getting error message Item 1000 should be created; a maximum of 999 item. this is problem is occuring when we process the large file from SAP PI. the condition is large file should not be split.
    to resovle this we have implemented SAP Note-36353 and tested the problem is not resolved.
    can you please advise the solution.
    Best Regards,
    krushi.

    Hi,
    Check below link it might help you.
    https://scn.sap.com/thread/1226684

  • FB50 upload data err."Item 1000 should be created maximum 999

    REPORT ZBDC_TAB_CTRL_FB50 . DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE. ****Header Internal Table DATA: BEGIN OF T_HEAD OCCURS 0, BLDAT(10) TYPE C, BUDAT(10) TYPE C, END OF T_HEAD. ****Detail Internal Table DATA: BEGIN OF T_DET OCCURS 0, BLDAT(10) TYPE C, BUDAT(10) TYPE C, HKONT LIKE ACGL_ITEM-HKONT, SHKZG LIKE ACGL_ITEM-SHKZG, WRBTR(16) TYPE C, END OF T_DET. DATA: T_EXCEL LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE, IDX(2) TYPE C, FNAM(20) TYPE C, FVAL(40) TYPE C. ***Internal Table for Holding Messages DATA: BEGIN OF MSGTAB OCCURS 0. INCLUDE STRUCTURE BDCMSGCOLL. DATA: END OF MSGTAB. ** Parameter for locating the .xls file PARAMETER:P_FILE TYPE RLGRAP-FILENAME OBLIGATORY. ***Selection Block for Header Section SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001. PARAMETER: PBROW_HD TYPE I, PEROW_HD TYPE I, PBCOL_HD TYPE I, PECOL_HD TYPE I. SELECTION-SCREEN : END OF BLOCK BLK1. ***Selection Block for Detail Section SELECTION-SCREEN : BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002. PARAMETER: PBROW_DT TYPE I, PEROW_DT TYPE I, PBCOL_DT TYPE I, PECOL_DT TYPE I. SELECTION-SCREEN : END OF BLOCK BLK2. ****Selecting the AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE. CALL FUNCTION 'F4_FILENAME' * EXPORTING * PROGRAM_NAME = SYST-CPROG * DYNPRO_NUMBER = SYST-DYNNR * FIELD_NAME = ' ' IMPORTING FILE_NAME = P_FILE. START-OF-SELECTION. ***Selecting data from .xls for the header data CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' EXPORTING FILENAME = P_FILE I_BEGIN_COL = PBCOL_HD I_BEGIN_ROW = PBROW_HD I_END_COL = PECOL_HD I_END_ROW = PEROW_HD TABLES INTERN = T_EXCEL EXCEPTIONS INCONSISTENT_PARAMETERS = 1 UPLOAD_OLE = 2 OTHERS = 3. IF SY-SUBRC 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ****For Header internal Table LOOP AT T_EXCEL WHERE ROW GT 0. CASE T_EXCEL-COL. WHEN 1. MOVE T_EXCEL-VALUE TO T_HEAD-BLDAT. WHEN 2. MOVE T_EXCEL-VALUE TO T_HEAD-BUDAT. ENDCASE. AT END OF ROW. APPEND T_HEAD. CLEAR T_HEAD. ENDAT. ENDLOOP. ***Selecting data from .xls for the detail data CALL fuNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' EXPORTING FILENAME = P_FILE I_BEGIN_COL = PBCOL_DT I_BEGIN_ROW = PBROW_DT I_END_COL = PECOL_DT I_END_ROW = PEROW_DT TABLES INTERN = T_EXCEL EXCEPTIONS INCONSISTENT_PARAMETERS = 1 UPLOAD_OLE = 2 OTHERS = 3. IF SY-SUBRC 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ****For Detail internal Table LOOP AT T_EXCEL WHERE ROW GT 0. CASE T_EXCEL-COL. WHEN 1. MOVE T_EXCEL-VALUE TO T_DET-BLDAT. WHEN 2. MOVE T_EXCEL-VALUE TO T_DET-BUDAT. WHEN 3. MOVE T_EXCEL-VALUE TO T_DET-HKONT. WHEN 4. MOVE T_EXCEL-VALUE TO T_DET-SHKZG. WHEN 5. MOVE T_EXCEL-VALUE TO T_DET-WRBTR. ENDCASE. AT END OF ROW. APPEND T_DET. CLEAR T_DET. ENDAT. ENDLOOP. ***Populating i_bdcdata from the header internal table LOOP AT T_HEAD . PERFORM BDC USING 'H'. ***Populating i_bdcdata from the detail internal table LOOP AT T_DET WHERE BLDAT = T_HEAD-BLDAT AND BUDAT = T_HEAD-BUDAT. PERFORM BDC USING 'D'. ENDLOOP. PERFORM POPULATE_BDCTABLE USING:'' 'BDC_OKCODE' '=BU'. CALL TRANSACTION 'FB50' USING I_BDCDATA MODE 'A' UPDATE 'A'. ENDLOOP. &---- *& Form POPULATE_BDCTABLE &---- * text ---- * -->P_0011 text * -->P_0012 text * >P_0013 text ** FORM POPULATE_BDCTABLE USING VALUE(P_FLAG) VALUE(P_FNAM) VALUE(P_FVAL). IF P_FLAG = 'X'. I_BDCDATA-PROGRAM = P_FNAM. I_BDCDATA-DYNPRO = P_FVAL. I_BDCDATA-DYNBEGIN = 'X'. ELSE. I_BDCDATA-FNAM = P_FNAM. I_BDCDATA-FVAL = P_FVAL. ENDIF. APPEND I_BDCDATA. CLEAR I_BDCDATA. ENDFORM. " POPULATE_BDCTABLE *&* *& Form BDC *&* * text *--
    * * >P_0416 text *--
    * FORM BDC USING VALUE(P_VAL). ****For Header IF P_VAL = 'H'. DATA:L_BLDAT(10) TYPE C, L_BUDAT(10) TYPE C. CLEAR:L_BLDAT,L_BUDAT. WRITE: T_HEAD-BLDAT TO L_BLDAT, T_HEAD-BUDAT TO L_BUDAT. PERFORM POPULATE_BDCTABLE USING:'X' 'SAPMF05A' '1001', ' ' 'BDC_OKCODE' '=0006', ' ' 'BDC_CURSOR' 'ACGL_ITEM-WRBTR(01)', ' ' 'ACGL_HEAD-BLDAT' L_BLDAT, ' ' 'ACGL_HEAD-BUDAT' L_BUDAT . ****For Detail ELSEIF P_VAL = 'D'. IDX = IDX + 1. IF IDX = 1. CONCATENATE 'ACGL_ITEM-HKONT(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING: ' ' FNAM T_DET-HKONT. CONCATENATE 'ACGL_ITEM-SHKZG(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING ' ' FNAM T_DET-SHKZG. CONCATENATE 'ACGL_ITEM-WRBTR(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING ' ' FNAM T_DET-WRBTR. ELSE. IF IDX > 10. IDX = 10. ENDIF. PERFORM POPULATE_BDCTABLE USING: 'X' 'SAPMF05A' '1001', ' ' 'BDC_OKCODE' '=0006'. CONCATENATE 'ACGL_ITEM-HKONT(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING: ' ' FNAM T_DET-HKONT. CONCATENATE 'ACGL_ITEM-SHKZG(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING ' ' FNAM T_DET-SHKZG. CONCATENATE 'ACGL_ITEM-WRBTR(0' IDX ')' INTO FNAM. PERFORM POPULATE_BDCTABLE USING ' ' FNAM T_DET-WRBTR. ENDIF. ENDIF. ENDFORM. " BDC
    Moderator message - Please observe the 2,500 character maximum for posts - post only the relevant portions of your code -  post locked
    Edited by: Rob Burbank on Aug 31, 2009 10:26 AM

    Hi,
    You can create 999 line items only in one Document.
    Thats the Standard.
    You have to split your data in to 999 each.
    just an example ..try to do like this......
    DO.
        CLEAR: bdcdata,gt_itab,count.
        REFRESH: bdcdata, gt_itab.
        DESCRIBE TABLE itab LINES l_line.
        IF l_line = 0.
          EXIT.
        ENDIF.
    *get 900 materials from the itab
        LOOP AT itab.
          APPEND itab TO gt_itab.
          DELETE itab.
          count = count + 1.
          IF count = 900.
            EXIT.
          ENDIF.
        ENDLOOP.
        LOOP AT gt_itab.
          AT FIRST.
            PERFORM bdc_dynpro    
          AT LAST.
            PERFORM bdc_transaction TABLES msg
                                    USING  'FB50' trans p_mode 'S'.
    error handling..
    Enddo.
    Thnx
    Rahul

  • Error in price at the time of creating SHC fro catalogue item

    Hi
    Cann anyone help me with the following problem.
    Error in price at the time of creating SHC fro catalogue item
    mentioned below article no. 0452202 then a pallet is to cost 3275,05 (you can only order min. 10 pallets).
    The system multiplies up the price by 10 & 10 and at that moment I transfer the shopping trolley it multiplies up again.
    The price for 10 pallets was gladly to be 32720,50 - Buttttttttttttt it turns into 3.272.050.
    Please help me in providing a solution for this
    Best Regards.
    sairam.

    Hi
    Please go through this ->
    Note 739562 Simplified pricing: Price 0.00 if catalog item.
    This is the standard system response as of EBP 3.5 Support Package 05 or Note 569275.
    This also depends on how you uploaded the price in the catalogs ->
    For price details you should use the following characteristics:-
    /ccm/price[1]#/ccm/amount /ccm/price[1]#/ccm/currency_code
    Perhaps you have to maintain field pricechangeable in BADi-InterfaceIF_EX_BBP_CATALOG_TRANSFER in method - ENRICH_ITEM_DATA. This will make sure you can edit the price_
    Other useful pointers ->
    Re: Price determination
    Re: free item shopping from catalogue....product with zero price
    OSS note 550071 - price for catalog product
    How to Upload Price details for a catalog in CCM 2.0
    Do let me know.
    Regards
    - Atul

  • Error : Item Category could not created.

    Hello SAP Masters,
    While creating a "sales process" in SAP CRM I've got the following error
    "Item Category could not created"
    Now let me tel you what exactly I've done, I have defined a "Sales Process" Type transaction called "Ysal" and by copying the slandered Item Category "Tan" I've created "ZTAN" , and for the Item category group and the Item Category Usage I've created "ZItem Group" and "ZItem usage".
    Now in the Item Category determination I've filled up
    Transaction Type = Ysal
    Item Cat. Group = ZItem Group
    Item Cat Usage = Zitem Usage
    Main Item Cat. = Ztan
    and under Item Category determination
    Item Category = ZTAN
    after this I've created A product Master and a ,material where I've assigned Item Category Group, and the product master.
    Now Please explain why I've got this error, as I've maintained the determination properly so in my view during transaction creation Item Category should be determined automatically.
    One more thing I am confused about "Higher Level Item Category" and "Lower Level Item Category" please explain.
    Thanks and Regards
    Rahul

    Hi,
    Thanks for your reply, as per your guidance left  the "Item Category" field blank, and also the "Main Item Category" as blank and selected my "ZTAN" in Item category.
    After that It worked, and the Item Category perfectly determined.
    But there is error for "ATP"  not checked. Can you please explain. Also please explain what is "Main Item Category".
    As you have said the higher level category is for main product, and lower level category is for dependent product like free product, then if there is scenario where no free product , in that case what should be done?
    Thanks and Regards
    Rahul
    Edited by: Rahul07 on Jan 21, 2011 7:22 PM

  • LR 5.5 upgrade. I only get the the 32 bit set up and an error when the 64 bit set up should be created. It says not enough disk space and no access to write. The disk space is ok and the 32 bit file was indeed created.

    LR 5.5 upgrade. I only get the the 32 bit set up and an error when the 64 bit set up should be created. It says not enough disk space and no access to write. The disk space is okay and the 32 bit file was indeed created. I have Windows 7 Home edition.

    Hi Rob, Thanks for your input. The temp location is on the C drive with 228 GB free space. My other drives have 123 GB and 204 GB of free space. I can see how the 32 bit set up is perfectly extracted when it stops when coming to the 64 bit set up. I have done the exercise several times and also made new downloads. I am using Norton 360 and Malwarebytes anti-malware but the dowload from Adobe should be trusted.

  • Invoice created via SUS having error -The template item 1 does not exists

    Hi All,
    We are in SRM6.0 and in our PRD system, we have few invoices created through SUS showing error "The template item 1 does not exist.
    These invoices went into "To be corrected" status and when I hit check it gives me above error message. The message itself don't make much sense to me. Please note we can create new invoice in SRM manually and everything works fine.
    Appreciate any pointers.
    Thanks, Sachin

    We have analysed the issue and found we are getting this error because these invoices are missing with "BE_LOG_SYSTEM" field in table BBP_PDBEI and "BE_REFOBJ_TYPE" field is showing "BUS2201 instead of "BUS2012".
    Any feedback why we have these difference as compare to good invoices (created directly in SRM).
    Thanks, Sachin

  • Multiple Error message at Item Level....

    Hi all,
    I have some doubt into display multiple error message from item level.
    The scenario is, I have to run some validation at each line item. If validation fails error message is population. Now suppose user ignore the error message or with that error user creating new line item and again because of validation some error occurs, then both error message should display all together but system is displaying only last message not previous one. This is happening with both the classes CL_BSP_WD_MESSAGE_SERVICE' and CL_CRM_GENIL_GLOBAL_MESS_CONT.
    But if I check same thing with standard validation all error message display all together.
    Any suggestion through which I can combined all message and display together.
    Thanks
    Gaurav

    Yes.I have tried ADD_MESSAGE method of the CL_BSP_WD_MESSAGE_SERVICE class.
    Thanks
    Gaurav
    Any suggestion from experts..
    Regards
    Gaurav
    Edited by: Gaurav Mehta on Dec 3, 2010 2:18 PM

  • My Itunes wont open - reading error "cannot be read because it was created by a newer verdion of itunes"

    My Itunes wont open - reading error "cannot be read because it was created by a newer verdion of itunes"
    should i uninstall/ reinstal.
    will i loose all my music nd playlists?

    This technique should work...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • Error Message "This Item has not been purchased"

    I just bought a brand new computer with Windows 7 and I just downloaded Itunes.  I couldn't remember my itunes password so I changed my password.  After changing my password, I changed my Email address since I was using an old one I don't have access to anymore.  After doing that I started trying to get my old purchases put on my new computer and maybe 40 songs downloaded before I got an error saying "This item has not been purchased with your Apple ID".  These songs are listed in my purchased list, I bought them on my old computer and Itunes isn't letting me download nearly 300 songs that I paid for.
    How do I fix this?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

  • PR Line Item Number should be Same for PO Line Item Numebr

    Hi Gurus,
    I have a rare Requiremenet. I will convert Only one PR to PO(So It is one to one) PR Item Number should Be Equal to PO Item Number.. can anybody suggest me is there any way to achive this.
    Explanation:
    Actually we will create third party Sale order and with A BAPI we  create PO in background.
    I will change Sales Order qty(Decrease directly or increse with schedule lines) so new PR items will be generated or Existing may be deleted. now i want my PR Item number should be equal to PO Item Number.
    In BAPI we have a provision to provide PR number still system is taking in sequential intervel of 10,20,30....
    How to overide this...
    EX:
                     PR               PO
    ItemNO      10              10
    ItemNO      30              30
    Thanks
    Pradeep

    Hi Monika,
    Thanks a lot my issue got resolved. annd i have another question regarding BAPI_PO_Change.
    Actually i am passing Price from PR to PO and i am making no_price_from_po while chenging PO and i am passing PRICE from SO to PO. Below scenario will explain My requirement.
    In third party we are creating Automatic PO from SO. we have developed one ZTrasaction for SO Approval in two stages, in second level Approval we are converting PR to PO.
    while creating we are able to pass Price value from SO to PO From Condition in the Pricing procedure.
    while changing we have 3 scenarios
    1.Changing Existing PR Item quantity
    2. Adding one more schedule line to the Existing SO so it will create one more PR Item
    3. we are adding one more Line Item in the SO in this case also one more PR Item will be generated
    we are able to convert each PR Item will be one PO line Item 
    But while changing we will have PO still we don't want to copy the Price from Previous Document.
    we have activated no_price_from_PO in the BAPI but still system is taking from previous Document.
    Pl suggest me if there anyway to over come this issue...
    Thanks
    -Pradeep

  • 'Error 30644: Page Group name should be unique' after page group is removed

    Hi, I have removed a page group with name 'X'. But when i tried to create a new page group with the same name 'X', i encountered the following error message:
    'Error 30644: Page Group name should be unique'
    What could i do to create page group with the same name 'X'?
    Thanks for any replies!

    I just tried this on a 9.0.2.2.14 version and was able to add, delete, and add again witout an error. It is possible that there was some kind of error during the delete which caused a row in the DB to remain. Unfortunately, there is no way to be sure without delving into the tables and looking for the 'deleted' page group. Not recommended unless absolutely critical. Given that the display name is what is typically shown in most screens, is it reasonable for you to name the new one X1 with a display name of X? If so, that's the safest bet.

  • Exchange 2010 SP3 - How many Calendar Items/Folders can you create under "all public folder"

    Hi,
    Is there a limitation on how many calendar items/folders you can create under "all public folder" in Exchange 2010 SP3?
    Thank you

    I don't believe you can create calendar items under the root folder, but it's been so long since I worked with a system that had public folders that I'm not sure.  If you mean "a folder that can contain calendar items", that is not a calendar
    item itself.
    Now, I believe your underlying question is, "How many folders can be created at the root level of the public folder hierarchy?"  If so, there is no simple limit that I know of (you can have thousands, if you really want), but management gets
    pretty unruly with the more that you have.  I normally recommend that you create sub-folders to logically meet your requirements, then have each of these with more folders (normally that only specific groups of users will be able to access or add items
    to).  And anyone will tell you that you want to restrict anyone from creating their own folders at the root level.  In fact, this is the default setting for a new Exchange 2010 installation.
    I'll add that you really should stop trying to use public folders, since there are newer technologies (SharePoint, for instance) that work much better and are much easier to use.

  • In MIGO  I have error."No Item Catagory exists Table T184L HID NORM V)

    Hi
    Stuck in MIGO , Po created with and  while processing MIGO I am getting the following error."No Item Catagory exists Table T184L HID NORM V)
    I am using Retail , maintained Item catagory group but still I am facing with this error ..

    Resolved the issue with  0184

  • ORA-01785 error :ORDER BY item must be the number of a SELECT-list expressi

    When i'm sorting on a calculated field i'm getting the following error:
    ORDER BY item must be the number of a SELECT-list expression
    Please any help?
    Thanks

    Here is the query, but its generated by the disco plus:
    WITH
    DISC_TMP_090921083714 as (
    SELECT /*+ NOREWRITE */DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') as C_1,o787901.INVOICE_DT as E787916,SUM(o787901.USED_AMOUNT) as E787915_SUM,( SUM(o787901.PS_QTY) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_4,( 0.8*( SUM(o787901.PS_QTY) ) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_5,( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) as C_3,0.8*( SUM(o787901.PS_QTY) ) as C_2,SUM(o787901.PS_QTY) as E787907_SUM,( ( SUM(o787901.ENCUMB_AMNT) )/( SUM(o787901.ORIGINAL_AMOUNT) ) ) as C_6,SUM(o787901.ORIGINAL_AMOUNT) as E787909_SUM,( SUM(o787901.ENCUMB_AMNT) )-( SUM(o787901.PO_PAYMNTS) ) as C_7,SUM(o787901.PO_PAYMNTS) as E787905_SUM,SUM(o787901.ENCUMB_AMNT) as E787908_SUM
    FROM ( select sum(t1.AMOUNT) po_paymnts,
    (t2.ORIGINAL_AMOUNT/t2.PS_QTY) unit_cost_1,
    t1.PO_NO,
    t2.PS_QTY,
    t2.AMOUNT encumb_amnt,
    t2.ORIGINAL_AMOUNT,
    T2.class district,
    0 owner_id,
    0 stock_id,
    0 received_amount,
    0 curr_amount,
    0used_amount,
    to_char(add_months(t1.INVOICE_DT,6),'YYYY') invoice_dt,
    0 unit_cost
    from dwtarget.dw_ps_all_payments_fact t1,dwtarget.dw_ps_ap_po_rq_fact t2
    where t1.PO_NO=t2.PS_NO
    and t1.LINE_NO=t2.PS_LINE
    and t2.OBJECT in ('545000','545001')
    group by t1.PO_NO,T2.class,t2.PS_QTY,t2.AMOUNT,t2.ORIGINAL_AMOUNT,t2.class,to_char(add_months(t1.INVOICE_DT,6),'YYYY')
    union all
    select 0 unit_cost_1,0 po_paymnts,to_char(0) po_no,0 ps_qty,0 encumb_amnt,0 original_amount,to_char(t2.owner_cat) district, t1.owner_id, stock_id,
    sum(received_amount) received_amount,
    sum(curr_amount) curr_amount,
    sum(used_amount) used_amount,
         date_work,
    unit_cost
         from
    (select owner_id_to owner_id,stock_id_to stock_id,sum(full_amount) received_amount,0 curr_amount,0 used_amount,null date_work,unit_cost
    from dwtarget.dw_wms_mat_transfer
    where master_code_id in ('8664','8665')
    and unit_id='724'
    group by owner_id_to,stock_id_to,unit_cost
    union all
    select owner_id,stock_id,0 received_amount,sum(curr_amount) curr_amount,0 used_amount,null date_work,0 unit_cost
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id
    union all
    select t2.owner_id, t1.stock_id, 0 received_amt, 0 curr_amt, sum(amount) used_amt,to_char(add_months(date_work,6),'YYYY') date_work,0 unit_cost
    from dwtarget.dw_wms_wo_mat_dc t1,
    (select owner_id,stock_id
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id)t2
    where t1.stock_id = t2.stock_id
    and unit_id='724'
    group by t2.owner_id, t1.stock_id,to_char(add_months(date_work,6),'YYYY')) t1,
    dwtarget.dw_wms_setup_owner t2
    where t1.owner_id = t2.owner_id
    group by t2.owner_cat,t1.owner_id,stock_id,date_work,unit_cost
    ) o787901
    GROUP BY DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes'),o787901.INVOICE_DT
    HAVING (( SUM(o787901.PS_QTY) ) != 0))
    SELECT C_1 as C_1,E787916 as E787916,E787915_SUM as E787915_SUM,C_4 as C_4,C_5 as C_5,C_3 as C_3,C_2 as C_2,E787907_SUM as E787907_SUM,C_6 as C_6,E787909_SUM as E787909_SUM,C_7 as C_7,E787905_SUM as E787905_SUM,E787908_SUM as E787908_SUM, 0
    FROM DISC_TMP_090921083714
    UNION ALL
    SELECT /*+ NOREWRITE */C_1 as C_1,E787916 as E787916,E787915_SUM as E787915_SUM,C_4 as C_4,C_5 as C_5,C_3 as C_3,C_2 as C_2,E787907_SUM as E787907_SUM,C_6 as C_6,E787909_SUM as E787909_SUM,C_7 as C_7,E787905_SUM as E787905_SUM,E787908_SUM as E787908_SUM, GID as GID FROM (SELECT DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') as C_1,o787901.INVOICE_DT as E787916,SUM(o787901.USED_AMOUNT) as E787915_SUM,( SUM(o787901.PS_QTY) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_4,( 0.8*( SUM(o787901.PS_QTY) ) )-( ( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) ) as C_5,( SUM(o787901.PO_PAYMNTS) )/( CASE WHEN ( SUM(o787901.UNIT_COST) ) = 0 THEN ( ( SUM(o787901.ORIGINAL_AMOUNT) )/( SUM(o787901.PS_QTY) ) ) ELSE ( SUM(o787901.UNIT_COST) ) END ) as C_3,0.8*( SUM(o787901.PS_QTY) ) as C_2,SUM(o787901.PS_QTY) as E787907_SUM,( ( SUM(o787901.ENCUMB_AMNT) )/( SUM(o787901.ORIGINAL_AMOUNT) ) ) as C_6,SUM(o787901.ORIGINAL_AMOUNT) as E787909_SUM,( SUM(o787901.ENCUMB_AMNT) )-( SUM(o787901.PO_PAYMNTS) ) as C_7,SUM(o787901.PO_PAYMNTS) as E787905_SUM,SUM(o787901.ENCUMB_AMNT) as E787908_SUM,GROUPING_ID(( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT) as GID
    FROM ( select sum(t1.AMOUNT) po_paymnts,
    (t2.ORIGINAL_AMOUNT/t2.PS_QTY) unit_cost_1,
    t1.PO_NO,
    t2.PS_QTY,
    t2.AMOUNT encumb_amnt,
    t2.ORIGINAL_AMOUNT,
    T2.class district,
    0 owner_id,
    0 stock_id,
    0 received_amount,
    0 curr_amount,
    0used_amount,
    to_char(add_months(t1.INVOICE_DT,6),'YYYY') invoice_dt,
    0 unit_cost
    from dwtarget.dw_ps_all_payments_fact t1,dwtarget.dw_ps_ap_po_rq_fact t2
    where t1.PO_NO=t2.PS_NO
    and t1.LINE_NO=t2.PS_LINE
    and t2.OBJECT in ('545000','545001')
    group by t1.PO_NO,T2.class,t2.PS_QTY,t2.AMOUNT,t2.ORIGINAL_AMOUNT,t2.class,to_char(add_months(t1.INVOICE_DT,6),'YYYY')
    union all
    select 0 unit_cost_1,0 po_paymnts,to_char(0) po_no,0 ps_qty,0 encumb_amnt,0 original_amount,to_char(t2.owner_cat) district, t1.owner_id, stock_id,
    sum(received_amount) received_amount,
    sum(curr_amount) curr_amount,
    sum(used_amount) used_amount,
         date_work,
    unit_cost
         from
    (select owner_id_to owner_id,stock_id_to stock_id,sum(full_amount) received_amount,0 curr_amount,0 used_amount,null date_work,unit_cost
    from dwtarget.dw_wms_mat_transfer
    where master_code_id in ('8664','8665')
    and unit_id='724'
    group by owner_id_to,stock_id_to,unit_cost
    union all
    select owner_id,stock_id,0 received_amount,sum(curr_amount) curr_amount,0 used_amount,null date_work,0 unit_cost
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id
    union all
    select t2.owner_id, t1.stock_id, 0 received_amt, 0 curr_amt, sum(amount) used_amt,to_char(add_months(date_work,6),'YYYY') date_work,0 unit_cost
    from dwtarget.dw_wms_wo_mat_dc t1,
    (select owner_id,stock_id
    from dwtarget.dw_wms_mat_inv
    where master_code_id in ('8664','8665')
    group by owner_id,stock_id)t2
    where t1.stock_id = t2.stock_id
    and unit_id='724'
    group by t2.owner_id, t1.stock_id,to_char(add_months(date_work,6),'YYYY')) t1,
    dwtarget.dw_wms_setup_owner t2
    where t1.owner_id = t2.owner_id
    group by t2.owner_cat,t1.owner_id,stock_id,date_work,unit_cost
    ) o787901
    WHERE ( SYS_OP_MAP_NONNULL(DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes')) , SYS_OP_MAP_NONNULL(o787901.INVOICE_DT) ) IN ( SELECT SYS_OP_MAP_NONNULL(C_1) , SYS_OP_MAP_NONNULL(E787916) FROM DISC_TMP_090921083714)
    GROUP BY GROUPING SETS(( ( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT ),( ( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ) ))
    HAVING GROUP_ID()=0
    AND GROUPING_ID(( DECODE(( DECODE(( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') ),NULL,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )||o787901.DISTRICT,( DECODE(o787901.DISTRICT,'1000','D10','2000','D20','3000','D30','4000','D40','5000','D50','6000','D60') )) ),'D10','Crawfordsville','D20','Fort Wayne','D30','Greenfield','D40','LaPorte','D50','Seymour','D60','Vincennes') ),o787901.INVOICE_DT) != 0)
    ORDER BY 14 DESC;
    Thanks

Maybe you are looking for