Sorting a SAP Table ?

Hi,
can anyone of you give me a detailed example for how to accomplich sorting in a datatable. The DatSource is a DataView.
Regards
Erhan

After mapping the ColumnNames it works fine.
Thank you very much so far
Now I do have an other problem.
My DataSet is generated dynamically, so I do not know how many columns my Dataset will contain.
In the beginning there are 3 TableCells declared in my program. Sorting with those TableCell is possible, but when I try to sort the other ones, it gives me an error:
Server Error in '/EPApp1400' Application.
Specified argument was out of the range of valid values. Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Index was out of range.  Must be non-negative and less than the size of the collection.]
   System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   SAP.Web.UI.Controls.TableColumnCollection.get_Item(Int32 index)
   SAP.Web.UI.Controls.TableCellCollection.get_Item(Int32 index)
   SAP.Web.UI.Controls.Table.SortColumn(Int32 columnIdx)
   SAP.Web.UI.Controls.TableHeaderCell.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Any suggestions ?

Similar Messages

  • How to update Records of SAP table from .CSV file

    Hi,
    I have written a code which takes a data from (,) delimited CSV file and adds it into the Internal table.
    Now I want to update the all fields in SAP table with the Internal table.
    I want to use Update statement.
    Update <table Name> SET <field needs to update> WHERE connditon.
    I don't want to iterate through thousand on record in sap table to check the where condition.
    Could you please tell me how to do it.

    Hi. I thing you will not workaround the iterating of the internal table.
    You can pre-load all the records into another internal table
    check lt_csv[] is not initial. " important, otherwise next select would read all records of the table
    select .... into lt_dbitab for all entries in lt_csv where key-fieds = lt_csv-key_fields...
    check sy-subrc eq 0 and lt_dbitab[] is not initial.
    then do in-memory update of the it_dbitab
    loop at it_dbitab assign <fs>.
      read table lt_csv assign <fs_csv> with key ... " lt_csv should be sorted table with key, or you should try to use binary search
      if sy-subrc eq 0.
        ...change required lt_dbitab fields: <fs>-comp = <fs_csv>-comp...
      endif.
    endloop.
    ant then you can do mass-update
    update dbtab from table lt_dbitab.
    From performance view, this solution should be much faster than iterating lt_csv directly and updating every single database record
    Br
    Bohuslav

  • How to retrieve information get in a sap table

    Hello,
    A sap program in my job chain reads a sap table. How can I retrive information of one of its fields and pass it in parameter in another step of my job chain ?

    Hi,
    The Z program returns informations in the job protocol, the question is how to parse the protocol to retrieve the string and put it in a parameter. I've been told that I can put a script in the "action" tag of the job definition as a post-running action. Where can I find an exemple of that kind of script ?
    FYI : the z program returns the following sentence, "flux sortant : nouveau compteur =0002" and what I need is to get 2 as a parameter for the next step.
    Re.

  • List of sap tables

    Hi all,
    I wanted to display the list of sap tables outside sap. So when i searched through forum i got some relevant FM.
    RFC_READ_TABLE, RFC_GET_TABLE_ENTRIES : RFC function modules doesn't help as they only deal with the display of fields in a table and not the entire table list.
    When i tried with DB fm, my database is oracle so those doesn't help me too.
    Is there any standard program which suits my need.
    Can GET_GLOBAL_SYMBOLS fm be used to retrieve the tables list. If so then what should i give as the program (import parameter) and give some guidance to test that fm.
    Is there any way to retrieve tables with sort criteria as the application module (MM, SD, etc.)
    Pls can anyone help me out.
    Thanx in advance,
    Revathi.

    Hi,
    Thanks for both your replies. My major requirement is to get the list of tables for the particular application module i.e . MM incudes certain tables and SD includes its own tables.
    Is there any fm or bapi which provides the tables list as per the application module.
    Can anybody throw some light on the link between the application module with its tables.
    Regards,
    Revathi.

  • Creating index for standard SAP tables

    Hi!
    What are the advantages and disadvantages of creating addtional indexes for tables with massive amount of data (BSEG, BKPF, COEP, etc...).
    If I create a new index it supposed to make the table access faster, for the cost of hard disk space.
    Am I right?
    Thank you
    Tamá

    Hi,
    Primary and secondary indexes
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    Structure of an Index
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    Accessing tables using Indexes
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    Thanks and Regards
    Arun Joseph

  • Sorted and hashed tables

    what happens when duplicate entries are present in sorted and hashed tables?

    Hi,
    Sorted internal tables can be of two types:
    unique or non unique.
    If u enter duplicate records in Sorted tables with unique  it will show error.
    If u enter duplicate records in Sorted tables with  non-unique key it will not show error.
    Hashed tables are with only unique key
    so no way to enter the duplicate records.
    for more information see the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    Reward if helpful.
    Jagadish

  • Is there any standard SAP table which stores the license number assigned to a delivery item

    Hi Experts,
    This is in relation to license number assigned to a delivery item under ‘Export License Log’. Our scenario is for delivery of type NLCC created for an inter-company stock transport order. (i.e.not a sales order case where the license may get copied from sales order to delivery through copy control)
    As we understand, for legal control – relevant scenarios, export license for each item shall be determined afresh every time the delivery is accessed. (Depending on legal regulation, grouping, destination country, export control class, delivery partners vis-à-vis license master customer assignments etc.)
    To print the license text on one of the delivery output types, we want to access the license number for each item. (determined under export license log)
    Our question is:  is there any standard SAP table which stores the license number assigned to a delivery item?
    We have checked some of the license tables (T606*, VAEX, EMXX etc.) but couldn’t get any specific table storing delivery-item-specific license data.
    Helpful answers Text Removed
    Regards,
    Jagan
    Message was edited by: G Lakshmipathi
    Dont add such text in your post

    Hi Lakshmipathi,
    The export control log can be accessed by going to delivery Extras-> Export license log
    We need a table that stores the determined license for each item in a delivery document ( as shown in the below screenshot)
    Regards,
    Jagan

  • Finding changes in SAP tables

    Hi,
    I have problem with SAP - Cognos interface. It functions like an ABAP program that generates a file from spec. fields of some SAP tables like BKPF, BSEG, BSID, BSIK, etc. And this is all OK, but problem is that report always selects ALL data, and in FI case(those table that I mentioned) this is complicated. For example one item is in some period open item, and in few days it will go to closed items. As COGNOS interface runs once in a Month or something like that, it is problem how to select proper data, because of huge amount FI data.
    Any Idea how to select only changes at table level? This must be also applicable to MM, SD and CO data. I thought of CHANGE DOCUMENTS, but what if change is not traced in CDHDR table because some data element is used in SAP table is not check to be observed as Change Document?

    Mario,
    For the changes, when ever there is a change done in the system a change number is created which will be available in table CDHDR, based on the Object classes extract the data and the required dates of changes made pull out the data.
    In case for AP, AR, G/L you can check with some tables ( there are some tables which will be only be updated based in the process AP/AR/GL ). Based on the list of these tables, extract data from table CDPOS  using the Change Number obtained from CDHDR.
    Anmol Saxena.

  • SAP Tables  for Open Customer Orders and Sales History

    Dear Experts.
    I am looking to get SAP SD related tables for the following,
    1) SAP tables for Open Customer Orders     
    From SAP, I need to get all tables that Contain all open customer orders for products.
    2) Sales History
    From SAP, I need to get all tables that contain the previous month's sales history (shipped customer orders).
    Please Help!!

    hi
    check the following link
    http://www.erpgenie.com/abap/tables_sd.htm
    hope it will help you
    regards,
    sreelatha gullapalli

  • How to access data from SAP Tables from a Webi report

    hi all,
    I have a webi report for financial data and from a Bex query which is build on a Cube (this has data from 2 SAP ECC systems)
    i want to build a functionality where in i can call some SAP Table data from this webi report. i should be able to pass information or some hard code where it can understand the source system it has to pick data from.
    in SAP BI, we have this ption wherein we can achieve this through RRI..
    is this possible in Webi ?
    Thanks
    SKS

    Hi.
    Create a universe on top of SAP Tables and create a webi report.
    Using hyper link /open doc we can call  this report from the webi report created on top of your Cube .
    @Sri

  • Relationship between unknown SAP-TABLES

    Hi Folks,
    Lets take a scenario of populating an ouput internal table with fields from 4 unknown sap tables(relation between the tables is unknown). How can we check the relationship between those tables to populate the internal table..? What are the possible ways to check the relationship between tables..?
    Can u please help me on this.
    Thanks n regards,
    ram.

    Hi <b>Ram</b>,
        I tried the following method to find relation between tables and i think it is quite useful. I hope this will be of some use to you.
    ->   Goto SE11 and display one of the tables.
    ->   Click on the <b>Graphic</b> icon on the toolbar or use shortcut ctrlshiftF11
    ->   It displays all the related tables by foreign key and even gives you all check tables involved. If the list is a long one, you can even use <u>Find</u> option to check if the other tables you are trying to find relation with, exist in the screen.
        Hope this Helps!! Do get back!!
    Regards,
    <b>Naveenan</b>.

  • SAP table for customer account balances by document currency

    Hi experts,
    We have a requirement to produce a monthly customer statement by customer currency or customer's document currency. Example is that the company code local currency is USD and the customer currency is EUR. The customer will be allowed to carry over a balance to next period under a certain threshold so there will be a carry over beginning balance from the previous period which needs to appear on the statement. Transaction FD10N only displays customers balances in the local or company code currency which is USD in this example.
    Question: Does anyone know if there is an SAP table that stores period beginning balances by customer account currency or customer's document currency?   
    We have not been able to find one and want to get additional input prior to building our own custom table.
    Many thanks in advance for your assistance.
    Regards,
    NormaF

    Hi:
        Make use of BAPI_AR_ACC_GETKEYDATEBALANCE to calculate customer opening balance. You need to develop Z report using table BSID and BSAD other SD related tables . There is not SAP standard report that shows the customer opening balance as carried forward from previous month.. You can make alteration for for showing balances in document currency.
    Regards

  • SAP table for finding Quant from the Handling unit

    Hi All,
    I would like to know the SAP table name - from the handling unit (where the stock received in the Warehouse), i would like to corresponding Quant ?
    PSS

    Hi,
    To know the QUANT for handling unit, use the table LQUA.

  • Issues in exporting data from SAP tables in SE16 to excel

    1.How can I save an sap table (displayed through SE16) in ECC6 into a pivot table in excel. [ I have seen this option in R/3 4.7, but do not see it in ECC.]
    2.How can I copy all the rows of a 3000 row SAP table in SE16 and paste the values into excel. I need to do this in one shot and not page by page.
    3.What option do I need to select inorder to preserve the formating of the values while saving as a local file in a spreadsheet format. All the values with leading zeros,like company codes gets saved with only their numeric portion when I save a SAP table as a local file. for eg company code 0001 gets saved in excel as just 1,company code 0056 gets saved as 56 etc. How do I prevent this? What option do I need to set in SAP in order for the values to be downloaded as is, without any truncation of leading zeros.

    1.  I don't know.  How about creating a pivot after exporting data
    2. System->List->Save->local file->clipboard
    Then paste whole lot in Excel
    3. This is a problem with Excel, not SAP.  SAP exports with leading zeroes.
    You could export as flat file & import into Excel into a spreadsheet with an appropriate numbering format.

  • Creating a new Search Help on a standard SAP table field?

    Good day, everyone!
    As part of a report I am writing, the customer would like to have Search Help added to the AUFEX field in table AUFK.  They would like this functionality so that when they are changing an order via t-code ko02, they can get a list of valid values to put in field AUFEX.  I would like to tie it to a zTable I've created; in my zTable, I have just 2 fields:  a key value (that will go into AUFEX) and a text description of the key value.  This zTable is used in my report.
    While I've created a Search Help on this table already for table maintenance, I've never added a custom Search Help to an existing standard SAP table field before.  I've done some Googling and other searching to see what I need to know, but I've only been able to find information on Collective Search Helps.  AUFEX doesn't yet have a Search Help field, so I don't think Collective Search Helps is my answer.
    Is this possible?  Can I add a custom Search Help to a standard SAP table field that doesn't have any Search Help linked to it yet?  Is there an existing thread or guide somewhere that can tell me how to do this?
    Thank you!

    Hi
    Yes u can: u can assign the search help to (A) data element livel or (B) field table livel.
    After creating your search help:
    A) Run SE11, insert your data element (AUFEX), press edit and insert the search help in "Search Help" area on DEFINATION tab;
    B) Run SE11, insert your table (AUFK), press edit, place the cursor on your field (AUFEX) and go to GoTo->Search help->for field
    But u should consider it'll mean to change a standard object for both cases: so u need to get the access key from your OSS.
    Max

Maybe you are looking for