Sorting issue in ALV ABAP webdynpro

Hi All,
We are displaying the data in ALV format using ABAP webdynpro.
The issue here is sorting the values. The field  is the character field, as the field may contain character or numberic values.
When we sort a set of values in ascending order, the values are sorted wrongly.
Example values sorted in ascending order:
11055
11260
5662
8697
9984
The above values are sorted wrongly. Is this a standard limitation of webdynpro ABAP or do we have any support class or setting available to solve this issue.
Please help.
Regards,
Vijay

Hello Vijay
of course its not  a limitation, you can sort it either ways.
Check the following link
http://help.sap.com/saphelp_nw70/helpdata/en/e9/e5eb40c4f8712ae10000000a155106/content.htm
you can use the following classes
Set sort Direction  -
CL_SALV_SORTS meth:  ADD_SORT (Parameter SEQUENCE)
CL_SALV_SORT  meth:  SET_SEQUENCE
Get sort direction
CL_SALV_SORT meth: GET_SEQUENCE
hope this helps!!
Regards
Senon

Similar Messages

  • Issue with new abap webdynpro INBOX EHP5

    Hello Experts,
    I'm currently working on the configuration of ESS/MSS services in EHP5. We are using different services like Appraisal OSA, Learning solution,etc. I already configured the Launchpad ESS, it's working fine but now I have an issue with the new Abap webdynpro INBOX. The employee and manager see their workitem notifications correctly in their respective inbox.(I'm calling application: IBO_WDA_INBOX that I integrated in my launchpad).
    My problem is that when clicking on a workitem in order that it opens me the appraisal document (in edit or display mode), I got an error saying: "There is no iView available for system "": object "SWF_WIOBN". For more information, contact your administrator."
    I did some search on SAP help without any results. I'm wondering how should I register workflow tasks? I saw there is a table called IBO_C_WF_TAS (I added entries e.g:
    IBO_WDA_INBOX TS99700031   EXECUTEAPPRAISALDOCUMENT).
    I tried also to register all my custom tasks in transaction SWFVISU.
    example:
    TASK: TS99700013
    Visualization Type: ABAP Webdynpro
    APPLICATION:    HAP_MAIN_DOCUMENT
    DYNPARAM   :    sap-wd-configId=HAP_AC_MAIN_DOC
    NAMESPACE :    sap
    SYSTEM_ALIAS: SAP_Webdynpro_XSS (I did create a system in sap portal under System Administration with as AS property /webdynpro/dispatcher )
    Could you let me know what could be wrong, what I missed? Shall I create an iView, if yes which one? which properties?
    I would really appreciate any help.
    Thanks!

    Hello Siddharth,
    Thanks for you reply. Still the same issue. Following are the config I did till now:
    In the PCD I created a new business object (SWF_WIOBN), an operation linked to the object (NAVIGATE).
    I did create an iView (powl) in the custom folder, I integrated the operation within iView. I created a page that contains the iView.
    In the properties of the iView I gave:
    Application Name: HAP_MAIN_DOCUMENT.
    Launch in New Window: "Display in separate Headerless Portal Window".
    System: SAP_ECC_HumanResources
    I added the required entries in tables:
    IBO_C_WF_TTAS
    IBO_C_WF_ACS
    IBO_V_WF_TAC
    IBO_V_WF_TTAC
    etc...
    I saw in the code of linked feeder class: CL_IBO_INBOX_FEEDER_WI  that it's checking something called "Launch_Editor".. Is it a property that we can set somewhere?
    Following are the parameters retrieved by system:
    BO_NAME       =  SWF_WIOBN
    BO_OP_NAME = NAVIGATE
    LAUNCHER_PARAMETERS ->  empty.??
    BO_RESOLVE_MODE = USER_SET_OF_ROLES
    LAUNCH_EDITOR  empty where must be set?
    At the end I still get the error:
    There is no iView available for system "": object "SWF_WIOBN". For more information, contact your administrator.
    Any advice,
    Thanks in advance

  • Sorting Issue in ALV table

    Hi,
    I have included a ALV table in my application. A column in the table is containing a list of amounts. When i am trying to sort it in ascending or descending order, the values are not listed properly. I am using "PAD_AMT7S" as the data type for the attribute which will accept up to 2 decimals. The issue is,
    if the column is containing values like
    0.00,
    8.75,
    17.00,
    8.50 and
    17.50.
    if i perform ascending type of sorting the values are re-arranged as,
    0.00
    17.00
    17.50
    8.50
    8.75
    and on descending
    8.75
    8.50
    17.50
    17.00
    0.00
    Which are all incorrect. Please provide me your suggestions..
    Thanks,
    Mugundhan

    Hi,
    Are you using the IF_WD_TABLE_METHOD_HNDL for the sort, or you wrote your own code?
    IF_WD_TABLE_METHOD_HNDL worked incorrectly for some special fields, in these cases I had to write the sorting code manually.
    e.g.
    CALL METHOD WDEVENT->GET_STRING
       EXPORTING
         NAME   = 'COL'
       RECEIVING
         VALUE  = lv_col_name.
      CALL METHOD WDEVENT->GET_STRING
       EXPORTING
         NAME   = 'DIRECTION'
       RECEIVING
         VALUE  = lv_direction.
      CASE lv_col_name.
        WHEN 'TABLE_FIELD1'.
          IF lv_direction EQ '00'.
            SORT lt_table BY CURR ASCENDING.
            ELSE.
              SORT lt_table BY CURR  DESCENDING .
          ENDIF.
    Is the table sorted incorrectly here?
    Bye
    N.

  • Sorting issues in alv oops

    Hi All,
    Greetings for the Day!!!
    am using alv oops for displaying output..
    BEFORE sorting my internal table  looks like below in the output.....
    for example
    A
    B
    C
    D
    E
    F
    AFTER sorting  the internal table in the output .display.,, the internal table shows like below
    F
    E
    D
    C
    B
    A
    but when i call the method set_table_for_first_display ,after sorting the in the output display ....,the internal table remains as like before
    A
    B
    C
    D
    E
    F....
    it should be lke
    F
    E
    D
    C
    B
    A .....
    kindly suggest me the alternatives.pls
    Regards
    Jack

    For example....
    DATA: lo_alv_grid            TYPE REF TO cl_gui_alv_grid.
    DATA: lo_form_alv_container  TYPE REF TO cl_gui_custom_container.
    * Create Controls
        IF lo_form_alv_container IS INITIAL.  "<-- Check if already created
          CREATE OBJECT lo_form_alv_container
            EXPORTING
              container_name = 'FORMULA_CONTAINER'.
    * Create control based ALV grid
          CREATE OBJECT lo_alv_grid
            EXPORTING
              i_parent = lo_form_alv_container.
    * set for first display
          lo_alv_grid->set_table_for_first_display(
                    EXPORTING
                       is_layout            = ls_layout
                       it_toolbar_excluding = lt_exclude
                    CHANGING
                       it_outtab            = lt_formulas[]
                       it_fieldcatalog      = lt_fieldcat[] ).
        ELSE.
          lo_alv_grid->refresh_table_display( ).    "<-- If so, just refresh
        ENDIF.
    Regards,
    Rich Heilman

  • How to make cell editable alv in WebDynpro for ABAP?

    I make Column editable ALV.(See under source code)
    But I can't make Cell editable ALV.
    How to make Cell editable ALV in WebDynpro for ABAP?
    and..how to get changed data?
    DATA: l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    * { EDITABLE
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_input_field     TYPE REF TO cl_salv_wd_uie_input_field,
            lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'TOTAL_COUNT'.
      lr_column->set_cell_editor( lr_input_field ).
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).

    the code seems to be correct....but where are you writing it?
    put the code in the wddoinit method and it should work.
    have a look at this article..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • DIfference Between OOPS ALV and WEBDYNPRO FOR ABAP ALV?

    Hi to All,
    i want some information that What is main difference when we develop ALV Report in OOPS and WEBDYNPRO For ABAP.which is good n in what way it is good?
    In the Same way I m also want know that WHICH IS BETTER AMONG WEBDYNPRO FOR JAVA/ABAP.In which way?
    Regards,
    Ravi K

    Thanku for ur valuble Information.
    could u give me information regarding OOPS ALV and WEBDYNPRO FOR ABAP ALV?which is better?is there differences?
    Edited by: ravi k on Mar 26, 2008 12:23 PM

  • How to use traffic lights concept in alv in webdynpro abap

    Hai ,
              How to use traffic lights concept for alv in webdynpro abap. If possible give me some code.

    Hi Ravi,
    You can create ICON  to get traffic light.
    Go through this step by step.. in this example
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?quicklink=index&overridelayout=true
    Please go through this...
    Re: Display ICON in the ALV table column
    Re: Image in ALV
    cheers,
    Kris.

  • ABAP webdynpro iView issue with Internet explorer

    Greetings,
    We are trying to integrate ABAP webdynpro with portal using the standard SAP webdynpro iView template, we are able to successfully integrate and display on portal pages.
    However if we are using IE version 7.0 browser we do not have any issues, but when we try to use IE version 6.0 the webdynpro portal pages does not display any content. A workaround was to open up the IE settings and change the setting for Navigate sub-frames across different domains to 'enable' from 'disable'.
    This fixed the issue.
    Also we came across information that we can change the setting to force the portal to use the css from the ABAP backend by changing the iView property 'Supply portal stylesheet' from 'Yes' to 'No'. Does this affect the portal behavior in rendering content in MS IE.
    Please let us know if there are any other methods to overcome this issue, as this will affect many of our users.
    iview isolation is of type 'URL'
    page isolation is set to 'Embedded'
    Portal page used is default framework type not webdynpro type
    thanks,
    Sudhir

    Greetings,
    This issue was fixed.
    I found this blog helpfull
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdabap/general%2btechnical%2baspects
    thanks,
    Sudhir
    Edited by: Sudhir Sidd on Jul 23, 2008 5:42 AM

  • ABAP Webdynpro Rendering issues after ECC Upgrade

    Dear All,
    We recently upgraded ECC to EHP 7 (Netweaver 7.4)  but our Portal is still at Netweaver 7.0 EHP2 SP16.
    The ABAP Webdynpro iViews in Portal have the following issues. ( We use IE11).
    1. The ABAP Webdynpro Table filtering is not working. When I click the filter button it does nothing.  
    2. The cursor in the  Input fields reset back to the first position while typing and create a big mess.
    Any help appreciated.
    Thank you.
    PK

    Hi N_niki
    There is no resolution as such.
    We had raised a Customer message with SAP and were informed that this was expected as the procedure to execute the reports was changed in ECC when compared to 4.6 (technical changes) and hence this issue shall remain for some queries wherein the old changes need to be brought back using an option in the SAP Query.
    Please refer to SAP Note # 723577 which could provide a better explanation for the issue.
    Hope this helps.
    Thanks
    Vinodh Sudhakaran

  • Hierarchical sequential display in ALV for webdynpro ABAP

    Hello,
    I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
    The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
    If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
    Thank you for all your help.
    Sumit.

    Hello,
    I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
    The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
    If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
    Thank you for all your help.
    Sumit.

  • Set color alv output cell abap webdynpro

    Hi Guys ,
    i wanted to set the color of some cells in alv output to red in ABAP WebDynpro.
    i am using the salv_wd_table.
    any piece of code is appreciated.
    thanks,
    Bobby.

    Bobby,
    If let's say you are build a ALV table to output 'SFLIGHT' table, and you want PLANETYPE '747-400' to be displayed in green, and PLANETYPE '146-200' displayed in red.
    Also, let's just say, you already had a context node 'SFLIGHT_NODE' that is mapped to the external node 'DATA' of your ALV.
    Now:
    1.  you need to modify the context node 'SFLIGHT_NODE' to add an attribute -- say 'CELL_COLOR' of type 'WDY_UIE_LIBRARY_ENUM_TYPE' -- to the SFLIGHT_NODE (note, you need to delete 'DICTIONARY structure' that is bind to the 'SFLIGHT_NODE' node, otherwise, you will not be able to create addition attributes)
    After, you will have something like this for your context node .
      CONTEXT
        --> SFLIGHT_NODE  
    > CARRID
    > CONNID
    > FLDATE
    > PRICE
    > PLANETYPE
    > <and any other attributes you had pulled from SFLIGHT)
    > CELL_COLOR (TYPE WDY_UIE_LIBRARY_ENUM_TYPE)
    2.  In your supply function to the 'SFLIGHT_NODE', you now need to supply the data to this newly added attribute:
    METHOD supply_sflight_node .
    ** data declaration
      DATA:
        itab_sflight_node            TYPE if_componentcontroller=>elements_sflight_node,
        stru_sflight_node            LIKE LINE OF itab_sflight_node.
    ** read sflight data
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE itab_sflight_node.
    ** populate the 'CELL_COLOR' field
      LOOP AT itab_sflight_node INTO stru_sflight_node .
        IF stru_sflight_node-planetype = '747-400'.
          stru_sflight_node-cell_color = CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_DARK .
         ELSEIF stru_sflight_node-planetype = '146-200'.
          stru_sflight_node-cell_color = CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_DARK .  
        ELSE.
          stru_sflight_node-cell_color = CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-STANDARD .
        ENDIF.
        modify itab_sflight_node from stru_sflight_node.
      ENDLOOP.
    ** bind all the elements
      node->bind_table(
        new_items =  itab_sflight_node
        set_initial_elements = abap_true ).
    ENDMETHOD.
    3. Now, you need to obtain the configuration model of the ALV and config it before display.  (say you have an method does this 'init_alv_table_settings', and it is called from your view's wddoinit() method)
    METHOD init_alv_table_settings .
      DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
      DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      l_ref_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
      DATA:
      node_sflight_node                   TYPE REF TO if_wd_context_node .
      node_sflight_node = wd_context->get_child_node( name = if_flights_view=>wdctx_sflight_node ).
      CALL METHOD l_ref_interfacecontroller->set_data
        EXPORTING
          r_node_data = node_sflight_node.
    **  get ConfigurationModel from ALV Component
      DATA:    lr_table TYPE REF TO cl_salv_wd_config_table.
      lr_table = l_ref_interfacecontroller->get_model( ).
    ** change the color of the cell
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= lr_table.
      lr_column = lr_column_settings->get_column( 'PLANETYPE' ).
      DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
      CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'PLANETYPE'.
      lr_column->set_cell_editor( lr_input_field ).
      lr_column->set_cell_design_fieldname( value = 'CELL_COLOR' ).
    ENDMETHOD.
    Compile and activate your code.
    Regards,
    Tina Yang
    Message was edited by: Tina Yang

  • ABAP WebDynpro: Handling the ON_ENTER Event in editable ALVs

    Sub: ABAP WebDynpro : Handling the ON_ENTER Event in editable ALVs
    Hi,
    I would like to know if there exists an event to handle TABout (i.e, when user navigates out of the cell with a TAB key-press) for a cell of an editable ALV.
    Alternatively, any help on how to handle ON_ENTER event and how it is triggered when data is entered by user into a cell of an editable ALV, would be really appreciated.
    Thanks,
    Adithya

    Hi
    I had one similar problem where user enter something into the editable cell and press enter. to handle this scenario i used WDDOBEFOREACTION  method of my view to call alv interface method check_data.
    if there is any change in the any table cell, it will fire an event on_data_check..which has paramater column name, row index and new and old value of the cell.
    you can handle this event and write your business logic in event handler method.
    hope it will help
    Regards
    Saurabh Garg

  • Using customize portal theme for abap webdynpro.

    Dear all,
    I have a customized portal theme where we used different color for the portal. When I create a abap webdynpro application for a workflow task (the application will launch when user click on the item in the UWL). When the application launch, it does not use the customized portal theme instead it just use the standard theme.
    Anyone knows where can I configure it?
    Thanks
    Regards
    Bryan

    Hi Brian,
    You can change the color of a table only if u have the Textview as UI element for cell.
    You can change the semantic color property of textview.
    Please check this.
    I would suggest you to use ALV instead of Table as you can change its colors easily by using functions like SET_DESIGN
    GET_DESIGN of IF_SALV_WD_TABLE_SETTINGS.
    I hope it helps.
    Please revert back with issues.
    Regards,
    Sumit Oberoi

  • ASR_PROCESS_EXECUTE - ABAP Webdynpro application keeps looping

    Hi,
    We are implementing HCM Processes and Forms framework and trying to use the standard ABAP
    Webdynpro application ASR_PROCESS_EXECUTE to be able to Start HR Personnel related processes.
    Start Processes iview available with the HR Administrator package on the portal when clicked seems to be getting stuck in a loop.
    When I try to test the application from SE80 on the backend, it seems to be going in some sort of loop and flashing message appears repeatedly 'Logon is being prepared.....logon is starting'.  Looks like it keeps attempting to switch between http and https. The URL that appears in SE80 for the application is
    http://servernmame.domainname.com/sap/bc/webdynpro/sap/asr_process_execute.
    Instead of http...if I replace this URL with https://servernmame.domainname.com:443/sap/bc/webdynpro/sap/asr_process_execute it works fine
    When I go to SICF and execute this Web dunpro application, it uses https in the URL and that works fine too.
    We are on EhP3. How can i fix this issue? I want to be able to use standard iviews that will call this Webdynpro application using appropriate protocols.
    Any ideas will be much appreciated
    Thanks,
    Saurabh
    PS: this also sound like a portal issue, so posting in Portal forum too.

    Its not the cache, i just wanted to let people know with similar problems.
    It may be a problem with the parameters,
    in RZ10, search for icm* parameters and search in SAP Help about each parameter and what should be their value. You will find that parameters are taking HTTPS
    Also, one more thing, STRUSTSSO2, check if certificate is added in ACL and in production client as well..
    This will solve all this kind of problems.

  • ASR_PROCESS_EXECUTE - ABAP Webdynpro application - http/https

    Hi,
    We are implementing HCM Processes and Forms framework and trying to use the standard ABAP
    Webdynpro application ASR_PROCESS_EXECUTE to be able to Start HR Personnel related processes.
    Start Processes iview available with the HR Administrator package on the portal when clicked seems to be getting stuck in a loop.
    When I try to test the application from SE80 on the backend, it seems to be going in some sort of loop and flashing message appears repeatedly 'Logon is being prepared.....logon is starting'. Looks like it keeps attempting to switch between http and https. The URL that appears in SE80 for the application is
    http://servernmame.domainname.com/sap/bc/webdynpro/sap/asr_process_execute.
    Instead of http...if I replace this URL with https://servernmame.domainname.com:443/sap/bc/webdynpro/sap/asr_process_execute it works fine
    When I go to SICF and execute this Web dunpro application, it uses https in the URL and that works fine too.
    We are on EhP3. How can i fix this issue? I want to be able to use standard iviews that will call this Webdynpro application using appropriate protocols.
    Any ideas will be much appreciated
    Thanks,
    Saurabh
    PS: this also sound like a portal issue, so posting in Portal forum too.

    Its not the cache, i just wanted to let people know with similar problems.
    It may be a problem with the parameters,
    in RZ10, search for icm* parameters and search in SAP Help about each parameter and what should be their value. You will find that parameters are taking HTTPS
    Also, one more thing, STRUSTSSO2, check if certificate is added in ACL and in production client as well..
    This will solve all this kind of problems.

Maybe you are looking for

  • Passing a value to a Parameter Field From a VB Form

    Post Author: as1971 CA Forum: General Hello everyone I'm using Visual Basic 6.0 and Crystal Report 9.0 I built a report using Crystal Report and named it Player_Statement.rpt. I then included it to my VB project and named it Player_Statement.Dsr In t

  • My 5th gen ipod will not play in itunes

    I have updated my ipod and downloaded the most current itunes software.  I can see all of my songs and playlist but they will not play when selected.

  • Implementation of Tag Cloud

    hi All, can we implement  Tag Cloud   in our enterprise portal? The user searches for some keywords and those keywords are stored in some location and are displayed in one page and the most searched keywords are displayed in larger fonts. also please

  • Output Error When Debugging the Package

    Hi, I just created my first SSIS Package, with OLE DB Connection pointing to our Oracle server and using SQL SERVER Destination. When I Debug, I get the following error: SSIS package "C:\Users\Documents\SQL Server Management Studio\Packageload.dtsx"

  • Berkeley DB is giving me error when compiling on Mac OS X 10.10

    Hey guys, I'm trying to compile Berkeley DB so I can compile OpenLDAP (requires version 4.4 or up) I tried version 6 and it says it doesn't support that one, so I went down to 5 and this one is giving me this error: ./libtool --mode=compile cc -c -I.