Group Lines Excel Function

Hi,
I have an ALV Tree (cl_salv_tree) that's works fine.
But I need to export all data to excel.
I am using OLE objects to do this.
I would like to know if is possible group lines into excel.
For example.
Today works like this
Level1 -
Value 1
---Level2 --- Value 2
---Level2 --- Value 2
Level3 - Value 3
I would like to do this (compress the Leve2, for example)
+ Level1 -
Value 1
Level2 -
Value 2
+---Level2 -
Value 2
Thanks a lot.

May be u can try this way. Instead of OLE
" Create a custom icon in the tree toolbar using the following
  try.
      v_text2 = text-b02.        " download to excel
      grt_functions->add_function(
        name     = 'DOWNLOAD'
        icon     = '@42@'
        tooltip  = v_text2
        position = if_salv_c_function_position=>right_of_salv_functions
    catch cx_salv_wrong_call cx_salv_existing.
  endtry.
" Make the events for the custom function
  data: lr_events type ref to cl_salv_events_tree.
  lr_events = grt_tree->get_event( ).
  create object grt_events.
  set handler grt_events->on_user_command for lr_events.
  set handler grt_events->on_double_click for lr_events.
  set handler grt_events->on_link_click for lr_events.
  set handler grt_events->on_before_user_command for lr_events.
  set handler grt_events->on_after_user_command for lr_events.
  set handler grt_events->on_keypress for lr_events.
  try.
      lr_events->add_key_for_keypress( if_salv_c_keys=>f4 ).
      lr_events->add_key_for_keypress( if_salv_c_keys=>enter ).
    catch cx_salv_msg.
  endtry.
" Call the following function module
" in the grt_events->on_user_command method, after arranging
" whichever format of your output table
CALL FUNCTION 'ALV_XXL_CALL'
EXPORTING
i_tabname = 'I_OUT'
IS_LAYOUT = l_xxl_Layout
it_fieldcat = l_xxl_fieldcat
TABLES
it_outtab = it_out
EXCEPTIONS
fatal_error = 1
no_display_possible = 2
OTHERS = 3.

Similar Messages

  • Excel Function to query BW using Web Services API

    Hello,
    I need to write an Excel function as an .XLA that will do the following:
    It will be invoked like any other Excel function. E.g. =GetCost(param p1, param p2)
    This function queries an InfoCube and must return a single numerical value for the Cell in Excel that the function is used in.
    I have never done anything like this before. I have done a decent amount of reading to discover the best way to attack this. It seems like the best way to create this functionality is to:
    1. create a web service in a BW function group with a function module that is RFC enabled.
    2. I'm thinking the function module will use native SQL to query the InfoCube and pull the value and then somehow pass this value to a web service.
    3. The value in the web service will be accessed through it's API in Excel/VBA.
    I am not sure if this is best way to do this, or if it is even possible to do it this way. I was wondering if anyone could tell me if I am heading down the right path and possibly direct me to a tutorial or other information that would aid in accomplishing this. I have yet to find some type of proof of concept from beginning to end on how to do something like this. Any help would be greatly appreciated.
    These are the documents I have found insightful so far:
    How to build an XLA: http://www.fontstuff.com/vba/vbatut03.htm
    If you can read a table and dump it into Excel then you can query an InfoCube? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c043d836-166c-2910-b99e-ae3633dec547
    How to view a webservice homepage: http://help.sap.com/saphelp_nw04/helpdata/en/1c/472e22c45cc94599ab3725bc9558d2/content.htm
    How to create a webservice:
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm
    What I am missing is how to pass data from the function module to the webservice, and from the webservice to the Excel/VBA code.
    Thanks!
    -Gary

    /bump

  • File 'pcprocbinding.cpp', line 1028, function 'PCDBTableCollection::FindOptimizedColumn'

    The cube was compiling ok.  I was using sql Server 2012  Standard.
    I upgraded to Sql Server 2014 Standard.
     Now when compiling the cube, without any changes, I get this error :
    Internal error: An unexpected error occurred (file 'pcprocbinding.cpp', line 1028, function 'PCDBTableCollection::FindOptimizedColumn').
    Errors in the OLAP storage engine: An error occurred while processing the 'Fact Inventaire Sem Past Year' partition of the 'Fait Inventaire Semaine' measure group for the 'Canac DM Ventes Produits Semaine' cube from the CanacDMVentesCondense database.

    Hi Karlrw,
    Glad to hear that your issue had been solved, thank you for your sharing.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Error using percentile excel function in Xcelsius 2008 5.3.0

    Hi everybody.
    I'm doing an Xcelsius Dashboard and I need to show a percentile value in a line graphic component.
    Even I've read that "percentile" Excel function is supported by Xcelsius (Xcelsius 2008 SP3 User Guide), I get an error when trying to preview SWF.
    This is the error:
    "Incompatible Excel Function".
    Anybody knows what's happening?
    My Xcelsius version is:
    Xcelsius Enterprise 5.3.0.0
    Compilation 12,3,0,670
    (Spanish)
    Thanks in advance.

    I had a similar experience with formula Weeknum. I had the Dutch Excel version installed and used the Dutch version of the formula, it did not work same message. Then I tried the formula in English,  of course Excel could not execute it, BUT Xcelsius did work fine.
    So I guess you have the Spanish Excel installed also, try both languages.

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

  • Cfspeadsheet not picking up data from cells using excel function indirect

    I am receiving data from comany executive in a sreadsheet and trying to post selected data to a company intranet by reading the data using cfspreadsheet.  for the most part, cfspeadsheet works, however, this speadsheet is rather complicated.  The spreadsheet uses the excel indirect function to determine which data to post.  When I read this cell, or any cell dependent on it, with SpreadsheetGetCellValue, if get the cell formula instead or the calculated value for the cell.  Is this function not supported by cold fusion?
    Is there any way around this?
    Is the a list somewhere of which Excel functions are or are not supported?

    Thanks for your reply...
    it is now displaying data in independent cells , but is it possible to add multiple headings in that excel sheet.
    ex
    Heading 1
    heading 2
    Column Headings-------
    Is it possible to do that way?? for column headings i think we need to pass in fields parameter of Tables...
    can we include multiple headings???
    Thanks for help..

  • BusinessObjects SDK - Save as Excel functionality

    Hi Experts,
    I have a question for anyone experienced with the SDK and the BOBJ apis. We are presenting WEBI reports to Partners, so we want to display the reports without the toolbars and only show the reports. We do not want to confuse them will all the extras :). We have done this, but, we have now been asked to provide the "save as excel" functionality to the users while still keeping all the toolbars hidden. So our goal is to just add our own button that will call the same functionality as file -> save as excel. Does anyone know if there is a specific function we can call from the apis that will perform this action?
    Second, and not sure if this is possible or not (hope it is). We also have some xcelsius reports displayed to the user in flash. We would also like to add the same functionality, giving the user the ability to click a button and save as excel. Does anyone know if there is a specific function within the xcelsius specific classes that would allow us to do this as well?
    Thanks!
    -Kevin

    Hi Kevin,
    If you are using the Business Objects Enterprise BI 4.0 then you can modify the crystal report viewer format list where you  can export to any particular format.
    Please refer to the below mentioned Blog by Ted Ueda :
    [SAP BusinessObjects Enterprise BI 4.0 - Modify the Crystal Reports Viewer Export Format List|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22845]
    As mentioned, you could only allow  the excel format to be exported by your customers.
    Regards,
    Rameez Shaikh

  • Error in  implementing the Export excel functionality

    Hi All,
    I have an issue an implementing the  "Exporting the Table data to Excel."
    My VC version is 7.0
    Portal version NW 2004s.
    By refering the following link, i have implemented Export To Excell functionality in VC.
    2) Another one that's in the Visual Composer WIKI:
    https://wiki.sdn.sap.com/wiki/display/VC/Exportingdatafrom+VC
    By refering to 7th page in the document. It is explained to add the data source object from the 'info' port and add the field called 'RAPTNAME'to the DATA source object.
    But the RFC object which i added to the story board, i havent find any 'info' port in my added RFC. But still i have added the data store object  and added field. then
    copied the following given formula in the document in  respective formula window ,Formula showin as valid. when i click on check button.
    copied formula :
    "pcd!3aportal_content!2fcom.sap.pct!2fplatform_a
    dd_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.b
    ex?QUERY=" & STORE@REPTNAME &
    "&BI_COMMAND_1-
    BI_COMMAND_TYPE=EXPORT&BI_COMMAND
    1-EXPORTFORMAT=XLS&BI_COMMAND_1-
    null="
    But when compile i have get any proble, when i deply it is giving the followin problem.
    Error in compiling Flex application: Error 1002: String literal was not properly terminated
    (D:\usr\sap\EPD\JC01\j2ee\cluster\server0\GUIMachine_Business_Packages\NewTestModel_28609\FLEX_COMPILATION_FOLEDR\AADMV.mxml:265)
    Error 1033: ')' expected
    (D:\usr\sap\EPD\JC01\j2ee\cluster\server0\GUIMachine_Business_Packages\NewTestModel_28609\FLEX_COMPILATION_FOLEDR\AADMV.mxml:266)
    Error 1205: The statement 'dd_ons' is incomplete.
    (D:\usr\sap\EPD\JC01\j2ee\cluster\server0\GUIMachine_Business_Packages\NewTestModel_28609\FLEX_COMPILATION_FOLEDR\AADMV.mxml:266)
    Error 1025: Left side of assignment operator must be variable or property.
    (D:\usr\sap\EPD\JC01\j2ee\cluster\server0\GUIMachine_Business_Packages\NewTestModel_28609\FLEX_COMPILATION_FOLEDR\AADMV.mxml:268)
    Error 1033: ':' expected
    can u tell me where is the problem
    My question is, Is that 'info' port is mandatory for implementing the export functionality?
    what is that 'info'port? what it contains?
    If i ask my ABAPER to add that 'info' port , he asked me , what is that, what  information i need to provide the to u in that?
    can any body provide information about 'info' port
    Regards
    Vijay

    Hi Benni,
    I am able to come out from the deployment error, i am able to run the application. After i run the application . once i click on the button 'ExportToExcel'  i am getting the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Could not find portal application com.sap.ip.bi.service.generic.
    Exception id: 05:32_01/05/07_0001_18800950
    See the details for the exception ID in the log file
    Can u please tell me what is the problem
    Regards
    Vijay

  • How to get TRIMMEAN  excel function in Essbase

    Hi,
    I am in Essbase 11.1.2, where we have a requirement to calculate avg of some value by following Excel function business use in Excel.
    IF(TRIMMEAN(AS13:AZ13,$BA$11)<0,0,TRIMMEAN(AS13:AZ13,$BA$11))
    just wanted to know if anyone use this in Essbase or any workaround to get this function value in Essbase.
    -KP

    You have to go through DBAG for more info on @XREF
    here is example of script we use
    SET UPDATECALC OFF;
    FIX(members in employee, members in entity)
    SET CREATENONMISSINGBLK ON;
    "Account_1" = @XREF(_Location alias, "PRODUCT");
    ENDFIX
    what we do is pull data from account_1 of databse 2 to database 1.
    you should specify location alias in database before executing this script.
    good luck.

  • VC Export to Excel Functionality not working

    Hi All,
    I have an issue an implementing the "Exporting the Table data to Excel."
    My VC version is 7.0
    Portal version NW 2004s.
    I have followed the instructions in the How To doc:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123 have implemented Export To Excell functionality in VC.
    yet we're getting the error:
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    iView not found: pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/iViewsüom.sap.ip.bi.bex.
    Exception id: 05:39_17/04/07_0001_4060051
    See the details for the exception ID in the log file
    Any assistance/advice appreciated.
    cheers,
    Imran

    Very strange, as I know there is no ü allowed. There should be used only ASCII.
    And if there is a ü, this should translated, e.g. with base64 encoding or sth. like that.
    Best Regards,
    Marcel

  • Template having export to excel functionality with filter values in WAD

    Hi,
    I need to create a template which has export to excel functionality with all the filter values that the user has selected in the selection screen.
    export to excel can be done but how can be the output excel sheet contain only those values which we see in browser  when the report is executed with some filters.
    Regards,
    Apeksha

    Hi Apeksha,
    you can achieve this requirement (unless I do not know the detailled requirement) perhaps by using this way of implementation:
    1. Create a new template which contains an info_field which does a data binding to the variable values or the characteristic you want to display. Set the visibility of the top container to "hidden". Add a empty data provider to this template. However be aware that the name for the (empty) data provider must match the name of the data provider within the original template you want to print.
    2. Open your original template and include the template you created in step 1 (Advanced: Web Templates and technical name of the web template created in step 2). Choose the appropriate location (above/below the analysis item).
    3. Check the settings of your export command: do not set a special web item to be printed.
    If you export the template within web the second template should be printed correctly displaying the variable settings chosen in step 2 for the info_field.
    Brgds,
    Marcel

  • Export to Excel Functionality

    Hi all,
    I followed the wiki (Web Dynpro Java - Exporting Table Data Using On-Demand Streams - SAP NW 7.0) and created with Link to URL UI element the excel functionality.
    It is working fine.
    Now what i am trying is i am implementing it using a button.
    I say the PDF with button in SDN but i am not able to understand it.
    What i need is in the Link to URL it is  using two elemets in the view context i.e.,
    Excel---->IconURL
                  ResourceURL
    These 2 elements in the context when i am using the button element.
    What are the changes i have to make if possible a code snipplet of what changes have to be made in the existing code which i have used for Link to URL UI element.
    Plz Help me in this regard,
    Lokesh

    Hi,
    The issue has been resolved.
    The thread is closed.

  • Export to Excel functionality doesn't work when DataControlScope is shared.

    Hi All,
    I have a taskflow whose transaction setting is as Below:
    1.Always Begin New Transaction
    2.DataControlScope is isolated(Share data controls with calling task flow checkbox is unchecked).
    I have an Export to Excel functionality with exportCollectionActionListener.The jsff source snippet is given below.
    <af:commandMenuItem text="#{smviewcontrollerBundle.EXPORT_TO_EXCEL}"
    id="cmi1" icon="/images/excel_icon.jpg"
    binding="#{backingBeanScope.backing_fragments_RefSetSearch.cmi1}">
    <af:exportCollectionActionListener exportedId="resId1"
    type="excelHTML"
    filename="SmRefSetCodes"
    title="System Reference Inquiry Result"/>
    </af:commandMenuItem>
    The jsff is used in the above mentioned task-flow.Having this configuration in task-flow,export to excel doesn't export any table data in the excel sheet.But the moment,data-control-scope is changed to shared,export starts working.
    Is there any specific reason on this kind of behavior.
    In all other task-flows in my application,I have data-control-scope as isolated only,but there,export is working perfectly fine.
    Please help.
    Thanks,
    Gaurav

    Hi Frank,
    Thanks for your reply.
    Exactly,I have just one task-flow in which I have a page fragment for which export to excel is not working.The moment I change the data-control-scope to shared,export functionality starts working.
    I do have correct table id mentioned in exportCollectionListener.
    Is there anything I need to look into?
    Thanks,
    Gaurav.

  • Export to Excel Functionality in SPM

    Hi
    When we are trying to export any report in excel in SPM it is currently giving the report in CSV format. We want the report to be downloaded in excel format. Is there a fix available?
    Regards
    Neel

    Hi Neel,
    The current functionality is the application exports reports in CSV format only.  But development is working on providing true export to MS Excel functionality.  The application will export .xlsx format which means you will need MS Excel 2007 or higher to open up the files.
    Regards,
    Rohit

  • Text Elements in Export to Excel functionality

    Hello Gurus,
         I have added Export to Excel functionality button on my web template and also added a Text Element Web Item to my web template. I am unable to get the Text Elements into the Excel Sheet when I click on Export to Excel button. Is there a way to show them in the Excel sheet when I click on Export to Excel or it is not possible to show them.
    Please let me know.
    Thanks a lot
    Raj

    Raj,
    Export to Excel will work only for the table item. Not 100% sure, but don't think that it can be setup for teh text items.
    Put the text elements into parts of teh query, for e.g. in the query title or column headings.
    The idea of export to excel is that the data gets exported. There is no transfer of context of the information.
    Aneesh

Maybe you are looking for

  • FCP7 on 2 24" Cinema Displays

    Hey Guys, Finally collected my 8 Core 2.26 Mac Pro yesterday with 2 Nvidia cards and 2 24" Cinema Displays. My question is; can FCP7 utilsie both displays? Reason I ask this is I read somewhere that FCP6 couldn't. I sure hope FCP7 can. Of course, all

  • 4th gen ipod touch has white screen

    I have a 4th generation Ipod touch. The screen turned white all of a sudden for no reason. I've tried holding buttons letting it die and plugging it back in but the white screen is still there.It still makes noise. like the other day it was making a

  • Mapping Property Names in EF6 Database First

    Hi I am just starting out with EF6 and am hoping I will be able to do what i am wishing: using DB first: say I have the following: database name "a1234" with table named "a" with column names "a1", "a2", with table named "b" with column names "b1", "

  • Color print

    How to print a .pdf document in color on an iMac?

  • Blank username field not allowed in authentication...

    Hi, a ihave a problem with built-in internet browser in N80. I need access some routers and access point by web interface, and one or other use blank username (only password is entered) to access it. But login popup from N80 web browser doesn't allow