Web dynpro ALV table copy selected row

How to copy a selected row into new row with same values.
Thanks

Hi,
I assume that there is a COPY buttonand there is a single lead seecltion for your alv table.
Now,
data:
  lr_node type ref to if_wd_context_node,
  lr_element type ref to if_wd_context_element,
  lr_element1 type ref to if_wd_context_element,
  ls_table type vbak,
ls_table1 type vbak.
lr_node = wd_context->get_chaild_node ( 'FLIGHT ' ).
if lr_node is not initial.
lr_element = lr_node->get_lead_selection ( ).
lr_elemnet1 = lr_node->get_element( index = 4). "supose the index of new row is 4
* you can use the get_element_count to know the record number
endif.
if lr_element is not initial.
lr_element->get_statitc_attributes
importing
static_attributes = ls_table
endif.
if lr_element1 is not initial.
lr_element1->set_staitc_attributes
exporting
STATIC_ATTRIBUTES = ls_table.
endif.
Assume that you have already created a new row...
use code wizard.
Regards,
Lekha.

Similar Messages

  • WEB DYNPRO ALV GRID  GET SELECTED ROWS...

    I'm reusing component ALV Grid ...
    How can i get selected rows...

    Hi Stephan,
    In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it.
    METHOD get_selected_rows .
      DATA: temp TYPE string.
      DATA: lr_node TYPE REF TO if_wd_context_node,
                wa_temp  TYPE REF TO if_wd_context_element,
                ls_node1 TYPE wd_this->element_node_flighttab,
                lt_node1 TYPE wd_this->elements_node_flighttab.
      lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
    " This would now contain the references of all the selected rows
      lt_temp = lr_node->get_selected_elements( ).
        LOOP AT lt_temp INTO wa_temp.
    " Use the references to get the exact row data
          CALL METHOD wa_temp->get_static_attributes
            IMPORTING
              static_attributes = ls_node1.
          APPEND ls_node1 TO lt_node1.
          CLEAR ls_node1.
        ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • 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

  • 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

  • Web dynpro ALV table cell popin

    from my understanding, it is possible to create a cell popin for a standard table.
    but now i wonder whether is it possible to create a cell popin for an ALV table?

    My question was about option Filter of ALV report.
    May be somebody knows how I can receive Interfacecontroller
    attributes: FILTER_VALUES. It should help to filter
    table inside code( in my ONFUNCTION method).
    Regards
    Irena

  • Web Dynpro ALV table contents  from context comes without filter conditions

    Hi Experts,
    Please help me to solve this problem.
    I set some selfmade functions on tool bar of my WD ALV,
    and it works OK, but when I set some filter conditions,
    I get same table contents in my method ONFUNCTION.
    What can I do?
    Thank you very much
    Irena

    My question was about option Filter of ALV report.
    May be somebody knows how I can receive Interfacecontroller
    attributes: FILTER_VALUES. It should help to filter
    table inside code( in my ONFUNCTION method).
    Regards
    Irena

  • 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.

  • Web Dynpro ALV vs. Table

    Hello,
    can u please describe the main differences between Web Dynpro ALV and Web Dynpro Table ?
    When do I choose which component for my applications ?
    Thanks in adavance
    Best regards
    hermannh

    Hi,
    SAP List Viewer (ALV) is a  tool which is used to display lists and tabular structures and provides a lot of flexibilty for report generation.
    Flexible in the sense , it has a lot of inbuilt functionalities which are used in general in a reporting and thus helps in reducing a large amount of coding.
    for eg: <code> CALL METHOD alv_grid->set_table_for_first_display
       EXPORTING
         I_STRUCTURE_NAME              = 'YCLII_CUST_STRU'
       CHANGING
         it_outtab                     = CUST_TAB
    <code>
    The above method is used for table generation. Mny more funtionalities such as sorting and re-arranging of result output is also available.
    for further info check this link.
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/f0b107e4-dc72-2c10-08a7-b822c9abf0e2
    Thanks

  • Web Dynpro ALV grid equivalent of onLeadSelect

    Hi,
    I am new to web dynpro alv and would like to know how to implement the equivelent of the action onLeadSelect that you can do with a table UIElement, but I want to do this for the ALV table that I have.  Many thanks,
    Samir

    Hi,
    Go to the View's property tab and include you ALV in that.
    whenever you instantiate the ALV then in the view, METHODS tab, you can find the Event handler for the lead selection for that ALV. Implement that.
    Method name           Method type         Event        
    ONLEADSELECT     Eventhandler        ON_LEAD_SELECT
    Check out the links -
    Re: click event on ALV
    http://www.flickr.com/photos/31042772@N08/3408386623/
    Regards,
    Lekha

  • 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.

  • Detail Button in Web Dynpro ALV

    Hi at all,
    when I create an ALV in Standard ABAP there is a small "Detail" button on the left side of the button row without any additional complex programming.
    How can I get this button in Web Dynpro ALV?
    Dirk

    The standard ALV Component in Web Dynpro doesn't have this features.  It wouldn't be too difficult to add manually.  You could simply bind a custom view to the lead selection of the same context you are using in the ALV and use the form wizard to generate the UI elements.  It isn't quite as nice becuase it woudl require a few manual steps for each usage of the ALV where you want this functionality.

  • 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 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.

  • 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^

  • How to Implement Sort, Filter funtinality in Normal web dynpro ABAP Table

    Hello,
    How to Implement Sort, Filter funtinality in Normal web dynpro ABAP Table ?
    Thanks

    hi,
    Check out this link for sorting in Table.
    Sorting option in WebDynPro ABAP UI Table
    steps to follow :
    ->Have the data in internal table (itab).
    ->Now use sort command for the particular column which ever you want to sort.
      e.g sort itab descending by <Column>.
    ->Now you can bind the internal table with the Context Node which is binded to Table.
    I hope it helps.
    Thanx.

Maybe you are looking for

  • Fails to update on Mac 10.6.8

    Hi, I followed these steps and it continues to fail: During installation of Adobe AIR, you receive an error dialog with contents similar to "An error occurred while installing Adobe AIR.  Installation may not be allowed by your administrator.  Please

  • 15 inch retina macbook pro graphical issue

    I noticed yesterday that i started getting a pixelated "flicked" across my screen. typically it's the lower half and it tends to go across the screen in a rectangular bar shape mainly. . it does happen when im not using video, but it does appear more

  • Using Parse REST APIs

    I know that you will recommend me to download Parse .Net SDK. But the problem is that it uses Tasks which are only available in .Net 4.5 The older versions of .Net are not supported. That is why I am going to use parse REST APIs. Having a problem in

  • Time Machine progress bar

    I recently upgraded from an iMac G5 running Leopard to an i5 MacBook Pro, and I had a specific issue with time machine that I would like to resolve. With the G5, after activating TM, I always got a small Finder-like window showing the progress of the

  • Unable to deploy my RT vi code on cRIO in scan mode

    Hi, I have been working on NI cRIO for past some time. Today I faced a peculier problem. I was able to make necessary changes in my RT vi and deploy it on the cRIO. Everything was working fine but somehow I started to get the message of " Unable to c