BI BEX Query execution from ABAP into a File w/ Text

We are currently running BI 2004s and have a requirement from a user to load a file (preferably excel but a csv or txt file would also work) on a server with the results of a BEX Query and they need the format to look exactly like the Bex results including the columns for the char. text that are specified in the Bex query properties.  If we could run this ABAP program in background and foreground - that would be a big plus.
I have searched and reviewed many of the FM, programs and transactions in this forum to do something like this but the text is always missing.
Any suggestions (the simpler the better) would be appreciated.
Thanks,
SJ

Sudheer,
Yes, I did try RSCRM_BAPI.  It looks very promising but the text is not there.  Example - Business area 9160 shows up but the text for it "SAFLEX" does not and this text does show up in BEx.

Similar Messages

  • Bex query for BW abap report/ transaction

    Hi Experts, Here is a scenario: I developed ABAP program in BW using multiple DSOs for complex logic. Since I cannot use abap program directly in BO reports, I need to develop a query in BW for my abap program. Is it possible to develop a bex query for BW abap report / transaction in BW? I have limited knowledge on BW and BO. Please help me. Thanks in advance Raghu

    First of all thanks for your suggestion Matthew..!
    As you said, I created virtual info cube based on function module.
    In the info cube, I defined (4)dimensions and (1)key figure.
    In the fucntion module, appropriate below parameters defined and code written for the data table (e_t_data)
    CALL ZFM_XXXXXXX 
    EXPORTING   
    i_infoprov =                " Name of InfoProvider   
    i_th_sfc =                  " rsdri_th_sfc: List of Characteristics    
    i_th_sfk =                  " rsdri_th_sfk: List of Key Figures
    *   i_t_range =                 " rsdri_t_range: Range List
    *   i_tx_rangetab =             " rsdri_tx_rangetab: Table from Range List
    *   i_first_call =              " rs_bool       First Call
    *   i_packagesize = 100000      " i             Package Size 
    IMPORTING   
    e_t_data =                  " standard table:  Data Table   
    e_end_of_data =             " rs_bool       :End of Data Reached   
    e_t_msg =                   " rs_t_msg      : BW: Table with Messages
    Test:
    Right click the info cube and choose "displayed data", immediately it triggered above function module.
    when I see the import parameters data,
    no characteristcs data in i_th_sfc. But, key figures has data (1 record) in i_th_sfk.
    Not sure, Did I missed anything? Please help me.
    Thanks in advance

  • Starting BeX Query Designer from Crystal opens older version Designer

    Hi,
    When starting the BeX Query Designer from Crystal Reports 2008, the older 3.5 version of the designer is started and hence wanting to edit a query that was designed in 2004s raises the error: "This component was edited with a more recent version of the editor. You also have to use the more recent version to edit further. Further processing is not possible. Update your front-end".
    The latest version is installed, it seems that Crystal by default opens the 3.5 version that was installed with the 710 GUI and Business Explorer etc ... Is this by design and can one set something somewhere to use the 2004s version via Crystal Reports.
    Any insight is welcome.
    Jacques

    Hi Jacques,
    that is a known issue in the toolbar of Crystal Reports.
    You can start the Query Designer 3.5 / 7.0 from the BEx menu item
    Ingo

  • How can I reduce BEx Query execution time

    Hi,
    I have a question regarding query execution time in BEx.
    I have a query that takes 45 mins to 1 hour to execute in BEx analyser. This query is run on a daily basis and hence I am keen to reduce the execution time.  Are there any programs or function modules that can help in reducing query execution time?
    Thanks and Regards!

    Hi Sriprakash,
    1.Check if your cube is performance tuned: in the manage cube from RSA1 / performance tab: check if all indexes and statistics are green. Aggregate IDx should as well be.
    2.Condense your cubes regularly
    3. Evaluate the creation of an aggregate with all characteristic used in the query (RSDDV).
    4.Evaluate the creation of a "change run aggregate": based on a standalone NavAttr (without its basic char in the aggr.) but pay attention to the consequent change run when loading master data.
    5. Partition (physically) your cubes systematically when possible (RSDCUBE, menu, partitioning)
    6. Consider logical partitioning (by year or comp_code or ...) and make use of multiproviders in order to keep targets not too big...
    7.Consider creating secondary indexes when reporting on ODS (RSDODS)
    8.Check if the query runtime is due the master data read or the infoprovider itself, or the OLAP processor and/or any other cause in tx ST03N
    9.Consider improving your master reads by creating customized IDX (BITMAP if possible and depending on your data) on master data table and/or attribute SIDs when using NAvs.
    10.Check that your basis team did a good job and have applied the proper DB parameters
    11.Last but not least: fine tune your datamodel precisely.
    hope this will give you an idea.
    Cheers
    Sunil

  • Publishing a BEx Query reports from BI Portal to Main portal

    Hi,
         We have 2 portals in out landscape.
    BI system has its own portal and the main portal for the commercial users.
    I have a requirement to bring BEx query Reports to Main portal.
    I am wondering, how this can be done.
    Thanks
    Sam

    Hi vel,
    1. You can connect BW/BI system with your portal.
    2. Create BEx iview (7.0) from iview templates.
    3. Then display report on portal.
    Feel free to update me as per your findings.
    Regards,
    sam

  • Bex Query- Use of ABAP code in Calculated Keyfigure/formula

    Dear Experts.
    I am wondering if there is any way to use ABAP in the formula editor of the Bex Query desinger.
    I have to build a report with very complex formulas (a lot of key figures, comporations, If then else ) an I think it would be easier to build all then in ABAP.
    So what I am looking for is any kind of user-exit/Badi that allows to calculate a Calculated Key figure/fomula in ABAP with the same data that is availabe in the fomula editor.
    If SAP is not providing this, this is clearlly a must for next releases.
    Thanks a lot and best regards,
    Alfonso.

    Dear Ananda.
    Thnaks for your reply, but could you please extend your answer a little bit more?
    As far as I know, Formula customer exit variables are only called once and they don´t provide the rest of the keyfigures and characteristic use in the drilldown level, so for my needs they are useless.
    Regarding IF-then-else statement in the formula, I already know about it. Actually what I am trying to avoid is to use them. In order to build my query I might need to build really big formulas with a lot of If-then-else, making it quite complex what the formula is doing. This is the reson I want to do it on ABAP.
    Please any other ideas?
    Thanks a lot.

  • Open BEx Query Designer From VBA

    Hi All,
    I have a requirement where I have to open the BEx Query  Designer by using VBA Code.
    When I execute the code the query designer should pop up.
    Can anyone please suggest an API for the same.
    Thanks for the help in advance.

    Hi Jacques,
    that is a known issue in the toolbar of Crystal Reports.
    You can start the Query Designer 3.5 / 7.0 from the BEx menu item
    Ingo

  • BEx "Query transformation from BI7.0 to BI3.5

    hi gurus,
      we have developed our BEx query in BI 7.0.
      but we have to change them from 7.0 compatible to 3.5 compatible.is there any provision to do that if it possible then please help me.

    Hi Kumar,
    I think there is no way to copy or save a new query created in 7.0 to 3.x.
    But you can use Program COMPONENT_RESTORE to restore 3.x queries which were converted to 7.0 queries.
    But there is one disadvantage of this program that this will not restore the changes that were made to the query after converting to 7.0.
    Hope this helps,
    Regards,
    Rk.

  • Get BEx query name in ABAP Class

    Hi,
    I have setup a Virtual Key Figure and need to get the BEx    query name within the implemented RSR_OLAP_BADI Class Compute method.
    Is there a system variable that holds this?
    Thanks in Advance

    Hi.
    Look at among components of importing parameter I_S_RKB1D of method you mentioned.

  • Runtime error Bex Query Execution

    Hi guys,
    I'm facing an BW-BEX error, when I Execute a Bex Query that supposed to
    make some time to retreive data, about 30000 records, un Excel runtime
    error occurs
    with the same query but enough restricted to retreive less than 5000
    records, this time it works fine
    This bug occurs on any PC workstation not only on my computer.
    ST22 shows no thing abnormal.
    ON RSRT, it works fine
    Any Idea ?

    I had this in the Bex Log file
    ListSeparator: ,
    ExcelVersion: 11.0
    AddinVersion: 7005.5.1502.949
    GetSystemInformation
    SUNI Const: 0
    CommunicationFactory.GetSystemInformation (Setting Conn 1)): 0
    CommunicationFactory.GetSystemInformation (Setting Conn 2)): 0
    CommunicationFactory.GetSystemInformation (Setting init Propties)): 0
    CommunicationFactory.GetSystemInformation (SUNI.FUNCTION_EXISTS)): 0.779665
    RSR_XLS_RFCtrc: 3.898325
    CommunicationFactory.GetSystemInformation (RSR_XLS_NET_INTERFACE)): 6.393253
    CommunicationFactory.GetSystemInformation (XML Stuff)): 8.576315
    CommunicationFactory.GetSystemInformation (Prop Stuff)): 8.576315
    CommunicationFactory.GetSystemInformation (Version)): 8.576315
    CommunicationFactory.ObtainSystemInformationandCheckVersion (GetSysInfo)): 8.732248
    CommunicationFactory.ObtainSystemInformationandCheckVersion (CheckAfterLogin)): 0.155933
    CommunicationFactory.LogOnUsingComConnection (ObtainSystemInfo)): 8.888181
    CommunicationFactory.LogOnUsingComConnection (MainConnectionChangedEvent)): 0.935598
    CommunicationFactory.LogOn: 10.135645
    BExCheckFrontend.CheckFrontend: No Check performed (20071119) 0
    RSR_XLS_RFCtrc: 0.467799
    BExThemes.LoadFromBackend: 2.338995
    BExThemes.LoadFromBackend: 0
    BExConnect.LogOn: 91.220805
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 0.155933
    OpenWorkbookGetTheMimeAndStoreItOnTemp
    BExProperties.CreateFromDeSer: CompId was not provided!
    BExItems.CreateFromDeSer: Trying to deserialize the Items...
    BExApplication.AfterRender: 01Pas de cellules correspondantes.
    BExApplication.AfterRender: 01Pas de cellules correspondantes.
    OpenWorkbookOpenTheSavedWorkbook 4
    RSR_XLS_RFCtrc: 1.091531
    RSR_XLS_RFCtrc: 0.935598
    RSR_XLS_RFCtrc: 0.623732
    BExProperties.CreateFromDeSer: CompId was not provided!
    RSR_XLS_RFCtrc: 0
    RSR_XLS_RFCtrc: 0.311866
    RSR_XLS_RFCtrc: 0.467799
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 2.338995
    RSR_XLS_RFCtrc: 0
    RSR_XLS_RFCtrc: 0.311866
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 0.779665
    RSR_XLS_RFCtrc: 2.338995
    RSR_XLS_RFCtrc: 0.311866
    RSR_XLS_RFCtrc: 282.082797
    RSR_XLS_RFCtrc: 1.403397
    RenderIndent: 1.24736
    RenderBorders: 0.156032
    RenderHierarchyShapes: 0
    7.0 Workbook : SAPBEXonRefresh exit called
    BExApplication.AfterRender: 01Pas de cellules correspondantes.
    BExApplication.AfterRender: 01Pas de cellules correspondantes.
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 3.898325
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 0.467799
    RSR_XLS_RFCtrc: 1.871196
    RSR_XLS_RFCtrc: 0.155933
    RSR_XLS_RFCtrc: 2448.469559
    11/20/2007 5:07:42 PM----
    System.Exception: BExConnect.BExWorkbook: Exception ---> System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.
       --- End of inner exception stack trace ---
       at com.sap.bi.et.analyzer.addin.BExConnect.get_BExWorkbook(String iWorkbookName, Boolean iConstruct)
       at com.sap.bi.et.analyzer.addin.BExMenu.UpdateMenuSubMenuControls()
       at com.sap.bi.et.analyzer.addin.BExMenu.UpdateMenu()
       at com.sap.bi.et.analyzer.addin.BExMenu.Update()
       at com.sap.bi.et.analyzer.addin.BExMenu.CommunicationFactory_MainConnectionChanged(BExCommunicationEventArgs iArguments)
       at com.sap.bi.et.Communication.MainConnectionChangedEventHandler.Invoke(BExCommunicationEventArgs iArgs)
       at com.sap.bi.et.Communication.CommunicationFactory.LogOff()
       at com.sap.bi.et.analyzer.api.BExConnectionLostException..ctor(Exception iException, BICS_PROV_T_MESSAGE itMessage)
       at com.sap.bi.et.analyzer.api.BExDataProvider.RetrieveResultSet()
       at com.sap.bi.et.analyzer.api.BExApplication.GetTemplate(Boolean iDoNotReadData)
    BExConnect.BExWorkbook: Exception
       at com.sap.bi.et.analyzer.addin.BExConnect.get_BExWorkbook(String iWorkbookName, Boolean iConstruct)
       at com.sap.bi.et.analyzer.addin.BExMenu.UpdateMenuSubMenuControls()
       at com.sap.bi.et.analyzer.addin.BExMenu.UpdateMenu()
       at com.sap.bi.et.analyzer.addin.BExMenu.Update()
       at com.sap.bi.et.analyzer.addin.BExMenu.CommunicationFactory_MainConnectionChanged(BExCommunicationEventArgs iArguments)
       at com.sap.bi.et.Communication.MainConnectionChangedEventHandler.Invoke(BExCommunicationEventArgs iArgs)
       at com.sap.bi.et.Communication.CommunicationFactory.LogOff()
       at com.sap.bi.et.analyzer.api.BExConnectionLostException..ctor(Exception iException, BICS_PROV_T_MESSAGE itMessage)
       at com.sap.bi.et.analyzer.api.BExDataProvider.RetrieveResultSet()
       at com.sap.bi.et.analyzer.api.BExApplication.GetTemplate(Boolean iDoNotReadData)

  • Exporting BEx Query results to CSV or other files.

    Hi All,
    We have a report designed in WAD, which uses a BEx query to display department’s information. Because of amount of data in the results it crashes when u get all the Free Characters into ROWS(Error is : Result set too large(552244 cells); data retrieval restricted by configuration (maximum =500000 cells).  It is a requirement from the user to have all the free characteristics in the rows( which I can understand is not the right way to go ahead). As it is crashing when you add last characteristic(WBS Purpose)  into the rows, they aren’t able to export data into spread sheet from the results. (as there are no results)
    Now my question is…..is there any way we can export the results from BEX query into any format for example text or csv? If yes, can we schedule that process? Please note that this characteristics are displayed as hierarchies.
    Am new to SAP BW and its been only six months since I have been in this role. Any help would be much appreciated???
    I looked online and some where in the forum it was mentioned of using program RSCRM_BAPI, but looks like it needs some sort of downloads from SAP.
    Is there any other way to export the BEx query results?
    Cheers
    Sandeep

    Hello Sandeep,
    You can use the Item "Context Menu" in your WAD and in the properties by default you can see the Options:
    Export to Excel & Export to CSV will be there and also there are many options which you wanted to see.
    It works for you!!!
    With Regards,
    PJ.

  • How to get sql query data and write into csv file?

    I am writing to seek help, in how can I create bat. script which can execute the following logic:
    connection to the database
    run sql query
    create CSV file
    output query data, into CSV file
    save the CSV file
    osql
    -S 84.18.111.111
    -U adw
    -P rem
    -i "c:\query.sql"
    send ""
    sed -e 's/,\s\+/,/g' MCI_04Dec2014.csv > localNoSpaces.csv
    -o "c:\MCI_04Dec2014.csv"
    This what i have so far, and I am little struggling with the logic after creating CSV file. I am unable to get the above script to work, please advice further, where I may be going wrong. 
    Can you create if statement logic within window's script, to check for null parameters or data feeds?
    Any hints would be most appreciated. 

    Thank you for your reply. 
    Apology for posting the code irrelevant to the forum, as I am still novice scripting user.  
    My goal is to create window's script which can compute the above logic and send the final output file (csv), to FTP folder. 
    Can this logic be implemented via bat. script, if so, is there a example or tutorial i could follow, in order to achieve my task. 
    Any help would be much appreciated. 

  • Error in query execution from Query designer

    Hi,
    We have recently installed the BI 7 server, when i execute the query from query designer i got the following URL:
    http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=TEST_REP&VARIABLE_SCREEN=X&DUMMY=2
    due to that page is not displayed, i guess there is some sort of hostname setting need to be done.
    Can anybody please guide me where all these settings are done, help required urgently ?
    Thanks in advance

    Hello Dipika
    May be you have not included host string in logon pad.
    1. Open SAP log on pad
    2. Select the system and go to change mode
    3. you have IP defined for the system, here you need to put host string name which u can get from C:\WINDOWS\system32\drivers\etc file for your SAP system in your system.
    4. Save and exit.and run query again
    Thanks
    Tripple k

  • BEx Query Execution problem

    Hi,
    I got a problem when I click Execute button in Query Designer to run a query. It popup a IE windows with a URL like below
    http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=PM_SALES_ANALYSIS&VARIABLE_SCREEN=X&DUMMY=2
    Apparently, the URL is wrong. It seems it try to connect to EP server to run the query. But I donnot have a EP server. What I just want, the query running via BEx web service. The expected URL should be
    http://SERVER:PORT/sap/bw/bex?QUERY=PM_SALES_ANALYSIS&VARIABLE_SCREEN=X&DUMMY=1
    Some configuration in SAP BI 7 server,
    SICF --> test BEx service works fine
    RSPOR_T_PORTAL not maintained(No entry)
    Environment: Only SAP BI 7 without EP
    Is there anybody can help me on this? How can I check and configure to fix this problem? Thanks a lot in advance.
    Thanks
    Nanshu

    Hi Wang,
    You could check the setting in SPRO transaction through following path:
    in the SAP Reference IMG under SAP NetWeaver -- > Business Intelligence --> Reporting-Relevant Settings --> BEx Web
    You can also assign standard web templates to all your queries from here.
    Hope this helps.
    Regards,
    Vidya

  • Query execution - RSRT - Abap Web - Several Logon prompts

    Hi,
    I am trying to execute a query in RSRT transaction after choosing ABAP Web option.  When I click on the abap web button, it opens a new browser window
    http://<server> : 80NN/SAP/BW/BEX?&QUERY=ZRF490N , but with a logon screen.  I try to logon with my abap credentials, but it repeatedly asks for the credentials.  If I say Cancel, it allows me to execute the query.
    What would have gone wrong?   FYI, I have already checked the service /sap/bw/bex in SICF transaction, and it remains standard as in other systems.
    Thanks in advance for your hints.
    Regards
    Abdul

    Hi,
    Please can set up the anonymous service in SICF refer to SAP Note 653099
    and maintain an anonymous user for the service Mime according to the SAP
    Notes 516884 and 487456 in order to avoid that logon request.
    Please refer the following URL:
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/
    25ea401675752ae10000000a155106/content.htm
    Thanks,
    Venkat

Maybe you are looking for

  • Help with invoicing and free of cost order

    here's the scenario: i took the pricing procedure of my standard order and basically changed PROO from R to S for statistical. rest is the same. gave the new pricing procedure a name starting with Z, then created a document procedure, then created a

  • Why QUAN_PO_E field in BBP_PDIGP tabl is not reset when PO item is deleted?

    Hi Gurus, For some reason, after an item is deleted at PO, its corresponding QUAN_PO_E field in BBP_PDIGP table of SC has the same quantity ( for example, 3 pieces ). When the buyer access the SOCO, the item is not displayed because previously the sy

  • Exchange rate type P is replaced with M

    Hi, We are using CATS for time booking and the process is as follows: 1) CAT2 -> Hours booked.. Lets assume: 9 HRs 2) CATS_APPR_LITE - > Time sheet approval -> Approved 9 Hrs 3) CAT9 -> CATS data transfer to cost object(PM order) -> During this trans

  • Comma Separated Value Taking too Much Time to Execute

    Hi, select ES_DIAGNOSIS_CODE DC from ecg_study WHERE PS_PROTOCOL_ID LIKE 'H6L-MC-LFAN' The above query returns comma separated value from the above query. I am using the query below to split the comma separated value but the below query is taking lot

  • 9.1.3 Performance

    Hi Guys, used Logic for a while now, I love it & know how to use some bits of it pretty well but I need a bit of advice, so thanks in advance for your help. The 9.1.3 u/g seems to have reduced Logic's efficiency a little IMO? That's the way it goes I