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.

Similar Messages

  • ALV - Adding an additional row after subtotal

    Hi Friends,
      I want to develop an ALV report wherein I want to have an additional row after the subtotal in ALV to show some calculation.
    Please refer the below link for the report layout. In the ALV 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 Grid or List.
    http://www.imagebanana.com/view/gpl4ynnk/report_layout.jpg
    Regards
    SAPient

    Hi ,
    Please go through the below link it may help you .
    LInk : [Sub total text |http://wiki.sdn.sap.com/wiki/display/Snippets/DisplaysubtotaltextinALV+grid]
    Regards,
    Maruthi

  • Adding one additional row to table control of VA01

    HI all,
    I am working on free goods N:N senario which is not supported by sap standard.
    so we have decided to club all the material on the basis of material group and PSTYV = 'tann' in the table control of va01 and at the end of tann we have to display the free goods .The user exit is USEREXIT_MOVE_FIELD_TO_KOMP.
    Please help in in adding the additional row in table control of va01 (TCTRL_U_ERF_AUFTRAG).
    Even i have gone through all the thread in sdn and tried all the solution but none of the solution is working .
    plz quote solutions....
    thanks..
    Kundal.

    The user exit is USEREXIT_MOVE_FIELD_TO_KOMP
    Are you adding condition records, or adding free materials to VBAP?  If free materials to VBAP, you're in the wrong exit, I think....look for routines that allow you to add to internal table XVBAP in includes named like MV45AFZ*, and remember to set you UPDKZ to 'I'-insert if you're adding new rows.
    Not sure what you mean by not supported by SAP standard;  SAP does support free goods, via config!
    Edited by: BreakPoint on Mar 14, 2011 4:11 PM

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

  • 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

  • Adding a New row in Workbook above Table values

    Hi,
    I have created a Workbook for which i need to add 2 additional rows manually at the top.  I added a row by deleting the Blue color line (with word 'Table').  But when i refresh the workbook, the blue color line is appearing again and the row which i added disappeared. 
    How do i make this possible?  Is there any way through which i can add the lines just above the Table values?
    Any help on this will highly be appreciated.
    Regards,
    Murali

    Hi,
    As per my view , Table name was written in the Backend with VB script hence its require change that first later you can include the Additinal rows .
    Regards,
    satya

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

  • Adding an editable row in an non editable table.

    Hi,
    My requirement is to add an Editable row in a table which is in display mode only, i mean i cannot edit the data that is present in the table.
    But if the user presses the Add Row button on the Table Toolbar, a new editable row should be added in the end, so that he can save the new data entered.
    methods tried:
    1: I have used Inputfield as Cell Editors, with their Read only Property check marked, thougt that with the new element created, it would not be Read Only.
    2: Binded the read only property with a context attribute, but still was not able to achieve this functionality.
    3: Tried the above two steps with the "Enabled" property of the Table Coloumn Cell Editors as well, but no result.
    Please give me some pointers on this.
    Regards,
    Ashish

    Hi Ashish,
    The approach you were following was correct, but I am not sure where you have placed the Enabled property attribute in the context.
    Please follow these steps:
    1. The table you are creating should have the enabled property set.
    2. The context with you are binding the table should have an additional attribute say ISENABLED of type boolean.
    3. Bind this attribute with the ENABLED property of all the input enabled fields in your table.
    4. When binding the non-editable data into the table, set this property to ABAP_FALSE for each record. This will make the existing data non editable.
    5. Use the below code for adding a new row and set the ISENABLE property of the added row to ABAP_TRUE.
        elem_table = node_table->create_element( ).
        node_table->bind_element( new_item =  elem_table set_initial_elements = abap_false ).
        stru_table-isenable = abap_true .
        elem_new_row->set_static_attributes( static_attributes = stru_table ).
    Let me know how you go about it.
    Cheers,
    Pratibha

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

  • 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

  • Adding Just One Row at a Time

    Multiple users can add Comments to a table, once added, the comments should be read only. How would I go about creating a region that will add just one row at a time, clear the region and then allow the adding of another row and not allow access to existing data rows?
    Jeff

    This example is doing exactly that:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    Once added, the row can not be changed any more.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Problem in adding a new row in a table.. plsss hlppp

    Hi Friends,
    I have a table defaulted to 4 rows. I have a add button to add a new row in the table.
    When i have already 4 rows in table, and when i click add its adding that 5th row correctly( and i used set_lead_selection for this new row ).
    But i want to automatically make a next page once i hit the ADD button here. Each time now i m hitting next page then only  able to see hte 5th row. I need once ADD is clicked, i want to see the 5th row visible..
    Can someone tell me how to code or do this
    thanks friends,,,
    Niraja

    hi niraja,
    Plz refer to the following code:
    method onactiononadd .
    node_material type ref to if_wd_context_node.
    elem_material type ref to if_wd_context_element.
    stru_material type sflight.
    node_material =  wd_context->get_child_node( name = 'ANNA' ).
    elem_material = node_material->get_element(  ).
    if ( elem_material is initial ).
    call method node_material->create_element
    receiving
    element = elem_material.
    endif.
    call method elem_material->get_static_attributes
    importing
    static_attributes = stru_material .
    call method node_material->bind_structure
    exporting
    new_item = stru_material
    set_initial_elements = abap_false.
    endmethod.
    i hope it helps
    regards
    arjun

  • Formula that creates additional rows

    Greetings everyone. I am fairly new to Apple numbers. I have a spreadsheet that calculates an investment return for clients year by year based on their age. I need the spreadsheet to go out to the clients age 100. There is an input page that I put in the clients age as well as additional information that it uses to calculate the investment return. It then takes the clients age and starts off the first column (client age) with that value. Each row has about 5 columns with different information being displayed. I am looking for a way for numbers to take the clients age column and automatically continue to create additional rows until it gets to the clients age 100. I would want each additional row to have the same formatting, formulas, and color scheme as the row before it. Is their a formula that would do this or do I need to create some sort of script?
    Thank you,
    Matt S.

    You can put the last row (the totals) in a footer and it will always be there or it can be a regular row that is TRUE so it is not hidden.
    If you make the table 125 years in length and automatically hide the unnecessary rows as I have outlined, you won't have to add rows, subtract rows, or tailor it in any other way for each client. It will tailor itself to the correct length based on the age you specify on the client's input page. And next year, when they are a year older, you can change their age in the client input page and the table will change accordingly.
    Depending on how you handle the formulas within the spreadsheet, you can sum things up the normal way with the SUM function or you can sum them up with SUMIF where the "if" is "if the row is TRUE". In other words, if every row that is FALSE has zeros, you can use SUM; if the rows that are FALSE have nonsensical numbers, you could use SUMIF. Formulas for things like rate of return might take some finessing but they too can be done. Any charts you might have can be made to not show hidden data (it's a checkbox), so they too are not a problem.
    I guess I'm from the school of "if it can be done within Numbers, then do it within Numbers" versus throwing scripts into the mix. It will be more versatile and portable if it does not require a script because a script is a separate entity, not part of the spreadsheet. Also, if you make changes to the spreadsheet, you may have to make corresponding changes to the script. That's just my opinion. It's your call. I'm sure Yvan can set you up with a terrific script.

Maybe you are looking for

  • Creating new VM ends with Error code 3430 and 3040 in Hyper-V log. Does anyone have any insight into what might cause this?

    The new VM is being created via a P2V process run from SCVVM. It reaches a completion of 60% and dies. I asked about this in another question detail of the VVM can be seen at this link: http://social.technet.microsoft.com/Forums/en-US/virtualmachinem

  • How to find a list of nokia specific settings soft...

    i have  nokia lumia 822 on verizon usa. right after i got the phone i was having problems with the bluetooth. the verizon tech had me do a hard reset and erased everything. when the phone restored i was able to reinstall most apps. but the nokia spec

  • How do i change the font color in mail message

    I am trying to change the Font colour in Mail message to Blue as a permanent preference in Mail - Preferences. The system does not accept the settings and goes back to black. Is there a way to change the same.

  • Working with DIAdem REPORT in DIAdem SCRIPT

    Hello, I am working with DIAdem 9.1 Advanced. I would like to create a report with a 2D graph object containing one curve (X,Y1) or (X,Y2). The user has to choose between (X,Y1) and (X,Y2) via a dialog box. I want to generate this report with a VBS s

  • Sluggish performance, iPhone 4S

    Anyone else having these issues and if so, have you fixed it? 1. while texting the text does not keep up with the touch, I'm a slow texter and there is a definate lag between the press of a letter and when it displays, this is a recent issue that I h