How to change layout dynamically?

Hi,
I have 15 fields in my WD ALV output. All i need is to display only certain columns on some action (by hitting button1) and to display other set of columns on other action (by hitting button2). Please let me know how should i approach in this?
Rgds
Sudhanshu

Via the ALV Model API classes you can access all the current columns and then hide any of them you wish. Here is some sample code:
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
  l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.
  DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  DATA l_table TYPE REF TO cl_salv_wd_config_table.
  l_table = l_salv_wd_table->get_model( ).
DATA l_column TYPE REF TO cl_salv_wd_column.
  l_column = l_table->if_salv_wd_column_settings~get_column( 'CLIENT' ).
  l_column->set_visible( cl_wd_uielement=>e_visible-none ).
There is also a GET_COLUMNS method that will return an internal table of all columns and their objects that you can loop through.

Similar Messages

  • Reg: how to change layout in report writer

    HI all,
    how to change layout in report painter?
    regards
    JK Rao

    Hi everybody,
    I have a report painter using transaction ke30 and I want to change the header layout.
    Now it looks like that
    |_________|_________|
    But i want to add another header row above this row, so it will look like:
    |_________________________|
    |___________|_____________|
    Does anyone know the answer?
    Thanks a lot for your response
    Edited by: Vo Duy Pho on May 24, 2010 10:29 AM
    Edited by: Vo Duy Pho on May 24, 2010 10:37 AM

  • How to change JNDI dynamically in DB adapter and FTP adapter

    Hi every one,
    Please any one explain "How to change JNDI dynamically in DB adapter and FTP adapter" with screen shots
    Thanks in advance

    YES, very much possible. Only with CRUD operation on a table is possible.
    Please refer the below URL, where you can see the multiple check box selected under "Perform an operation on a table" under Operation Type.
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_db.htm#BDCGADFJ
    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
    Going forward, please raise this as a separate thread. So that people will get benefited.
    Thanks,
    Vijay

  • How to change layout of report  S_ALR_87012083?

    Hi everybody,
        How to change layout of report  S_ALR_87012083 except change  output control at selection screen ?
        For example,I need a list that there have vendor no. at every line of open item,and I don't need Total liabilities for every vendor.
    Thanks a lot for any help.

    Hi yu liang,
                     You can find vendor list having Vendor No. & without showing total liability for every vendor.
    after executing the report,
    1.You need to select "change layout (ctrl+F8)",
    a small window comes, it has two part -> column content & hidden fields.
    then u select "Vendor" from hidden field & move it to column content.
    2. at column content there is a column named "Total". u need to remove check for your column name "amount".
    now select "copy" button or enter. u will find the req. report.
    u can save it also by ur name.
    hope its helpful to u.......
    plz, reward points as a way of thanks if helpful...

  • How to change images dynamically in jsp?

    Hi All,
    i Want to know how to change images dynamically in jsp, for example in any site if u look at advertise or any images, it will be changed after every few seconds.
    Please guide me
    Thanks
    Sandesh S

    sandeshas wrote:
    Hi BlusC,
    i was searching your mail Id to ask the question directly to u,i checked in your blog also, but i didnt get,I want to keep my email spam safe. Only trusted people and direct friends have it. Just use the forums for discussion.
    my question is suppose if i want to display and change the advertise(adds from different company ) in my web site,how can i do it by using jsp?
    Do i need to create animated gifs which contains all company adds??one might be from movie add,after few seconds next one migth be some other web site add like that, how can i achieve this in my servet,jsp or using struts.You create animated gifs with an [animated gif editor|http://google.com/search?q=animated+gif+editor]. There is nothing what JSP can do for you here.

  • How to change the Dynamic Selection screen

    Dear Freinds,
                I have requirement where in on the selection of Dynamic Selections ( iam using PNP logical database) i want to add another fields , could  any one tell me how to change  Dynamic Selections as per my requirement.
    please let me know .
    regards
    divya

    Hi Prat,
               I have done similar way and saved the view ( i.e se80> ediobject>table>table name > given all the tables required for me and i try to saved it is not allowing to save and giving message as empty view cannot be saved. Therefore i have selected the tables which have been added and made one by table and selected them . some how it got saved. Now when i added this name of the view in the custom report caterogy and executed my custom report and selected the > dynamic selections i found as empty and in debugging i can see all the 4 tables which i have mentioed while createing view are there . But i dint understood why the custom View is empty.
    please correct me where i went wrong.
    regards
    divya'

  • How to change layout for list display in background

    Hi All,
    I want to change layout for the list display of tcode fbl1n when i execute in background. is there anyway to select our own layout when i execute in background. When i execute in foreground we can change the layout by selecting change layout button, but how it possible when in backgroung, is there any way please let me know.
    Thanks in advance.
    Regards,
    Vishal

    Hi,
      Create a list variant by executing the program and changing the layout and saving..
      Then use the "Layout" parameter in the selection screen and give the variant you created earlier...
      Then while executing in background the list variant will be pickedup accordingly (given in the selection screen)..
    Hope this helps...
    THanks,
    Naren
    Message was edited by: Narendran Muthukumaran

  • How to change the dynamic IP address to Static IP Address in Solaris 10X86

    Hi,
    I have installed Solaris 10X86 in a VM.While installing Solaris I have enabled DHCP.So its created with dynamic IP Address.Now I want to change the dynamic IP address to static IP address.Please anyone can help me to sort out this problem.

    Hi,
    I have installed Solaris 10X86 in a VM.While installing Solaris I have enabled DHCP.So its created with dynamic IP Address.Now I want to change the dynamic IP address to static IP address.Please anyone can help me to sort out this problem.

  • How to change layout of new calculated item values?

    Hi,
    Is there a way on how to change colours or add a percentage symbol on the values of a calculated items?
    I do not want to change the source measures in the criteria area I used to get the calculated items results.
    Any idea?
    Regards
    Giuliano

    I solved this by using an other approach.
    Created a report and filtered the first resolts by certain value. Added a label.
    Used combine with similar request and filtered again.
    Created so many combines for the number of results I need to filters
    In result columns renamed the label with a description which is a common denominator for all the labels
    In pivot table, moved the main label to Rows and appled the sum
    the reults is below
    https://docs.google.com/file/d/0B0nRf4E3yBfpWS1WVjJjbWZyTG8/edit?usp=sharing
    Regards
    G

  • How to change layout in List of Sales Orders (VA05)

    Hello,
    Does anybody knows how I can save layout changes or create new layout in transaction VA05 (List of Sales Orders)?
    Thanks for advance

    Hi,
    Goto VA05, enter values in selection screen press enter.
    In menu click on settings>layouts>Current  select the fields and save. Give layout name and description and press enter.
    You can choose your own layout  goto settings>layouts>Choose   click on layout from list of layouts.
    If you want to default your layout for VA05. settings>layouts>Administration. click on field default setting for your layout. Default you will get your own layout for VA05 transaction.
    Regards,
    Chandra

  • How to change layout

    Hello All,
    I am working on customizing standard apps reports. It is in landscape and i need to change to portrait. Any suggestions on how to do it.
    I am also trying to have different font sizes on the report and it doesnt seem to be accepting any font changes. Any ideas how to overcome this issue.
    Thanks in advance.
    Anant

    For the page layout, have you tried going to the object navigator, going to the property inspector for your Main section, and changing the height to 11 and the width to 8.5, or just changing the "Orientation" to 'Portrait'? I think that should work, unless you've already tried it and it doesn't, if so, I'm not sure.
    I'm not sure about it not accepting chages to font size, I've never had any issues with that.

  • How to change layout set in KM room part...

    Hi,
    My company is currently using EP6 SP15 and is in the process of trialing the use of Collaboration room.
    One of the feedback from our users is that they do not like the layout of the KM document room part. What they would like to use is the "Tree list Preview Explorer" layout. Can someone point me to any documentation on how this could be done?
    Thanks,
    Thomas Siu

    Hi Thomas,
    It is easy to do this for a single room to experiment
    before changing the iView settings for the template which would affect new rooms. You can go into the Details for the root folder of your room part and call up the "Presentation Settings". Then choose the "ConsumerTreeListPreview" as the Layout set.
    In my rooms I typically add a set of extra links in the Room Links iView (perhaps restricted to the admins) that provide an Admin Explorer view and a WebDAV link. These look something like this:
    https://myportal/irj/servlet/prt/portal/prtroot/com.sap.km.cm.navigation/room_extensions/cm_stores/documents/workspaces/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?rndLayoutSet=AdminExplorer
    javascript:document.write('<div id=mydiv><a href=https://myportal/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/room_extensions/cm_stores/documents/workspaces/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/ folder=https://myportal/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/room_extensions/cm_stores/documents/workspaces/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>Click here if page fails to redirect.<\/a><\/div>');mydiv.addBehavior('\x23default\x23httpFolder');mydiv.navigateFrame('https://myportal/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/room_extensions/cm_stores/documents/workspaces/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX','_self');
    Obviously, you need to change "myportal" to your portal name/domain and "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" to your room store GUID. These links make maintaining room content easier.
    I also typically make the top folder a bit prettier by  using a taxonomy-like view with a grid of big folder icons with be links.
    Regards,
    Darin

  • How to change layout in portal

    It's a very hard question to me.but may be easy to you.
    there are very limited layout in portal.
    but i need more userful layout ,may be 4 columns in layout
    How should i do if i want change the layout?

    Hi,
    see http://help.sap.com/saphelp_nw04/helpdata/en/d5/1b083e7623445ae10000000a11405a/frameset.htm and (somewhat older) https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9242a890-0201-0010-32a9-8516639c5afa
    Hope it helps
    Detlev

  • ALV OO: how to change layout more than once using custom pushbuttons?

    Hello,
    I'm developing a report using ALV Class CL_GUI_ALV_GRID.
    It's nearly complete. but I need to add some little feature.
    I create pushbuttons on GUI Status in order to show/hide totals and to group/ungroup fields according.
    I have already created and I added them into PAI of corresponding dynpro, as follows.
    GROUP/UNGROUP FIELDS:
    DATA: g_editable_alv1        TYPE REF TO cl_gui_alv_grid.
    DATA: tb_fieldcat_1          TYPE lvc_t_fcat.
    DATA: tb_sort_1              TYPE lvc_t_sort.
    FIELD-SYMBOLS: <fs_fieldcat> TYPE lvc_s_fcat.
    CALL METHOD g_editable_alv1->set_sort_criteria
      EXPORTING
        it_sort                   = tb_sort_1
      EXCEPTIONS
        no_fieldcatalog_available = 1
        OTHERS                    = 2.
    CALL METHOD g_editable_alv1->refresh_table_display
      EXPORTING
        i_soft_refresh = 'X'
      EXCEPTIONS
        finished       = 1
        OTHERS         = 2.
    When I wanto to sort and group using fields CID and PSPID_VDATU, table TB_SORT_1 is filled as follows:
    SPOS FIELDNAME                      UP DOWN GROUP SUBTOT COMP EXPA SELTEXT
    01  |CID                           |X |    |     |X     |    |X   |      
    02  |PSPID_VDATU                   |X |    |     |X     |    |X   |      
    SHOW/HIDE TOTALS:
    I have to show/hide totals for all fields with domain name ARBEIT. In this sample I copy code to be run when I want to show totals:
    LOOP AT tb_fieldcat_1 ASSIGNING <fs_fieldcat>
                              WHERE domname = 'ARBEIT'.
      <fs_fieldcat>-do_sum    = 'X'.
    ENDLOOP.
    CALL METHOD g_editable_alv1->set_frontend_fieldcatalog
      EXPORTING
        it_fieldcatalog = tb_fieldcat_1.
    CALL METHOD g_editable_alv1->refresh_table_display
      EXPORTING
        i_soft_refresh = 'X'
      EXCEPTIONS
        finished       = 1
        OTHERS         = 2.
    OK, both features (and their opposite ones) works *only once*.
    I mean: first time ALV is displayed according standard layout. Then I click on one of my new pusbutton and it works (ALV layouts is changed). If I click again one of my pushbutton, nothng happens.
    Edit: I tried also to use CALL METHOD g_editable_alv1->refresh_table_display. (without any parameter), but nothing changed.
    What should I modify in order to be able to use my pushbuttons as many times as I want?
    Thank you and best regards
    Guido

    Your approach is ok. I think you are missing MODIFY statement when setting new fieldcatalog. Please follow my code, it works fine.
    DATA: r_cust TYPE REF TO cl_gui_custom_container,
          r_alv TYPE REF TO cl_gui_alv_grid.
    DATA: it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA: it_sflight TYPE TABLE OF sflight.
    DATA: it_sort              TYPE lvc_t_sort WITH HEADER LINE.
    "event handler class
    CLASS lcl_handler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
              handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
                             IMPORTING e_object e_interactive,
              handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
                                  IMPORTING e_ucomm sender.
    ENDCLASS.                    "lcl DEFINITION
    CLASS lcl_handler IMPLEMENTATION.
      METHOD handle_toolbar.
        DATA: ls_toolbar TYPE stb_button.
        MOVE:
           0 TO ls_toolbar-butn_type,
           'FC_BTN' TO ls_toolbar-function,
           'Show/hide totals' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD .                    "handle_toolbar
      METHOD handle_user_command.
        DATA it_fcat TYPE lvc_t_fcat.
        DATA wa_fcat TYPE lvc_s_fcat.
        IF e_ucomm = 'FC_BTN'.
          sender->get_frontend_fieldcatalog( IMPORTING et_fieldcatalog = it_fcat ).
          LOOP AT it_fcat INTO wa_fcat WHERE fieldname = 'PRICE' .
            IF wa_fcat-do_sum = 'X'.
              wa_fcat-do_sum = space.
            ELSE.
              wa_fcat-do_sum = 'X'.
            ENDIF.
            MODIFY it_fcat FROM wa_fcat.
          ENDLOOP.
          sender->set_frontend_fieldcatalog( it_fcat ).
          CALL METHOD sender->refresh_table_display
            EXPORTING
              i_soft_refresh = 'X'.
        ENDIF.
      ENDMETHOD.                    "handle_user_command
    ENDCLASS.                    "lcl IMPLEMENTATION
    INITIALIZATION.
      SELECT * FROM sflight INTO TABLE it_sflight UP TO 20 ROWS.
    START-OF-SELECTION.
      CALL SCREEN 100.
    MODULE pbo OUTPUT.
      IF r_cust IS NOT BOUND.
        CREATE OBJECT r_cust
          EXPORTING
            container_name              = 'CUSTOM_CONTAINER'      .
        CREATE OBJECT r_alv
          EXPORTING
            i_parent          = r_cust.
        it_sort-fieldname = 'CONNID'.
        it_sort-up = 'X'.
        APPEND it_sort.
        CALL METHOD r_alv->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SFLIGHT'
          CHANGING
            it_outtab        = it_sflight.
        SET HANDLER: lcl_handler=>handle_user_command FOR r_alv,
                     lcl_handler=>handle_toolbar FOR r_alv.
        CALL METHOD r_alv->set_toolbar_interactive.
      ENDIF.
    ENDMODULE.                    "pbo OUTPUT
    Regards
    Marcin

  • How to change layout of KM Basic Search

    Hi all,
           I have a question about the layout of the KM Basic Search.
    I've created a new Search Component Set in System Administration >System Configuration>KM>CM>User Interface-->Search. I've added search_input_indexes as Component for Basic Search function. However this component sets the inputfield, indexes dropdownlist and the search button on one line.
    Is there any way to change this so de dropdownlist can be displayed under the inputfield? The reason is that I don't have much space to show this on one line.
    Any help is welcome. Thanx.
    Kwok Wha

    Hi Kwok
    As far as I know there is no search component that meets your requirements.
    Perhaps you should consider using search_input_scope instead since that might solve your space problem. But then you dont get a dropdown-indexlist as you'd like.
    Kind regards,
    Martin

Maybe you are looking for

  • HP officejet pro 8600 "not found" after installation on Dell laptop with Windows 7 op syst

    downloaded software from internet and it shows that it's been installed on computer.  Printer is on and shows that it is connected to the network.  Networks match on computer and printer.  Printer not printing from computer but did from my phone.  "p

  • Problem configuring vRealize Operations Manager

    Hi there, I have installed VRealize operations manager version 6.0 (trial version for 60 days) and ever since I have installed it, it says collecting data but not able to see any details of my vmware infrastructure in there. When I click on reports,

  • Device not authorized to play movie

    Hi, When I try to play a movie I have rented from iTunes on my iPad, I get device not authorized when using Airplay to my Apple TV. Signed in to iTunes with same account on iPad and Apple TV. Worked fine for another movie yesterday. The only differec

  • Cropping offset with artboard "fit to selected art" ?

    I have been having this problem for a while now, and did a lot of searching and don't seem to see anyone else having this issue! If I create something in illustrator (in this case, it's a button for a web page), and I create a new artboard and select

  • Nikon D4  unsupported?

    updated Aperture to 3.4, but my Nikon D4 Raw files still saying. "Unsupported Image Format"?  What is the fix for this - since it is listed on the supproted Nikon cameras.