Selective ordering of item after bid creation

Is it possible for me to create a bid as a strategic purchaser in SRM for item 'X' where in i invite 2 suppliers( A & B) & during processing i accept both bids , ordering 40 % of item 'X' from supplier A and the remaining 60 % from supplier B.?

Hi,
Yes , it is possible.
When the vendor submits the bid , during the processing of the bids
you  have ACCEPT both the vendor s bid and you can raise P.O.
It all depends on the client requirements
Regards
G.Ganesh Kumar

Similar Messages

  • Possible to delete SC item after PO creation?

    Dear all
    We use Extended classic. I need a piece of info.
    I am able to delete the SC item after PO creation..! Is it allowed as per general business scenario. Is it possible to delete SC items after PO creation?
    How to curb this?
    Please share your valuable knowledge in this regards
    Thanks in advance
    Krupa

    Hello,
    As per standard design, it is possible to delete a shopping cart if only                 
    one follow-on document exists. For example, a purchase order or a                        
    purchase requisition.                                                                               
    When you delete the shopping cart in EBP, the deletion indicator will                    
    be set in the purchase order.                                                                               
    You cannot delete the shopping cart if the follow-on document has other                  
    follow-on documents, like confirmation or invoice.                                                                               
    The following is the standard behaviour for SC/limit SC deletion:                                                                               
    SC -> PO : deletion possible                                                             
    SC -> PReq: deletion possible                                                            
    SC -> PReq + PO: deletion NOT possible                                                   
    SC -> PO + CF: deletion NOT possible                                                     
    SC -> PReq + PO + CF: deletion NOT possible                                              
    SC -> PO + CF + INV: deletion NOT possible                                               
    SC -> PReq + PO + CF + INV: deletion NOT possible                                                                               
    Standard logic: in general SC does not prevent the deletion of SC items                  
    just because of existence of follow-on documents.                                        
    The SC item itself does not know if the deletion is possible.                            
    It just tries to delete the corresponding item of follow-on document.                    
    If this deletion has been successful, then also the SC item can                          
    and will be deleted. If the deletion of follow-on document item has                      
    failed, the SC item deletion is not possible.                                            
    So it is a task of follow-on document to know if its items can be                        
    deleted or not.                                                                          
    Best regards,
    Ricardo

  • Sale order 'value changes' after invoice creation

    Experts,
    A sale order was created / shipped / invoiced. The invoice did not go to accounting because of credit auth error. We have a procedure to fix it and then release it to accounting (transaction VFX3). All OK until this point.
    While fixing the auth error, an user changed the freight condition value in the sale order. Then invoice is released to accounting. Now, the value of freight in order and invoice match. How is it possible to change the value of an invoice after its creation?
    Any input would be appreciated.
    UV

    when the value is changed in the sale order, it would automatically transfer
       the new pricing to the existing open SD invoice pending accounting entry??
    Certainly not.  The control is in VTFL where if you select the billing item category for the combination of your delivery type and billing type, you can see a field "Pricing Type".  If you maintain any value other than "B", system will copy the price from sale order to billing and you can, as I said above, can change manually in billing.  On the other hand, if you have maintained "B" in the above field, system will not  consider sale order price but will check your pricing condition maintained in VK11 which you can check in VK12 or VK13.
    thanks
    G. Lakshmipathi

  • Insertion of contract in PO item after invoice creation

    Hello,
    Can any help me on this topic.
    I have a PO item which is already invoiced. After that, we cancel the invoice and we want to add a contract to that PO item. But the field "Contract" in ME22N is disabled.
    Can anyone help me on this plz?
    Thanks in advance.
    Anusha

    HI,
    Check the PO Screen layout-Field settings.
    This can be done by checking the Screen Layout out ,for the document type you want to Update the contact.
    See that in the screen layout and then go to the screen layout config (Material Management->Purchasing-> Purchase order->Define Screen Layout.)
    at the in the option -> selection group-->outline agreement-
    make the setting that it is optional entry.
    also check if there is a field setting done for Me22/ Me22n ( Since at some times the Screen layout is also mantained at T code level)
    make the setting that it is optional entry.
    Hope so this would help.
    Regards
    Anjanna

  • Custom itemRenderer in a F3 ComboBox on specific list items after combobox creation

    Hi,
    I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox  gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..
    I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.
    Thanks in advance for any help
    J

    Hi,
    If I understand correctly, you can create you comboBox with all items at the begining:
    http://blog.flexexamples.com/2007/08/18/displaying-icons-in-a-flex-combobox-control/
    After that, base on user task, you can filter you comboBox:
    http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in-a-datagrid-in- flex/
    In this way you don't see the delay.
    Johnny
    Please rate answers.

  • Sales Order Line Item Details

    Hi Experts,
    Is there anyone knows in what variable or table does the line item number of the selected sales order line item after selecting any commands in Va01 transaction?
    Points will be rewarded...
    thanks in advance

    Most likely in the user exits you cannot know what line has been selected on the screen. Normally VBAP-POSNR has the line number of the line being currently processed, but it's not the same line that user selected (i.e. clicked on) on the screen.
    I think you can only get this information in the screen's PAI (I might be wrong though). If you need to pass this information further you could fill in a global variable in the screen's exit and then use it later in other user exits.

  • IDOC creation after the creation of a purchase order

    Hi everybody,
                I want some configuration details regardign IDOC creation. The requirement is, once i create a purchase order in one system, the details should automatciaclly transfer to other system through IDOC. could any one suggest any document or detailed procedure to accomplish the task. Thanks in advance,
             Santosh.

    hi santosh kumar,
    Creating an IDoc Segment WE31:
    The segment defines the structure of the records in an IDoc. They are defined with transaction WE31.
    We will define a structure to send a text from the text database.
    Transaction WE31 calls the IDoc segment editor. The editor defines the fields of a
    single segment structure. The thus defined IDoc segment is then created as a data
    dictionary structure. You can view the created structure with SE11 and use it in an
    ABAP as any TABLES declaration.
    To demonstrate the use of the IDoc segment editor we will set up an example, which
    allows you to send a single text from the text pool (tables STXH and STXL) as an
    IDoc. These are the texts that you can see with SO10 or edit from within many
    applications.
    We will show the steps to define an IDoc segment YAXX_THEAD with the DDic
    structure of THEAD.
    To facilitate our work, we will use the "copy-from-template-tool", which reads the
    definition of a DDIC structure and inserts the field and the matching definitions as
    rows in the IDoc editor. You could, of course, define the structure completely
    manually, but using the template makes it easier.
    The tool in release 4.0b lets you use both DDIC structures or another IDoc segment
    definition as a template.
    The thus created structure can be edited any time. When saving, it will create a data
    dictionary structure based on the definition in WE31. The DDIC structure will retain
    the same name. You can view the structure as a table definition with SE11 and use it
    in an ABAP the same way.
    Defining the Message Type (EDMSG)
    The message type defines the context under which an IDoc is transferred to its destination. It allows for using the same IDoc file format for several different applications.
    Imagine the situation of sending a purchase order to a supplier. When the IDoc with
    the purchase order reaches the supplier, it will be interpreted as a sales order
    received from a customer, namely you.
    Simultaneously you want to send the IDoc data to the supplier's warehouse to inform
    it that a purchase order has been issued and is on the way.
    Both IDoc receivers will receive the same IDoc format; however, the IDoc will be
    tagged with a different message type. While the IDoc to the supplier will be flagged
    as a purchase order (in SAP R/3 standard: message type = ORDERS), the same IDoc
    sent to the warehouse should be flagged differently, so that the warehouse can
    recognize the order as a mere informational copy and process it differently than a
    true purchase order.
    The message type together with the IDoc type determine the processing function.
    The message types are stored in table EDMSG.
    Defining the message type can be done from the transaction WEDI
    EDMSG: Defining the message type (1)
    The entry is only a base entry which tells the system that the message type is
    allowed. Other transactions will use that table as a check table to validate the entry.
    IT is as shown .
    EDMSG: Defining the message type (1):
    The entry is only a base entry which tells the system that the message type is
    allowed. Other transactions will use that table as a check table to validate the entry.
    Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
    Requirement:
    Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
    Processing:
    The report selects, 'ORDERS' IDoc numbers & status, generated between given time range, from table EDIDC. Further, it calls Function Module 'IDOC_READ_COMPLETELY' to get the IDoc details. Then required information is extracted by reading relevant field data of IDoc segments.
    sampl code:
    REPORT  Z_EDI_FILE_LOAD_STATUS_REPORT           .
    Staus Report for Inbound IDOCs ( Sales Orders )
    Program        : Z_EDI_FILE_LOAD_STATUS_REPORT
    Presented By   : www.rmtiwari.com
    TABLES : EDIDC.
    ALV stuff
    TYPE-POOLS: SLIS.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          GS_LAYOUT   TYPE SLIS_LAYOUT_ALV,
          GT_SORT     TYPE SLIS_T_SORTINFO_ALV,
          GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA : BEGIN OF T_REPORT OCCURS 0,
             IDOC_NO       TYPE EDI_DOCNUM,
             IDOC_DATE     TYPE SY-DATUM,
             IDOC_TIME     TYPE SY-UZEIT,
             SORDER_NO     TYPE VBELN,
             STP_NO        TYPE KNA1-KUNNR,
             STP_NAME(35)  TYPE C,
             STP_PHONE(12) TYPE C,
             PO_NO(15)     TYPE C,
             STATUS        TYPE C,
             S_TEXT(70)    TYPE C,
             ERROR(70)     TYPE C,
           END OF T_REPORT.
    --PARAMETER--
    selection-screen begin of block date with frame title TEXT-S01.
    select-options: UDATE for  EDIDC-UPDDAT
                          default SY-datum obligatory,    "Changed On
                    UTIME for  EDIDC-UPDTIM .             "Changed Time
    selection-screen end   of block date.
    INITIALIZATION.
    START-OF-SELECTION.
    PERFORM SHOW_STATUS_REPORT.
    *&      Form  alv_grid
          text
    -->   p1        text
    < --  p2        text
    FORM ALV_GRID.
      IF GT_FIELDCAT[] IS INITIAL.
        PERFORM FIELDCAT_INIT.
        PERFORM LAYOUT_INIT.
        PERFORM SORT_INIT.
      ENDIF.
      PERFORM GRID_DISPLAY.
    ENDFORM.                    "alv_grid
    *&      Form  layout_init
    FORM LAYOUT_INIT.
      GS_LAYOUT-ZEBRA             = 'X'.
      GS_LAYOUT-CELL_MERGE        = 'X'.
      GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      GS_LAYOUT-NO_VLINE          = ' '.
      GS_LAYOUT-TOTALS_BEFORE_ITEMS = ' '.
    ENDFORM.                    " layout_init
    *&      Form  fieldcat_init
    FORM FIELDCAT_INIT.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'IDOC_NO'.
      LS_FIELDCAT-KEY          = 'X'.
      LS_FIELDCAT-REPTEXT_DDIC = 'IDOC'.
      LS_FIELDCAT-OUTPUTLEN    = 10.
    Fix for ALV print bug, which puts 'N/A' over last digit
    Set inttype to 'N' to stop corruption of printed ALV cell.
      LS_FIELDCAT-INTTYPE = 'N'.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'IDOC_DATE'.
      LS_FIELDCAT-REPTEXT_DDIC = 'Creation Date'.
      LS_FIELDCAT-OUTPUTLEN    = 10.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'IDOC_TIME'.
      LS_FIELDCAT-REPTEXT_DDIC = 'Creation Time'.
      LS_FIELDCAT-OUTPUTLEN    = 8.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'STATUS'.
      LS_FIELDCAT-REPTEXT_DDIC = 'St'.
      LS_FIELDCAT-OUTPUTLEN    = 2.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'ERROR'.
      LS_FIELDCAT-REPTEXT_DDIC = 'Message'.
      LS_FIELDCAT-OUTPUTLEN    = 70.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'STP_NO'.
      LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party No'.
      LS_FIELDCAT-OUTPUTLEN    = 10.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'STP_NAME'.
      LS_FIELDCAT-REPTEXT_DDIC = 'Sold to Party Name'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PO_NO'.
      LS_FIELDCAT-REPTEXT_DDIC = 'Purch Order'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'STP_PHONE'.
      LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party Phone'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      APPEND LS_FIELDCAT TO GT_FIELDCAT.
    ENDFORM.                    "fieldcat_init
    *&      Form  sort_init
    FORM SORT_INIT.
      DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
      CLEAR LS_SORT.
      LS_SORT-FIELDNAME = 'IDOC_DATE'.
      LS_SORT-SPOS      = 1.
      LS_SORT-UP        = 'X'.
      APPEND LS_SORT TO GT_SORT.
      CLEAR LS_SORT.
      LS_SORT-FIELDNAME = 'IDOC_TIME'.
      LS_SORT-SPOS      = 2.
      LS_SORT-UP        = 'X'.
      APPEND LS_SORT TO GT_SORT.
      CLEAR LS_SORT.
      LS_SORT-FIELDNAME = 'STATUS'.
      LS_SORT-SPOS      = 3.
      LS_SORT-UP        = 'X'.
      APPEND LS_SORT TO GT_SORT.
      CLEAR LS_SORT.
      LS_SORT-FIELDNAME = 'IDOC_NO'.
      LS_SORT-SPOS      = 4.
      LS_SORT-UP        = 'X'.
      APPEND LS_SORT TO GT_SORT.
    ENDFORM.                    "sort_init
    *&      Form  grid_display
    FORM GRID_DISPLAY.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IS_LAYOUT     = GS_LAYOUT
          IT_FIELDCAT   = GT_FIELDCAT
          IT_SORT       = GT_SORT
          i_callback_program      = SY-REPID
          I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
          I_DEFAULT     = ' '
          I_SAVE        = 'X'
        TABLES
          T_OUTTAB      = T_REPORT
        EXCEPTIONS
          PROGRAM_ERROR = 1
          OTHERS        = 2.
    ENDFORM.                    "grid_display
    *&      Form  COMMENT_BUILD
          Processing of listheader
    FORM COMMENT_BUILD USING P_FK_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
      REFRESH P_FK_LIST_TOP_OF_PAGE.
    List Heading : Typ H
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO  = 'Sales Order Interface: Z_EDI_FILE_LOAD'.
      APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
    List : Typ S
      clear LS_LINE.
      LS_LINE-typ  = 'S'.
      LS_LINE-key  = 'Date Range:'.
      LS_LINE-info  = UDATE-low.
      if not UDATE-high is initial.
        write ' To ' to  LS_LINE-info+30.
        LS_LINE-info+36 = UDATE-high.
      endif.
      APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
    ENDFORM.                               " COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
          Ereigniss TOP_OF_PAGE                                       *
          event     TOP_OF_PAGE
    FORM TOP_OF_PAGE.
      PERFORM COMMENT_BUILD  USING gt_LIST_TOP_OF_PAGE[].
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  show_status_report
    FORM SHOW_STATUS_REPORT .
    Report to show status.
      DATA: BEGIN OF T_TEDS2 OCCURS 0.
              INCLUDE STRUCTURE TEDS2.
      DATA: END OF T_TEDS2.
      DATA: BEGIN OF T_IDOC_CONTROL_TMP OCCURS 0.
              INCLUDE STRUCTURE EDIDC.
      DATA: END OF T_IDOC_CONTROL_TMP.
      CONSTANTS: C_STATUS_IN_IDOC_POSTED       LIKE EDIDC-STATUS VALUE '53'.
      DATA : T_EDIDS TYPE STANDARD TABLE OF EDIDS WITH HEADER LINE.
      DATA : T_EDIDD TYPE STANDARD TABLE OF EDIDD WITH HEADER LINE.
      DATA : GV_PARTNER_SEG TYPE E1EDKA1,
             GV_PO_REF_SEG  TYPE E2EDK02.
    Get text for status values
      SELECT * FROM TEDS2 INTO TABLE T_TEDS2 WHERE LANGUA = SY-LANGU.
    Read the IDoc's status after processing
      SELECT * FROM EDIDC
        INTO TABLE T_IDOC_CONTROL_TMP
       WHERE UPDDAT IN UDATE
         AND UPDTIM IN UTIME
         AND MESTYP = 'ORDERS'.
      LOOP AT T_IDOC_CONTROL_TMP.
      IDoc has been processed, since control record changed.
        READ TABLE T_TEDS2 WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
        T_REPORT-IDOC_NO = T_IDOC_CONTROL_TMP-DOCNUM.
        T_REPORT-IDOC_DATE = T_IDOC_CONTROL_TMP-CREDAT.
        T_REPORT-IDOC_TIME = T_IDOC_CONTROL_TMP-CRETIM.
        T_REPORT-S_TEXT = T_TEDS2-DESCRP.
        IF T_IDOC_CONTROL_TMP-STATUS = C_STATUS_IN_IDOC_POSTED.
        ok status
          T_REPORT-STATUS = 'S'.
        ELSE.
        error status
          T_REPORT-STATUS = 'E'.
        ENDIF.
        Get IDoc details.
        CALL FUNCTION 'IDOC_READ_COMPLETELY'
          EXPORTING
            DOCUMENT_NUMBER         = T_REPORT-IDOC_NO
          TABLES
            INT_EDIDS               = T_EDIDS
            INT_EDIDD               = T_EDIDD
          EXCEPTIONS
            DOCUMENT_NOT_EXIST      = 1
            DOCUMENT_NUMBER_INVALID = 2
            OTHERS                  = 3.
      Get Error status
        READ TABLE T_EDIDS WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
        IF SY-SUBRC EQ 0.
          REPLACE FIRST OCCURRENCE OF '&1' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA1.
          REPLACE FIRST OCCURRENCE OF '&2' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA2.
          REPLACE FIRST OCCURRENCE OF '&3' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA3.
          REPLACE FIRST OCCURRENCE OF '&4' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA4.
          REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA1.
          REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA2.
          REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA3.
          REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
                                WITH T_EDIDS-STAPA4.
          T_REPORT-ERROR = T_EDIDS-STATXT.
        ENDIF.
        LOOP AT T_EDIDD.
          CASE T_EDIDD-SEGNAM.
            WHEN 'E1EDKA1'.
              GV_PARTNER_SEG = T_EDIDD-SDATA.
              CLEAR : T_REPORT-STP_NAME.
              CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  INPUT  = GV_PARTNER_SEG-PARTN
                IMPORTING
                  OUTPUT = T_REPORT-STP_NO.
              SELECT SINGLE NAME1 TELF1
                INTO (T_REPORT-STP_NAME,T_REPORT-STP_PHONE)
                FROM KNA1
               WHERE KUNNR = T_REPORT-STP_NO.
            WHEN 'E1EDK02'.
              GV_PO_REF_SEG = T_EDIDD-SDATA.
              T_REPORT-PO_NO = GV_PO_REF_SEG-BELNR.
          ENDCASE.
        ENDLOOP.
        APPEND T_REPORT.
      ENDLOOP .
      SORT T_REPORT BY STATUS IDOC_NO.
    Show Report
      PERFORM ALV_GRID.
    ENDFORM.                    " show_status_report
    thanks
    karthik
    reward me points if usefull.

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

    I have a dynamic SQL on a page. The SQL is dynamic because there are 3 LOV fields from which the user may make selections, and those field values are used in the WHERE clause. Also, the 2nd LOV field is populated with AJAX based on the 1st LOV's selection. And, the SQL joins to another table. The report has 7 sortable columns. The main table the SQL runs over has about 1,000 rows in it.
    The 2nd table has about 500 rows. (Sorry, I'm not sure what information you might need to help me, so I listed several details.)
    The application, and page, have been working flawlessly for several weeks. Then, yesterday the page was being used and the user received the "ORA-01785: ORDER BY item must be the number of a SELECT-list expression" error. The error just appeared out of the blue, so to speak. After weeks of of usage this is the first time this error has appeared. The application had not been changed, but they had been entering data into the main table and the table joined to in the SQL. The application is in production, so I can't put the application into DEBUG, etc. to see what SQL is being built.
    Anyway, I was trying to debug the page today and was doing selections and seeing what would display, then as suddenly as the page quit working it started working correctly. No code changes made, no server changes made (to my knowledge), and no data changes made.
    I'm new to both Oracle and Apex, and am not a SQL, Oracle or Apex expert. So, I am very perplexed and don't have any idea of what could be happening.
    I don't know if it's an issue with the SQL, AJAX not loading the select fields properly, a corrupted table, a server load issue, or something else all together.
    Any suggestions?
    Also, I'm not familiar with Oracle error messages. Can they be red herrings sometimes? Because, I don't programmaticly code the ORDER BY of the SQL. Apex appends that part. So, how could that aspect quit working. And, then suddenly start working.
    Sorry, but I'm extremely confused. :-) Any suggestions or help will be greatly appreciated.
    Thanks, Tony

    Hi Dan,
    Thanks for the feedback. I'm not going to be dogmatic about possible cause, but it has myself and another Oracle developer (who writes SQL and PL/SQL in his sleep) stumped. He doesn't think it's the SQL. Your suggestion was one of the first things we thought of considering the error message we got, but from Scott's reply that it could be a red herring, and after additional testing we've ruled the SQL out for now.
    I understand what you're saying, but the SQL selects all the columns (about 40 columns are selected) that are sortable columns on the report. I've sorted by all the columns by clicking on them and that aspect works without error.
    The SQL is created dynamically and is quite large. I've included below just for information purposes.
    Thanks, Tony
    = = = = = = =
    DECLARE
    q VARCHAR2 (4000);
    BEGIN
    q := 'select ';
    q := q || 'hd."ID", hd."MODEL", hd."YEAR", hd."HIN", hd."BOAT_STATUS", hd."SPECIAL_ACTIVITY", hd."PARTIAL_KIT_VALUE",
    hd.OPTION_NUMBER || '' - '' || e.DESCRIPTION OPTION_NUMBER,
    hd."OPTIONS_HOURS", hd."OPTIONS_MATERIAL", hd."STATION", hd."ACTIVITY_COMMENT", hd."BI_EQUIV_MATERIAL",
    hd."BI_EQUIV_LABOR", hd."EI_EQUIV_MATERIAL", hd."EI_EQUIV_LABOR", hd."BASE_BOAT", hd."SA_ENGINES",
    hd."SA_OPTIONS", hd."DY_STANDARD_MATERIAL", hd."DY_STANDARD_LABOR", hd."DY_STANDARD_OVERHEAD",
    hd."DY_STANDARD_ENGINE", hd."DY_ENGINE_ENGINEUP", hd."DY_ENGINE_MATERIAL", hd."DY_ENGINE_LABOR",
    hd."DY_ENGINE_OVERHEAD", hd."DY_OPTIONS_MATERIAL", hd."DY_OPTIONS_LABOR", hd."DY_OPTIONS_OVERHEAD", hd."EI_STANDARD_UNITS", hd."EI_STANDARD_MATERIAL", hd."EI_STANDARD_LABOR", hd."EI_STANDARD_OVERHEAD", hd."EI_STANDARD_ENGINE", hd."EI_ENGINE_ENGINEUP", hd."EI_ENGINE_MATERIAL", hd."EI_ENGINE_LABOR", hd."EI_ENGINE_OVERHEAD", hd."EI_OPTIONS_MATERIAL", hd."EI_OPTIONS_LABOR", hd."EI_OPTIONS_OVERHEAD",
    htmldb_item.hidden(50,hd.ID) idalias ';
    q := q || 'from "PLP_HIN_DETAIL" hd , "PLP_ENGINES" e ';
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    AND :P10_SEARCH_MODEL <> '%null%'
    AND :P10_SEARCH_YEAR IS NOT NULL
    AND :P10_SEARCH_YEAR <> '%null%'
    AND :P10_SEARCH_STATUS IS NOT NULL
    AND :P10_SEARCH_STATUS <> '%null%'
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    AND instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    ELSE
    IF
    :P10_SEARCH_MODEL IS NOT NULL
    OR :P10_SEARCH_YEAR IS NOT NULL
    OR :P10_SEARCH_STATUS IS NOT NULL
    THEN
    q := q || 'WHERE
    (instr(upper(hd.MODEL),upper(nvl(:P10_SEARCH_MODEL,hd.MODEL))) > 0
    AND instr(upper(hd.YEAR),upper(nvl(:P10_SEARCH_YEAR,hd.YEAR))) > 0
    or instr(upper(hd.BOAT_STATUS),upper(nvl(:P10_SEARCH_STATUS,hd.BOAT_STATUS))) > 0)
    AND e.OPTION_NUMBER (+) = hd.OPTION_NUMBER and e.YEAR (+) = hd.YEAR AND e.MODEL (+) = hd.MODEL AND e.PLP_ID (+) = hd.PLP_ID';
    else
    q := q || 'WHERE e.option_number = hd.option_number and e.year = hd.year and e.model = hd.model and e.plp_id = hd.plp_id';
    END IF;
    END IF;
    q := q || ' AND :P0_PLP_ID = hd.PLP_ID';
    return q;
    END;

  • Purchase Order Line Item Creation DATE ?

    Hi All ,
    How can we fine the Line item creation date in PO ? I know EKPO-AEDAT but that is chaged date and its get updated if you chage the line Item after creating it . I need creation date for a perticular Line Item how can we get that ?. thanks in advance , I'll reward if useful.
    Thanks ,
    Lucky.

    Item creation is same as Order date of schedule line
    EKET-BEDAT
    Thanks
    Seshu

  • ATP after Sales Order Line Item Configuration

    Hello experts,
    I have a question regarding the ATP at the time of Sales Order entry. I am in the process of creating a technical spec for creation of program that looks at the lowest level of BOM explosion. Here are the details:
    1) It is a MTO environment using VC BOMs and Routings.
    2) At the time of Sales Order entry, and after the line item is configured, the user must have the visibility of the raw material resulted from BOM explosion before Sales Order is saved.
    3) What my issue is how to retrieve the lowest level of BOM explosin as a result of SO line item configuration.
    I appreciate any lead that can be provided.
    Newoxford

    Sorry for a partial post. Some button !
    Hello Newoxford
    Did not quite get your issue.
    How the sales order item is exploded depends on the Config Profile (VA42) for that material. In the tab ' Confign Initial screen' and subtab " Confign Parameters' , you have the ability to specify multilevel BOM explosion. Also in the item cat , you need to specify the structure scope as B-Explode multi-level bill of material.
    If you do this, after the item is configured in the order, it will be exploded as needed.
    With respect to ATP, do you want to check the lowest level for availability? if so, that item should be relevant for delivery and should have appropriate Sched Line and all the requisite config.
    And my question to you is all this is through config, master data etc, then what are you trying to accomplish with your program?

  • Change Transfer Order Line Items during Creation

    Hi All,
    I  have a requirement wherein it is necessary to change the Line item (LTAP) of a transfer order , during its creation.
    I had a look at exits - MWMTO001 (EXIT_SAPLL03T_001) . But it is not useful in our case as the TO is already created before the control is passed over to the user-exit.
    Our requirement is that, if the source qty in alternate unit of measure (LTAP-VSOLA) contains a decimal value i.e. if LTAP-VSOLA = 2.500 CAR ( Carton is the alternate unit of measure ), then the TO line must be split into two lines and the qty must be distributed as 2 CAR and 6 EA ( Each is the Base unit of Measure ), considering that 1 CAR = 12 EA.
    I tried searching for any FM/BAPI for changing TO's, so that it can be used in the above exit after TO creation, but could not find any . Any suggestions to over come this will be highly appreciated.
    Thanks & regards,
    Sandeep

    Hi Jurgen,
    You are right. The system does not propose TO's with different UoM's for the same material. The TO split thro configuration which you have suggested does not check for the decimal value of the quantity, but rather it takes the Qty value as a whole.
    As far as I have seen , there are no user exits which can be used to influence the creation of TO line items.  Let me know if u come across any of them, which can be used to modify the system determined TO lines.
    Regards,
    Sandeep

  • Selection IDs missing after maintenance / creation of new ones

    Hi all,
    after the creation of new selection IDs the originally maintained selection IDs are missing.
    Who has an idea how this could have happen and how we can get the old ones back?
    Thanks in advance
    Toby

    Hi,
    In which release of the APO you are facing this issue?
    Please check the entries in the header table of the selection ID /SAPAPO/TS_SELKO wheter it is present or not?
    Also check following tables too!
    /SAPAPO/TS_SEL                 View of Saved Selections
    /SAPAPO/TS_SELKO               Header Selection Variants
    /SAPAPO/TS_SELOB               Hitlist Selection Variants
    /SAPAPO/TS_SELPO               Item Selection Variants
    It will help you to understand what is happning.

  • Sales Orders line item quantity getting Zero after free good line item

    Hi experts,
    i am creating sales order using BAPI  BAPI_SALESORDER_CREATEFROMDAT2   sales order having some free goods material  and line item after free goods line item having quantity zero.
    for example A B are  materials, A having free goods a1.  when SO  having 3 line items 10 for A ,line item  20 for a1 and line item 30 for B . But line item 30 having quantity zero.
    find code below and advice .
    lwa_ord_head_in-doc_type       = 'ZSO'.
        lwa_ord_head_in-sales_org      = '1000'.
        lwa_ord_head_in-distr_chan     = '10'.
        lwa_ord_head_in-division       = '10'.
        lwa_ord_head_in-req_date_h     = lwa_rof_s-date_del.
    *Order Header Update
        lwa_ord_head_inx-doc_type       = 'X'.
        lwa_ord_head_inx-sales_org      = 'X'.
        lwa_ord_head_inx-distr_chan     = 'X'.
        lwa_ord_head_inx-division       = 'X'.
        lwa_ord_head_inx-req_date_h     = 'X'.
        lwa_ord_partners-partn_role  =  'AG'.
        lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
        APPEND lwa_ord_partners TO lt_ord_partners.
        IF lwa_rof_s-del_addr IS INITIAL.
          lwa_ord_partners-partn_role  =  'WE'.
          lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
          APPEND lwa_ord_partners TO lt_ord_partners.
        ELSE.
          lwa_ord_partners-partn_role  =  'WE'.
          lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
          APPEND lwa_ord_partners TO lt_ord_partners.
        ENDIF.
        lt_rof_it_t = lwa_rof_s-zsd_rof_it_t.
        LOOP AT  lt_rof_it_t INTO lwa_rof_it_s.
          lwa_ord_items_in-material = lwa_rof_it_s-matnr.
          lwa_ord_items_in-plant = lwa_rof_s-plant.
          lwa_ord_items_in-target_qty = lwa_rof_it_s-qty.
          lwa_ord_items_in-comp_quant = lwa_rof_it_s-qty. "added on 12/29
         lwa_ord_items_in-target_qu = 'EA'.
         lwa_ord_items_in-t_unit_iso = 'EA'.
          APPEND lwa_ord_items_in TO lt_ord_items_in.
          lwa_ord_items_inx-material = 'X'.
          lwa_ord_items_inx-plant = 'X'.
          lwa_ord_items_inx-target_qty = 'X'.
          lwa_ord_items_inx-comp_quant = 'X'.
         lwa_ord_items_inx-target_qu = 'X'.
         lwa_ord_items_inx-t_unit_iso = 'X'.
          lwa_ord_items_inx-updateflag = 'I'. "'U'
          APPEND lwa_ord_items_inx TO lt_ord_items_inx.
         ** Schedule Line Information
          lwa_schedule_lines-itm_number = '000010'.
         lwa_schedule_lines-sched_line = '0003'.
          lwa_schedule_lines-sched_line = 'X'.
          lwa_schedule_lines-req_date   = lwa_rof_s-date_del.
          lwa_schedule_lines-date_type  = '1'.
          lwa_schedule_lines-req_qty    = lwa_rof_it_s-qty.
          APPEND lwa_schedule_lines TO lt_schedule_lines.
         lwa_schedule_lines_x-itm_number = '000010'.
         lwa_schedule_lines_x-sched_line = '0003'.
          lwa_schedule_lines_x-updateflag = 'I'.
          lwa_schedule_lines_x-sched_line = 'X'.
          lwa_schedule_lines_x-req_date   = 'X'.
          lwa_schedule_lines_x-date_type  = 'X'.
          lwa_schedule_lines_x-req_qty    = 'X'.
          APPEND lwa_schedule_lines_x TO lt_schedule_lines_x.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
      SALESDOCUMENTIN               =
            order_header_in               = lwa_ord_head_in
            order_header_inx              = lwa_ord_head_inx
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
       IMPORTING
         salesdocument                 = lwa_saledocu
       TABLES
         return                        = lt_return
         order_items_in                = lt_ord_items_in
         order_items_inx               = lt_ord_items_inx
         order_partners                = lt_ord_partners
         order_schedules_in            = lt_schedule_lines
         order_schedules_inx           = lt_schedule_lines_x
      ORDER_CONDITIONS_IN           =
      ORDER_CONDITIONS_INX          =
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

    Hi experts,
    I am still waiting for your response......
    Thanks in advance
    Deepanker

  • Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'

    Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'
    Not able to book the sales order because of this issue

    Order Management does not support the inclusion of optional service items in a configured Model BOM (see Support article #1296751.1 for more detail).  Allowing for such would therefore require customization.
    As you've found, there's no modeling restriction that prevents you from creating a Model BOM that includes optional service items, nor is there any problem with creating a Configurator Model for it.  And required service items (such as a warranty item that is a required child of an optional BOM component) do not present a problem; they have nothing to do with Configurator, and would never appear as sub-lines in OM.  The problem arises in OM, which requires that any service item be "associated" to the item it's "servicing".  OM does not automatically make such an association with service sub-lines, even though it might be argued that an association may be inferred by the BOM structure (i.e., OM does not assume that an optional service sub-line is necessarily associated, from a service standpoint, with its BOM parent).  OM customization is therefore required in order to hook any service item up to its corresponding product item.  Many customers who configure service along with product have implemented such a customization.
    (Another gap in such a solution that may be relevant to you is that for an included optional service item requiring recurring billing, Order Management does not create the requisite Service Contract.  Customers have likewise developed customizations to address this, as well.)
    As this is not specifically a Configurator matter (you could have created your order without using Configurator at all, and you would have experienced the exact same behavior), please do not take my explanation as being either authoritative or comprehensive (I am a Configurator expert, and only knowledgeable enough about Order Management to be dangerous).  It would be advisable for you to seek more detailed information/recommendations from the Order Management forum.
    Eogan

  • 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

  • How to restrict the total order size to 10 in atg CRS store

    Hi, i want to restrict customer from selecting orders not more than 10 either the same product or different one. i got the solution for same product but the problem is when i am trying to restrict the customer from selecting items more than 10 by cha

  • AP_SUPPLIERS ENABLE_FLAG

    Hello, I'm using ap_vendor_pub_pkg.update_vendor to update enabled_flag='N' and end_date_active=SYSDATE of ap_suppliers in R12.1.3. I want to leave a option for users to be able to activate the vendor if needed in future.I'm able to clear inactive da

  • Warning "Printer marks may overlap artwork..."

    The full warning is "Printer marks may overlap artwork. You may need to expand the Crop box using the Crop dialog." I am getting this warning when adding printer marks to a PDF created from Xpress. No amount of expanding the crop box has helped. If I

  • Asset class summary management auc

    Dear Forum, May I know what is the meaning of summary management auc under status of auc in asset class OAOA. Hope to have advice as I read from F1 but yet not clear. Thanks

  • Getting outlook contacts using java

    hi every body, is anybody know how to get the OutLook contacts using java.