Creating or Updating BW Queries at runtime using ABAP

Hi everybody,
How can we create BW Query programmatically (using ABAP) or How can we update structure of BW queries at run time using ABAP? We have requirement where we want to add/remove characteristics from rows section of query at run time based on user’s input, we are making a BSP module for that, is there any function module provided to create or update BW queries in ABAP?

Hi Annabelle,
I think there is a very simple solution to your problem - use lexical parameters.
You define a user parameter e.g. P_TABLE with a default value e.g. EMP. This must be the name of an existing table. The you write your select like this: SELECT ENAME,SAL from &P_TABLE. This will work as long as the default value is the name of an existing table. You can now change the value of P_TABLE as long as the column names are the same. If the column names also changes then you can write the select as: SELECT &P_COL1 ENAME,&P_COL2 SAL from &P_TABLE.
Regards,
Hans Peter Guldager
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by AnnabelleJones:
Hello!
I want to create queries and charts, one for each of a number of tables which each have the same format. I dont know how many tables at design time but will do at runtime. Is there any way of creating charts and tables at runtime or will I have to generate a seperate report for each table?
Thanks for any help!<HR></BLOCKQUOTE>
null

Similar Messages

  • Problem in creating and updating of  material by the use of bapi and bdc

    Hello All,
    I am using bapi (BAPI_MATERIAL_SAVEDATA ) and than bdc to create and update classification data of material.
    I am facing a problem.
    1) firstly I am creating material by the use of bapi and than after creation i want to update classification data for taht perticular material .
    2) To update classification data i am using bdc . while at the time of updating material through bdc system showing me error that material is currently locked by user (my login name ).
    Please suggest what to do.
    Tkank you
    With Regards
    Shantanu Modi

    When u update/create data it takes sometime to commit. So after using BAPI
    give 10 minutes wait in ur program before updating classification data.
    you can write like
    wait up to 20 seconds.
    and update the classification.

  • Requirement wherein I want to call two queries in parallel using ABAP Prg

    We are using RSCRM_BAPI to run a query in background and write the results to a table. We later read this table and create a file. I have a requirement u2013 wherein I want to call two queries in parallel using an ABAP program.
    For our discussion assume:
    1) Program : ZCALL_RCRMBAPI  is a program that calls RSCRM_BAPI in background and takes the query name as input
    2) Program: ZMAIN_PROGRAM  this is the main program
    The requirement is to call the ZCALL_RCRMBAPI in a loop. Also within the loop call it in parallel. Basically we have an ODS that stores ; FISCPER. So I call the two queries for a list of FISCPER.
    ZMAIN_PROGRAM - A program that reads a table (ODS ) in our case and call the two programs in a loop and both should run in parallel .
    Now if it was sequential u2013 it was easy u2013 I would just say
    Loop at L_T_FISCPER .
    Update Z_FISCPER with L_T_FISCPER-FISCPER u201C Assume Z_FISCPER is a Z table . The VARIABLE in the query Q1 and Q2 use a customer exit to read this table.
    A)       SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q1 and return .
    B)      SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q2 and return .
    Endloop .
    Question: How do I make these calls in parallel u2013 yet retain control in the main program?
    A)       SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q1 and return .
    B)      SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q2 and return .

    Instead of RSCRM BAPI you can use the RRW3_QUERY_VIEW_DATA function module for greater control over program execution...
    /people/arun.varadarajan/blog/2009/07/29/make-the-most-out-of-query-execution--part-1
    will give you pointers as to how this can be done...

  • Update MS Access Database table using ABAP

    Hi All,
    I have a requirement wherein I have to update the existing records in MS Access database using ABAP Code. Can someone provide sample code through which I can achieve this. Thanks!!!
    Regards,
    Nitish Reddy.
    Edited by: Nitish Cherukupally on Mar 30, 2009 4:02 PM

    hi,
    please refer to this link
    http://learningabap.wordpress.com/2007/04/11/get-data-from-ms-access-into-internal-table/
    http://abapcode.blogspot.com/2007/05/get-data-from-ms-access-into-internal.html
    http://abapcode.blogspot.com/2007/06/sample-program-to-upload-excel-document.html
    MS Access Database using ABAP Program
    thanks

  • How to create a ms-access database at runtime using java

    hi, this is ravi kiran,
    i have a situation where i need to create a new ms-access database with one table in it at runtime(when user clicks on some button).
    i have been searching many sites to know how to do this in java, but i didnot find any thing useful.
    plz tell me how to do this in java.
    plz help me, its urgent
    thanx in advance.

    Here's how I did it. Research does help, but sometimes looking at others code does too... You do have to have a dummy file that you made with access though. You can't just make a file file.mdb (it will be corrupt)
         public void createDatabase(String database) throws SQLException{
              try{
                   // This file needs to have been created with MS Access
                   File dbfile = new File(this.dataBaseDir + "dummy.mdb");
                   // This is the new database file being made
                   File newFile = new File(this.dataBaseDir + database + ".mdb");
                   // Copy all bytes from dummy file to new DB file.
                   FileInputStream instream = new FileInputStream(dbfile);
                   FileOutputStream ostream = new FileOutputStream(newFile);
                   int numBytes = instream.available();
                   byte inBytes[] = new byte[numBytes];
                   instream.read(inBytes, 0, numBytes);
                   ostream.write(inBytes, 0, numBytes);
              catch(FileNotFoundException e) { e.printStackTrace();}
              catch(IOException e) { e.printStackTrace();}
              if(DEBUG) System.out.println("creating the " + database + " database");
         }

  • How get recently created and updated events from google calendar using pl/s

    Hello
    I am able to get Google calendar events using pl/sql..I am receiving huge xml code(if there are more events),want only update and recently created events instead of getting repeated events.please help me in this regard.
    Thanks
    Edited by: user12180635 on Mar 2, 2012 1:49 AM

    This is the forum SQL Developer (Not for general SQL/PLSQL questions).
    Your question would probably be better in a Google forum since the answer is probably somewhere in google's API. Or if you want to extract items from your file, try the SQL and PL/SQL forum here, or possibly one of the XML development forums.

  • OLE - Creating header and footer in Word document using abap

    Hi All,
    I'm using OLE to create a WORD document from abap.
    I need to insert a logo in the header and a footer text.
    Does any one know how to insert a header/footer with abap ole ?
    I tried to insert the logo as picture with:
    call method of o_inlineshapes 'AddPicture' = o_logo
      exporting
      #1 = 'C:\logo3.jpg'.
    but I can't put it in the place I want..
    thanks,
    Michal

    call method of LOBJ_MS_WORD 'ActiveWindow' = w_activewindow.
    call method of lobj_activewindow 'ActivePane' = w_activepane.
    call method of lobj_activepane 'View' = w_activeview.
    SET PROPERTY OF w_activeview 'SeekView' = '9'.   " header view.
    " This will set the view to the header view. Whatever you write here
    will go to the header.
    Get PROPERTY OF lobj_ms_word 'Selection' = w_selection.
    CALL METHOD OF w_selection 'TypeText'exporting
      #1 = 'Rahul Anand'.
    "Now set the view again to the main doc view.
       SET PROPERTY OF w_activeview 'SeekView' = '0'.
    " Now write your main doc code .
    " For footer the view is '10'.
    call method of LOBJ_MS_WORD 'ActiveWindow' = w_activewindow.
    call method of lobj_activewindow 'ActivePane' = w_activepane.
    call method of lobj_activepane 'View' = w_activeview.
    SET PROPERTY OF w_activeview 'SeekView' = '9'.   " header view.
    " This will set the view to the header view. Whatever you write here
    will go to the header.
    Get PROPERTY OF lobj_ms_word 'Selection' = w_selection.
    CALL METHOD OF w_selection 'TypeText'exporting
      #1 = 'Rahul Anand'.
    "Now set the view again to the main doc view.
       SET PROPERTY OF w_activeview 'SeekView' = '0'.
    " Now write your main doc code .
    " For footer the view is '10'.

  • Create Process Chains and add Process Types using ABAP

    Does anyone in here have experience in creating or changing a full Process Chain including the Process Types?
    The reason is, that we have a lot of source systems with "similar" loads.
    We already have an ABAP that can copy the chain and replace the InfoPackages. But we can't find a way to create/change a process, e.g. 'Hierarchy Save', 'PSA Delete' etc.
    Any ABAP samples is highly appreciated!
    Best Regards Jakob

    Hello Jakob
    did you find already this how to paper: "How to ... Implement custom process types" ?(https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/72e0e1ed-0c01-0010-74bc-b397c8c4dadc)
    It has a code sample in the appendix.
    Hope it helps,
    regards
    Martin
    Message was edited by: Martin Lehmann

  • How to create a dynamic mapping of columnar at the Runtime using ADF or JSF

    How to create a dynamic GUI at the Runtime using ADF or JSF in JDeveloper 11g.
    What I am trying to build is to allow the user to map one column to another at the run time.
    Say the column A has rows 1 to 10, and column B has rows 1 to 15.
    1. Allow the user to map rows of the two tables
    2. An dhte rows of the two columns are dynamically generated at the run time.
    Any help wil be appreciated.....
    Thnaks

    Oracle supports feedback form metalink was; "What you exactly want to approach is not possible in Htmldb"
    I can guess that it is not
    exactly possible since I looked at the forums and documantation etc. but
    couldnt find anything similar than this link; "http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.h
    t". But this is a very common need and I thought that there must be at least a workaround?
    How can I talk or write to Html Db development team about this since any ideas, this is very important item in a critial project?
    I will be able to satisfy the need in a functional way if I could make the
    select lists in the tabular form dynamic with the noz_id;
    SELECT vozellik "Özellik",
    htmldb_item.select_list_from_query(2, t2.nozellik_deger, 'select vdeger
    a,vdeger b from tozellik_deger where noz_id = 10') "Select List",
    htmldb_item.text(3, NULL, t2.vcihaz_oz_deger) "Free Text"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    But what I exactly need i something like this dynamic query;
    SELECT
    vozellik "Özellik",
    CASE
    WHEN (t2.nozellik_deger IS NULL AND t2.vcihaz_oz_deger IS NOT NULL) THEN
    'HTMLDB_ITEM.freetext(' || rownum || ', NULL) ' || vozellik
    WHEN (t2.nozellik_deger IS NOT NULL AND t2.vcihaz_oz_deger IS NULL) THEN
    'HTMLDB_ITEM.select_list_from_query(' || rownum ||
    ', NULL, ''select vdeger a,vdeger b from tozellik_deger where noz_id = ' ||
    t1.noz_id || ''' ) ' || vozellik
    END AS "Değer"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    Thank you very much,
    Best regards.
    H.Tonguc

  • Known Issue: "DNS server could not be reached" when creating or updating a RemoteApp collection using template images for some locales

    When trying to create or update Azure RemoteApp collections that use a template image for some non-EN-US locales, it might fail with error "DNS server could not be reached". You might also see error code "DnsNotReachable". 

    Cause:  There was a issue in Azure in which decimal punctuation was not treated properly if the locale of the template image used a comma (,) instead of a period (.).
    Workaround:  Before a fix was applied, the workaround was to use template images based on a locale that uses a period to delimit decimals, such as EN-US.
    Resolution:  As of March 19, 2015, a fix for this issue has been applied to Azure. You should once again be able to create collections from template images that use non-EN-US locales. If you continue to have this problem, please
    try the workaround. If that works and the only difference in the template images is the locale, please email remoteappforum (at Microsoft). If the workaround does not work, the issue is likely caused by a DNS configuration issue such as:
    No valid forwarders to public DNS servers configured on your internal DNS server(s).
    A valid internal DNS server is not specified on your Azure RemoteApp VNet.
    A VNet or internal network configuration issue is preventing the internal DNS servers from be reached by the VMs in the RemoteApp collection.

  • Create a check box in excel cell  using sap abap

    Dear Sap Master's,
    Please give me some idea on  how to create a check box in excel cell using abap program..
    (OLE concept).
    Thanks
    Moderator message: please search for available information first.
    Edited by: Thomas Zloch on Jan 12, 2012

    select the cell then open the cell formatter:
    process should be similar in the iOS version.  I do not have any iOS devices with Numbers so I cannot check.  I did find this link that may help:
    http://support.apple.com/kb/PH3374?viewlocale=en_US

  • Create new survey data for opportunity using abap code

    Hello to all,
    I have one requirement.
    create survey data for given opportunity ID using abap code. or copy survey data from one opportunity to another opportunity using abap.
    any ideas..
    many thanks
    Babu

    Hello Babu,
    You can do this through the CRM_ORDER_MAINTAIN FM, this is the generic FM to edit any transaction in CRM.
    The FM contains an internal table IT_SURVEY that must be filled. Actually, this table will only contain a reference to the (completed) survey, it doesn't store the data of the survey itself.
    For some example coding, take a look at the SrvTSurvey.do controller. If you want to see what data is stored in the IT_SURVEY table, create a transaction and attach a completed survey to it (you can easily do it in the standard views of the webclient) and take a look at the survey structure in the CRM_ORDER_READ FM/Report.
    Let me know if you need more guidance,
    Reward points if useful,
    Regards,
    Joost

  • Issue with FM 'STATUS_CHANGE_EXTERN'  using ABAP Proxy

    Hi Experts,
    I am using the FM 'STATUS_CHANGE_EXTERN'   & 'STATUS_CHANGE_INTERN'  to change the user status & system status using ABAP Proxy.
    But SAP is updating the system status using ABAP Proxy through ''STATUS_CHANGE_INTERN'' but not updating the User stauts 'STATUS_CHANGE_EXTERN' using ABAP Proxy but when run the same in foreground then it's working fine..
    I have already used the External Commit for the same.
    Please help me in this case.
    Thanks in Advance
    Sachin

    After call of CRM_STATUS_CHANGE_EXTERN you need to call BAPI_TRANSACTION_COMMIT.
    call function 'CRM_STATUS_CHANGE_EXTERN'
        exporting
            objnr               = iv_guid
            user_status         = iv_status
        exceptions
            OBJECT_NOT_FOUND    = 1
            STATUS_INCONSISTENT = 2
            STATUS_NOT_ALLOWED  = 3
            OTHERS              = 4
    if ( sy-subrc = 0 ).
        call function 'BAPI_TRANSACTION_COMMIT'
            exporting
                wait  = ABAP_TRUE
    else.
        "!+ Handle error
    endif.
    Best regards,
    Tomas.

  • How to use a single page for create and update mode.

    Hi,
    I need to develop a single page to be used for both create and update modes.
    I am going to use a variable MODE
    and i will set this in the emp summary page.
    Based on the button clicked by the user i have to render the JSF page.
    For tis if the user selects a perticular and cliks on update thn i will pass the empno to the next.
    so there in the next i will appy a ViewCreiteria on my View Obj to fetch only that row so that only that emp will be displayed ion update mode.
    This is working fione for me.
    So now the issue is
    when the user clicks on CreatEmp button.
    i need to enable my VO for insert operations.
    for this i wrote the code like this in the beforePhase event
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding valBinding = ctx.getApplication().createValueBinding("#{data}");
    BindingContext bContext = (BindingContext) valBinding.getValue(ctx);
    DCDataControl dcControl = bContext.findDataControl("DataControl");
    Application app = ctx.getApplication();
    ApplicationModule am = (ApplicationModule) dcControl.getDataProvider();
    System.out.println("After Appmodule initiation");
    // get the VO reference and initiate the query
    System.out.println("Before Page VO initiation");
    PrismDmPageSectionViewImpl vo = (ViewImpl)am.findViewObject("View");
    //ViewRowImpl row = (ViewRowImpl) vo.createRow();
    /* TO CREATE AN EMPTY ROW*/
    Row row=vo.createRow();
    System.out.println("New Row is created");
    //vo.createKey(row);
    vo.insertRow(row);
    vo.setCurrentRow(row);
    By doing this a new empty page is rendered.
    But when i fill up the values and click on ok.. i am getting the error like this..
    JBO-27023: Failed to validate all rows in a transaction.
    JBO-27027: Missing mandatory attributes for a row with key null of type View3
    JBO-27014: Attribute Id in View3 is required
    JBO-27014: Attribute PageeId in View3 is required
    Please point me out where i am missing.
    Thanks

    Hi,
    In my opinion you are over complicating things.
    This is what I do for using the sme page as both create and update without all this code.
    1) Create a browse page containing a an adf table with a select one component bound to your view object.
    2) Create an additional edit page containing only an edit form containing fields of your view object that your users must enter in order to add or edit rows.
    3) Link the pages in the JSF diagram with an "edit" navigation case from browse to edit page and a "return" navigation case from edit to browse (make sure that redirect option is NOT set on both cases)
    4) Remove the submit button from the edit page and add two application module bindings for the commit and rollback operations as command buttons in the form footer facet. Make sure that both buttons has an action of return and that their disabled property is set to false. You will probably change their labels to ok and cancel respectively.
    5) Drop a create action for your view object from the data control palette inside your page as a command button and set the action property to edit also.
    3) Set the action property of the view button to edit
    This should basically work without any code from your part. -- at least it does so for me -- if you like to make it a bit more funcy you may add am action listener inside your buttons and set a requeScope variable for example #{requestScope.editing} to true or false depending on the button clicked. Then add a title to your page with a value like #{requestScope.editing == true ? 'Editing record' : 'Adding a new record'}..
    Hope that helps.
    Thanassis

  • Is it still possible to downgrade from ios 6 to ios 5.1.1 on my ipod touch 4th gen as of Sept.24?Also, if I use a backup created AFTER updating to ios 6 when I restore/downgrade to ios 5.1.1, does it become ios 6 again because of the backup?

    Is it still possible to downgrade from ios 6 to ios 5.1.1 on my ipod touch 4th gen as of Sept.24? Also, if I use a backup created AFTER updating to ios 6, when I restore/downgrade to ios 5.1.1, does it become ios 6 again because of the version of ios 6 that I created the backup on?

    There has never been a legit way to downgrade.
    It will always restore to the latest available software.

Maybe you are looking for