How to change the layout of alv-urgent

hi friends,
my requirement is  User should be able to sort the data on fields in different order, should be able to select the fields to sort the data
for example iam displaying the sales order,sales group,kunnr,amount in ALV List Display now when iam selecting the fields sales group,kunnr,amount,sales order then program has to display output in this way only. for this i used sort table thae way iwrote logic for displaying output is as follows ...
  w_sort-spos = 3.
  w_sort-fieldname = 'FINQTR'.
  W_FIELD-just = 'C'.
  W_SORT-UP = 'X'.
  W_SORT-group = 'UL'.
  W_SORT-SUBTOT = 'X'.
  APPEND W_SORT TO I_SORT.
  CLEAR W_SORT.
for subtotals it is working fine and now what shall i do for this requirement plz send me the sample code its really urgent to me.

use slis_t_sortinfo_alv.
w_sort-fieldname = 'XYZ'.
w_sort-up = p_userinput1.(for XYZ)
w_sort-down = p_userinput2.(for XYZ) preferabbly radio buttons.
append w_sort to t_sort.
w_sort-fieldname = 'YZX'.
w_sort-up = p_userinput1.(for YZX)
w_sort-down = p_userinput2.(for YZX) preferabbly radio buttons.
append w_sort to t_sort.
thats the best I am able to think for you.
let me know if that is helpful.
cheers
santhosh

Similar Messages

  • How to change the layout of a category view

    I don't know how to change the layout of a category. I want to put 3 image's behind each other followed by some text, like a table with 4 columns. Instead of puting then in 4 rows

    larsprevo
    The category 'view' of items/folders uses the default style of the content area it is defined in (shared categories use the default shared style). Edit the default style to change the font/color of the items/folders returned within the category 'view'. Unfortunately, you don't have the ability to control the layout(like folder regions) - they always display in rows.
    Added an enhancement request for a feature that would allow you to control the display of items/folders in a category/perspective: 1828423

  • How to change the layout of the desktop before you login as a User into iPS.

    I am trying to change the layout of the anonymous user desktop. I know how to change the layout after i login as a User. All the thin channels except one get lined up in the first column of a thin-thick-thin layout.
    How to change that?
    Any help is greatly appreciated.
    Hugo Victor

    Go to available channel list and the select show advanced options, you should see the row and column attributes for the channel. Set it to your choice ..

  • How to change the layout of the ALV screen

    Hi,
    I need to have a parameter in the selection screen.  If I change the layout name on the selection-screen, the layout of the ALV needs to be changed.
    Thanks,
    srinivas.

    Pass the layout (and report name) to the ALV. parameter IS_VARIANT of function module [REUSE_ALV_GRID_DISPLAY|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_grid_display&adv=false&sortby=cm_rnd_rankvalue] or method [SET_TABLE_FOR_FIRST_DISPLAY|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=set_table_for_first_display&adv=false&sortby=cm_rnd_rankvalue]
    You may also use the following function modules in your selection screen :
    - [REUSE_ALV_VARIANT_F4|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_f4&adv=false&sortby=cm_rnd_rankvalue]  to select the layout/variant name. (in AT SELECTION-SCREEN ON VALUE-REQUEST FOR <variant>.)
    - [REUSE_ALV_VARIANT_EXISTENCE|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_existence&adv=false&sortby=cm_rnd_rankvalue] to check existence of the layout/variant name.  (in AT SELECTION-SCREEN ON <variant>)
    - [REUSE_ALV_VARIANT_DEFAULT_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=reuse_alv_variant_default_get&adv=false&sortby=cm_rnd_rankvalue] to get the default variant (to fill <variant> in the INITIALIZATION)
    Regards

  • How 2 Change the Layout of Reports Paramform?

    reports 9.0.4.0.21
    hi folks
    we want to change the layout of the parameter form (html) on this way that it looks like our Corporate Design.
    (Logo, style, color, and so on)
    is it possible to change that design?
    if yes, how?
    thx in advance
    jogi

    Hello,
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_howto.htm#i1039790
    3.11 Work with Parameters and the Parameter Form
    Regards

  • Export to Excel u0096 how to change the layout of the spreadsheet?

    Hello all,
    Do anyone knows how to configure the layout of the excel spreadsheet that opens when doing "export to Excel" from a web template report?
    For example, I would like to add texts or the filter values, how can I achieve it?
    Thank you!
    Ron.

    how can u add labels and texts in the exported excel sheet.
    as far as i know , NO U CANNOT DO THAT.
    cos watever data is displayed out of analysis web item that and only that u can output to excel websheet.
    as the analysis web item is assigned to excel output
    but if u want to output the texts and filter
    i can suggest
    create a tabbed pages
    in tab page assign filter section
    now in that tab page if u do export to excel the excel sheet will have filter output
    u cannot change that binding as far as i know..

  • How to change the layout of area pages in ESS Overview.

    Dear Experts,
    Area groups like Leave, directory,payslip are presented on portal in a layout which is fixed in backend ESS customization eg postions(1,2...).
    Can I change the layout of these areas in portal?
    I tried doing this by going to overview iview and preview and then ctrl+click. I could see containers for each area group but I could not modify their sequence?
    Please help!!!

    Hi,
    May be this guide can help you
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0235c40-6351-2a10-a3a3-eb666dfdb407
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10ddda33-277b-2a10-5294-9913ee5d698f
    Regards,
    Niraj
    Edited by: Niraj Kumar on Feb 18, 2009 10:26 AM

  • How to change the layout set for Search Results

    Hi gurus.
    I’m developing a search component for KM Search iView, and as a requirement the layout must change dynamically to display the search results.  How do I get this to happen?
    public SearchParamsMap getSearchParamsMap() {
         SearchParamsMap m = new SearchParamsMap();
              try {
              IQueryEntryList list =                   this.createQuery();
                   m.put(SearchParamConst.PARAM_SEARCH_QUERY_ENTRIES,                list);
              } catch (WcmException e) {
                   e.printStackTrace();
              m.put(
                   SearchParamConst.PARAM_SEARCH_IN,
                   SearchParamConst.SEARCH_FROM_FOLDER);
              m.put(SearchParamConst.PARAM_SEARCH_FOLDER, path);
              return m;
    private IQueryEntryList createQuery() throws WcmException {
              Hashtable searchParameters = new Hashtable();
              searchParameters.put(
                   SearchParamConst.PARAM_ITEMS_SELECTION,
                   SearchParamConst.ITEM_ONLY_DOCS);
              searchParameters.put(
                   SearchParamConst.RESULT_LAYOUT_SET,
                   "Sed_Comunicados");
              SearchQueryListBuilder sqb =
                   new SearchQueryListBuilder(searchParameters);
              IQueryEntryList qel = sqb.buildSearchQueryList();
              return qel;
    In the createQuery() method, code searchParameters.put(
                   SearchParamConst.RESULT_LAYOUT_SET,
                   "Sed_Comunicados"); is not working.  Also, where do I find the documentation for Class SearchParamConst?

    I have the same question.  Any help will be greatly appreciated.

  • How to change the layout of check in form

    Hi,
    Is there anyway to change to position of the metadata field, such as display more than one field in the same row?
    Thanks.

    Check out chapter 6 of the Admin Tutorials guide for some tips and tricks on using profiles and rules to change and enhance the layout and function of the checkin/search and other pages.
    http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/tutorials/tutorials_cserver_10en.pdf
    Warmly,
    Billy Cripe
    Fishbowl Solutions

  • How to change the colour in ALV of the particular coloum thru mouse rollove

    Hi ,
    Can any body help me in this ,
    Im presently working on ALV's,and i want the color of the
    any coloum to be changed when ever i move the mouse over that  colum from the normal colour.
    Thanks
    Anil

    I dont think we have any events like On Mouse roll liek in VB yet.
    Rgds,
    Mano Sri

  • How to change the layout

    hi there
    i meet a requirement about alv display.
    i have some data like below
    bukrs name1 ort01 prctr     budat    pswsl wrbtr
    9999  A01   01    99990000  20070601 HKD   0
    9999  A01   01    99990000  20070601 SGD   -1870.84
    9999  A01   01    99990000  20070601 USD   0
    9999  A01   01    99990000  20070601 EUR   0
    9999  A01   01    99990000  20070608 HKD   0
    9999  A01   01    99990000  20070608 SGD   -1870.84
    9999  A01   01    99990000  20070608 USD   0
    9999  A01   01    99990000  20070608 EUR   0
    the requirement is that the result will be displayed
    bukrs name1 ort01 prctr     hkd(06/01) sgd(06/01) usd(06/01) eur(06/01)  hkd(06/08) sgd(06/08) usd(06/08) eur(06/08)
    9999  A01   01    99990000  0          -1870.84   0          0    0          -1870.84   0          0
    and the currency is not fixed.
    any suggestion wil be appriciated,
    thank u in advance
    Kevin
    i use the   CALL METHOD cl_alv_table_create=>create_dynamic_table
    Message was edited by:
            Kevin Gao

    1. get the dynamic table
    2. set the dynamic field

  • How to change the layout of an input file and write to an output file

    Hi
    I have a .csv file which has a layout as schoolNo. , county1,county2,county3,county4,county5
    It will need to go into an output file as schoolNo. repeated and a county on each record .
    ie., schoolNo.,county1
    schoolNo.,county2
    schoolNo.,county3
    schoolNo.,county4
    schoolNo.,county5
    I wrote the java program as follows ..which results in this error
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    BECAUSE :--
    i know bec., the first record doesnot have county3,county4,county5 . So when the if loop for county3 lenght is checked it gives this exception .
    Pls help me write this program ..thanks in advance .
    /Here I open the input file and read in record by record                                                                                                                        
              BufferedReader readin;
              try {
                   readin = new BufferedReader(new FileReader(InFile));
                   String firstLine = readin.readLine();
                   String[] headers = firstLine.split(",");
                   columnCount = headers.length;
                   System.out.println("Columns in ZIP Master File: "+columnCount);
                   for(String input ;(input = readin.readLine()) != null; ){
                        recCount++;
                        input = input.substring(1);               
                        String[] column = input.split(",");
                        if(columnCount == 10){
                             eachIP++;
    //                               OUTPUT FILE
                                    if(column[1].length()> 0) {
                                       String mainStr = column[0] + "," + column[1] ; 
                                       Count++;
                                       totalcolumns++;
                                       writeOutFile.write(mainStr);
                                       writeOutFile.newLine();
                                  else{
                                  bypassedCount++;
                                    if(column[2].length()>0){
                                         String mainStr = column[0]+ "," + column[2];
                                         Count++;
                                         totalcolumns++;
                                       writeOutFile.write(mainStr);
                                       writeOutFile.newLine();
                                  else{
                                  bypassedCount++;
                                    if(column[3]..length()>0){
                                         String mainStr = column[0]+ "," + column[3];
                                         Count++;
                                         totalcolumns++;
                                       writeOutFile.write(mainStr);
                                       writeOutFile.newLine();
                                  else{
                                  bypassedCount++;
                                 }

    There are two split( ... ) methods; check the other one (the one with two arguments), it allows for empty entries to be counted, i.e. split(inputString, -1) gives you the wanted results.

  • How to change the sign in ALV

    Hi in my ALV output the negative numbers are displayed with sign on the right side of the numbers.
    Need your help to get this sign on the left side.

    Hi,
    This is from SDN thread.
    When you define the fieldcatalog..
    Give the rollname..
    Example..
    DATA: S_FIELDCATALOG TYPE slis_fieldcat_alv.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname = 'ITAB1'.
    <b>s_fieldcatalog-rollname = 'WERTV6'.</b>
    APPEND s_fieldcatalog to t_fieldcatalog.

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 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.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • Help in changing the layout structure

    HI,
         I have created a layout from the <b>com.sap.portal.layout.framework</b>. I have selected the <b>WAandNavPanel.jsp</b> component. This layout has two colums which is WideNarrow, so i have to keep the Detailed Navigation (DTN) in the right side. Iwant to change the layout from WideNarrow to NarrowWide column layout ot keep the DTN in the Narrow left side column.
    how to change the layout from the WIdeNarrow to NarrowWide in the WAandNavPanel.jsp of the above mentioned par
    Thanks in advance
    Thx
    Saravanan

    Hi Saravanan,
    The JSP file describes the layout properties within the page. You should only replace the width values of the cells (<hbj:gridLayoutCell .... width="...") with the new values that you want.
    In the portalapp.xml file you should also change the description of the layout so it will match your new need (from "WideNarrow" to "NarrowWide").
    Please award points if you find this answer helpful.
    Regards,
    Amit.

Maybe you are looking for