How to add sum in dynamic alv ?

hello ,
i create dynamic alv , by using FIELD-SYMBOLS ,
but my columns are char type , and the SUM an SUBTOTAL
not work .
how i can tern the internal table that build with char
columns to be numeric (like BSIK-WRBTR)?

FIRST OF ALL THANKS  , BUT ....  ))
NOW THE LINE OF THE SUM DISPLAY AS THE FIRST LINE AND
ALL OTHER LINE AFTER IT )) .
HOW CAN I TERN IT TO BE NORMAL ( IN BUTTOM ) ? .
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      I_STRUCTURE_NAME = 'YAG_ST_FOR_SPLITE_PER_VEND'
    CHANGING
      CT_FIELDCAT      = LT_FIELDCATALOG[].
  DESCRIBE TABLE LT_FIELDCATALOG LINES LIN6 .
  LIN6 = LIN6 + 1 .
  LOOP AT IT_SPLITE_COLUMNE .
    LS_ALV_CAT-FIELDNAME = IT_SPLITE_COLUMNE-FIELD_NAME.
    LS_ALV_CAT-REF_FIELD = IT_SPLITE_COLUMNE-FIELD_NAME.
    LS_ALV_CAT-COL_POS   = LIN6.
    LS_ALV_CAT-DATATYPE   = 'QUAN'.
    LS_ALV_CAT-DO_SUM     = 'X'.
    LS_ALV_CAT-TABNAME   = 'IT_SPLIT_FOR_REP'.
    APPEND LS_ALV_CAT TO LT_FIELDCATALOG.
    LIN6 = LIN6 + 1 .
  ENDLOOP.

Similar Messages

  • How to add a frame dynamically in a jsp page.

    Hai all,
    In my application, in a particular jsp page i had the 3 links namely add.edit and delete. When click on add button, it is pointing to another jsp page where i can enter user details. But what i want now is when i click add button, the form in which we fill the user details should be added to the current page itself dynamically i.e., it should not go to another page when i click add button and that form should be displayed in the current page in a new frame dynamically.
    The same should happen when i click n edit or delete options. everything should be diaplayed in the same page in different frames.
    Can anyone suggest me about how to add a frame dynamically.

    You create a frameset with two frames. One frame you give 100% of the rows and run the JSP in this frame. The other frame you give 0% of the row so that it is hidden. In the JSP you use a JavaScript funtion to submit the form. This function will call the parent frameset to reset the row values to 50%/50% which will make the bottom frame visible and then submit the form request with the bottom frame as teh target.
    It is not so much as creating frames as using JavaScript to hide and display frames.

  • How to add ComboBox to dynamically created DataGridColumn ?

    hai friends,
    help me, How to add ComboBox to dynamically created DataGridColumn

    public     function docfoldercurtainmanagerResult(event):void
    if(event.result){
    rightslistArray=event.result.RES2;
    //Alert.show(event.fault.message);
    <mx:DataGridColumn  
    headerText="Rights Level" minWidth="75" sortable="true" >
    <mx:itemRenderer>
    <fx:Component>
    <mx:ComboBox dataProvider="{outerDocument.rightslistArray}" labelField="sec_rights_level" />
    </fx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>

  • How to add af:inputFile dynamically within each row of table?

    I need to add af:inputfile dynamically within each row of af:table, when the user hits a commandlink at the bottom of each row.
    I have tried wrapping af:inputfile with af:foreach:
    <af:table value="Bean.rows" var="row">
    <af:column>
    <af:forEach step="1" begin="1"
    end="#{Bean.filecount}">
    <af:inputFile label="Please upload a file"
    id="1"
    valueChangeListener="#{Bean.onClickUpload}"/>
    </af:forEach>
    <af:commandLink text="Add more file" id="cl3" actionListener="#{Bean.onAddFile}"/>
    </af:column>
    </af:table>
    in Bean.onAddFile, I have:
    public void onAddFile(ActionEvent event){
    filecount++;
    It works but there's no independent control of each row. When I click one commandlink, All rows now have 2,3,.... af:inputFile. The change affects all rows.
    The requirement should be that when I click one commandlink in a row, only that row shows additional af:inputFile.
    So why not leverage the row variable of the table, right? That's what I did, I changed the end attribute of foreach to the following:
    <af:forEach step="1" begin="1"
    end="#{row.fileRowCount}">
    the backing bean method changed to the following:
    public void onAddFile(ActionEvent event){
    int filerowcount = (Integer)JsfUtil.resolveExpression("#{row.fileRowCount}");
    Integer newcount = filerowcount+1;
    JsfUtil.setExpressionValue("#{row.fileRowCount}", newcount.toString());
    Note that "row" refers to an object that has a int field called "filerowcount". And the initial value is "1".
    Just for testing, I also added <af:outputText value="row.filerowcount"/>, to see if the count is what I expected it to be.
    I didn't see the any af:inputfile this time, but the outtext is showing the filerowcount properly. When I click the commandlink, the number changed to 2,3,..... Also in the backing bean newcount and filerowcount is incrementing correctly.
    I know the begin, end attribute means the index of a for loop. So I changed begin="0", it now shows one row of af:inputfile, but when I click the commandlink, no additional rows are shown. (Although the outputtext of filerowcount keeps incrementing as expected.
    So to sum up, the END attribute of af:foreach row CAN pick up the value from the backing bean and render af:inputfile dynamically, but it CANNOT pick up the value from the the field in VAR object of a table.
    Is is a known issue? Or I did something by mistake.
    Is there any other way to add af:inputFile dynamically within each row of table?
    Any advice/comment is appreciated.

    Hi,
    here is how it goes:
    - add an af:inputFile to the column and set its rendered property to point to a managed bean property. The managed bean property has a default value of "false" and the bean should be in viewScope
    - create another variable that holds the row number that should show the inputFile component. This is updated by the command link and evaluated by the get method of the managed bean property controlling the inputFile visibility
    - Define a property name for the table varStatus property
    - For the command link, define a attribute f:attribute with the name rowNumber and set its value to #{varStatusPropertyName.index}
    - define an action listener for the command link
    public void showInputFile(ActionEvent actionEvent){
    int rowNumber = ((RichCommandLink) actionEvent.getSource()).getAttributes().get("varStatusPropertyName");
    //set the value on the internal variable
    - In the getter of the property that defines the render value of the inputFile, use code like this
    public boolean get<whatever name you use>(){
    //access the following EL from Java #{varStatusPropertyName.index}
    int currentRenderedRow = <EL result here>;
    // compare the current row index with the one set by the command link, which is stored in the variable of the managed bean
    if true return true
    else return false
    - Set the PartialTriggers property of the table to point to the commandLink ID so the table is repainted when the command link is pressed
    This should then render the fileInput component for a single row (the one you clicked the command link in)
    Frank

  • How to add a button on ALV in webdynrpro ABAP  ?

    Hi Friends,
    i have come across one scenario in my project.
      we use SALV_WD_TABLE class to generate ALV component in Webdynrpro and it contains two
    defalut buttons ' PRINT VERSION ' & ' EXPORT '.
    i have copied SALV_WD_TABLE into ZSALV_WD_TABLE.
    my question is how to add button ( Button has to come after 'EXPORT' ) on this copied one ZSALV_WD_TABLE and which method we need to write the code to get button ?  so that , instead of using SALV_WD_TABLE i can use ZSALV_WD_TABLE  which has 3 buttons .
    Thanks in Advance.....
    Regards,
    L.Aditya

    Hi,
    in my opinion it's not necessary to copy the component to add buttons.
    Have a look at this:
    http://help.sap.com/saphelp_nwpi71/helpdata/de/99/d5b72310094a138d65c0ecbcf67733/frameset.htm
    Regards

  • How to add push button in alv display with out class or method

    Hai,
    How to add push buttons in out put screen of ALV (tool bar) with out using classes or methods .I want to know using normal ALV .
    Thanks in advance .
    kiran

    You should post your question in the ABAP forum.
    ABAP Development

  • How to add an extra dynamic columns in workflow inbox?

    Hi Every Expert,
    Transaction SWL1 only provides Six columns as dynamic columns for workflow inbox. But we need to use 7 to 8 dynamic columns. How to add these two extra columns into workflow inbox?
    Thanks,
    Shirley

    Thank you very much for all you responses.
    Due to SAP only provides 6 columns, I can't add anohter extra dynamic column. I may consider to change task to show the contents in preview pane.
    Thanks again to everyone.
    Shirley,

  • How to add a pushbutton in ALV

    Hi,
    Can anybody tell me the step-by-step procedure to add a pushbutton in a ALV Report?

    Hi Sudheer,
    Add Button to ALV Toolbar with REUSE_ALV_LIST_DISPLAY
    How to add button to ALV toolbar using REUSE_ALV_LIST_DISPLAY?
    In the program which calls ALV using REUSE_ALV_LIST_DISPLAY,
    I have to add a new button.
    I saw the demo program BCALV_GRID_08, which is written using ABAP-Controls.
    In that example, the button is added using TOOLBAR event of cl_gui_alv_grid.
    Could you help me to implement the same logic using REUSE_ALV_LIST_DISPLAY parameters.
    you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality such as sorting/subtotaling etc...
    When you call 'REUSE_ALV_GRID_DISPLAY' make sure you pass it the new status name.
    an example of one of mine:
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZSDBOLST_REPORT'
    i_callback_pf_status_set = 'STANDARD' <----
    i_callback_user_command = 'USER_COMMAND'
    i_structure_name = 'I_BOLACT'
    i_grid_title = 'BOL Action Report'(031)
    is_layout = gs_layout
    it_fieldcat = gt_fieldcat[]
    i_save = 'A'
    is_variant = v_variant
    TABLES
    t_outtab = i_bolact
    EXCEPTIONS
    program_error = 1
    others = 2.
    I just tried the same procedure ,but my entire application toolbar disappeared and a lock icon appears next to the application toolbar in my copied pf-status.
    Could you advice what might have gone wrong ?
    As identified with the FM's help you can do the following.
    1). Using SE80 (I think) you can copy a GUI status from one program to another. It mentions which one in the FM's help.
    2). Create a form named like so:
    Code:
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTANDARD'.
    ENDFORM. "Set_pf_status
    In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called '%DELETE'.
    3). Create the following report:
    Code:
    Form User_command
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
           Detects whether the icon/button for
           'Return Tag Deletion' has been pressed. If it has then
           detect whether any rows have been highlighted and then
           set the delete flag.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    DATA: li_count TYPE I.
    IF r_ucomm EQ '%DELETE'.
      LOOP AT %g00 WHERE mark EQ 'X'.
        ADD 1 TO li_count.
      ENDLOOP.
      IF li_count GT 0.
        gc_delete_flag = 'X'.
        r_ucomm = '&F03'. "Back arraow
      ELSE.
        MESSAGE W000 WITH 'Please highlight the rows to be deleted!'.
      ENDIF.
    ENDIF.
    ENDFORM.  "User_command
    As I've added an extra button to indicate which records should be deleted I need to identify a form to be called to process when this button is chosen.
    Then when you call the ALV function you to specify the following extra details:
    Code:
        call function 'REUSE_ALV_GRID_DISPLAY'
             exporting  i_callback_program = gc_repid
                        I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
                        I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
                        i_grid_title       = lc_grid_title
                        is_layout          = lc_layout
                        it_fieldcat        = gt_fieldcat
                        it_sort            = sort
                        i_save             = l_save
                        is_reprep_id       = l_bbs_id
                        is_variant         = l_variant
             tables     t_outtab           = %g00
             exceptions program_error      = 1
                        others             = 2.
    The parameters in capitals are the extra ones that need to be added.
    That should be it!
    Make you sure that you also read the help against the ALV function.
    Please chk the below link which is in PDF format
    http://www.erpgenie.com/abaptips/index2.php?option=com_content&do_pdf=1&id=141
    And also please chk the link
    http://abapprogramming.blogspot.com/2007/07/alv-documentation-complete.html
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=alv%20grid&cat=sdn_all&start=111
    Reward if useful.
    Regards,
    Chandru

  • How to add line series dynamically to a line chart in flex?

    hi..i need to add line series dynamically to a line chart..depending on an array..the application is this..i have an array which stores the details of the users connected to an fmi server..the chart should display the bandwidth of each client..so the users should be added and removed from the chart dynamically...

    Hi
    1.I am giving you solution for dynamically adding values to the dropdown
    public void addValue( )  //Method Name in Component controller
        //@@begin addValue()
              IWDNodeInfo nodeinfo = wdContext.nodeNodeTestData().getNodeInfo();// Node should be map to the view's Node
              IWDAttributeInfo att = nodeinfo.getAttribute("VechileTypes");// Attribute by which dropdown in bound//
              IModifiableSimpleValueSet svSet = att.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
              svSet.put(wdContext.currentNodeTestDataElement().getInpAtt(),wdContext.currentNodeTestDataElement().getInpAtt());
        //@@end
    2.   wdThis.wdGetLangCompController().addValue(); // call this method in the point where u want to add values to the dropdown.

  • How to add LOV Data dynamically

    Hi Experts,
    Working in JDEV 11.1.1.3.0
    I have a requirement as need to add LOV values dynamically.
    I have Button to add rows in the table(transient VO), table as 2 columns one is value and another one is description, this description is lov(InputListOfValues -- Another Transient VO).
    This ListValues are dynamic, i need to get these values from Webservice call, this i have already written which is working fine.
    Now My requirement is the LOV should be get values dynamically for each corresponding value in the row.
    For this in add method, Added data to the LOV TransientVO, but when i click on inputComboLOV symbol, i am not getting any values, i put debugger values are setting to the transient VO,
    but when i click on lov symbol i am not getting proper values.
    Is there way to implement this requirment, can any one suggest me.
    Can we make transient VO as LOV VO?
    Edited by: user642703 on May 10, 2012 2:45 PM

    Hi,
    I think what you need to do is to access the Web Services from a programmatic view obeject to build a model driven LOV. If you did this then have a look here: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/89-adfbc-lov-switcher-454168.pdf
    Frank

  • How to add particluar column dynamically to an internal table

    Hi
    How can I add particluar column(s) to an internal table dynamically and then display in an alv.
    for eg:
    There are 5 columns and the 4th column is the <b>period (1 to 12)</b> that has been declared as select-options in the selection screen.
    col1 = bukrs
    col2 = lifnr
    col3 = akont
    <b>col4 = period</b>
    col5 = waers
    so my question is
    if period is in the range from 1 to 3 then the internal table should be
    bukrs  lifnr  akont   <b>period1   period2  period 3</b>  waers. 
    likewise if the period is in the range from 1 to n then internal table should be
    Bukrs  lifnr   akont   <b> period1   period2   period3   period4 .....  periodn  </b> waers.
    Thanks

    Hi,
    First create a global field catalog with all 12 periods ie period1, period2, ....period12.
    Once you have fieldcatalog with all 12 periods
    Then use this code arrive the dynamic field in the fieldcatalog
    data : begin of i_period occurs 0.
    data : period type i.
    data : end of i_period.
    data : v_no type i value 1.
    do.
      i_period-period = v_no.
      v_no = v_no +1.
      if v_no eq 12.
         exit.
      endif.
    enddo.
    " Here arrive the periods that are not belong to selection option period
    delete i_period where period in s_period.
    data : v_fldname like dd03l-fieldname.
    loop at i_period.
      concatenate 'PERIOD' i_period-period into v_fldname.
      condense v_fldname no-gaps.
      read table i_fieldcat with key fieldname = v_fldname.
      if sy-subrc eq 0.
         delete i_fieldcat index sy-tabix.
      endif.
    endloop.
    After this loop your field catalog contains only valid period that equal to selection option period
    aRs

  • How to add new cols to ALV  ?

    Hi,
    in a report , we have a some fields in the table it_data and avaiable fielcat table.
    But while running , we need to add some new colunms to the it_table ( data to be displayed ) , So how can we do this ?
    For example :
    I have the field : matnr  & maktx
    But then Before displaying i will get all the characteristics of this materail and with each characteristics i will add a new column.
    So would you please tell me the way of doing this
    Thanks

    Add the same fields to field catalog and add them to final internal table if you know the fields and have the same in your final internal table or You have to create dynamic internal table with the output internal table.
    Search forums for dynamic internal table.
    Edited by: abap technical on Jan 28, 2008 9:38 AM

  • How to add form fields dynamically

    Hi
    I have a form with several fields, and in one section I have one check box and two text fields in a row and also have one button "Add more"
    when I click on the Add more button I need to create one more row with the above fields dynamically.
    how can I do it? Could some one suggest me with any code snippet?
    thanks,
    Suman K

    Use custom tags.
    Create all the new fields on the JSP page using custom tags ... i,e through Java code.

  • How to add UI elements dynamically in the views of webdynpro

    Hi Experts,
    Here i have a requirement where 2 text-box get added on a click of "ADD" button in the view during the execution of the Application. so is it possible to add the text-box to the view or not?
    if yes how can it be done.
    Thanks in advance
    Regards
    Lalitkumar.

    Even with these expanded requirements I wouldn't necessarily recommend dynamic UI element creation in WDDOMODIFYVIEW.
    If the UI element requirements are fairly static (2 text boxes for each push of the button), then consider using a Multi-Pane (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/df/da8b412bb5b35fe10000000a1550b0/frameset.htm) or Row Repeater (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d3792e8c60d6e10000000a114a6b/frameset.htm) UI element. These constructs will both create a series of UI elements based upon the number of context elements in a bound node.  Therefore if you want to generate two textboxes for each push of a button, in the button event handler you simple add another context element to the context node.  You don't need dynamic UI element creation or dynamic data binding.
    If you feel that you must use dynamic UI element creation, then first read up on the WDDOMODIFYVIEW phase model event.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
    You then probably want to study these three blogs on the topic:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    /people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
    /people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements

  • How To Add Serial Number  Dynamically

    Dear all,
    In a dynamic form I require to add cosecutive serial no to the dynamically generated fields.How can I do it?If any body can please help me.
    Thanking you
    Rakesh

    I too need to be able to add a sequence number to each new row that is added to a dynamic form. The fields are being added / deleted as they should be but my JavaScript knowledge is not up to the level where I am able to address individual fields in each new row.
    I've tried script along the lines of:
    _detail[0].Item_Sequence.rawValue = 1;
    _detail[1].Item_Sequence.rawValue = 2;
    Where "detail" is the subform that contains the 'dynamic' rows
    "Item_Sequence" is a numeric field in each row.
    Please help to put an old IBM mainframe developer out of his misery and get to grips with this wonderful world of new fangled Adobe object-oriented technology.

Maybe you are looking for

  • SOA Suite 10.1.3.4 BPEL Console not working after install the mlr#4 patch

    After install the mlr#4 patch for 10.1.3.4 version the BPEL console dos not work. The BEPL is up and running , I can deploy projects, all domains are fine and working (I see on the logs) but the console show the following error: Oracle BPEL Process M

  • Cannot maximise trip form window  in portal

    Hello Everyone, When we display the Trip form in Travel Management on portal the PDF form in displaying only as a small window and the Maximize button on the window is also disabled by default. We want that to be active. Could anyone please help us i

  • Separate Album art for each episode.

    I have a video podcast that I set up and I'm trying to make separate album art for each episode- unfortunately I have no idea how to even go about this. I'm prepared to edit the xml file if I need to, as long as someone can walk me through it. thanks

  • CFolder template Creation

    I have xRPM, cProjects and cFolders in our production system working smoothly. I have to create a NEW cFolder template for our new division rollout. HOW CAN I CREATE A NEW cfolder templates.  Where is it exactly located in the PORTAL or backend syste

  • Installation of Sol8

    I am trying to install SOL8 on Sparcststion 5,with two harddrives one of ~4gb and other 700mb by using wizard and selecting custom install and after all the files have been installed when the computer is rebooted it gives an error saying bootblk not