Current date in the query

Hi Experts,
I want to display current date in the query in one of the time characterstic which i am including in the data target but i don't want to load anything in the data target but still i want to display the current date in the query only.
how can i achieve this.
thanks and regards

Hi,
It's a real fcahllenge or a non ABAPer.You have to create  a project in cmod and to assign enhancement RSR00002.
In component EXIT_SAPMRSRU_001 you will find a couple of includes.
Please add attached code. Replace  YOURCUBE by the name of your info provider and  YOURIO by the name of desired info object.
*&  Include           ZXRSRTOP
DATA: G_POS_YOURCUBE_ YOURIO TYPE I.   
*&  Include           ZXRSRU02
DATA: L_S_CHANM TYPE RRKE_S_CHANM.
DATA: L_SUBRC1 TYPE SY-SUBRC. "execute only, if key figure really used
CASE I_S_RKB1D-INFOCUBE.
  WHEN 'YOURCUBE'.
    L_S_CHANM-CHANM = 'YOURIO'.
    L_S_CHANM-MODE  = RRKE_C_MODE-NO_SELECTION.
    APPEND L_S_CHANM TO E_T_CHANM.
  ENDCASE.
*&  Include           ZXRSRZZZ
FORM USER_YOURCUBE USING I_S_RKB1D TYPE RSR_S_RKB1D
        CHANGING C_S_DATA  TYPE ANY.
FIELD-SYMBOLS <L_YOURIO>.
ASSIGN COMPONENT G_POS_YOURCUBE_YOURIO  OF STRUCTURE C_S_DATA TO  <L_YOURIO >.
<L_YOURIO >.= SY-DATUM.
ENDFRORM.
Hope it works.
Good Luck
Joe

Similar Messages

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Display Current/System date in the Query

    Hi,
    Can any one tell me how i can display the current date or system date in Bex Query/report. I tried to use "0DAT" SAP exit as the key date in the "General Properties"... this helps me to execute query based on a Key date, but does not display the date. Can any one tell me, how I can use the current date in my query for some calculations and how I can display the current date.
    Thanks

    Hi Tanu
    If you want to see the query run date along witn query properties in the report output ( after you execute the report).. then go to "Layout".. (please check for Icons) >display text elements> all. ( This is if you are in BW 3.5).. if you are in BI 7.0, then simplay click on information and you will see all the details
    I see you are asking for some calcuation's also.. for that you should see what date fields you have in the backend cube/dsou2026
    Hope this helps
    Thanks
    Kalyan

  • How to display the current date in the prompt value.

    Hi,
    How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
    Thanks,
    Shakthi.

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • My ipod is somehow synced to another library, because I plugged the charger to a wall. How can I sync my ipod shuffle back to the original Itunes library without erasing my current data in the Ipod shuffle?

    My ipod is somehow synced to another library, because I plugged the charger to a wall. How can I sync my ipod shuffle back to the original Itunes library without erasing my current data in the Ipod shuffle?

    ",the owner sold the ipod without clearing the songs and since the songs were not puchased from the itunes store then i believe i now own the songs"
    Not true at all.
    It does not matter where the songs came from, they are not yours and the previous owner does not own the right to distribute them to others.
    The law is the same with downloads and cds and any other medium.

  • Automatically add a current date at the end of the comments

    Hi,
    I have a form on a table with 5 fields... on one the field I am asking my users to enter comments...
    I am looking for a functionality to automatically add a current date at the end of the comments, only when they are updated or newly filled in...
    Please advice how can I do it... I am anticipating some sort of a trigger on column (when the data is modified)...
    Thanks

    automatically add a current date at the end of the comments, only when they are updated or newly filled inDo you want to add the date to the page item itself and hence show it to the end user as and when its changed, thn
    Assuming comments item is named '*P1_COMMENTS* , add the following to the "execute on load"
    $('P1_COMMENTS').change( function(){
      var d = new Date();
      $s('P1_COMMENTS', $v('P1_COMMENTS')+ d.toUTCString() );
    });If its to be done only when updating ie in the PLSQL block
    UPDATE <table name>
    SET <comments _column> = (  SELECT DECODE(  NVL(<comments _column>,'')
                                                                          ,NVL(:P1_COMMENTS,'')
                                                                          ,<comments _column>
                                                                          ,:P1_COMMENTS||TOCHAR(SYSDATE,'DD-MON-YYY')
                                                  FROM DUAL
    WHERE <condition>

  • ICal still shows previous day in ical proper, but shows current date in the dock

    iCal is open in the MONTH, on my desktop permanently, but it continually shows yesterdays date.  It isn't till I actually click on the following day in iCal proper that the date changes to the current date. The iCal icon on the dock works fine with no issues.  When I first purchased the iMac iCal worked aok.  Software is continually updated.

    I have the same issue. I am also running iCal 5.0.2 under Lion 10.7.3. It worked fine for me on Lion 10.7.2, and it still works ok for me on my iPhone 4 running iOS 5.1. It does look like a bug to me. I have the issue connecting to a Google Calendar as well as to another (non-Apple) CalDAV server.
    Let me know if you call Apple Support to report this issue.

  • Variable : Key date of the query

    Hello Everyone,
    I would like to share couple of points with you all during this cool holiday season.
    I need to use variable for a  time dependent hierarchy. I have a variable and selected that. Again I want to restrict this hierarchy by using variable for key date of the query.
    I can select a variable for the hierarchy. But I am not able to restrict the hierarchy.  When I choose a varaible for "key date of the query" system responed with an error message ' For characteristic 0Date, enter value in permitted format'. So I am not able to select a variable for "key date of the query " and restrict the hierarchy to choose a node.
    Please share your valuable inputs.
    Thanks in advance
    RJ

    Hello,
    what is the variable name that you are using to restrict the hierarchy date?
    Regards,
    Daniel

  • How to show the Current Date in the Screen as default

    Hi all,
    This is may be simple to u all, but i need the solution for this,
    I want to show the Current date in the Screen, i am using the structure. but the calendar control showing when i run the program. But i want to show the current date as default.
    Thanks
    Shankar

    Is this a screen or a report?
    If its a report, try assigning DEFAULT sy-datum (to the parameter/select-option name)
    If its a screen field, try writing this in the PBO:
    IF fieldname IS INITIAL.
    fieldname = sy-datum.
    ENDIF.
    Hope this helps.
    Sudha

  • Javascript Question - How to Insert a Dynamic/Current Date into the Footer of a Scanned Document

    Hi!
    I am looking for help in finding a Javascript that would allow the insertion of a dynamic/current date into the footer of a scanned document at the time the document is printed.
    I am currently using Adobe Acrobat Professional 8.0 at my work and there has arisen a need to have a dynamic/current date in the footer on scanned documents when they are printed out on different days by different people.
    I am new to the Forum and I am also very new to Javascript and what this entails.
    Thank you in advance for your help and input!
    Tracy

    this.addWatermarkFromText({
    cText: util.printd("mmmm dd, yyyy", new Date()),
    nTextAlign: app.constants.align.right,
    nHorizAlign: app.constants.align.right,
    nVertAlign: app.constants.align.bottom,
    nHorizValue: -72, nVertValue: 72
    Will insert the current Monday/Day/Year as a text watermark at the bottom of every page of a document, 1 inch up and 1 inch in from the right corner.

  • Sum from current date to the last date of sales

    Hi 
    It's been a while since I used MDX last time. 
    I have a simple question (probably). I need a measure which sums up from the current date to the last sale date. 
    It's like a reversal of Year To date.  And I need to do it date level. 
    Let's say is the sales goes like
    1/May/2000     $1000
    2/May/2000     $1000
    3/May/2000     $1000
    4/May/2000     $1000
    5/May/2000     $1000
    I need to create a measure which displays sum of current sales and last sales
    1/May/2000     $5000  
    2/May/2000     $4000
    3/May/2000     $3000
    4/May/2000     $2000
    5/May/2000     $1000
    I have a date hierarchy and hope it can be rolled up. 
    And I tried like something like ( suggested in another posting)
    [Date].[Calendar].CurrentMember:NULL}
    But this does not work for me.
    The actual MDx I wrote is 
    With member MEASURES.ActiveLicences as 
    sum ( 
    {[License Expiry Date].[FinancialYear].[YY-MMM].CurrentMember: null},
    [Measures].[No of Students]
    select {
    MEASURES.ActiveLicences,
    [Measures].[No of Students] } on columns, 
    [License Expiry Date].[FinancialYear].[YY-MMM].members on rows 
    from [Sales];
    Can anyone help me with this please? 
    Kind regards
    Mark Kim

    Hi SQLMa ,
    I was trying a similar code, using a hierarchy expression instead of a member expression for the CurrentMember functionality . Here is an Adventure Works example :
    With member MEASURES.ActiveLicences as 
    sum ( {[Delivery Date].[Fiscal].CurrentMember: null}
    , [Measures].[Internet Sales Amount]) 
    select {MEASURES.ActiveLicences,[Measures].[Internet Sales Amount]} on columns
    , [Delivery Date].[Fiscal].[Month].members on rows 
    from [Adventure Works]
    Hope it helps :)
    Regards, David .

  • Variant must get the current date from the system.

    Hi All,
    I really appreciate your help on below please;
    I need to create a variant and schedule a report program once a day.
    But variant must get the current date from the system (sy-datum).
    The program should run for the values in the variant in schedule job run;
    Can I do this using SAP variants (for Report Program) and schedule the job.
    Many thanks
    Iver

    Standard functionality.
    http://help.sap.com/saphelp_nw70/helpdata/en/c0/98039be58611d194cc00a0c94260a5/frameset.htm
    Thomas

  • How to get the current Date from the system?

    How do I acquire the current date from the system? Also, if possible, can I assign the day, month and year separately into three variables and how? It would be thankful if some simple Example could be given. Thanx!

    import java.util.*;
    public class count {
    public count() {
    Calendar now = Calendar.getInstance();
    int month = now.get(Calendar.MONTH);
    int day = now.get(Calendar.DAY_OF_MONTH);
    int dayyear = now.get(Calendar.DAY_OF_YEAR);
    int year = now.get(Calendar.YEAR);
    int a = 365;
    int b = a - dayyear;
    System.out.println("The day is the" + " " + day);
    System.out.println("IT is the" + " " + month + " " + "month of the year");
    System.out.println("The year is" + " " + year);
    System.out.println("This many days till next year" + " " + b);
    public static void main(String[] args) {
    count cou = new count();
    }

  • Subtraction of dates in the query.

    Hi Experts, I am new here and need some help please.
    I want to subtract 2 different dates in the query. They are defined as characteristics. Can somebody help me with this please?
    Thanks

    Hi,
    As said in the previous post, Create 2 formula variables on these 2 dates. and use them in the calculation.
    Go to rows right click on structure Select New formula. Popup will come, select the formula varibles onleft below. Right click New variable slect the processing type as Replacement path. and reference char as these 2 characteristics.
    Khaja

  • Operation with the current date in a query....

    Hi all,
    someone can give me some help.....
    Do I have a wild query like this:
    SELECT JOB_ID,
    FROM MY_TABLE
    WHERE ACTION = '....'
    AND STATUS = '....'
    AND DAEMONCODE = '....'
    AND (CURRENT_DATE - TIMEINSERT) > 10
    --> "10" represents the number of days
    The last condition of Where is the one that I can not write properly ......
    TIMEINSERT is a column of the table from which I run the query in FROM. TIMEINSERT is of type VARCHAR2 (17 CHAR) and the values are of the type that can take 20110217124105030
    The first thing I should do is to transform the reading into a date using TO_DATE TIMEINSERT (........) of Oracle, but does not seem possible .....
    And even if it is possible to solve this problem (current_date - timeinsert)> 10
    Hi.
    Flavio (from Venice)

    With a correct format mask, it works:
    SQL> select 1 from dual where current_date - to_date('15-MAR-11','DD-MON-RR') > 10;
    1
    1
    SQL> select 1 from dual where current_date - to_date('15-MAR-11','DD-MON-RR') > 20;
    no rows selected

Maybe you are looking for

  • Downloading one song from itunes store to ipod

    I downloaded one song from itunes store yesterday. I accomplished it accidentally. Does anyone know how to easily download one song directly to ipod.

  • Reading dvd Zone 1 on imac in zone 2

    Is it possible or i'm limited by 5 changes on my iMac? Thanks

  • File open

    this is in c++, CFile File; File.Open(FileName, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone) similarly i want to use in java. I tried using FileInputStream but reading data is different what should i use for typeBinary mode file?

  • Simple Search in iWeb?

    Is there any way that I can use a simple search function on my website? I just want it to search from a certain collection of pages that I have on my website, and just those pages. I also would love it if there was a way to do this that clean and goo

  • Iphone teethering through usb on windows 7 64bit

    cant seem to get this to work atm Windows 7 Enterprise 64bit Itunes 10.6.3.25 iPhone 3GS iOS 4.2.1 firm 05.15.05 sharing on, wifi connected on the phone and working but on the computer its just "network cable unplugged" i have done this rebooted disa