WebDynpro: ALV: LinktoURL depending on row

Hello all,
I need to integrate a LinkToURL UIElement to a column in an ALV. The column is AUFNR and
the link is depending on the number of the order. f.e. www.sdn.sap.com?id=<AUFNR>.
Anybody could tell me if its possible with WebDynpro for ABAP?
Thanks and regards
Mario

Ok, I'm in kind of a snarky mood today.  I assume that even though you didn't ask how to acomplish this, you might want to know.  First of all, here is the help link on how to change the cell editor in general:
http://help.sap.com/saphelp_nw70/helpdata/EN/43/2808494f49601ee10000000a422035/frameset.htm
The class that you want to use for a linkToURL is CL_SALV_WD_UIE_LINK_TO_URL. You will need to build the URL as a separate context attribute and bind to the linkToURL.

Similar Messages

  • Webdynpro ALV - Adding an additional row

    Hi Friends,
    I want to develop an ALV report in Webdynpro ABAP as per the format mentioned in the below link. I want to have an additional row after the subtotal in ALV to show some calculation.As per the format below in the output after subtotaling the total operating revenue and total other income i would like to have an additional row to show the Total revenue(total operating revenue + total other income). Similarly after subtotaling the cost of sales, I would like to show the gross profit(total operating revenue - cost of sales) in an additional row. Please let me know whether this is possible in ALV. If so please advice me how to achieve it.
    http://www.imagebanana.com/view/gpl4ynnk/report_layout.jpg
    Regards
    SAPTechies

    Hi,
    I'm not sure but have you tried implementing the code you want after the total inside  end of page.
    There is another event called 'AFTER_LINE_OUTPUT' , try using them.
    Refer the below links for understanding how to use them.
    END-OF-PAGE
    http://help.sap.com/saphelp_470/helpdata/en/9f/dba04f35c111d1829f0000e829fbfe/content.htm
    Thanks.

  • How to make all the rows editable in webdynpro alv output

    Hi,
    How to make all the rows editable in webdynpro alv output.
    Thanks
    Rakshar

    Hi Rakshar,
    Check this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP
    Regards

  • How to display different icon within WDA alv table base on row data ?

    Hi,
    is that possible to display different icon for every row within ALV table depending on the row data ?
    for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
    because base on this code below i only can set 1 icon for the whole row data.
    LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'ICO'.
            CREATE OBJECT lr_caption.
               lr_caption->set_image_source( value = '~Icon/SuccessMessage').
               <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    Thank you in advance.
    Fernand

    Hello,
    Yes it is possible to display different images based on data.
    For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
    And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
    Now in the settings for ALV use the following code:
    * Display icon in column seatsocc
      DATA: lr_column TYPE REF TO cl_salv_wd_column,
            lr_image TYPE REF TO cl_salv_wd_uie_image,
            lv_icon TYPE string.
      lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
      CREATE OBJECT lr_image.
      lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
      lr_column->set_cell_editor( lr_image ).
    in the above code, column 'SEATSOCC' will be displayed as an icon.
    Sample code to fill the attribute 'STATUS'
    LOOP AT lt_flights INTO ls_flight.
        lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
        IF lv_seatsfree = 0.
          ls_flight-status = 'ICON_RED_LIGHT'.
        ELSEIF lv_seatsfree <= 50.
          ls_flight-status = 'ICON_YELLOW_LIGHT'.
        ELSE.
          ls_flight-status = 'ICON_GREEN_LIGHT'.
        ENDIF.
        MODIFY lt_flights FROM ls_flight.
      ENDLOOP.
    Hope this helps!
    Regards,
    Srilatha
    Edited by: Srilatha M on Jun 25, 2010 12:02 PM

  • How to code to get intermediate results in webdynpro ALV? Please help!

    Hi Experts,
    I got following info from help file to generate Intermediate Results(subtotal).
    Can somebody help me with sample code to achieve this?
    Basically I want to subtotal 'Qty' column based on 'Product' field.
    By default, all values in a field are used in the calculation during aggregation. However, you
    are also able to generate intermediate results. You group the data records that contain the
    values for an intermediate result and display each intermediate result in its own result row.
    To generate intermediate results, you have to provide certain information:
    &#9679; To specify in which field the values from which the intermediate results are calculated
    are located, generate an aggregation condition for the desired field. The overall result is
    displayed in the result row.
    &#9679; To specify which data records are contained in an intermediate result, group the data
    records: You sort the ALV output by the field that includes the criterion for the
    intermediate result.
    &#9679; To then generate the intermediate results, calculate the intermediate results using the
    field with the criterion.
    &#9679; To then display the intermediate results, switch on the display of intermediate results.
    You are able to make the following settings for intermediate results:
    &#9679; Generate intermediate results
    &#9679; Display intermediate results
    &#9679; Setting levels for drilling down intermediate results
    &#9679; Set the position of the result rows (see Settings for Aggregation [page 196])
    &#9679; Forbid the generation of intermediate results
    Prerequisites
    &#9679; You have generated an aggregation object for at least one aggregatable field.
    &#9679; The field with the criterion for intermediate results is not an aggregatable field, and
    therefore has an alphanumeric data type.
    Generate Intermediate Results
    To generate intermediate results in a field that already has an aggregation condition, generate
    a sort condition for the field of a column (another column) (see Sorting [page 190]).
    In this sort condition, define whether intermediate results are to be generated. To do this, use
    the methods of the class CL_SALV_WD_SORT_RULE.
    Methods for Generating Intermediate Results
    Function Method
    Generate intermediate results SET_GROUP_AGGREGATION
    Check whether intermediate results are displayed GET_GROUP_AGGREGATION
    Display Intermediate Results
    Once you have made all settings, to generate intermediate results you have to switch on the
    display of these intermediate results. You use the methods of the interface class
    IF_SALV_WD_FIELD_SETTINGS for this (implementing class
    CL_SALV_WD_CONFIG_TABLE).
    Methods for Displaying Intermediate Results
    Function Method
    Display intermediate results SET_GROUP_AGGR_DISPLAYED
    Check whether intermediate results are displayed GET_GROUP_AGGR_DISPLAYED
    I have tried a bit but it is not working. here is my code:
    get field and create aggregation rule of type total
    lr_field = l_value->if_salv_wd_field_settings~get_field( 'Qty' ).
    lr_field->if_salv_wd_aggr~create_aggr_rule( ).
    lr_aggr_rule = lr_field->if_salv_wd_aggr~get_aggr_rule(  ).
    lr_aggr_rule->set_aggregation_type( if_salv_wd_c_aggregation=>aggrtype_total ).
    l_field = l_value->if_salv_wd_field_settings~get_field( 'PRODUCT' ).
    l_sortrule = l_field->IF_SALV_WD_SORT~create_sort_rule( ).
    l_sortrule~SET_GROUP_AGGREGATION( 'Y').
    l_value->if_salv_wd_field_settings~SET_GROUP_AGGR_DISPLAYED( 'Y' ).
    Please help
    Message was edited by:
            gopalkrishna baliga

    Hi Gopalakrishna balgia,
    I think i have answered in the below thread. Check it out.
    How to show Subtotal in webdynpro ALV(ABAP)? Kindly help!
    Regards
    Rakesh

  • Help,Webdynpro ALV report

    Hello,
    My Webdynpro ALV report display SFLIGHT all fields .
    But I want to show only five fields,
    how code?
    CODE::
    data:node_flights type ref to if_wd_context_node,
           it_flights type sflight_tab1,
           is_flights type sflight,
           it_final type IF_MAIN=>elements_flights,
           is_final type IF_MAIN=>element_flights.
      select * from sflight into table it_flights up to 10 rows.
      node_flights = wd_context->get_child_node( 'FLIGHTS' ).
      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_ref_interfacecontroller type ref to iwci_salv_wd_table.
      l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
    navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
      node_flights = wd_context->get_child_node( name = `NODE_FLIGHT` ).
    fill context node
      node_flights ->bind_table( it_flight ).
    endmethod.
    thanks

    HI,
    There is no need to change your code.
    Do one thing.
    Create a node SFLIGHT and do not add dictionary structure SFLIGHT.
    Then create what are the required five attributes under it.
    Make sure all these five refer to the dictionary data elements.
    example: If you want carrid declare dectionary structure S_CARR_ID.
    Like wise.
    Now finally goto component usage->ALV->INTERFACECONTROLLER in the
    left side tree of web dynpro component.
    Then create component usage and drag SFLIGHT node to DATA of the context.
    It is one of the way.
    Second way is.
    Create SFLIGHT node and mention SFLIGHT as stricture and select five required attributes that you need.
    Now after creation of SFLIGHT NODE just delete the structure name present in the PROPERTIES of
    SFLIGHT NODE.
    Now finally goto component usage->ALV->INTERFACECONTROLLER in the
    left side tree of web dynpro component.
    Then create component usage and drag SFLIGHT node to DATA of the context.
    I hope it helped you.
    Regards and Best wishes.

  • ALV Scrolls to last row

    Hello everybody,
    I have a problem with my WebDynpro ALV. When I am using the calculation functions the ALV scrolls down to the totals line. When I set "Display Calculations at Start of Table" it scrolls to the first row in the Table (which is in fact the behaviour I want to achieve).
    Is it possible to convince my ALV to start at the first row and displaying the totals at the bottom of the Table? I have searched in the cl_salv_wd_config_table, but I did not find anything what soved my problem.
    Anyone any ideas?
    Thanks
    Daniel

    Hi,
    Are you using the standard ALV total functioanlity or custom caluculation.
    Can you be more clear in your requriement.
    Check the method cl_salv_wd_config_table -
    IF_SALV_WD_TABLE_SETTINGS~SET_FIRST_VISIBLE_ROW to set the first visible row.
    Regards,
    Lekha.

  • Abap WD ALV: Event for calculation row?

    Hi,
    i have one Abap WebDynpro ALV Component. It is possible to register an event (ON_CLICK) for Cells which are an Link_to_action for example.
    My Table:
    ID | Group | Var
    A1 | Test | 4
    A2 | Test | 5
    A3 | Dev | 4
    A4 | Dev | 6
    If i create the ON_CLICK event for the last row, which is then a link_to_action column, i can click on the numbers and the event is triggered
    Now i have a table which uses the ALV Calculation feature and the Intermediate Results for the grouping.
    My new output view is:
    ID | Group | Var
    ->---Test    9
      A1 | Test | 4
      A2 | Test | 5
    ->---Dev  10
      A3 | Dev | 4
      A4 | Dev | 6
    (It calculates the sum of the vars and groups it by the second column)
    Now I need an Event if someone clicks on the numbers in the Var Row of the intermediate results row (here: 9 and 10). How can i do this?
    If this is not possible, how can i register an event if someone expands or collapses a intermediate result row?
    Kind Regards,
    Thomas
    Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PM
    Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PM

    Hi,
    Is the DDLBK is filled with support function? if yes then look if you can enhance the method by post method exit etc..
    Thanks,
    Chandra

  • Export and Import functionality in WebDynpro ALV

    Hi Experts,
               I have done a webdynpro alv application and it is displaying the data as i wanted. However i have a requirement to get the alv displayed data in an excel sheet( which works with the export button on alv) and update that excel sheet which will be updated back in the alv table.(for eg any import button functinality on alv)
    Regards,
    Tashi

    Hi,
    For this you need to use file upload to upload the modified excel data back to ALV. Else why dont you make an ALV Editable.!
    For upload excel refer this wiki: [Upload excel in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP]
    hope this helps u.,
    Thanks & regards,
    Kiran.

  • Dynamic report output in a webdynpro alv

    Hi,
    I have created a dynamic report in the R/3 system . In this report, i am creating a report program within the report and subsequently executing this dynamically created report and displaying in the ALV..
    Is it possible to handle such a scenario in a webdynpro ALV. One option is to use ITS and display the report in the portal but is there some other way so that i can directly view this report in an alv grid in a view.
    all help appreciated!!
    regards,
    Priyank

    Hi Priyank,
    This could be one of the solution:
    1] Run the report in background mode (using submit statement, dn't forget to give printer as LOCL), get the spool id programatically. Use the FM's CONVERT_OTFSPOOLJOB_2_PDF or CONVERT_ABAPSPOOLJOB_2_PDF.
    Which returns the ouput of table tline, convert this to xtring and bind it to xtring attribute.
    In view add a interactive form and bind the xstring attribute to the Interactive form.
    By following the above steps, we can display the result in the PDF in WD ABAP.
    2] The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
    In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
    3] But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
    You can create a service which takes the parameters of the report, submits it and
    transfers the result to HTML. In a view you use an IFRame which takes the URL of the service and shows the result HTML.
    just additionally read this thread,
    Display simple ABAPLIST
    Here an IFrame is used to display HTML output of report. But as IFRame gets obsolete the Suresh's solution seems to be pretty cool.
    Hope this will help you!
    Cheers,
    Darshna.

  • Hide disclose icon form ADF tree row depending on row data

    Hello,
    I've got an ADF tree based on recursive View Object. So basically we don't know how many tree levels are there, but depending on a row data we know that the row is a leaf and there will be no children rows.
    But the disclose icon is there event though we definitely know it is currently useless.
    So is there any way to hide the disclose icon from ADF tree(treetable) row depending on row data?
    Thanks.
    ADF 11R2

    Great, it works.
    The only thing is suggested style just makes the icon invisible, but it is still there and can be clicked.
    I applied .hideDiscloseIcon af|treeTable::collapsed-icon-style
    display: none;
    }and there is no disclose button at all.

  • How to build a fieldcatalog in webdynpro alv

    Hi friends,
    how to build a fieldcatalog in webdynpro alv ? can any give me with example
    Thnx
    Kumar Srini

    fieldcatalog in the sense, we can modify the alv table column names by using below code.
    DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV2( ).
    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_ALV2( ).
      DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
      LO_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE_ROW_COUNT( 5 ).
    for title
    DATA: LR_TABLE_SETTINGS TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    DATA: LR_HEADER TYPE REF TO CL_SALV_WD_HEADER.
    LR_TABLE_SETTINGS ?= LO_VALUE.
    LR_HEADER = LR_TABLE_SETTINGS->GET_HEADER( ).
    LR_HEADER->SET_TEXT( 'Waiting for Travel Advance Approval ' ).
    **lr_table_Settings->set_Read_only( abap_false ).
    DATA L_HEADER TYPE REF TO CL_SALV_WD_COLUMN_HEADER.
    DATA: LO_COLUMN1 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN1 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'TRAVELID' ).
    L_HEADER = LO_COLUMN1->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Travel Adv ID' ).
    DATA: LO_COLUMN2 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN2 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    L_HEADER = LO_COLUMN2->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Employee Name' ).
    In get_column you have to pass the attribute name
    is this what you are looking?
    Regards
    Srinivas

  • Webdynpro alv display

    Hi ,
    I have one requirement in webdynpro ALV. I have to display all po header detail in one view and when user click on any po respective item detail from item table should display .
    i am facing problem in user interaction means how to handle click event in where i have to call and how its possible.

    Hi Abhishek,
    Try to post these type of questions in WD ABAP forum.
    Please check the below threads for a help on your issue.
    http://help.sap.com/saphelp_erp2005/helpdata/EN/f1/177741adb7167de10000000a155106/content.htm
    [ALV|https://wiki.sdn.sap.com/wiki/display/WDABAP/GettingtheRowSelectedIntheALV....andMuchMore..]
    Search on supply function in SDN, you will find more links.
    Thanks,
    Sreekanth
    Edited by: Sreekanth on Jul 24, 2009 8:30 AM

  • Webdynpro ALV index of rows in a separate column

    Hello,
    I have an ALV in webdynpro and would like to see the index of the rows in a separate column. Does anybody know if there is an option for that in ALV or how to solve this problem?
    Thanks!

    It's useful to read CAREFULLY !
    _I wrote:_
    Enter the _"iWork Formulas and Functions User Guide"_ and search for COUNTIF.
    _I didn't wrote_ Enter the Numbers User Guide and search for COUNTIF !!!!!!!
    Yvan KOENIG (from FRANCE vendredi 31 juillet 2009 19:14:36)

  • Unable to selelct a Row in ABAP Webdynpro ALV table

    Hi,
    I have a ALV Table in webdynpro  and I need to choose a Row in that table. But the table is not allowing me to choose the row.
    Row_selectable is at 'X'.
    Row selection type is at 8.
    Still.. the grid looks like it is in display mode..
    pls help

    Hi
    You explicitly need to make the table editable.
    DATA lo_table_setings TYPE REF TO if_salv_wd_table_settings.
      lo_table = lo_interfacecontroller->get_model( ).
      lo_field_settings ?= lo_table.
      lo_table_setings->set_cell_action_event_enabled( value = abap_true ).
      lo_table_setings->set_read_only( value = abap_false ).
      lo_table_setings->set_enabled( value = abap_true ).
    have u written thse lines in ur code??
    Regards,
    Arvind

Maybe you are looking for