How to Pre-Select a View for ALV dashboard at runtime

Hello Experts,
The requirement is to pre-select 1 view initially (out of several configured) for 'All' users and disable the 'View-selection' dropdown function in a standard ALV dashboard. So whenever the dashboard loads, a particular view has to be set automatically for all users.
I need your help for the first part, which is to always pre-set a 'View' in a standard dashboard.
I tried to implement the suggestion provided in the following thread:
How to apply ALV view at runtime
However I couldn't make this work in my case. I created a Post-Exit of a method in Comp Ctlr of dashboard (Initialize method) - where I receive the refrence 'IWCI_SALV_WD_TABLE'. Then calling the method 'GET_CONFIG_DATA' with action 'if_salv_wd_table=>set', I try to set the view, but it has no effect.
Thanks a lot for your help,
Abir

Hi abir,
Use this and alv1 is my alv component name
    DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    LO_CMP_USAGE =   WD_THIS->WD_CPUSE_ALV1( ).
    IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
      LO_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
    LO_INTERFACECONTROLLER =   WD_THIS->WD_CPIFC_ALV1( ).
LS_PARAM_IN TYPE IF_SALV_WD_TABLE=>S_TYPE_PARAM_CONFIG_IN.
ls_param_in-default = "your view name " ( view is of type wdr_pers_variant)
    DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
    LO_VALUE = LO_INTERFACECONTROLLER->GET_CONFIG_DATA( ls_param_in )
Regards
Srinivas
Edited by: sanasrinivas on Dec 30, 2011 7:15 AM

Similar Messages

  • How to extend the costing view for a material

    How to extend the costing view for a material

    Use MM01 Trxn code and Select Material and Select Costing Views and Maintain, Save it.
    Else Use MM50 and Select Material and Mainenance Status as G Costing and Execute, Maintain & Save.

  • How to create a help view for a customized error message

    Hi all,
    Can you guide me how to create a help view for a customized error message, we need to put some suggestions in it so that user can can resolve this issue with this guide. ( the short text is too short to describe all situations via TC:SE91)
    Thanks very much!
    Bruce, Wen

    Hi Bruce,
    Could you brief your concerns again.
    Why don't you maintain long text in message class for long description.
    Regards,
    Ranjith N

  • How to create a special view for sharepoint list A and deploy this view to specific user personal view?

    How to create a public view for sharepoint list A and deploy this view to specific user personal view? Is that possible OOTB?

    Views cannot be exported or moved. Can you elaborate your requirement?
    --Cheers

  • "I would like to know how to set the default view for the columns. Somewhere I read it could be done in by music icon under Library.  Can't find it.  Thanks

    "I would like to know how to set the default view for the columns that are shown in iTunes. Every time I open it, I have to either go to the options, or right-click to get the pop-up options, and delete "rating" and add "composer." I'd really like to just do it once and be done with it."  Somewhere I read you could do this by clicking on the Music icon under LIBRARY then arramge the columns.  Trouble is, I can't find a Musi Folder or icon in my user library.
    Any help would be appreiated.  OSX 10.9.2  iTunes version 11.1.5  Thanks!!! CW!

    From the iTunes menu bar try View>Show View Options.  Make sure what you want to see is checked and what you don't is unchecked.  You can do this (may need to do this) for any playlists, your main Library, etc.
    Good luck
    srb

  • How we can select two records in alv report

    how we can select two records in alv report

    Hello,
    You can use the method <b>get_selected_rows</b>.
         CALL METHOD gv_alv->get_selected_rows
            IMPORTING
          ET_INDEX_ROWS =
            et_row_no     = lt_selected_rows.
    READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
    The table <b>lt_selected_rows</b> will contain all the selected rows.
    Regards,
    Beejal
    **reward if this helps

  • How to Pre-select Value in auto drop down list

    Hi,
    I have an automatically populated drop down list, and I'm trying to have it display with a pre-selected value (in the example 5). I didn't know where to start, so I modified the Dreamweaver code for "Set value equal to" from the Dynamic list function.The list displays, but the value defaults to 0. What am I missing?
    <?php
    echo '<select name="firstnumber" id="number">';
    for ($j=0; $j<11; $j+=1)
    echo  "<option value=\"$j\" <?php if (!(strcmp(\"$j\",5))) {echo \"selected=\"selected\"\";} ?>$j</option>\n";
    echo '</select>';
    ?>
    Thanks,
    Tim

    The problem is that you have nested PHP tags inside a PHP block. You can't do that. In fact, it's surprising that the code works at all. Normally, nesting PHP tags inside a PHP code block will trigger a syntax error.
    Also, your code is very difficult to read because of the way you use double quotes all the time. It's best to use single quotes for strings, except when you need to display the value of a variable inside a string. You can also nest double quotes inside a single-quoted string and vice versa, making for code that's much easier to read without all the backslashes.
    This is how I have rewritten your code:
    <select name="firstnumber" id="number">
    <?php
    for ($j=0; $j<11; $j+=1) {
      echo  "<option value='$j'";
      if (!(strcmp($j,5))) {
         echo 'selected="selected"';
      echo ">$j</option>\n";
    ?>
    </select>

  • How to have a tree view for value node..

    Hi all,
    I need to display a tree view for a value node in web ui  just like a model node, for a custom view in a pop up. Please guide me  how to do this or let me know the process steps.
    Thanks in advance.

    Hi All,
    while debugging I found that in class CL_BSP_WD_CONTEXT_NODE_TREE , the method GET_T_TABLE the below code is not triigerring for the child node attributes ( to trigger the get method of attribute for value node).
    this call method is not triggering at all only for first coulmn its triggering ..
      LV_TN ?= ME->NODE_MAPPER->GET_NODE_OBJECT( <LINE>-NODE_KEY ).
        CONCATENATE 'GET_' COMPONENT INTO LV_METHOD.
        TRY.
            CALL METHOD LV_TN->(LV_METHOD)
              EXPORTING
                ATTRIBUTE_PATH = ''
              RECEIVING
                VALUE          = VALUE.
          CATCH CX_ROOT INTO LV_ERROR.
    I created the GETTER method inthe class CN01 and CN02. But those methods are not triggered in CALL METHOD LV_TN->(LV_METHOD). Even that class CN02 is having the  same methods. Those methods are already Implemented. May I know what was the reason Why those methods are not triggered ( getter method ). With out that Method data will not display in the Tree view. Can anybody tell me the reason why it is not happenning?
    .Please find the below .HTM code  as well.
    <chtmlb:configTree
                          actionsMaxInRow       = "5"
                       id             = "Table1"
                       nodeTable      = "<%= ZTREEVIEW->node_tab %>"
                       table          = "//ZTREEVIEW/Table"
                       noFrame        = "FALSE"
                       personalizable = "TRUE"
                       onCollapseNode = "NODECOLLAPSE"
                       selectionMode  = "MULTILINEEDIT"
                       onExpandNode   = "NODEEXPAND"
                       onRowSelection = "select" />
    Only one column was triggered another column did not get any value becasue of the above method call fail.. We are not restricted anywhere to display one column value in the output.   Even in Debugging I checked that LV_METHOD  is having the method name. CN02 class is also having the  same method, But it is not going into the method. It is coming out side. What could be  the reason I could not able to understnad.
    Please provide me some pointers on the issue....
    Thanks in advance..

  • How to create a structure manually for ALV?

    I want to use internal table as my structure instead of a dictionary table. Therefore i know i cant use i_structure_name parameter in FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'. Any suggestion or example.
    Thanks
    Nahman

    You can use the field catalog.  Please see the following example program.
    report zrich_0004
           no standard page heading.
    type-pools slis.
    <b>data: fieldcat type slis_t_fieldcat_alv.</b>
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of imara.
    * Selection Screen
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_matnr for imara-matnr .
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    *  Get_Data
    form get_data.
      select  mara~matnr makt~maktx
                into corresponding fields of table imara
                  from mara
                   inner join makt
                     on mara~matnr = makt~matnr
                        where mara~matnr in s_matnr
                          and makt~spras = sy-langu.
    endform.
    *  WRITE_REPORT
    form write_report.
    <b>  perform build_field_catalog.</b>
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
    <b>            it_fieldcat = fieldcat</b>
           tables
                t_outtab    = imara.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_fieldcat_alv.
      clear fieldcat. refresh fieldcat.
    <b>  clear fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-col_pos    = 3.
      append fc_tmp to fieldcat.</b>
    endform.
    Regards,
    Rich Heilman

  • How to pre-select in netui:select

    I am new to workshop. I need to use netui:select for a list box with multiple selection. I want to pre-select the listbox with several entries. I am wondering how to do this?

    Cindy,
    You can set multiple default values on a select tag by binding the
    defaultValue attribute to a String[] or anything else (collection, etc)
    that can be turned into an Iterator.
    For example, here is how I modified Workshop's Sample Application
    (specifically the "select multiple" example)
    <netui:form action="submit">
    <netui:select multiple="true" dataSource="{actionForm.selections}"
    size="5" defaultValue="{pageInput.defaultValues}">
    <netui:selectOption value="red" />
    <netui:selectOption value="blue" />
    <netui:selectOption value="green" />
    <netui:selectOption value="yellow" />
    <netui:selectOption value="orange" />
    </netui:select>
    <netui:button type="submit" value="Submit"/>
    </netui:form>
    here is the code from the controller showing the page flow variable
    defaultValues being passed to the page as a page input in fhe Forward
    contstructor.
    private String[] defaultValues = {"green", "yellow"};
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward begin()
    return new Forward("success", "defaultValues", defaultValues);
    - john
    "Cindy" <[email protected]> wrote in message
    news:407170f4$[email protected]..
    I am new to workshop. I need to use netui:select for a list box withmultiple selection. I want to pre-select the listbox with several entries.
    I am wondering how to do this?

  • How to Pre-select an item when making an ISR DDL.

    I am trying to mimic the functionality of the "Position Field' in the SPPD, but I can't figure out how it is pre-selecting the PLANS_CURR box with the current position.
    I basically want a drop down bo, which I am populating with data using ls_special_data, and I am able to do that fine, but now I would like to specify and certain record to be pre-selected.
    Does anyone know how to do this?
    Thanks,

    hi Tim and Sridhar,
    How do we do the binding.
    On the Adobe dynamic binding I See see.
    for example for the forms field PERSK_NEW
    ITEM Binding
    Item value          text
    Item key           key
    but the source code in ls_additional_data has this code
    ls_additional_data-fieldindex = index.
    ls_additional_data-fieldname ='PERSK_KEY'.
    ls_additional_data-fieldvalue = int_table-key.
    append ls_additional_data to additional_data.
    ls_additional_data-fieldindex = index.
    ls_additional_data-fieldname = 'PERSK_LABEL'.
    ls_additional_data-fieldvalue = int_table-label.
    append ls_additional_data to additional_data.
    endloop.
    In this case how is PERSK_KEY  bound to Item key
    and 'PERSK_LABEL' bound to item value
    Please guide. I am trying to create a PCR from scratch and got stuck up big time at this point

  • How to display selected table fields in ALV report.

    Hi,
    I am displaying data from table EKPO using ALV through this query.
    select * from ekpo into table itab_ekpo up to 25 rows.
    bt if i need to display selected fields like
    select ebeln matnr netpr from ekpo into table itab_ekpo up to 25 rows.
    IT gives  error GETWA_NOT_ASSIGNED.
    FIELD SYMBOL HAS NOT YET BEEN ASSIGNED
    CAN ANYONE PLZ HELP ME.

    Hi ,
          I am pasting the code in which i am getting the error.Plz help.
    REPORT  ZHALV.
    tables:ekpo.
    data itab_ekpo type ekpo occurs 100 with header line.
    types: begin of itab_new,
           f_ebeln type ekpo-ebeln,
           f_matnr type ekpo-matnr,
           f_netpr type ekpo-netpr,
           end of itab_new.
    data itab1 TYPE STANDARD TABLE OF itab_new initial size 0.
    type-pools: slis.
    DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
          lf_fieldcat TYPE slis_fieldcat_alv.
    DATA:    ws_repid TYPE sy-repid VALUE 'ZHALV'.
    DATA:  l_layout   TYPE slis_layout_alv.
    selection-screen Begin of block block1 with frame title text-111.
    select-options : S_EBELN for EKPO-EBELN.
    selection-screen end of block block1.
    INITIALIZATION.
    start-of-selection.
      select ebeln matnr netpr from ekpo into table itab1 up to 10 rows WHERE EBELN IN S_EBELN.
    *select * from ekpo into table itab_ekpo up to 25 rows.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM GET_DETAILS.
    end-of-selection.
    *&      Form  build_fieldcatalog
          text
    FORM build_fieldcatalog .
    PURCHASING DOCUMENT NUMBER
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'EBELN'.
      lf_fieldcat-ref_tabname = 'EKKO'.
      lf_fieldcat-ref_fieldname = 'EBELN'.
    MATERIAL NUMBER
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'MATNR'.
      lf_fieldcat-ref_tabname = 'EKPO'.
      lf_fieldcat-ref_fieldname = 'MATNR'.
      APPEND lf_fieldcat TO lt_fieldcat.
    NET PRICE IN PURCHASING DOCUMENT
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'NETPR'.
      lf_fieldcat-ref_tabname = 'EKPO'.
      lf_fieldcat-ref_fieldname = 'NETPR'.
      lf_fieldcat-cfieldname = 'WAERS'.
      lf_fieldcat-do_sum = 'X'.
      APPEND lf_fieldcat TO lt_fieldcat.
    ENDFORM.                    " build_fieldcatalog
    *&      Form  GET_DETAILS
          text
    FORM GET_DETAILS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
                                 I_INTERFACE_CHECK                 = ' '
                                 I_BYPASSING_BUFFER                = ' '
                                 I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = ws_repid
                                 I_CALLBACK_PF_STATUS_SET          = ' '
                                 I_CALLBACK_USER_COMMAND           = ' '
                                 I_CALLBACK_TOP_OF_PAGE            = ' '
                                 I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                                 I_CALLBACK_HTML_END_OF_LIST       = ' '
         I_STRUCTURE_NAME                  = 'EKPO'
                                 I_BACKGROUND_ID                   = ' '
                                 I_GRID_TITLE                      =
                                 I_GRID_SETTINGS                   =
                                 IS_LAYOUT                         =
                                  IT_FIELDCAT                       = lt_fieldcat
                                 IT_EXCLUDING                      =
                                 IT_SPECIAL_GROUPS                 =
                                 IT_SORT                           =
                                 IT_FILTER                         =
                                 IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
        I_SAVE                            = 'A'
                                 IS_VARIANT                        =
                                 IT_EVENTS                         =
                                 IT_EVENT_EXIT                     =
                                 IS_PRINT                          =
                                 IS_REPREP_ID                      =
                                 I_SCREEN_START_COLUMN             = 0
                                 I_SCREEN_START_LINE               = 0
                                 I_SCREEN_END_COLUMN               = 0
                                 I_SCREEN_END_LINE                 = 0
                                 I_HTML_HEIGHT_TOP                 = 0
                                 I_HTML_HEIGHT_END                 = 0
                                 IT_ALV_GRAPHICS                   =
                                 IT_HYPERLINK                      =
                                 IT_ADD_FIELDCAT                   =
                                 IT_EXCEPT_QINFO                   =
                                 IR_SALV_FULLSCREEN_ADAPTER        =
                               IMPORTING
                                 E_EXIT_CAUSED_BY_CALLER           =
                                 ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = itab1
          EXCEPTIONS
                                 PROGRAM_ERROR                     = 1
                                OTHERS                            = 2.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *append itab_ekpo to i_tab.
    ENDFORM.                    "GET_DETAILS

  • How do I select multiple contacts for an e-mail?

    Using an iMac and wondering how to send an e-mail to multiple people in my contact list without having to open the contact list every time I select a name.  It would be nice if I could just open the contact list and select multiple people for the same e-mail.  Does anyone know how to do this?

    Hi there Kathy, The easiest way is Window (along the menu bar) > Address Pannel, then you can select multipul contacts and then click the "To:" Button in the top left of the window.
    (Tip: You can use comand and click to select multipul at once, then click the "To:" button in the top left)

  • How to create a maintainance view for a table.

    Hi All,
    Can anyone explain me how do we create a maintainance view for a table?
    Also, what access is required to create the view.
    Is it true that for SAP tables we cannot create a maintainance view?
    Appreciate any help on this.

    Hi
    Can anyone explain me how do we create a maintainance view for a table?
    <i>
    You can use the SE11 menu option 'Utilities-->Table Maintenance Generator' or you can use transaction SE54.</i>
    also check
    <i>http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm
    Regards
    krishna
    <i>Note: Award Points if helpful. Thanks</i>

  • How to set a variant View of ALV at runtime

    Hi,
    For each user, I have saved in a specific table the Configuration Key of The variant he has created.
    At runtime I want to set this one in my ALV component.
    I think to use the method if_salv_wd_comp_table_pers~set_standard_view of class CL_SALV_WD_C_TABLE but this class isn't implemented elsewhere SALV_WD_TABLE.
    As anybody worked on this need, or something like ?
    Thanks

    I want to access attribute of  context node A in another context node B of the same view .
    for that In my View impel class I have created a public static attribute which can be accessed from any where in the view .
    I want to set the value of this public static attribute from the set method of the attribute of the context node  A .
    which I can access in my other node B's attribute
    cl.._impl=>attr_tmp = lv_varibleA  . for setting the value .
    lv_variableB = Cl..._impl=>attr_tmp  for accessing the value .
    will this work ???

Maybe you are looking for

  • How to deal with images stored in oracle

    hi, can anyone help me to solve this issue please: in fact i am developping a swing based standalone application based on a TCP/IP client-server connection, so the point is to display on my frame for each student his information and also his personal

  • Failure to Sleep... HEAT build up...

    I all, I have a week 40 macbook 1.83GHz machine. This afternoon I put it to sleep (closed the lid) with a fully charged battery. Upon return from my son's Karate class the book was not sleeping, FANS WERE ROARING, heat was incredible (really really h

  • FW CS6 Error message: An error occurred. This command requires an active document.

    Hi, I've been seeing the following message while saving active documents recently: An error occurred. This command requires an active document. My document does indeed save. I'm wondering if a recently-installed (and much-loved) extension could be th

  • Elements 10 shut down problems

    I have Adobe Photoshop Elements 10 and it keeps shutting down unexpectedly whether I am in organizer or editor.  I contacted Apple help and they told me that this program was not intended to support 100,000 images and that was most likely why the pro

  • Time machine restored files are locked and can't unlock them

    After upgrading to an SSD, i was having problems with restoring files from Timemachine. i fiexed that by naming my ssd drive the same as the drive that was backedup using time machine. now, i can't seem to edite any of the files restored in Documents