Sort Table based on Display Variant

Hi...
I want to Sort a table based on Display Variant Sort option??
Please Help????

Hi Try this...
FM..
K_KKB_OUTTAB_SORT
To Sort Data
CALL FUNCTION 'K_KKB_OUTTAB_SORT'
  EXPORTING
    IT_SORT                   = I_SORT
  TABLES
    T_OUTTAB                  = I_MAIL_FINAL
EXCEPTIONS
   SORTFIELD_NOT_FOUND       = 1
   OTHERS                    = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • CM25: Sort standard table based on custom table.

    Hi Experts,
    I need to sort the CM25 capacity table based on a ZTABLE where we will define the sequence number of each material. So when CM25 is executed the material should get sorted based on sequence number maintained in Ztable. Now the challenge is how to achieve this sorting before we display the capacity table.
    anybody has faced such scenerio please help us.
    There are few user exits available but not able to find out how to achieve the required functionality.
    Regards,
    Raghav
    Edited by: Julius Bussche on Jul 30, 2009 9:29 AM
    In future threads with meaningless subject titles will simply be deleted as you appear to be doing this intentionally

    First, let me say that I have no experience with this CM25 table and where/how it is used or displayed, but here's how I look at it:
    But what is the real problem?
    1. Don't know the user exit / BAdI to be used?
    2. Don't know how to do the sorting?
    3. .....?
    Answer:
    1. This will be a matter of trying I would say and reading the documentation of the exit/BAdI.
    2. You can do dynamic sorting of an internal table (if it is an internal table that is used before displaying it).
    DATA: lv_sort1 TYPE CHAR10 VALUE 'NAME_OF_COLUMN_FROM_ZTABLE',
               lv_sort2 TYPE CHAR10 VALUE 'NAME_OF_OTHER_COLUMN_FROM_ZTABLE'.
    SORT itab BY (lv_sort1) ASCENDING (lv_sort2) DESCENDING.
    Edited by: Micky Oestreich on Jul 30, 2009 7:34 AM

  • Sort Internal table based on another internal table

    Hello All,
    My Requirement is :
    I have two internal tables itab1 and itab2. itab1 has partner_number along with some more fields/columns. Based on the partner_numbers of the itab1 i write a query to get the values for partner_last_name and central_block_flag from the table but000 and i fill these values into a new itab2.
    Sort itab2 by partner_last_name and central_block.
    Now how do I sort itab1 based on the sorted itab2-partner_number. I need to have itab1 sorted similar to the order in the itab2.
    How do i do this?
    Please let me know if you need more details.Looking forward for your support.
    Regards,
    Harish P M

    Hello Micky,
    Thank you for your early reply.
    I have this scenario wherein i need to sort a existing internal table itab1 of type 'bapibus1006_relations' based on the 'Partner last name ' and 'Inactive/Active Flag'. These two fields are not available in this itab1 and so i need to create itab2 after a query on table but000.
    Sorting itab2 is , first sort itab2 based on the 'Active flag' and then sort this itab2 again by 'Partner last name'(ascending order).
    Finally when i get my sorted itab2 i would have to ensure that my objective of sorting itab1 is obtained.
    I guess i sound better now.
    Would be helpful if you could reply.
    Regards,
    Harish P M

  • Data from another table, to be displayed on table based screen

    I have a block that is based on one table, if I found the record(s) on that table I will display it on the forms, No Problemo. But, if record(s) was not in the said table, I have to get the data on another table and then display it on the same forms. Is there someone who can show me how I can get the data from another table and display it on screen that is based on another table?

    suppose you have 2 table emp_n and emp with same table structure
    first check data from emp_n if not found then go to emp
    try it:-
    you will change block name at run time(query data source)
    by
    emp_n is old
    emp is new
    set_block_property('emp_n',QUERY_DATA_SOURCE_NAME,'emp');
    if no data found in emp_n table then
    change the block query name by
    set_block_property('emp_n',QUERY_DATA_SOURCE_NAME,'emp');
    in next try it will go to emp table for fetching record
    kuljeet pal singh

  • Displaying the table based on number of records.

    Hi Experts,
    I want to display a normal table based on the records, if there is only one record then only one row should be displayed on the table, if there are 2 records then 2rows should be displayed on the table with the data, if they are more than 2 records only 2 rows should be displayed on the table and remaining rows should be able to scroll on the table.
    Please Provide the requried infformation.
    Thanks & Regards.
    Bhushan.

    Hi Bhushan
      What exactly is row scroll? Did you not refer to the vertical scrollbar that appears when the number of rows is more than the number of displayed rows? Please clarify
    If it is the vertical table scroll bar you refered to then you will get it if the number of records are more than the visibleRowCount you set
    If it is the horizonal table scroll bar you refered to then you will get it by setting a fixed width to the table. If your column(s) value width exceeds the table width you have specified, you get the horizontal scrollbar.
    Regards,
    Gayathri Shanbhag

  • How to re-sort Table data like A-Z and Z-A

    Hello Gurus,
      How can i re-sort Table data based on last name or first name, once table filled data from backend(i mean, once executed RFC,  Table will be filled with data records, after that i want to re-sort table).
       Can you provide me code, how to do?
    Thanks
    Venkat.

    Hi Venkat,
    For sorting to table columns, you need to pick up the code from here and add into a java file within your development component.
    http://wiki.sdn.sap.com/wiki/display/Snippets/TableSorterClassfor+WebDynpro
    Then, you can call the constructor of the class and pass the arguments to enable table sorting in your code.
    Refer to following blog for execution
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1078501850DB00490474849923920126End?blog=/pub/wlg/3287
    Let me know, if the problem persists.
    Regards,
    Tushar Sinha

  • Problem with parameters and non table based items

    Hi,
    I have a situation where I have some not table based items on a page (shuttles and select lists). It is parameters that the end user inputs. I have another page with the same items just here they are Display Only and also not table based. When the user press a button I branch from page 1 to page 2 and set the items on page 2. My problem is that the input the user keys in are not copied to the items on page 2. I can see the data in the session state.
    I assume that this is a silly question and I have just set Source Used or Source Type wrong one one of the items but I can not get it working. Can anybody help?
    It works fine if I use a Application Item and creates a process on page 1 where I copy the item value from the session state but that should be needed right?
    Regards Pete

    Thanks Scott,
    I think I got it working. If I remove all the colons from the data it works. I select several entries in a Shuttle and the result is a colon delimited string of values. If I remove these in a process it works fine. Is there a way of escaping the output from a Shuttle?
    Regards Pete

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • Spliting a table in to two table based on the groups in SSRS

    Hi,
    I am trying to a split a rows accross two tables based on a group.
    So far I have added a list and added a row group and grouped it using lineof business
    Inside my list i have two identical tables so i can display the data
    for the first table i have set the row visibility as follows: where LineOfbusiness1 is the  groupname of my list group
    =RowNumber(Nothing) >= (IIf(CountRows("LineOfBusiness1")\2 = 1, CountRows("LineOfBusiness1")/2, (CountRows("LineOfBusiness1")/2)+1))
    and for the second table in the i have set the row visibility as follows
    =RowNumber(Nothing)< (IIf(CountRows("LineOfBusiness1")\2 = 1,CountRows("LineOfBusiness1")/2, (CountRows("LineOfBusiness1")/2)+1))
    this set up works fine for the first group but it doesnt display the data the way i want for the subsequent groups.
    so how do i have the table start over after each group... plus in my group i have specified to do a page break after everygroup...
    Any help will be appreciated.
    Thanks
    Karen

    Visakh,
    Thanks for answering.... a sample for the data will look like
    dataset----
    create table #dataset
    Code varchar(5),
    Name varchar(200),
    Lineofbusiness int,
    Statename varchar(10),
    typed int,
    description varchar(2000)
    insert into #dataset
    select 45111,abc,1,AL,4500,policies
    insert into #dataset
    select 45111,abc,1,AL,2500,vehiles
    insert into #dataset
    select 45111,abc,1,AL,3,drivers
    insert into #dataset
    select 45000,bca,2,AL,4500,policies
    insert into #dataset
    select 45000,bca,2,AL,500,house
    insert into #dataset
    select 45000,bca,2,AL,40,theft
    When i display the data i want it to be
    Line of business 1
    policies 4500 drviers 3
    vehiles 2500
    Line of business 2
    Policies 4500 theft 40
    House 500
    but right now the for lineofbusiness 1 its showing the correct way for but the line 2 everything is being displayed in the right.
    Thanks
    Karen

  • Need to fetch value from a table based on data range

    Hello there,
    I was hoping that the community could give me a hand with this little puzzle I got.
    I am currently creating a Time Dimension for a data wharehouse, and I have the requirement to populate a column named SEASON (e.g: Summer, Winter, Spring, Autumn) for each date row. So for the 20/Dec/2013, the Season column must say Winter.
    Here is now my Time Dimension table looks like, without the Season information (which I yet have to load):
    DimTime Table
    TIMEID
    FULLDATE
    YEAR
    SEASON
    MONTH
    MONTHDAY
    WEEK
    WEEKDAY
    274
    02-MAR-10
    2010
    3
    2
    9
    2
    275
    03-MAR-10
    2010
    3
    3
    9
    3
    276
    04-MAR-10
    2010
    3
    4
    9
    4
    277
    05-MAR-10
    2010
    3
    5
    9
    5
    278
    06-MAR-10
    2010
    3
    6
    9
    6
    279
    07-MAR-10
    2010
    3
    7
    9
    7
    This entire table is being populated using Oracle functions to manipulate a date field from another table, named PDATE:
    My ETL Code
    INSERT INTO DimTime(timeid, fulldate, year, month, monthday, week, weekday)
    SELECT tim_seq.NEXTVAL, pdate, year, month, monthday, week, weekday
    FROM (SELECT DISTINCT pdate, EXTRACT(year from pdate) year, EXTRACT(month from pdate) month,
    EXTRACT(day FROM pdate) monthday, to_number(to_char(to_date(pdate,'DD/MM/YY'),'IW')) week,
    TO_CHAR(pdate, 'D') weekday
    FROM Performance PER
    ORDER BY pdate);
    NOTE: Code considers the table DimTime to be truncated every time it loads (i.e.: I don't need to consider additional loads).
    As you can see, Season wasn't populated. Since the solstices and equinoxes vary for each year, I can't just say that Summer start at a given date (e.g: 21 of June) because one year it could be the 19/Jun, another the 22/Jun, etc. So in order to solve this problem, I have a table named Season which defines the START and END dates for the seasons:
    Season Table
    SEASON#
    SEASONNAME
    YEAR
    DATEFROM
    DATETO
    1
    Spring
    2010
    01-MAR-10
    30-MAY-10
    2
    Summer
    2010
    31-MAY-10
    29-AUG-10
    3
    Autumn
    2010
    30-AUG-10
    28-NOV-10
    4
    Winter
    2010
    29-NOV-10
    27-FEB-11
    5
    Spring
    2011
    28-FEB-11
    29-MAY-11
    6
    Summer
    2011
    30-MAY-11
    28-AUG-11
    7
    Autumn
    2011
    29-AUG-11
    27-NOV-11
    8
    Winter
    2011
    28-NOV-11
    26-FEB-12
    9
    Winter
    2009
    30-NOV-09
    28-FEB-10
    This is the bit I don't know how to do. How can I make sure that I populate the correct Season in my DimTime table based on the season specified in the Season table?
    Thanks in advance for your help!
    Regards,
    P.

    Just join to table Season:
    INSERT
      INTO DimTime(
                   timeid,
                   fulldate,
                   year,
                   month,
                   monthday,
                   week,
                   weekday,
                   seasonname
      SELECT  tim_seq.NEXTVAL,
              pdate,
              year,
              month,
              monthday,
              week,
              weekday
        FROM  (
               SELECT  DISTINCT pdate,
                                EXTRACT(year from pdate) year,
                                EXTRACT(month from pdate) month,
                                EXTRACT(day FROM pdate) monthday,
                                to_number(to_char(to_date(pdate,'DD/MM/YY'),'IW')) week,
                                TO_CHAR(pdate,'D') weekday,
                                seasonname
                 FROM  Performance PER,
                       season
                 WHERE pdate between datefrom and dateto
    SY.

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Build a table based on XML data set with Spry

    Hi there,
    I'm new to spry technology therefore forgive any basic question of mine.
    I'm trying to fill content in a table based on XML data set values but nothing is shown :-(
    here is my code.... any suggestion? pls tell me where I'm wrong.
    Thank you in advance
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var uscite = new Spry.Data.XMLDataSet("data/Calendario 2011.xml", "csv_data_records/record", {sortOnLoad: "Date", sortOrderOnLoad: "ascending"});
    uscite.setColumnType("Date", "date");
    uscite.setColumnType("km", "number");
    </script>
    <div class="RankContainer" id="UsciteDiv" spry:region="uscite" >
              <table width="100%" border="0" class="RankTable">
                <tr>
                  <th width="10%" scope="col" spry:sort="Date">Data</th>
                  <th width="20%" scope="col">Destinazione</th>
                  <th width="5%" scope="col">KM</th>
                  <th width="35%" scope="col">Percorso</th>
                  <th width="30%" scope="col">Breve</th>
                 <!-- <th width="15%" scope="col">Mappa</th>-->
                </tr>
                <tr>
                   <script type="text/javascript">
           var rows = uscite.getData();
        for (var i = 0; i < rows.length; i++)
         if (rows[i]["Mappa"].startsWith("/"))
          rowContent = "<td> si </td>";
         else
              rowContent = "<td> no </td>";
         document.write("<td>{Date}</td>");
         document.write("<td>"+rowContent+"</td>");
         document.write("<td>{km}</td>");
         document.write("<td>{Percorso}</td>");
         document.write("<td>{Breve}</td>");
          </script>
               </tr>
              </table>
           </div>

    Sure this is how it should work (except that no anchor tag shall be present for Destinazione whereas Mappa has no real value in)
    http://www.gsc-borsano.it/_Calendario%202011.html
    and this is the non working page
    http://www.gsc-borsano.it/_v2Calendario%202011.html
    Thanks

  • Extracting information from a table based on different criteria

    Post Author: shineysideup
    CA Forum: Formula
    Hi Folks
    I have a bit of a strange one here.
    I need to extract information from a single table based on different critera.
    Sounds simple enough but here's the tricky part.
    This table is a table that contains the build of a product. All the parts that are used to make the product and also the sub-parts that are used to make the primary product parts.
    Example:
    I have a part that is in the product and the part no is 1111. This part is actually part of another part that is part no 1112
    What I need to do is display part no 1111 with all of its details but then also show that it is also part of part no 1112.
    The way the table holds this information is as follows.
    Seq_No      Parent_Seq_No     Part_No
    The seq_no is item no that is given to the part number. If the part is a member of another part then there is also a parent_seq_no.
    Everything needs to tie back to the seq_no and the parent_seq no as the part itself can be used in a parent or it can be used on its own. This way you can actually have the same part appearing in the list several times but the seq_no will be different for each one. If the part can be used in two different sub-builds (with each part being used twice in each sub-build) and also on its own once then you would have 5 different seq_nos two parent_seq_nos.
    What I need to do is to list all of the parts but then also when a part is part of a parent_seq_no I need to be able to display the parent seqno but also the part_no for that as the parent would also be listed as an individual item in the part list.
    At the moment listing the part_no, seq_no and parent_seq_no is easy but when I try to list the part_no for the parent I jsut keep getting the original sub part again. I can do this with a sub-report but with what I need to do with the data after listing the parts a sub-report is not an option for me.
    This make sense?
    Thanks

    Post Author: Charliy
    CA Forum: Formula
    As long as the chain only goes one link deep, you should be able to Alias the table and link it (left outer)  from the child part to the parent part.  Then build a Detail B (or Group Footer if that's where you're printing) and conditionally suppress is if there is no "Parent Part".

  • Accessing sap tables data and display in webi

    Hi all,
    i installed business objects edge series.
    i want to access SAP tables data and display in webi for adhoc reporting.
    Is there any process to achieve this.

    Hi
    currently (April 2010) you have the following options:
    1. You load your R/3 data into an SAP BW and use universes based on BEx queries to create WebI reports
    2. You can use SAP rapid marts. They contain Data integrator mappings (you need an installation of the DI for this) to extract and load your SAP R/3 data into a relational database. Additionally they provide universes (based on a relational schema) hich ill allo you to build WebI reports.
    3. You can use the R/3 connector for the Data Federator (You need a DF installation for this). Please note that the R/3 connector is not yet a product rather just a PROTOTYPE. Take a look here: SAP BusinessObjects Web Intelligence Reporting for SAP ERP [original link is broken]
    4. You can try to access the underlying database directly using the appropriate DB drivers. Please note that this is NOT RECOMMENDED. This way you cannot leverage security defined on the R/3 side in your WebI reports and you will not be able to access all data as available in R/3 since some of them are stored encoded/compressed in the underlying tables.
    5. Instead of WebI you can use Crystal Reports and the R/3 drivers (eg. SAP Tables, Functions, Cluster) provided when installing the integration kit for SAP.
    Regards,
    Stratos

  • Currency Format in Spry Sort Table

    Any ideas on how to format all numbers in a spry sort table
    into US currency? Currently on my site, Spry is not displaying the
    ".00" that is included in my XML file.
    My
    Spry Sort Table Example

    Hi,
    yes, I`ve had the same behavior. As a workaround, you have to change the format of the cells.
    Go into the properties of the cells:
    -> Right mouse click
    -> format cells
    -> category
    -> number
    -> change something, e.g. the number of decimal places to show
    Then you will have to map the component again to the same cells under "Display Data".
    And now, the currency information will be shown correctly.
    Regards
    Victor

Maybe you are looking for

  • How to reuse a pre-populate adapter

    Hi OIM gurus, I have a pre-pop rule gen adapter that computes the value of a process form attribute based on business logic applied to a OIM user form attribute. Now, if the OIM user form attribute changes I want this pre-pop to run again and update

  • Problems Installing BPA (Bpel Process Analytics)

    Hi, I was installing BPA under my Applicattion Server 10g R2, first of all i've installed Oracle Bpel Process Manager 10.1.2, after that i started the installation of BPA, checking all the requirements, the installation first copy the files , and the

  • Premiere Pro CC won't play audio from video file

    I've been trying to edit videos recorded with Bandicam in Premiere Pro CC. The video file itself is fine, when I play it in Windows Media Player it all checks out, but once I get it into a sequence in Premiere Pro CC despite it showing the audio trac

  • CO_XT_OPERATIONS_DELETE function module

    Is there any documentation on the use of this Function Module ? would like to use instead of BDC

  • Why does my original Apple ID not work with the support community?

    I've been signing in with the same Apple ID for at least four years.  My username on these forums is JayhawkCWE.  When I tried to sign on this morning, it told me I had to make a new account. When I entered my preferred ID (my forum handle, not the A