7 Replies Latest reply: Jun 11, 2014 3:48 PM by Frank Siciliani RSS

    Filling Date Variable automatically

    Rubens Rodrigues

      Hi fellows, how are you?

       

      I have a challenge to overcome according to the following scenario:

       

      • There is a query which I'm extracting from SAP BW through QV OLAP Connector and it has a mandatory date variable . If I just enter manually with the date it works fine and QV retrieves data successfully. However, as I need to enter with the actual date everyday to set the variable correctly, I woud like to use some function which can get TODAY's date automatically, so setting the variable correctly and automatically as well. Do you know if it's possible since QV native script commands may not work when calling SAP queries?

       

      Below is a an example of my query with the date value highlighted in red. The idea is to replace the value using a function:

       

      [ZITEMLQP2/TEST_QUERY]:

      Load *;

      Select PseudoMDX D (

      Dimensions (

        [0COMP_CODE] (),

        [0SEM_CRDATE] (),

        [POSIT] (),

        [0CALMONTH] ()),

      Measures (

        [A6RKRK0IZ4IVI9S7VL4LNYZ81].[A6RKRK0IZ4IVI9S7VL4LNZ5JL]),

      Variables (

        [0SEM_CRD] (I = [0SEM_CRDATE].[20140611])),

      From (ZITEMLQP2/Q_MP_FLXCX_0014_PREVQVIEW));

       

      PS: My second option is to ask BW consultant to treat it in BW, but I would like to check if it's possible using some script in QV.

       

      Best regards,

       

      Rubens Rodrigues