Getting the Filter line by default in ALV.

Hi friends,
        There is a requirement for me, wherein, i need to provide a default filter line when the page loads initially. Generally we get a filter line, when we filter on any of the fields available, but in my case, without filtering on any of the fields, i should get the filter line. Is that possible in real?
If yes, kindly provide me the appropriate code.
Thanks & Regards,
Akshay
Edited by: akshay0222 on Sep 15, 2011 1:00 PM

Hi,
Please try the below code.you can find more solution in sdn.
This displays both the filter line and the FILTER option(rightside top)
DATA:
lv_value type ref to cl_salv_wd_config_table.
  DATA: lt_fields TYPE salv_wd_t_field_ref,
        ls_fields TYPE salv_wd_s_field_ref,
        lr_field TYPE REF TO cl_salv_wd_field,
        lr_filter TYPE REF TO  cl_salv_wd_filter_rule.
  CALL METHOD lv_value->if_salv_wd_field_settings~get_fields
    RECEIVING
      value = lt_fields.
  LOOP AT lt_fields INTO ls_fields.
    lr_field = ls_fields-r_field.
    CASE ls_fields-fieldname.
      WHEN 'VBELN'.
        CALL METHOD  lr_field->if_salv_wd_filter~create_filter_rule
          EXPORTING
   included   = 'X'
      operator   = 'NE'
            low_value  = space            
   high_value =
          RECEIVING
            value      = lr_filter.
      WHEN 'ERDAT'.
      WHEN 'ERZET'.
      WHEN 'ERNAM'.
      WHEN 'ANGDT'.
    ENDCASE.
  ENDLOOP.
Thanks,
Lavanya.

Similar Messages

  • How can you get the filter off if you can't remember the password? It's"pro con" and it wont even let me check out the rates for aflight.

    How can you get the filter off if you can't remember the password? It's"pro con" and it wont even let me check out the rates for aflight.

    You can check the file prefs.js in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and remove the line(s) related to that extension (procon.password).

  • How to get the command line interface for WRT160NL router

    hi,
    How can I get the command line interface for WRT160NL router. please suggest.

    If you’re trying to access the web-based interface of your router, just use its default IP address (192.168.1.1). The Username is left blank and the Password is "admin". Here’s a quick link on how to do that.

  • Get the current line no.(similar to sy-linno in report) in  Sapscript form

    Hi everyone,
    In ABAP reporting, you can use sy-linno to determine the current line no.
    But if in sapscript form,
    does any system field to get the currect line no. or y-origin. ?
    Just say the program is now runing and have written several lines in a window of the form.
    AS         This is the first line
    AS         This is the second line
    AS         This is the third line
    how to get the current line = 3 or  yorigin '+3'  LN?
    Thanks for reply in advance.

    Hi,
    you can also chk the sy-linno directly in your script.
    Regards
    Subramanian

  • HT1267 HAVE SET UP AN INCORRECT EMAIL ADDRESS. The call centre set up a new email address as the Username. I am unable to access the new account because the default on my phone is the email that is incorrect. How do I get the correct email as default

    I HAVE SET UP AN INCORRECT EMAIL ADDRESS. The call centre set up a new email address as the Username. I am unable to access the new account because the default on my phone is the email that is incorrect. How do I get the correct email as default??

    Thank you for your help, much appreciated
    Regards
    Geoff

  • Read to get the last line from a File

    Hi
    I am sending in a clarification , hoping that I get an efficient solution from the group, should somebody have come across this scenario and implemented.
    How to read or get the last line from a text file , which usually have a no of records, without actually reading or looping through all the lines
    I know there is some solution with the RandomAccessFile, but given there can be some encoding issues or so.
    Please let me know if somebody have implemented the same.
    Thanks n advance

    The character encoding could, indeed, be an issue especially with UTF-8. I think what I'd do is to create a byte array with the encoded, expected end of line sequence in it and work on the file in bytes. For example, seek to the last 100 bytes of the file, read those bytes and look for an EOL sequence backwards. If not found read the previous 100, 200, 400 bytes etc. until you do find an end of line. Then seek to after the EOL and read normally. Remember an EOL sequence might cross a boundary.
    UTF-8 would be a problem, especially with a unix format file because you might mistake part of a multi-byte sequence for '\n'. To be reliable on UTF-8 you'd need to go back three characters looking for sequence start markers (has the previous character got the top bit set, or the one before that the first two bits set, or the one before that the top three bits). Or you could just react to an encoding exception and try another position.

  • How can we get the selected line number from JTextArea ?

    how can we get the selected line number from JTextArea ? and want to insert line/string given line number into JTextArea??? is it possible ?

    Praitheesh wrote:
    how can we get the selected line number from JTextArea ?
    textArea.getLineOfOffset(textArea.getCaretPosition());
    and want to insert line/string given line number into JTextArea??? is it possible ?
    int lineToInsertAt = 5; // Whatever you want.
    int offs = textArea.getLineStartOffset(lineToInsertAt);
    textArea.insert("Text to insert", offs);

  • POWL Easy - Getting the marked lines

    Hi,
    I have a surrounding WD component which embeds a POWL Easy.
    Now I want to get the marked lines in the POWL when triggering a POWL action.
    I implemented WD-Component Interface POWL_DETAIL_COMP_IF where method UPDATE_DETAIL_DATA is triggered
    when a POWL line is marked. Unfortunately this method only imports one single line.
    I tried also to implement an event handler for event POWL_FOLLOW_UP. But this event handler is never called,
    although I triggred a event (in debugging) in feeder class method IF_POWL_FEEDER~HANDLE_ACTION.
    Does anyone know, how the event handler method POWL_FOLLOW_UP can be called?
    Thank you and best regards, Edgar

    Hi Madhu,
    in my case the described solution is not working.
    I am using a Easy POWL which means that I am using the WD Component POWL_EASY in my main component
    and not POWL_UI_COMP (see also example WD component POWL_EASY_DEMO in your system).
    When I raise a portal event in IF_POWL_FEEDER~HANDLE_ACTION as decribed
    the method POWL_FOLLOW_UP  is not called, although I registered for this event in my main component.
    Best regads, Edgar

  • How do I get the shape/line 'properties window' on Photoshop sc4. (mac)  It shows it on the help videos but I cannot find it?

    How do I get the shape/line 'properties window' on Photoshop sc4. (mac)  It shows it on the help videos but I cannot find it?

    For a crisp border of any color or any size, Just expand the "Canvas" by 0.5 inches or whatever dimension your file needs.

  • Error getting the filter from filter factory

    I created a Service which will filter the iviews on some attributes. I deployed the service on the portal and set the com.sap.portal.pcd.gl.FilterAssignment property to the ServiceKey name on the Page.
    1. When I open the Page, log shows the error:
    "Error getting the filter from filter factory"
    2. I created another servce and when I assigned it to com.sap.portal.pcd.gl.FilterAssignment property, portal still referes the first ServiceKey assigned in Step-I.
    Pls let me know what am I doing wrong.
    Rgds

    Got the bug...Issue closed

  • How to get the changed lines in POWL

    Hi Experts,
    I need your help on POWL. In the project I have set some fields as input field and they are editable. But I cannot get the lines which i have changed, and the method handl_action wasn't triggered after i pressing 'Enter' key. How can I solve it?
    Since in WD ALV we can trigger the event data_check when user press 'Enter' after changing data. I think it also can be done in POWL.
    Thank you very much!
    Julia

    Hi, anyone can help me? thank you very much!

  • Whow to get the error line number in Oracle 9i

    I am using Oracle 9i, In my procedure i am getting exception in When Others section, but unable to trace that from where it is throughing.... the procedure is about 2500 line of code. In Oracle 10g we can use dbms_utility.format_error_backtrace to catch the line number....
    So, is there any workaround in Oracle 9i to get the line number ????
    Thanks in Adance...

    Not sure, but the following might give you a good starter for ten....
    create or replace procedure who_called_me( owner      out varchar2,
                             name       out varchar2,
                             lineno     out number,
                             caller_t   out varchar2 )
    as
        call_stack  varchar2(4096) default dbms_utility.format_call_stack;
        n           number;
        found_stack BOOLEAN default FALSE;
        line        varchar2(255);
        cnt         number := 0;
    begin
        loop
            n := instr( call_stack, chr(10) );
            exit when ( cnt = 3 or n is NULL or n = 0 );
            line := substr( call_stack, 1, n-1 );
            call_stack := substr( call_stack, n+1 );
            if ( NOT found_stack ) then
                if ( line like '%handle%number%name%' ) then
                    found_stack := TRUE;
                end if;
            else
                cnt := cnt + 1;
                -- cnt = 1 is ME
                -- cnt = 2 is MY Caller
                -- cnt = 3 is Their Caller
                if ( cnt = 3 ) then
                    lineno := to_number(substr( line, 13, 6 ));
                    line   := substr( line, 21 );
                    if ( line like 'pr%' ) then
                        n := length( 'procedure ' );
                    elsif ( line like 'fun%' ) then
                        n := length( 'function ' );
                    elsif ( line like 'package body%' ) then
                        n := length( 'package body ' );
                    elsif ( line like 'pack%' ) then
                        n := length( 'package ' );
                    elsif ( line like 'anonymous%' ) then
                        n := length( 'anonymous block ' );
                    else
                        n := null;
                    end if;
                    if ( n is not null ) then
                       caller_t := ltrim(rtrim(upper(substr( line, 1, n-1 ))));
                    else
                       caller_t := 'TRIGGER';
                    end if;
                    line := substr( line, nvl(n,1) );
                    n := instr( line, '.' );
                    owner := ltrim(rtrim(substr( line, 1, n-1 )));
                    name  := ltrim(rtrim(substr( line, n+1 )));
                end if;
            end if;
        end loop;
    end;
    /

  • How can you get the filter off if you can't remember the password? It's"pro con" and it wont even let me check out the rates for a flight.

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/790760]</blockquote><br>
    A friend put on the filter but no one can remember the password

    You can check the file prefs.js in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and remove the line(s) related to that extension (procon.password).

  • How to get the Row and Column values in ALV (without using Objects)

    Hi All,
    I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
    Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
    Please help.
    Thanks,
    Vishal.

    Hello,
    The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = 'prg_name'
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND' " this is to the click event!!
          i_callback_top_of_page   = 'TOP_OF_PAGE'
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat
          i_save                   = 'A'
          it_events                = alv_events[]
        TABLES
          t_outtab                 = i_totmez.  ---> TOUR IT.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    " then....
    FORM user_commandUSING r_ucomm     TYPE sy-ucomm
                                    ls_selfield TYPE slis_selfield.
    " r_ucomm -> HAS THE STATUS
    " ls_selfield-tabindex  -> HAS THE SELECTED INDEX
    " THEN READ THE INTERNAL TABLE
    " HERE YOU WILL HAVE THE SELECTED ROW
    READ TABLE i_totmez INDEX ls_selfield-tabindex.
    ENDFORM.
    cheers,
    Gabriel P.

  • How to get the \filter directory from registry (or other) during installation of the plugin

    Hello
    I made a script to install the plugin because it needs some libraries to be installed as well, but during the installation, the filter directory isn't defined (it isn't the same for each platform or language)
    for example my filter folder is :
    E:\Program_Files\Photoshop CS2\Modules externes\Filtres
    how do i get this filter directory from registry (or with another way)
    thanks a lot
    Jeff

    sorry i made a little mistake (didn't poste the updated version of my code)
    here is the right code:
    [Code]
    var
      maxnb8bf : Integer;
      maxDirectory:        String;
      nb8bf : Integer;
      PreviousDirectory:        String;
    procedure ProcessDirectory (RootDir: String; Progress: Boolean);
    var
    NewRoot:        String;
    FilePath:        String;
    FindRec:        TFindRec;
    n1 : Integer;
    n2 : Integer;
    begin
    NewRoot := AddBackSlash (RootDir);
    if FindFirst (NewRoot + '*', FindRec) then
    begin
    try
    repeat
    if (FindRec.Name <> '.') AND (FindRec.Name <> '..') then
    begin
    FilePath := NewRoot + FindRec.Name;
    if FindRec.Attributes AND FILE_ATTRIBUTE_DIRECTORY > 0 then
    ProcessDirectory (FilePath, Progress)
    else
    begin
            if (NewRoot <> PreviousDirectory) THEN
            begin;
               if (maxnb8bf < nb8bf) THEN
               begin;
                   maxnb8bf := nb8bf;
                   maxDirectory := PreviousDirectory;
               end;
               nb8bf := 0;
            end;
            n1 := Pos('.8bf', FilePath);
            n2 := Pos('.8BF', FilePath);
            if ((n1 > 0) or (n2 > 0)) THEN
            begin;
               nb8bf := nb8bf + 1;
            end;
            PreviousDirectory := NewRoot;
    end;
    end;
    until NOT FindNext (FindRec);
    finally
    FindClose(FindRec);
    end;
    end;
    end;
    function InitializeSetup(): Boolean;
    var
      V: string;
    begin
      if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Photoshop.exe', 'Path', V) then
        MsgBox('Value is "' + V + '"', mbInformation, MB_OK);
      Result := TRUE;
       maxDirectory := '';
       nb8bf := 0;
       PreviousDirectory := '';
       maxnb8bf := 0;
       ProcessDirectory (V, true);
       //if (maxDirectory <> '') THEN
       // begin;
       //      MsgBox('Value is "' + maxDirectory + '"', mbInformation, MB_OK);
       // end;
    end;
    function NewTargetDir(Param: String): String;
    begin
      Result := maxDirectory;
    end;
    Regards

Maybe you are looking for

  • Changing Base Unit Of Measure (Material Master)

    Hi 1. How to check this? (Any successful changes in material master only took place when there is no open document from SD, PP, MM & FI for that material. ) 2. Base unit of measurement cannot be changed.  The reason being material movement history is

  • Problem with Community app

    I have a Nokia C2 touch&type...it have a Community app in it...after i update my phone i can't open it and it says "delete this application?"....what should i do to get it back?

  • Template having export to excel functionality with filter values in WAD

    Hi, I need to create a template which has export to excel functionality with all the filter values that the user has selected in the selection screen. export to excel can be done but how can be the output excel sheet contain only those values which w

  • Change Header Banner with transitions within Dreamweaver CS4

    Is it possible to have a looping banner with several graphics and transitions within Dreamweaver

  • WiFi Support for a meduim/large event

    Hello All,    I have a design question that maybe was already answered but I was unable to find sorry :-( ... It is a kind of dilemma on how to design the wireless network: I'm planning a wifi network to support a medium sized event, kind of an hotel