Dynpro Alv Column

Hi,
        I have an ALV grid in which there is a default column appearing for 'Client' (its not be selected in the context field catalog ) which should be removed . Can you pls give some examples to do this .
Thanks,
Kumar.

DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
DATA: LR_INTF_CTRL TYPE REF TO IWCI_SALV_WD_TABLE.
DATA: LR_MODEL    TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
  LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
LR_INTF_CTRL = WD_THIS->WD_CPIFC_ALV( ).
LR_MODEL = LR_INTF_CTRL->GET_MODEL( ).
WD_THIS->M_MODEL = LR_MODEL.
LR_MODEL->IF_SALV_WD_COLUMN_SETTINGS~DELETE_COLUMN( ID = 'MANDT' ).
Use the above code to delete the column through coding, where ALV is the component usage name in
WD_CPUSE_ALV( ).
Abhi

Similar Messages

  • Show image in Web Dynpro ALV column

    Hello everybody,
    I have a WD component with an ALV table bound to a context node. Works very fine so far.
    Now in the first column of the node I have put an image source (MIME object in my WD component).
    I configured the first ALV column as Link To Action and now would like to link it to the image source. My problem is that the image is not loaded in the ALV.
    This is my coding (INIT method of my view):
    METHOD wddoinit .
      DATA: lo_alv_cmp         TYPE REF TO if_wd_component_usage,
                  lo_alv_if          TYPE REF TO iwci_salv_wd_table,
                  lo_alv_config      TYPE REF TO cl_salv_wd_config_table,
                  lo_column_settings TYPE REF TO if_salv_wd_column_settings,
                  lo_column          TYPE REF TO cl_salv_wd_column,
                  lo_link_to_action  TYPE REF TO cl_salv_wd_uie_link_to_action.
    get instance of ALV component
      lo_alv_cmp = wd_this->wd_cpuse_alv( ).
      IF lo_alv_cmp->has_active_component( ) IS INITIAL.
        lo_alv_cmp->create_component( ).
      ENDIF.
    get instance of ALV Interface Controller
      lo_alv_if = wd_this->wd_cpifc_alv( ).
    configure ALV
      lo_alv_config = lo_alv_if->get_model( ).
      lo_column_settings ?= lo_alv_config.
      lo_column = lo_column_settings->get_column( 'IMAGE' ).
      CREATE OBJECT lo_link_to_action.
    fix settings for test purpose (how must I change it to get the information from the context node??)
      lo_link_to_action->set_image_height( '50px' ).
      lo_link_to_action->set_image_width( '50px' ).
      lo_link_to_action->set_image_source( 'ICE Flottenportal.jpg' ).
      lo_column->set_cell_editor( lo_link_to_action ).
    ENDMETHOD.
    Thanx a lot in advance for any help!!

    Thanks a lot for your helpful advice.
    I now found that method cl_wdr_utilities=>get_mime_path is the best way to get the path.
    But one question is still open:
    How can I retrieve my image source from the context? Do I have to read the context and then write it to the image_source attribute? Or ist there a more elegant solution?
    Thank you for any help!

  • Custom sorting in Web Dynpro ALV columns

    Hello Experts,
    I want to implement custom sorting on some of columns in Web Dynpro ABAP ALV.I searched in SDN forum,but couldn't find much useful information on this?are there any events through which we can achieve this?
    is it technically feasible?
    Any information on this will be great help.
    Thanks,
    Naidu

    Hello Thomas,
    Thanks for your quick response.Actually i want to display Price and currency values together  in single column ,like 5000 USD.For this i have to use character field as i can't take currency field .If i take char field for price,sorting will based on character type rather than decimal type.Due to this,i want to implement custom sorting on that particular field.
    Anyhow thanks for confirmaion.
    Thanks,
    Naidu

  • Web dynpro for abap how to create a customize search help in alv column

       hi:
          Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
          Are there specific examples ?
          thanks!!

    HI:
       I want to created a freely programed help which include date&time,and put help value to alv column.
      I have created a freely programed help in web dynpro for abpa application,I refer:
      **************** - WebDynpro for ABAP
      but have a problem!
       If you focus on the the input field in the first row, you get the value help
    However if  I go to the second row and focus on the same input field in this column, I don't get the value help:
    What is a good way to solve similar problems?
    thanks

  • Web Dynpro ALV grid column colour

    Hi,
    I have tried to set the colour of a column for my web dynpro alv with the below code but it the colour for this column has not changed - it seems to remain the standard colour.  Is there something else i need to do?
      DATA: lt_columns TYPE salv_wd_t_column_ref
          , ls_columns  TYPE salv_wd_s_column_ref
          , lr_column TYPE REF TO cl_salv_wd_column
      lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
      LOOP AT lt_columns INTO ls_columns.
        IF ls_columns-id CS 'TOTAL_'.
          lr_column = ls_columns-r_column.
          lr_column->set_cell_design( cl_wd_abstr_master_table_col=>e_cell_design-positive ). "CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
        ENDIF.
      ENDLOOP.

    Hi Samir,
    You will have to create an attribut WDUI_TABLE_CELL_DESIGN and bind this attribute with the cell design property of the column. Check this wiki link [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Web%20Dynpro%20ALV%20-%20Change%20Cell%20Colour%20based%20on%20Content], it will solve your issue.
    Regards,
    Radhika.

  • Web Dynpro ALV grid column width

    Hi,
    I have a web dynpro alv grid that has columns titles that are long.  What is the best way of displaying the data without taking up too much space with the titles? 
    For example is it possible to wrap the title into 2 or 3 rows
    Thanks,
    Samir

    Hi,
    DATA: lr_column type ref to cl_salv_wd_column,
    lr_colheader type ref to cl_salv_wd_column_header.
              CALL METHOD lrcolumn->get_header
                RECEIVING
                  value = lr_COLHEADER.
    lr_COLHEADER->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_short ).
    Refer this if_salv_wd_c_ddic_binding in se24 for more.
    Regards,
    Lekha.

  • Separatate column of Web Dynpro ALV table using a vertical line

    Hi Experts!
    I have Web Dynpro ALV table and  I have a requirement to add a colored vertical line between two columns as a separator.   
    Is this possible? Is it possible to adjust border width of individual cells?
    I would be grateful for any ideas you may able to share.

    Both could be achieved by creating custom theme. But those changes will be applicable to tables and ALVs in your applications.
    Nitesh

  • How to Email POWL Reports / Apply Web Dynpro ALV Table Layout Settings

    Hi all,
    we want to be able to automatically extract POWL reports and email them to users in a batch job.
    We can refresh a POWL report using FM POWL_QUERY_REFRESH, and access the raw report data using method CL_POWL_QUERY_ACCESSOR=>GET_CACHED_RESULTS.
    However this merely gives us a table of raw data.  No view layout (ie. Web Dynpro ALV table layout) settings have been applied, so there is no hiding or arranging of columns, row sorting, calculations or filters.
    Ideally we would like to be able to specify a query and view layout.  The batch job would then refresh and extract the data, and format the data according to the view layout before sending it on as an attachment in an email.
    Does anyone know how to determine and apply Web Dynpro ALV table layout settings to format table data outside of the Web Dynpro environment ?
    Thanks & regards,
    Grogan

    Hi Grogan,
    Did you find out how this works..i also have the same issue.
    Thanks
    Jdsouza

  • Web dynpro Alv ENHANCEMENT

    hI,
    i HAVE a requirement to add extra 2 columns in web dynpro alv of standard web dynpro component
    what are the steps to be taken.

    Hi Madhav,
    Please cehck Thomus answer in this thread..
    is possible to enhance standard ALV?
    Enhancement Implementation - Removing columns in standard ALV table
    Cheers,
    Kris.

  • Web Dynpro ALV grid totals

    Hi,
    I have created an application that uses a web dynpro alv grid.  I want to display totals - is there a setting that can do this automatically - if so, can you please tell me how to do this?    Thanks,

    Hi
    You can take help of following code snippet to create totals for a particular column
    Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column          TYPE REF TO cl_salv_wd_column,
            lt_column type salv_wd_t_column_ref,
            ls_column type salv_wd_s_column_ref.
    Data:  lr_field_amnt type REF TO CL_SALV_WD_FIELD.
    * get reference of ALV component
      lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
    *  get function settings
      lr_function_settings ?= wd_this->alv_config_table.
    * display columns in correct order
      lr_column_settings ?= wd_this->alv_config_table.
      lt_column = lr_column_settings->get_columns( ).
      loop at lt_column into ls_column.
    CASE ls_column-id.
    when 'AMOUNT'
    * aggregate field
            CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
              EXPORTING
                FIELDNAME = 'AMOUNT'
              RECEIVING
                VALUE     = lr_field_amnt.
    * create aggregate rule as total
            CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
              EXPORTING
                AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
              RECEIVING
                VALUE            = lv_aggr_rule.
    endcase.
    Regards
    Manas DUa

  • Web Dynpro ALV grid format

    Hi,
    I have a web dynpro alv table that has many columns (about 20) I would like it to be displayed so that the user does not have to scroll right to see all the data.
    at the moment columns:
    col1 col2 col3 ......col19 col20
    i would like the second half of the table under the 1sta half:
    col1 col2 col3...col9 col10
    col11 col12...col19 col20
    Is there any way that i can get the table to be split into two or some other nice way to display without scrolling?

    You won't be able to do this with a single ALV.  I suppose you could have two ALVs and bind them both to the same context.  You wouldn't be able to sync the veritcal scrolling between the the two ALVs however.  I'm also not sure how usage this design is from a UI design pattern.  I would think the acceptible approach would be to use horizontal scrolling within the ALV.  You don't have to make the ALV display all columns at once as this can make your entire page very wide and require using the browser scrolling.  Instead consider using the set_scrollable_col_count method.

  • Input field in Web Dynpro ALV does not have correct focus

    Hello Friends,
    Our client's SAP system is recently upgraded with ECC 6.0 SP 18.
    After that the focus in the editable field of Web Dynpro ALV does not working properly by down arrow navigation.
    The common scenario:
    The ALV has more than one rows and one column is editable...
    when user is selecting field of first row and making some entries...
    after that pressing down arrow it is going to next row and coloring the field like focusing...
    but the 'cursor' is not blinking so user can not make entry without clicking by mouse...
    this was working Ok before upgrade...
    Could you please anyone have a look and propose a suitable solution?
    Thanks
    Krish

    Hello,
    The problem was with Javascript....which play an important role in layout of web dynpro ALV...
    which resides in MIME repository -> SAP ->PUBLIC - >BC ->NW5 ->JS ->SAPURI_Ie6....
    We wrote to SAP for giving us the fix...
    after we got a new file from SAP the problem is solved...
    also we have to clear server cache through SMICM and client cache...
    Thanks.
    K.

  • Wrapping text with web dynpro ALV

    Hi there,
    I have got an web dynpro ALV and have set the SET_FIXED_TABLE_LAYOUT value to abap_true. This provides what i need apart from instead of not showing the text that can not be fit into the available column width I would like it to wrap the text, so it is all displayed. Is this possible?
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Thanks and Regards
    Mart

    Hi Mart,
    Please refer this [thread|Wrap in ALV], it might help.
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Refer the reply of Thomas Jung in this [thread|Adjusting Column width on Web Dynpro ALV].
    Regards
    Arjun
    Edited by: Arjun on Feb 23, 2009 10:48 AM

  • ABAP Web Dynpro ALV

    How does one enable:
    1) Column selection (single & multi)?
    2) Cell selection (single & multi)?
    This is Web Dynpro ALV 2004S support stack 6.
    Regards,
    Glenn.

    hi
    good
    go through these links, i hope these ll help you to solve your problem,
    http://www.sap-press.de/download/dateien/1079/sappress_web_dynpro_for_abap.pdf
    http://help.sap.com/saphelp_nw04s/helpdata/en/b5/ac884118aa1709e10000000a155106/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/4d3642eca5033be10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9
    thanks
    mrutyun^

  • Problem while exporting ALV column header to excel sheet.

    Hi,
    I am able to export an ALV grid details to an excel sheet. But the ALV column headers when exported to excel sheet are getting truncated.
    For eg: if my column header in ALV grid is displayed as 'Material' then the column header in excel sheet is 'Mater' only. Remaining portion is getting truncated.
    How can I view the entire column header text?
    Kindly assist.
    Thanks.

    I have the same problem with you, when user export to excel. I fixed it by using
    w_layo-colwidth_optimize = 'X'. <<<<<<<<<<<<This
    perform generate_fcat_reftab
        using 'PRUEFLOS' 'T_INPUT' '' '' 'Inspection Lot' 0.
    form generate_fcat_reftab  using    p_fieldname
                                        p_tabname
                                        p_ref_tabname
                                        p_ref_fieldname
                                        p_output_text
                                        p_output_lenght.
      clear w_fcat.
      w_fcat-fieldname = p_fieldname.
      w_fcat-tabname   = p_tabname.
      w_fcat-ref_fieldname = p_ref_fieldname.
      w_fcat-ref_tabname = p_ref_tabname.
      w_fcat-seltext_s = p_output_text.
      w_fcat-seltext_m = p_output_text.
      w_fcat-seltext_l = p_output_text.
      w_fcat-outputlen = p_output_lenght.
      w_fcat-ddictxt = 'L'. <<<<<<<<<<<<<<<<<<This
      append w_fcat to t_fcat.
    endform.

Maybe you are looking for

  • Apple iPod Update Server Error

    Whenever I try to run an update for my iPod through iTunes, it comes up with an error that says that "The iPod server network could not be contacted." I have parental controls set up on my computer applied to me, and I'm wondering if that is the case

  • I updated Adobe Flash on my Mac and now my solitaire app won't open.  No error message, just -600.

    I updated Adobe Flash on my Mac and now my solitaire app won't open.  Message just says 'unable to open' -600.  I tried to reinstall Full Deck Solitaire, but the app store says it is already installed, so I can't do it that way.  What should I do?  T

  • 0IC_C03 in BI 7

    Dear All, I am using InfoCube 0IC_C03 in BI 7 and I found that there are InfoSources for this cube such as 2LIS_03_BX_TR. I just want to know what the different and its features between 2LIS_03_BX_TR and the previous version 2LIS_03_BX. Could anyone

  • How to retrive the deleted entries in the ztable

    please let me know how to retrive the deleted entries in the ztable.

  • Filter based upon results of another request

    How do I troubleshoot a Filter based upon results of another request issue? I have a report that lists every account that purchased a product in May. I have a report that lists every account that purchased a product between Jan - April. I have a repo