AFS Sort - Sequence  (table J_3ASORT)

We are in the process of upgrading from SAP 4.5B (AFS 2.5B) to ECC 5 (AFS 5).  Table J_3ASORT has been marked as 'obsolete' by SAP and no new/substitute table is mentioned (in the SAP documentation nor notes - that I could find) that will contain data that I can use in its place.
J_3ASORT is used in many of our customer applications to control the sequence of our sizes / dimensions as they are presented on the screen or report.
If I let the screen display in the sequence based on the dimension then we will get (for example):
Dimension value Sort sequence
1X              00001350    
28              00000100    
2X              00001400    
30              00000200    
32              00000300    
34              00000400    
36              00000500    
38              00000600    
3X              00001500    
40              00000700    
42              00000800    
44              00000900    
46              00001000    
48              00001100    
4X              00001600    
50              00001200    
52              00001300   
The dimensions are not in the correct 'size' sequence, but rather they are in the ASCII sort sequence.
When I use the sort sequence, I get the better readable version of:
Dimension value Sort sequence
28              00000100    
30              00000200    
32              00000300    
34              00000400    
36              00000500    
38              00000600    
40              00000700    
42              00000800    
44              00000900    
46              00001000    
48              00001100    
50              00001200    
52              00001300    
1X              00001350    
2X              00001400    
3X              00001500    
4X              00001600   
Short of creating a new Z table does somebody know of a table that can be used to the same effect of being able to assign a sort sequence to the various dimensions?
I very much appreciate your time and effort.
Henry

Henry,
         Did you try out this note - Note 856352 - AFS 5.0 upgrade: Wrong values order for grid characteristics. Now in AFS 5.0 the characteristics maintenance is thro ct04. The dimension sort sequence for the relevant grids are now maintained in the following table - J_3APGDI . I guess you will have to populate this table using your dimension and grid relationships.
I hope this piece of information was useful to you.
Regards,
Gary

Similar Messages

  • Sort Sequence for mutli dimension table in SAP Lumira

    Hi Experts,
    I notice one interesting point in SAP Lumira for multi dimension
    For example, we have a table like below
    Country  City   GSV
    A1           B        100
                   C        150
                   D        130
    A2           E        200
    A3           F        100
                   G        150
    if you turn on the subtotal for GSV in Lumira table, result will be like below
    Country  City   GSV
    A1           B        100
                   C        150
                   D        130
                   Total   380
    A2           E        200
                   Total   200
    A3           F        100
                   G        150
                   Total   250
    Sort by GSV descending, result will like this
    Country  City   GSV
    A1           C        150
                   D        130
                   B        100
                   Total   380
    A2           E        200
                   Total   200
    A3           G        150
                   F        100
                   Total   250
    Here the sort sequence for City under each country is correct
    But the sequence for country is incorrect and I think the correct sequence for country will be
    Country  City   GSV
    A1           C        150
                   D        130
                   B        100
                   Total   380
    A3           G        150
                    F        100
                   Total   250
    A3           E        200
                   Total   200
    It looks like this issue is not only for Lumira and other company tools behaviors same as well
    Would you kindly let me know whether whether for sorting, the sort sequence should consider from 1st level to lowest level
    Best regards
    Alex yang

    Hi,
    I think you've got a typo in the last block.
    with regards to next steps - if you feel you have identified a defect, please log a support ticket via the normal routes.
    if this is considered an enhancement, please submit a request at the Ideas Place for Lumira.
    Many thanks,
    H

  • Report not initially sorted as defined by Report Attributes "Sort Sequence"

    I have a Report Region with Type SQL Query and Source "SELECT * FROM <table>" where <table> has a primary key from a sequence. Under Report Attributes, I have Report Column "ST_NM" with Show and Sort checked and having a Sort Sequence of "1". I assume this is to set the iniital display sequence but regardless, the report rows display in Primary key order initially.
    To try it: http://apex.oracle.com/pls/apex/f?p=21997:2 with Dever/Ima9Dever
    1) How do I set the initial display sequence to be other than the primary key sequence?
    [Note: It seems to work part (or all?) of the time under our 4.1 implementation.]
    Thanks,
    Howard
    I thought this one would be easy!

    Howard (DBA in Training) wrote:
    I have a Report Region with Type SQL Query and Source "SELECT * FROM <table>" where <table> has a primary key from a sequence. Under Report Attributes, I have Report Column "ST_NM" with Show and Sort checked and having a Sort Sequence of "1". I assume this is to set the iniital display sequence but regardless, the report rows display in Primary key order initially.
    To try it: http://apex.oracle.com/pls/apex/f?p=21997:2 with Dever/Ima9Dever
    1) How do I set the initial display sequence to be other than the primary key sequence?
    [Note: It seems to work part (or all?) of the time under our 4.1 implementation.]Standard reports store sort columns persistently across sessions as user preferences. It's likely that Dever user has at some point clicked to sort on the PK column and created a persistent preference. Try it with a new user that has never viewed the page before...
    See +{thread:id=2433320}+ for more on this, including how to reset it.

  • Sort sequence and sort rules

    Hello friends,
    In batch determination at delivery level
    In strategy type SD01, if I don't maintain sort sequence
    can sytem automatically determines the batch at delivery level?
    Please clarify my doubt.
    regards,
    Sekhar_sd consultant.

    Hi Harrison,
    Noted. Thanks.
    Best practice to achieve optimal performance also states that in all the look up tables (includes Qualified), sort index for DF must be set to Normal.
    Ref:SAP Note 1258982 ; Read 'Please Note' which states the above .
    Please put your thoughts on this.
    Reards,
    Vinay

  • Problem in sorting Advanced Table

    Hi,
    I unable to sort the data in advanced table.The data in the table is populated from an external LOV.When i set the initial sort sequence attribute of the sortable column of the table it is sorting in desecnding order by default.How to sort the data in the ascending order.Please help me it is very urgent.
    Thanks in advance
    Regards
    Srikanth

    The sorting on the table is done by adding the order by clauase and then re querying the vo.
    However here the data is coming from an LOV not from VO.
    Hence what you need to do is add the order by clause to the VO of the multiselect LOV.
    By making the LOV columns sortable (OR ASCENDING BY DEFAULT) and then sorting them in ascending order, see what comes to the base page?..
    IF sorting on lov does not suffices and the need is to provide sorting on the base table is also needed then my suggestion is to associate the same vo of the lov with the advanced table (or put the same query of the lov vo for the advanced table vo)

  • Sorting sequence disturbed

    Hello Friends,
    I am sorting an internal table like
    sort ITAB by F1 F3 F4.
    but after this sort I lost my sequence and grouping of VBELN PONR. which is as below:
    VBELN-----POSNR---F1 F2F3--
    F4          
    80011864-     40   300730---- V100-----     GER--
         CSL
    80011866-     10     300730----     V110-----     GER--
         CSL
    80011866-     20     300730----     V110-----     GER--
         CSL
    80011864-     10     300730----     V100-----     GER--
         CSL
    80011864-     20     300730----     V100-----     GER--
         CSL
    80011867-     10     300730----     V150-----     GER--
         CSL
    80011864-     30     300730----     V100-----     GER--
         CSL
    80011865-     10     300730----     V000 <<<     GER----
         CSL
    I can't add VBELN and POSNR in the sort statment coz it ll make my o/p like
    VBELN-----POSNR---F1 F2F3--
    F4          
    80011864-     10     300730----     V100-----     GER--
         CSL
    80011864-     20     300730----     V100-----     GER--
         CSL
    80011864-     30     300730----     V100-----     GER--
         CSL
    80011864-     40   300730---- V100-----     GER--
         CSL
    80011865-     10     300730----     V000 <<<     GER----
         CSL
    80011866-     10     300730----     V100-----     GER--
         CSL
    80011866-     20     300730----     V100-----     GER--
         CSL
    80011867-     10     300730----     V150-----     GER--
         CSL
    Here F2 with value 'V000' is placed in between the 80011864 and 80011866 data which is useless as we have to sort on only F1 F3 and F4. So i can't add F2 in sort sequence.
    i want my output like
    VBELN-----POSNR---F1 F2F3--
    F4          
    80011864-     10     300730----     V100-----     GER--
         CSL
    80011864-     20     300730----     V100-----     GER--
         CSL
    80011864-     30     300730----     V100-----     GER--
         CSL
    80011864-     40   300730---- V100-----     GER--
         CSL
    80011866-     10     300730----     V100-----     GER--
         CSL
    80011866-     20     300730----     V100-----     GER--
         CSL
    80011865-     10     300730----     V000-----     GER--
         CSL
    80011867-     10     300730----     V150-----     GER--
         CSL
    Please Help to solve this sorting problem.
    -Maharshi

    HI,
    SORT ITAB by F1 F3 F4 F2 VBELN POSNR.
    You get the out as follows
    VBELN-------POSNR-------F1------------- F2-------------F3-------------F4
    80011865--- 10----------- 300730------ V000------- GER--------- CSL
    80011867--- 10----------- 300730------ V150------- GER--------- CSL
    80011864--- 10----------- 300730------ V100------- GER--------- CSL
    80011864--- 20----------- 300730------ V100------- GER--------- CSL
    80011864--- 30----------- 300730------ V100------- GER--------- CSL
    80011864--- 40----------- 300730------ V100------- GER--------- CSL
    80011866--- 10----------- 300730------ V100------- GER--------- CSL
    80011866--- 20----------- 300730------ V100------- GER--------- CSL

  • Sort sequence

    Hello,
    I have an internal table and am trying to sort the table by three fields. The internal table contains some 400 records and all the three fields that are used in the sort have same values for all the 400 records. I am expecting that the internal table ignore the sort and maintain the order of the 400 records ( 1 - 400 ) but instead it simply reverses the contents i.e after sort the internal table holds values from 400 - 1.
    This is not my custom code and it is in one of the standard program of SAP. I am just wondering why the sort gets reversed irrespective of the fact that all the three fields specified in the sort has same values for all the 400 rows. Can some one throw some light?
    Thanks.
    Prem

    Hi,
    There is nothing mentioned in the same. It is simply sort ( internal table ) by field 1 , field 10 , field 14.
    There are fields in between the sort fields i.e the table is sorted by field1, field 10 and field 14. If all these fields are the same would the system consider a different sort sequence i.e Field 2 , field 3 etc.I am really not sure how the internal table gets sorted in this condition.

  • How to read sort sequence and other properties of a specification in Cg02 .

    hello ,
    i need to update the specification properties in CG02 basing on sort sequence  for hazards and mariane pollutant of a specification.
    do we have any standard Bapi or Fm to read the properties of Specification .
    thanks for your help
    Ananta

    well -
    specifications are rather complicated - there are many tables linked by internal keys. As most of them (and all in the folowing overview) begin with 'EST' I only use the subseqent letters - so table ESTRH is written as RH below.
    Here an -  uncomplete - overview
    Header: RH
    2nd level:
    - RR References
    - RI Identifiers
    - MJ Material Joins
    - VH Valuation Headers (containing field ESTCAT for valuation type)
    3rd level:
    - VA - Valuation (instance - containing sequence number (field ORD - non unique!)
    4th level - data of the valuation:
    - PR Data stored in class system (such as regulation, DG-Class)
    - DU Usage
    - VP Components
    - 0F Transport Classification (containing Hazard Inducers)
    In general you can determine the related table if you look at the technical info at CG02. The structure name will be like
    "RCGxxIOT" where xx stands for the last two letters of the table ESTxx. The structure of interfaces in FUGR C1F5 are defined with a similar pattern: ESPRH_APIxx_TAB_TYPE.
    To read the data, you may use FM C1F5_SPECIFICATIONS_READ  which has sufficient documentation. You may refer to the documentation of obsolete FM C1F2_SUBSTANCES_READ as well.
    A good alternative is  BAPI_BUS1077_GETDETAIL - as this is a BAPI Function it should work after an upgrade while FM of C1F5 migh make some adaption necessary.
    However - it will take some days to understand both - the data model of specifications and the related FMs. I personally would recommend a developer familar with this 1yr+ before asking for implementations that are not only reading data - but they are hard to find....
    have fun!
    hp

  • SORTED & HASHED tables

    Hi all
         what exactly are the SORTED & HASHED tables??
    Regards
    Srini

    Internal tables are the core of ABAP. They are like soul of a body. For any program we use
    internal tables extensively. We can use Internal tables like normal data base tables only, but the
    basic difference is the memory allocated for internal tables is temporary. Once the program is
    closed the memory allocated for internal tables will also be out of memory.
    But while using the internal tables, there are many performance issues to be considered. i.e which
    type of internal table to be used for the program..like standard internal table, hashed internal
    table or sorted internal table etc..
    Internal tables
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by
    line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data
    objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables
    whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for
    storing and formatting data from a database table within a program. They are also a good way of including very complicated data
    structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract
    description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The
    data type is also an attribute of an existing data object.
    Internal Tables as Data Types
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type,
    key, and table type.
    Line type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the
    structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify
    whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness
    depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves
    internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type
    is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables
    with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember
    this, for example, if you intend to sort the table according to the key.
    Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In
    this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access
    records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table.
    The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled
    very quickly, since the system does not have to check whether there are already existing entries.
    Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the
    table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system
    uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether
    the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of
    table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique.
    When you define the table, you must specify the key as UNIQUE.
    Generic Internal Tables
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a
    generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic
    internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data
    objects.
    Internal Tables as Dynamic Data Objects
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in
    respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects,
    since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are
    the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration)
    is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more
    than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The
    individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the
    internal table.
    Choosing a Table Type
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most
    frequently executed.
    Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest
    possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by
    specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship
    with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in
    separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key
    access, the response time is logarithmically proportional to the number of table entries.
    Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries
    are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add
    them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always
    uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the
    table key in the WHERE condition.
    Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index.
    The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always
    have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for
    processing large amounts of data.
    Creating Internal Tables
    Like other elements in the ABAP type concept, you can declare internal tables as abstract data
    types in programs or in the ABAP Dictionary, and then use them to define data objects.
    Alternatively, you can define them directly as data objects. When you create an internal table as a
    data object, you should ensure that only the administration entry which belongs to an internal
    table is declared statically. The minimum size of an internal table is 256 bytes. This is important if an
    internal table occurs as a component of an aggregated data object, since even empty internal
    tables within tables can lead to high memory usage. (In the next functional release, the size of the
    table header for an initial table will be reduced to 8 bytes). Unlike all other ABAP data objects, you
    do not have to specify the memory required for an internal table. Table rows are added to and
    deleted from the table dynamically at runtime by the various statements for adding and deleting
    records.
    You can create internal tables in different types.
    You can create standard internal table and then make it sort in side the program.
    The same way you can change to hashed internal tables also.
    There will be some performance issues with regard to standard internal tables/ hashed internal
    tables/ sorted internal tables.
    Internal table types
    This section describes how to define internal tables locally in a program. You can also define internal tables globally as data types in the
    ABAP Dictionary.
    Like all local data types in programs , you define internal tables using the TYPES statement. If you do not refer to an existing table type
    using the TYPE or LIKE addition, you can use the TYPES statement to construct a new local internal table in your program.
    TYPES <t> TYPE|LIKE <tabkind> OF <linetype> [WITH <key>]
    [INITIAL SIZE <n>].
    After TYPE or LIKE, there is no reference to an existing data type. Instead, the type constructor occurs:
    <tabkind> OF <linetype> [WITH <key>]
    The type constructor defines the table type <tabkind>, the line type <linetype>, and the key <key> of the internal table <t>.
    You can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    Table type
    You can specify the table type <tabkind> as follows:
    Generic table types
    INDEX TABLE
    For creating a generic table type with index access.
    ANY TABLE
    For creating a fully-generic table type.
    Data types defined using generic types can currently only be used for field symbols and for interface parameters in procedures . The generic
    type INDEX TABLE includes standard tables and sorted tables. These are the two table types for which index access is allowed. You cannot
    pass hashed tables to field symbols or interface parameters defined in this way. The generic type ANY TABLE can represent any table. You
    can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and
    parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed.
    Fully-Specified Table Types
    STANDARD TABLE or TABLE
    For creating standard tables.
    <b>SORTED TABLE</b>
    For creating sorted tables.
    <b>HASHED TABLE</b>
    For creating hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for
    standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    Line type
    For the line type <linetype>, you can specify:
    Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the
    ABAP Dictionary. If you specify any of the generic elementary types C, N, P, or X, any attributes that you fail to specify (field length, number
    of decimal places) are automatically filled with the default values. You cannot specify any other generic types.
    Any data object recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data
    type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and
    structures in the ABAP Dictionary (for compatibility reasons).
    All of the lines in the internal table have the fully-specified technical attributes of the specified data type.
    Key
    You can specify the key <key> of an internal table as follows:
    [UNIQUE|NON-UNIQUE] KEY <col1> ... <col n>
    In tables with a structured line type, all of the components <coli> belong to the key as long as they are not internal tables or references,
    and do not contain internal tables or references. Key fields can be nested structures. The substructures are expanded component by
    component when you access the table using the key. The system follows the sequence of the key fields.
    [UNIQUE|NON-UNIQUE] KEY TABLE LINE
    If a table has an elementary line type (C, D, F, I, N, P, T, X), you can define the entire line as the key. If you try this for a table whose line
    type is itself a table, a syntax error occurs. If a table has a structured line type, it is possible to specify the entire line as the key. However,
    you should remember that this is often not suitable.
    [UNIQUE|NON-UNIQUE] DEFAULT KEY
    This declares the fields of the default key as the key fields. If the table has a structured line type, the default key contains all non-numeric
    columns of the internal table that are not and do not contain references or internal tables. If the table has an elementary line type, the
    default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    Specifying a key is optional. If you do not specify a key, the system defines a table type with an arbitrary key. You can only use this to
    define the types of field symbols and the interface parameters of procedures . For exceptions, refer to Special Features of Standard Tables.
    The optional additions UNIQUE or NON-UNIQUE determine whether the key is to be unique or non-unique, that is, whether the table can
    accept duplicate entries. If you do not specify UNIQUE or NON-UNIQUE for the key, the table type is generic in this respect. As such, it can
    only be used for specifying types. When you specify the table type simultaneously, you must note the following restrictions:
    You cannot use the UNIQUE addition for standard tables. The system always generates the NON-UNIQUE addition automatically.
    You must always specify the UNIQUE option when you create a hashed table.
    Initial Memory Requirement
    You can specify the initial amount of main memory assigned to an internal table object when you define the data type using the following
    addition:
    INITIAL SIZE <n>
    This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to
    reserve memory space for <n> table lines when you declare the table object.
    When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each
    are then allocated.
    You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The
    space occupied, depending on the line width, is 16 <= <n> <= 100.
    It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and
    need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for
    deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
    To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the
    length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB.
    Examples
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    The program defines a table type ITAB. It is a sorted table, with line type of the structure LINE and a unique key of the component
    COLUMN1.
    TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    TYPES: BEGIN OF DEEPLINE,
    FIELD TYPE C,
    TABLE1 TYPE VECTOR,
    TABLE2 TYPE ITAB,
    END OF DEEPLINE.
    TYPES DEEPTABLE TYPE STANDARD TABLE OF DEEPLINE
    WITH DEFAULT KEY.
    The program defines a table type VECTOR with type hashed table, the elementary line type I and a unique key of the entire table line. The
    second table type is the same as in the previous example. The structure DEEPLINE contains the internal table as a component. The table
    type DEEPTABLE has the line type DEEPLINE. Therefore, the elements of this internal table are themselves internal tables. The key is the
    default key - in this case the column FIELD. The key is non-unique, since the table is a standard table.
    Internal table objects
    Internal tables are dynamic variable data objects. Like all variables, you declare them using the DATA statement. You can also declare static
    internal tables in procedures using the STATICS statement, and static internal tables in classes using the CLASS-DATA statement. This
    description is restricted to the DATA statement. However, it applies equally to the STATICS and CLASS-DATA statements.
    Reference to Declared Internal Table Types
    Like all other data objects, you can declare internal table objects using the LIKE or TYPE addition of the DATA statement.
    DATA <itab> TYPE <type>|LIKE <obj> [WITH HEADER LINE].
    Here, the LIKE addition refers to an existing table object in the same program. The TYPE addition can refer to an internal type in the
    program declared using the TYPES statement, or a table type in the ABAP Dictionary.
    You must ensure that you only refer to tables that are fully typed. Referring to generic table types (ANY TABLE, INDEX TABLE) or not
    specifying the key fully is not allowed (for exceptions, refer to Special Features of Standard Tables).
    The optional addition WITH HEADER line declares an extra data object with the same name and line type as the internal table. This data
    object is known as the header line of the internal table. You use it as a work area when working with the internal table (see Using the
    Header Line as a Work Area). When you use internal tables with header lines, you must remember that the header line and the body of the
    table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate
    this by placing brackets after the table name (<itab>[]). Otherwise, ABAP interprets the name as the name of the header line and not of the
    body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested
    in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.
    TYPES VECTOR TYPE SORTED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    DATA: ITAB TYPE VECTOR,
    JTAB LIKE ITAB WITH HEADER LINE.
    MOVE ITAB TO JTAB. <- Syntax error!
    MOVE ITAB TO JTAB[].
    The table object ITAB is created with reference to the table type VECTOR. The table object JTAB has the same data type as ITAB. JTAB also
    has a header line. In the first MOVE statement, JTAB addresses the header line. Since this has the data type I, and the table type of ITAB
    cannot be converted into an elementary type, the MOVE statement causes a syntax error. The second MOVE statement is correct, since
    both operands are table objects.
    Declaring New Internal Tables
    You can use the DATA statement to construct new internal tables as well as using the LIKE or TYPE addition to refer to existing types or
    objects. The table type that you construct does not exist in its own right; instead, it is only an attribute of the table object. You can refer to
    it using the LIKE addition, but not using TYPE. The syntax for constructing a table object in the DATA statement is similar to that for defining
    a table type in the TYPES statement.
    DATA <itab> TYPE|LIKE <tabkind> OF <linetype> WITH <key>
    [INITIAL SIZE <n>]
    [WITH HEADER LINE].
    As when you define a table type , the type constructor
    <tabkind> OF <linetype> WITH <key>
    defines the table type <tabkind>, the line type <linekind>, and the key <key> of the internal table <itab>. Since the technical attributes of
    data objects are always fully specified, the table must be fully specified in the DATA statement. You cannot create generic table types (ANY
    TABLE, INDEX TABLE), only fully-typed tables (STANDARD TABLE, SORTED TABLE, HASHED TABLE). You must also specify the key and whether
    it is to be unique (for exceptions, refer to Special Features of Standard Tables).
    As in the TYPES statement, you can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    You can create an internal table with a header line using the WITH HEADER LINE addition. The header line is created under the same
    conditions as apply when you refer to an existing table type.
    DATA ITAB TYPE HASHED TABLE OF SPFLI
    WITH UNIQUE KEY CARRID CONNID.
    The table object ITAB has the type hashed table, a line type corresponding to the flat structure SPFLI from the ABAP Dictionary, and a
    unique key with the key fields CARRID and CONNID. The internal table ITAB can be regarded as an internal template for the database table
    SPFLI. It is therefore particularly suitable for working with data from this database table as long as you only access it using the key.

  • Issue with value of  transient attribute after filtering or sorting a table

    Hi guys,
      i'm using jdev 11.1.1.4.0 .
      i've the use case :
             - a table with a column containing a checkbox to mark the selection of  a row
    <af:column align="center" sortProperty="TemIsChosen" filterable="true"
    sortable="true" id="c6">
    <af:selectBooleanCheckbox value="#{row.bindings.TemIsChosen.inputValue}" autoSubmit="true"
    shortDesc="#{bindings.ServersIndicTempVVO.hints.TemIsChosen.tooltip}"
    id="sbc1"
    valueChangeListener="#{backing_initIndicatorsTemp.onSelectTemp}"/>
    </af:column>
             - i select one or more rows with checkboxes
             - if i filter  or sort the table, the selection of the checkboxes reset to not selected (value false by default).
         I understand that for the framework, it's a normal behavior because for filtering or sorting , it re-executes the query from database. And transient attribute is not persistent, so it goes back to the default initial value "false".
         What i would appreciate, it's that filtering or sorting has no effect on the value of the transient attribute, ie end user selection remains.
          I tried to modify query mode of the ViewObject to filter with in-memory data. It works fine but if you reset filter inputs you can't retrieve correct RowSet. Only new RowSet is stored, old is lost.
           So  now it's the filtering feature that doesn't work as expected.
       How can i implement  my use case withouth the troubles i've described.
    Best regards,
    David

    Hi Frank,
       no it's a view object level attribute inside a read-only view object.
      The view object doesn't use any entity.
      Here is the definition of the attribute in the xml file of the VO, if can help you :
    <ViewAttribute
        Name="TemIsChosen"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.Boolean"
        ColumnType="BIT"
        AliasName="VIEW_ATTR"
        SQLType="BIT"
        Passivate="true">
        <Properties>
          <SchemaBasedProperties>
            <TOOLTIP
              ResId="ADD"/>
            <DISPLAYWIDTH
              Value="50"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
    David

  • How to find min and max of a field from sorted internal table

    Hi,
    I have sorted Internal Table by field f1.
    How do I find max and min value of f1.
    For min value of f1 I am using,
    READ TABLE IT1 INDEX 1.
    IT1-F1 = MIN.
    Is this correct? And how do I find the max value of f1 from this table.
    Thanks,
    CD

    Yes, that is right, and you can get the max like this.
    data: lv_lines type i.
    * get min
    READ TABLE IT1 INDEX 1.
    MIN  = IT1-F1.
    * get max
    lv_lines = lines( it1 ).
    read table it1 index lv_lines.
    MAX  = IT1-F1.
    Regards,
    Rich Heilman

  • Sort sequence functionality in Batch management

    Hi All,
    I have a doubt in batch management. I am not sure whether it is a basic doubt. But obviously confusing me a lot and I am not able to find appropriate for that.
    In our company, we have two characteristics assigned to the batch class 023. Shelf life expiration date (LOBM_VFDAT) and Manufacturing date (LOBM_HSDAT).
    Our Sort sequence is FIFO.
    Please find the following example given below.
    Material     GR date           SLED               Manufacturing date          Batch
    M1              21.05.2014     21.06.2014        21.05.2014                      0001
    M1              22.05.2014     22.06.2014        20.05.2014                      0002
    As per the above example, when SLED (LOBM_VFDAT) is concerned, batch 0001 will get selected, when Manufacturing date (LOBM_HSDAT) is concerned, batch 0002 will get selected.
    But which particular batch will be copied into the outbound delivery. I am confused how system can sort out based on multiple characteristics.
    Could someone please exlplain the logic behind this.
    Regards,
    Raja Durai

    I assume in your system
    Ascending = TO
    Descending = From
    But, strange to see no material in key combination.
    Whereas, you said
    when SLED (LOBM_VFDAT) is concerned, batch 0001 will get selected, when Manufacturing date (LOBM_HSDAT) is concerned, batch 0002 will get selected
    Frankly, based on above statement I was expecting batch of the key combination. But, that would very tedious task while maintaining individual sort for each batch & material combination. And that is reason I asked you about the key combination.
    Based on screenshot provided, system will consider sort in following sequence:
    1. LOBM_BSDAT
    2. LOBM_VFDAT
    provided you have dependency maintained for SORT in CU71.
    There in dependency editor may be you have logic to control this behaviour, for example
    Thanks, JP

  • Sorting a table in numbers for iPad

    Hello,
    can anyone help me figure out how to sort a table, such as a league table sorted by points?
    Thanks

    Generally, you are more likely to get an answer if you post in the iWork for iOS forum at
    https://discussions.apple.com/community/app_store/iwork_for_ios
     Cheers, Tom 

  • What is access sequence tables and how to use them in program?

    hi all, I know a little about SD and access sequence tables, but I get a requriment like this:
    condition type is a paramater
    The condition types allowed in this report are: Note: A list of pre-defined condition types with their corresponding access sequence tables will be defined.
    How can I make it? How can I use it in program to get the price?

    Hi,
    An access sequence is a search strategy with the aid of which the SAP
    System searches for valid condition records of a certain condition type.
    For example, you can stipulate for a price that the SAP System first
    searches for a price for a specific plant, and then for a generally
    applicable price.
    For condition types for which you wish to maintain conditions with their
    own validity period, you must assign an access sequence. With this, you
    define which fields the SAP System checks in searching for a valid
    condition record.
    e.g. When you create condition record (e.g. Purchasing condition record) you enter condition type, system asks you the key combination to enter the entries. These key combinations are nothing but the access sequence. On the basis of combination of condition table it will search record. e.g. when u maintain condition record with acc seq Material/plant combination, it will transfer the same record in PO when u enter same material and plant in the PO.
    Example:
    An access sequence has been assigned to condition type PB00 so that
    prices can be maintained in purchasing info records and contracts.
    No access sequence has been assigned to condition type RC00 because it
    does not have a validity period of its own. In the standard system, it is
    always maintained simultaneously with the price and is valid for the
    period of the price.
    For more help
    http://www.sap-img.com/materials/steps-for-mm-pricing-procedures.htm
    Regards,
    Raj.

  • Sort Filter Table Matrix

    Hi,
    I like to use the Sort Filter Table function (right click on the Matrix, plus the SAP icon to be activated) in my Add-On, Matrix.
    Could you please provide me the code?
    Thank you,
    Rune

    Hi Szymon Lipnicki,
    I will open a new Forum ticket, because I cannot give you 10 points in this ticket anymore...
    I will post a new ticket and please drop your answer in the new ticket. The Subject is "Filtering User Matrix"
    Thank you very much, this is good news!!!
    Thank you,
    Rune

Maybe you are looking for

  • Adding data field in query print layout designer (PLD)

    Dear Experts/Gurus, I would like to add data field in query PLD in repetitive area1 but it can't. The query I made excluding sequence no., so I think I must use datafield for that. I  use textfield in the repetitive area header1. is it correct what I

  • Oracle Apps 11i AP Credit Memo & Invoice Link in tables

    Hello, How do we link the credit memo to an invoice from the tables. For example if i know the credit memo number how do i find that credit memo is linked to which invoice.(I believe the table is AP_Invoices_All but not sure which column) Thank you A

  • Pie chart labels prepended with "@" symbol

    Hello I have a pie chart and it has two values, each of which is a formula When I view the Pie chart the Data labels and legend are prefixed with @ The Data Value formula name is Open Online, so the data lable on the Pie is @Open Online, as it the le

  • Creating a PDF drawer

    I have scanned in 10 separate pages, converted them to 10 PDF files and now need to send them out in one attachment. So I need to convert from 10 separate PDF files to 1 PDF file with 10 pages. How?

  • SCSM Review activities watched by SCO Monitor Object Review Activity

    Hi, I'm monitoring the Review Activities with Status equals Pending and Title contains [Set_ ...] (see pic) Now the runbook starts and when I've a look at the log I see it starts on: So the Status Filter is used (I've tested this), but the Title Filt