Bad order of a columnin a grid

Hi,
I've a Grid that I populate with a user query, using ExecuteQuery method
form.DataSources.DataTables.Item(idTabella).ExecuteQuery(query)
All is ok, but the order of the column is not correct. For example, if my query is 'Selecr A,B,C from mytable', the column of my Grid are B,C,A.
Every time i need to click 'Form settings' and 'Restore Default'. After this step, all my column is correctly ordered.
There is a table or a config file where Sap write this information?
Thank you
Marco

Hi,
check table CPRF and column VisualIndx.
hope it helps
Petr

Similar Messages

  • Change item condition in BADI order save with crm_order_maintain

    Hi all,
       i could update conditions in report but not successful in BADI order save, below is my code in BADI...
       what is the problem maybe ?  Ths
    * Get order info.
      CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid       = lt_header_guid
          it_requested_objects = lt_requested_objects
        IMPORTING
          et_ORDERADM_I        = lt_ORDERADM_I
          ET_TEXT              = lt_text
          ET_STATUS            = lt_status
          et_pridoc            = et_pridoc
        EXCEPTIONS
          DOCUMENT_NOT_FOUND   = 1
          ERROR_OCCURRED       = 2
          DOCUMENT_LOCKED      = 3
          NO_CHANGE_AUTHORITY  = 4
          NO_DISPLAY_AUTHORITY = 5
          NO_CHANGE_ALLOWED    = 6
          OTHERS               = 7.
    read table lt_ORDERADM_I into ls_ORDERADM_I with key ITM_TYPE = 'YTS1'.
      if sy-subrc = 0.
        read table et_pridoc INTO es_pridoc index 1.
        LOOP AT es_pridoc-pric_cond into es_pric_cond where kposn = ls_ORDERADM_I-guid.
          clear is_cond_chg.
          move-corresponding es_pric_cond to is_cond_chg.
          clear is_cond_chg-kbetr.   "  clear the amount
          INSERT is_cond_chg INTO TABLE is_pridoc-cond_change.
        endloop.
        CLEAR: lt_input_field_names.
        ls_input_field_names-fieldname = 'COND_CHANGE'.
        INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        CLEAR: cs_input_fields, ct_input_fields.
        cs_input_fields-ref_guid = ls_ORDERADM_I-guid.
        cs_input_fields-ref_kind = 'B'.
        cs_input_fields-objectname = 'PRIDOC'.
        cs_input_fields-field_names = lt_input_field_names.
        INSERT cs_input_fields INTO table ct_input_fields.
        is_pridoc-ref_guid = ls_ORDERADM_I-guid.
        is_pridoc-ref_kind = 'B'.
        INSERT is_pridoc INTO it_pridoc INDEX 1.
      endif.
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_pridoc         = it_pridoc
        CHANGING
          ct_input_fields   = ct_input_fields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.

    Try this Function Modul after Order_Maintain
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   =
          IMPORTING
            return = .
    Edited by: Richard Brünning on Nov 12, 2009 1:55 PM

  • Iweb issues - photos are put in a RANDOM ORDER when added to photo grid

    My website created with i-WEB contains a lot of photos.
    When I add them to a photo grid (on a page using the "Photos" template, by dragging and dropping from Finder) the order of the photos is randomized by i-web.
    They are kind of in reverse order (highest file number first) but with a large number of files just randomly arranged in no particular order. The files have simple numerical names like "img_100, img_101, img_102" etc which are in numerical / date order in Finder, but when loaded into i-web are not in any order.
    I can't see a feature / option anywhere in I-web to re-arrange images according to name. I can of course manually rearrange them which is fine for a dozen images, but not when I have 500.
    I have tried adding a small number of images to see if it's a problem with overloading the software with too many, but the problem happens with 5 images as well as 500.
    (this is i-web '08)
    Matt

    The photo app puts files in date/time order and ignores their names.
    You can look for another app that may honor file names (sorry, I don't know any to recommend) or you can find a program that alters your file properties. If all the files have properties that read the same date and time, then it defaults to alphabetical order

  • Bad Order By Detection

    Hello all
    This thread is the follow-through from another:
    Dodgy Order By detection
    There is a problem in APEX to do with it's detection of the "order by" clause.
    If an SQL query has the string "order by" (case-insensitive) in it, then APEX will not allow you to use column sorts in reports.
    Example of a query that you CAN use column sorts with:
    select name, points
    from tableExample of a query that you CANNOT use column sorts with:
    select name, points
    from table
    order by pointsThat makes sense, as you shouldn't be able to sort an already sorted result set.
    What doesn't make sense is this...
    Example of a query that you CAN (but SHOULDN'T) use columns sorts with:
    select name, points
    from table
    order
    by points(line break between order and by)
    or
    select name, points
    from table
    order  by points(2 spaces between order and by)
    APEX is simply checking for the presence of the string "order<space>by".
    This is, obviously, incorrect.
    Example of a problem case:
    A query that has...
    select row_number() OVER (order by q.value desc) rank, q.*You should be able to sort this, but you cannot...
    Unless you put 2 spaces between the order and by words.
    Bug :)

    A way around this is to create a view:
    create or replace view vw_your_table as
    select row_number() OVER (order by q.value desc) rank, q.*
      from your_table qand select from the view.
    Mike

  • AFS grid value/valuation type not picked in sales order cost estimate

    Hi Experts,
    We have different valuation types in the material master. This is part of the AFS, where each grid value is a valuation type. While making a sales order cost estimate and in one sales order item, we have 3 grid values (valuation types), system is costing only for one grid value and that too for the entire quantity. This way the costing is wrong as different grid values have different BOMs and routings.
    Is there any specific setting to have the grid value to be picked up in the sales order cost estimate? Or am i missing some setting? in general product costing settings or AFS product costing settings?
    Best Regards
    Vimal

    Hi,
    Do you mean "sales order costing", please  if so then please ref. the link:
    http://help.sap.com/saphelp_46c/helpdata/en/90/ba6da4446711d189420000e829fbbd/content.htm
    Regards
    DSR
    Edited by: D.Srinivasa Rao on Nov 25, 2011 8:19 AM

  • CRM Header data not getting refreshed in BADI when clicked in New order

    We have used a ORDERADM_H BADI, header badi to populate some custom field values.
    Step 1) While creating sales order in CRM(CRMD_ORDER), we are giving inputs such as sold to party , material etc.
    Step 2) Before actually saving the order, we found that we dont need this order to be created and again click on create new button in the transaction. In order header BADI, order data for the previous order is not getting refreshed. The previous GUID is still there and function module CRM_ORDER_READ still retrieves the old order values which was cancelled in the previous step. It is causing lot of issues and finally giving dump.
    basically the previous GUID is not getting refreshed. Please suggest

    Pls send the code that you have in the Badi. Did you actually compare the GUIDs manually ? Instead of CRM_ORDER_READ have you tried using CRM_ORDER_READ_OW ?

  • Disable re-order columns in ALV Grid

    Hi,
    I want to disable the option of move/re-order of columns in ALV grid.
    Ex: My grid is displaying 5 fields in the order F1, F2, F3, F4 & F5. I can move the columns by dragging then on their header so I can change the fields order to F2, F3, F1, F4 & F5. I want to disable this option of re-arranging the columns in the ALV grid.
    Its not related FIX_COLUMN in field catalog.
    Thanks & Regards,
    Adithya M.

    Hi Hima,
    FIX_COLUMN is is used to fix the respective columns from moving when horizontal scroll bar is moved.
    I want to disable re-arranging of columns, i.e, after displaying the grid the user should not be able to re-arrange/drag the column from one position to other.
    Thanks & Regards,
    Adithya M

  • Grid value probelm in PR or PO

    Dear All my Guru,
    I am using AFS MM
    I have 2 userid:
    ACTMM01
    ACTMM03
    Terms:
    Purchase requisition /  Purchase order
    Item details: Delivery Schedule>Grid Value
    In this above I am creating one PR by userId "ACTMM03" .
    In delivery schedule > Grid value - I can not see any grid value there.
    It is showing "No values found" Message no. DH801
    But other hand by "ACTMM01" it is fine. I can see the all grid value there.
    I believe this is the user id problem. But I did not found any authorization problem in SU53 for the user ACTMM03.
    Can any body advice me is there any other problem in userid?
    Thanks and B/R
    Bishnu
    04/12/2010

    HI ,
    Thanks for the Elaborated answer.
    What  i did  is
    PR number range in the backend as external and same i created in SRM as Internal.
    PO number range in ECC i maintain as internal and in SRM as external because of classic scenario.
    Apart from number ranges i went to
    Define backend system for Product category in Technical settings.
        source and target system as BAckend logical system name
    In Cross Application basic setting-- >Define object in backend system
    Pgrp as * and Cat. ID as * Source sys "BAckend System"  ....Always external procurement and PO if item data is complete otherwise PR.
    Now my question is with these settings am i able to create a PR when my Shopping cart is approved and other thing is Do i need to implement any Badi for this ? i mean to create aPR do i need to implement any BAdi , SAme for PO. ?
    Appricate your help in advacne.
    Smriti
    Edited by: Smriti arora on Apr 27, 2010 3:12 PM

  • Regarding production order closing and demand closing

    Hi Gurus,
    I am new to pp module..
    I have the requirement on production order closing and demand order closing.
    The requirement needs plant,reuirement plan no ,basic finish date and percentage in selection screen.
    In the output display plant,requirement plan no,PIR No,order,order finish dat ,***.order qty,***.delivered qty,qty difference,percentage%,order status as in alv grid display.
    And in the output it has 2 buttons named technically complete and demend close .whener user click on first button system should take all the orders which r selected to the program with the same reuirement plan as for the selected order and then technically close all the orders with the same reuirement plan number.
    when user clicks on demand close button,system should take the respetcive requirement plan number,order finish date and material and it has to take the pir no which match the above and deactivate the pir and save.
    I need the help about this.
    Thankx in advance.

    Dear Chandu,
    First settle the production order using the T Code CO88,and then close the production order.
    Prerequisites
    Prerequisites for setting the CLSD status are:
    The order must have the status Released (REL) or Technically completed (TECO)
    The order balance must be 0
    There can be no open purchase requisitions, purchase orders or commitments
    There can be no future change records from confirmation processes
    Regards
    Mangalraj.S

  • How to delete the host on GRID after the target agent alreary been removed

    I already uninstalled the agent on the target host, the server still show on the GRID and show agent is not recheable, what do I need to do in order to delete from the GRID once I delete the agent.
    thanks

    if you want to delete the agent of the Configuration --> Agents section of grid control , you need to delete the agent of the mgmt tables
    it s a process complex

  • Bad performance view on views

    we have two views with equal key fields which perform very good (order less than 1 second).
    Both views give extra fields from data sets.
    I want to combine those extra fields in one record with equal key values. Because some key combinations can miss in either one of both sets, I make an extra view with a union only on the keyfields of both views and use this view as driver for the combination, so I join both original views open with this driver. When I now query the resultview the performance is bad (order 3.5 minutes).
    (This is independent of the number of result records)
    Explain plan shows no full table scans.
    Any suggestions to improve this construction??

    I have split the two parts of the union query, and analysed both parts separately, see below.
    The subviews perform as follows:
    c_contr_opb_CD with restriction on contract_no 7 rows in 0:02 seconds
    without restrictions 2216 records in 3:34 minutes
    c_contr_opb_B with restriction on contract_no 5 rows in 0:01 seconds
    without restrictions 1567 records in 0:05 minutes
    (in both views are 1332 records with common keys)
    When I make the view over an open join of both views and I use the
    c_contr_opb_B as driver then it performs with and without restriction
    on contract_no the same, suggesting it performs the 'group by'-clause in
    the view c_contr_opb_CD before applying the restriction.
    When, on the other hand I use the view c_contr_opb_CD as driver it seems to
    apply the restriction before the 'group by'-clause in the view.
    Is there a way to always apply the restriction berore the 'group by' clause
    select tB.Contract_no
    , tB.agc
    , tB.salesgroup
    , tB.B_pricing
    , tB.B_No_of_elements
    , tB.B_m3_elements
    , tB.C_complete
    , tCD.C_pricing
    , tCD.C_No_of_elements
    , tCD.C_m3_elements
    , tCD.D_pricing
    , tCD.D_No_of_elements
    , tCD.D_m3_elements
    from c_contr_opb_CD tCD
    , c_contr_opb_B tB
    where (tCD.Contract_no(+) = tB.Contract_no
    and tCD.agc(+) = tB.agc
    and tCD.salesgroup(+) = tB.salesgroup)
    and tB.contract_no=lpad('20042002',20);
    query in 3:40 minutes, result 5 records
    Options Object Operation
    SELECT STATEMENT
    OUTER MERGE JOIN
    JOIN SORT
    C_CONTR_OPB_B VIEW
    GROUP BY SORT
    VIEW
    UNION-ALL
    NESTED LOOPS
    UNIQUE SCAN PK_CMHD INDEX
    BY INDEX ROWID CMMT TABLE ACCESS
    RANGE SCAN PK_CMMT INDEX
    NESTED LOOPS
    UNIQUE SCAN PK_CMHD INDEX
    BY INDEX ROWID CMSV TABLE ACCESS
    RANGE SCAN PK_CMSV INDEX
    JOIN SORT
    C_CONTR_OPB_CD VIEW
    GROUP BY SORT
    VIEW
    UNION-ALL
    NESTED LOOPS
    RANGE SCAN X_SHP_CM INDEX
    BY INDEX ROWID CMMT TABLE ACCESS
    RANGE SCAN PK_CMMT INDEX
    NESTED LOOPS
    RANGE SCAN X_SHP_CM INDEX
    BY INDEX ROWID CMSV TABLE ACCESS
    RANGE SCAN PK_CMSV INDEX
    28 rows selected.
    select tCD.Contract_no
    , tCD.agc
    , tCD.salesgroup
    , tB.B_pricing
    , tB.B_No_of_elements
    , tB.B_m3_elements
    , tB.C_complete
    , tCD.C_pricing
    , tCD.C_No_of_elements
    , tCD.C_m3_elements
    , tCD.D_pricing
    , tCD.D_No_of_elements
    , tCD.D_m3_elements
    from c_contr_opb_B tB
    , c_contr_opb_CD tCD
    where (tB.Contract_no(+) = tCD.Contract_no
    and tB.agc(+) = tCD.agc
    and tB.salesgroup(+) = tCD.salesgroup)
    and tCD.contract_no=lpad('20042002',20);
    query in 0:05 minutes, result 7 rows
    Options Object Operation
    SELECT STATEMENT
    OUTER MERGE JOIN
    JOIN SORT
    C_CONTR_OPB_CD VIEW
    GROUP BY SORT
    VIEW
    UNION-ALL
    NESTED LOOPS
    UNIQUE SCAN PK_CMHD INDEX
    BY INDEX ROWID CMMT TABLE ACCESS
    RANGE SCAN PK_CMMT INDEX
    NESTED LOOPS
    UNIQUE SCAN PK_CMHD INDEX
    BY INDEX ROWID CMSV TABLE ACCESS
    RANGE SCAN PK_CMSV INDEX
    JOIN SORT
    C_CONTR_OPB_B VIEW
    GROUP BY SORT
    VIEW
    UNION-ALL
    NESTED LOOPS
    RANGE SCAN X_SHP_CM INDEX
    BY INDEX ROWID CMMT TABLE ACCESS
    RANGE SCAN PK_CMMT INDEX
    NESTED LOOPS
    RANGE SCAN X_SHP_CM INDEX
    BY INDEX ROWID CMSV TABLE ACCESS
    RANGE SCAN PK_CMSV INDEX
    create or replace view c_contr_opb_B as
    select     Contract_no
         ,     agc
         ,     salesgroup
         ,     min(C_complete)          C_complete
         ,     sum(B_pricing)          B_pricing
         ,     sum(B_No_of_elements)     B_No_of_elements
         ,     sum(B_m3_elements)     B_m3_elements
         from (     select     h.cm_num               Contract_no
              ,     ms.agc
              ,     ms.sales_group               salesgroup
              ,     decode(ms.closed_reason,'C001','*',' ')     C_complete
              ,     ms.unit_price*ms.ord_qty     B_pricing
              ,      decode(ms.agc,'PROJ',fnc_struct_m3(ms.ccn,ms.structure_id,ms.structure_rev)
                        ,0)*ms.ord_qty          B_m3_elements
              ,     ms.ord_qty                B_No_of_elements
              from     cmmt     ms
              ,     cmhd     h
              where     ms.ccn          = h.ccn
              and     ms.cm_num     = h.cm_num
              and     ms.price_bucket     = 'B'
              and     ms.closed_reason in ('C001',' ')
              and     h.ccn          = 'SPAN'
              UNION ALL
              select     h.cm_num               Contract_no
              ,     ms.agc
              ,     ms.sales_group               salesgroup
              ,     decode(ms.closed_reason,'C001','*',' ')     C_complete
              ,     ms.unit_price*ms.ord_qty     B_pricing
              ,      0                    B_m3_elememts
              ,     ms.ord_qty                B_No_of_elements
              from     cmsv     ms
              ,     cmhd     h
              where     ms.ccn          = h.ccn
              and     ms.cm_num     = h.cm_num
              and     ms.price_bucket     = 'B'
              and     ms.closed_reason in ('C001',' ')
              and     h.ccn          = 'SPAN'
         ) group by Contract_no
         ,     agc
         ,     salesgroup
    create or replace view c_contr_opb_CD as
    select     Contract_no
         ,     agc
         ,     salesgroup
         ,     sum(C_pricing)          C_pricing
         ,     sum(C_No_of_elements)     C_No_of_elements
         ,     sum(C_m3_elements)     C_m3_elements
         ,     sum(D_pricing)          D_pricing
         ,     sum(D_No_of_elements)     D_No_of_elements
         ,     sum(D_m3_elements)     D_m3_elements
         from (     select     h.cm_num               Contract_no
              ,     ms.agc
              ,     ms.sales_group               salesgroup
              ,     ms.unit_price*ms.ord_qty     C_pricing
              ,     ms.ord_qty                C_No_of_elements
              ,      decode(ms.agc,'PROJ',fnc_item_m3(ms.ccn,ms.item,ms.revision),0)
                        *ms.ord_qty          C_m3_elements
              ,     ms.unit_price*ms.ord_qty     D_pricing
              ,     decode(ms.agc,'PROJ',fnc_item_aantal_D(ms.ccn,ms.item,ms.revision),0)
                                       D_No_of_elements
              ,      decode(ms.agc,'PROJ',fnc_item_m3_D(ms.ccn,ms.item,ms.revision),0)
                   * decode(ms.agc,'PROJ',fnc_item_aantal_D(ms.ccn,ms.item,ms.revision),0)
                                       D_m3_elements
              from     cmmt     ms
              ,     cmhd     h
              where     ms.ccn          = h.ccn
              and     ms.cm_num     = h.cm_num
              and     ms.price_bucket     = 'C'
              and     ms.closed_reason in ('F001','F003',' ')
              and     h.ccn          = 'SPAN'
              UNION ALL
              select     h.cm_num               Contract_no
              ,     ms.agc
              ,     ms.sales_group               salesgroup
              ,     ms.unit_price*ms.ord_qty     C_pricing
              ,     ms.ord_qty                C_No_of_elements
              ,      0                    C_m3_elememts
              ,     ms.unit_price*ms.ord_qty     D_pricing
              ,     0                    D_No_of_elements
              ,      0                    D_m3_elements
              from     cmsv     ms
              ,     cmhd     h
              where     ms.ccn          = h.ccn
              and     ms.cm_num     = h.cm_num
              and     ms.price_bucket     = 'C'
              and     ms.closed_reason in ('F001','F003',' ')
              and     h.ccn          = 'SPAN'
         ) group by Contract_no
         ,     agc
         ,     salesgroup

  • Problem with BPC 10 REST SERVICE. (Write-Back  BAdI)

    Hello!
    We have implemented a Write-Back BAdI order to write values ​​to a parent and copy those values ​​to their children in the hierarchy. Proper operation.
    Then through the Default Logic we are making various calculations (many to be honest), based on the data recorded with the Write-Back BADI.
    The problem arises when we try to write in a parent hierarchy with many children.
    We receive the following message in Excel.
    We have configured the service as follows
    The transaction st22 says nothing about our problem.
    If I go to log the EPM Add-in for Excel see the following. A problem with REST service (I think that is the PROBLEM)
    Write-Back BAdI writes values properly.
    Thank you!

    Thanks for answering.
    Yes, if I try to write in a parent without Default.lgf there is no problem. I performed the test to the parent node of all hierachy.
    I send the Default.lgf and the others scripts .
    I think the problem is that the communication between BPC and Netweaver is lost, which is done through the REST service??
    thank you very much.

  • Java- Problem in tabbing order using Border layout

    Though i have added components in particular order to borderlayout Panel,Order of tabbing is not in the order of components added?can any one say why is happens because the tabbing occurs naturally in the order the components are added to the panel . how to solve this problem ? Please.
    Arun

    I think that the border layout defines it's own tab order.
    I think the grid bag layout does, also.
    You could, however, try to duplicate the border layout using :
    a) A box layout
    b) A spring layout
    Or, you could take a look at Focus Managers. That will allow you to set an arbitrary tab order independent of the component order or the default tab orders of the layouts.

  • Cannot sort images in grid view?

    I am trying to re-arrange the order of images in the grid view by mean of drag-and-drop, but LR doesn't allow me to do it. I also manually selected "User Order" from the sort menu with no effect. It is happening only with the latest bunch of photos I imported (both in Collection and Folder), while LR still allows me to re-arrange my old images. I must be missing something obvious (not to me)... any idea?

    User sort order comes up on this forum so frequently that the subject deserves to be in the FAQ, especially since user sorting is almost totally undocumented.
    As Lee Jay points out, what is implemented is a design decision. There is a basic conflict here between user sort order and the existence of subfolders.
    The current implementation has a few rough edges. For example, even including all sub-items in the top folder doesn't free up sorting as has been suggested, at least in my Windows version. Also, even if a sub-folder is empty, user sorting is still frozen in parents. BTW, a sub-folder is one recognized by LR. A folder can have sub-folders in the underlying file system not in the catalog. These have no effect as far as I can tell.
    However, in all the cases I have tried, user sorting is available within and into stacks at any level regardless of whether sub-folders exist. I can move things around freely in a stack or from outside the stack (even from another stack) into the stack. Reversal is possible in stack-to-stack moves but not from a stack to the outside, unless the folder has no sub-folders. This fact might help work around the limitation in some cases.

  • COOIS report with sales order details

    Hello,
    I am looking for a COOIS report attribute or an extension of the COOIS report that will have the sales order detials on the ALV grid instead of having to drill down to it. I want the item level details and the characteristic values... Hopefully there's a function module that will get that information.
    Thanks,
    AJ
    Edited by: Antonio Jones on Feb 11, 2008 7:07 PM

    Hi,
    As far as my understanding there is no standard report is availbale
    see in va05 and in layout see inco term option is available or not
    Otherwise you can develop zreport, extract this from table VBKD
    Kapil

Maybe you are looking for