Variable fro Valid date

I have a simple Requirement, Please help me to resolve this
Requirement: I have Valid To Date for all Objects Now i want to create the Variable such that the
User Input Date(During Report Execution) is less than equal to Valid Date(OVALIDDATE).
Please let me know how to solve do i need to write the code in customer exit if you have any template. or any formula if you can explain step by step would be great help.
Thanks
Poonam

Just set the value of the page item to sysdate and separately apply whatever format mask you want to use. Sysdate include a time element. For very accurate timestamping you might want your column to be a timestamp datatype rather than date.
Earl

Similar Messages

  • Checking for a valid date

    I have a program that takes a user's input from three text boxes to make a date. I need to be able to check to make sure that the day of the month is correct. For example if they enter 02/35/02 an error message should apear. I am trying to use a Calendar object to do this with but it isn't working. Here is my code:
                    String strMonth = month.getText();
              int intMonth = Integer.parseInt(strMonth);
              if ( (intMonth < 1) || (intMonth > 12) ) {
                   invalidDate("month",month.getText());
                   month.requestFocus();
                   return;
              else if(strMonth.length() == 1) {
                   strMonth = "0" + strMonth;
              //Formating the year
              String strYear = year.getText();
              int intYear = Integer.parseInt(strYear);
              if (strYear.length() == 1) {
                   //User entered only one digit
                   strYear = "200" + strYear;
              else if(intYear > 40) {
                   //User entered a year greater than 40 so must be 19??
                   strYear = "19" + strYear;
              else {
                   //If neither of the above then must be 20??
                   strYear = "20" + strYear;
              intYear = Integer.parseInt(strYear);
    //-----------RIGHT HERE IS MY PROBLEM------------------------------          
              //Check the day field using the month and year
              String strDay = day.getText();
              int intDay = Integer.parseInt(strDay);
              Calendar cal = Calendar.getInstance();
              cal.clear();
              cal.set(Calendar.MONTH,intMonth);
              cal.set(Calendar.YEAR,intYear);
              cal.set(Calendar.DAY_OF_MONTH,intDay);
              int min = cal.getMinimum(Calendar.DATE);
              System.out.println("Min Day: " + min);
    //-------------The variable max is always 31----------------------          
                    int max = cal.getActualMaximum(Calendar.DATE);
              System.out.println("Max Day: " + max);
              if( (intDay < min) || (intDay > max) ) {
                   //User entered an invalid date
                   invalidDate("day",strDay);
                   day.requestFocus();
                   return;
              else {
                   //User entered a valid date
                   if(strDay.length() == 1) {
                        strDay = "0" + strDay;
              //Everything is correct
              requestedDate = strMonth + "/" + strDay + "/" + strYear;
              System.out.println("All correct: " + requestedDate);The problem is that when I do this the variable max that I use to get the maximum day in the month is always 31. I would appreciate any help.

    import java.util.*;
    import java.text.SimpleDateFormat;
    public class Test {
      public static void main(String args[]) {
        GregorianCalendar c = new GregorianCalendar();
        c.set(Calendar.MONTH, 9);
        c.set(Calendar.YEAR, 2002);
        c.set(Calendar.DATE, 40);
        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
        System.out.println("Date is "+sdf.format(c.getTime()));
        GregorianCalendar tmp = new GregorianCalendar();
        tmp.setTime(c.getTime());
        tmp.add(Calendar.MONTH, 1);
        tmp.set(Calendar.DATE, 1);
        tmp.add(Calendar.DATE, -1);
        System.out.println("Days="+tmp.get(Calendar.DATE));
    }

  • Multiple Validity Dates in Contract Pricing Agreements

    Hi
    We are using Quantity contracts in ECC 5.0. Now business wants to maintain multiple validity dates in price agreement of contract.
    When we try to create the agreement with multiple validity dates, i am getting following message:
    The condition is being processed in the current session.
    Message no. VK104
    Diagnosis
    A condition record with the same variable key is already being processed.
    System response
    The new record is not included in processing.
    Procedure
    Carry out the changes to the record that is currently being processed.
    In this case we are unable to maintain multiple validity dates for same combination (Sales Document & Line Item).
    Is this standard scenario? If no, how to address this issue.
    Please awaiting your valuable feedback.
    Regards,
    Shankar

    Question answered by SAP.
    1. Use VK11/12 to maintain the multiple validity dates.
    2. If 2 Logical systems are used, then need to use separate condition types for CRM & ECC.
    3. Ensure new condition types are blocked from replicating to CRM.
    Now, we are able to maintain separate condition for ECC & CRM and working satisfactorily.
    Thanks
    Shankar

  • Upload and Download Errror " File does not contain valid data"

    We are on the ECC 6.0 Unicode system.
    I dowloaded the Role from QA server and tried to upload into DEV box.
    I am getting the Error " File does not contain valid data".
    However, when I downloaded the Role, it was done successfully.
    Please let me know if anyone has that problem.
    Thanks,
    From
    PRANAV

    This is what I see here.
    DATE                                              20090716                                          131756RELEASE                                           700LOADED_AGRS                                       Z_BI_HR_REPORTING_FUNCTIONALAGR_DEFINE                                        210Z_BI_HR_REPORTING_FUNCTIONAL                                PTHAKER     20080523131557000000000000000PTHAKER     20090709142400000000000000000AGR_TCODES                                        210Z_BI_HR_REPORTING_FUNCTIONAL  TRRRMX                                             X 00000AGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000001S_RFC     T-BD90003500    U  O000004Authorization Check for RFC AccessAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000002S_RS_AUTH T-BD90003500    U  O000013BI Analysis Authorizations in RoleAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000003S_RS_COMP T-BD90003500    U  O000016Business Explorer - ComponentsAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000004S_RS_COMP1T-BD90003500    U  O000023Business Explorer - Components: Enhancements to the OwnerAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000005S_RS_FOLD T-BD90003500    U  O000029Business Explorer - Folder View On/OffAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000006S_RS_HIER T-BD90003500    U  O000032Data Warehousing Workbench - HierarchyAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000007S_RS_ODSO T-BD90003500    U  O000038Data Warehousing Workbench - DataStore ObjectAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000008S_RS_PARAMT-BD90003500    U  O000045Business Explorer - Variants in Variable ScreenAGR_1250                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000009S_TCODE   T-BD90003500    S  O000009Transaction Code Check at Transaction StartAGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000001S_RS_COMP T-BD90003500    RSZCOMPTP CKF                                                                             U  O000021AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000002S_RS_COMP T-BD90003500    RSZCOMPID *                                                                               U  O000020AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000003S_RS_COMP1T-BD90003500    RSZCOMPID ZHCM*                                                                           U  O000025AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000004S_TCODE   T-BD90003500    TCD       RRMX                                                                            S  O000010AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000005S_RS_HIER T-BD90003500    ACTVT     71                                                                              U  O000033AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000006S_RS_HIER T-BD90003500    RSHIENM   *                                                                               U  O000034AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000007S_RS_HIER T-BD90003500    RSIOBJNM  *                                                                               U  O000035AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000008S_RS_HIER T-BD90003500    RSVERSION *                                                                               U  O000036AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000009S_RS_PARAMT-BD90003500    PARAMNM   *                                                                               U  O000047AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000010S_RS_COMP T-BD90003500    RSINFOAREAZPA_ECM*                                                                        U  O000018AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000011S_RS_ODSO T-BD90003500    RSINFOAREAZPA_ECM*                                                                        U  O000040AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000012S_RS_COMP1T-BD90003500    RSZCOMPID ZPAOS*                                                                          U  O000025AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000013S_RS_ODSO T-BD90003500    ACTVT     03                                                                              U  O000039AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000014S_RS_COMP1T-BD90003500    RSZCOMPID ZPAPA*                                                                          U  O000025AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000015S_RS_ODSO T-BD90003500    RSODSOBJ  *                                                                               U  O000041AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000016S_RS_ODSO T-BD90003500    RSODSPART DATA                                                                            U  O000042AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000017S_RS_ODSO T-BD90003500    RSODSPART DEFINITION                                                                      U  O000042AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000018S_RS_ODSO T-BD90003500    RSODSPART EXPORTISRC                                                                      U  O000042AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000019S_RS_ODSO T-BD90003500    RSODSPART UPDATERULE                                                                      U  O000042AGR_1251                                          210Z_BI_HR_REPORTING_FUNCTIONAL  000020S_RS_COMP T-BD90003500    ACTVT     03                                                                              U  O000017AGR_1251

  • Error messege- Please enter a valid date in Background Job

    Hi all,
    background job which is scheduled in sm37 is giving error for dated 01.01.2009 to 30.01.2009.
    But before 31.12.2008 it was working fine
    error messege-
    This is happening in Production and developement client.
    While running the report it showing the error messege- Please enter a valid date
    One function module is used in the report for geting fiscal year from date.
    it is showing the following error messege for perticular date range- 01.01.2009 to 30.01.2009.
    GM_GET_FISCAL_YEAR
    Error
    Fiscal year variant V3 not defined or maintained for date 01.01.2009
    Thanks
    Susanta

    Hi,
    Did you put the date fields to be dynamic in your variant? i.e if in your variant you specified date range of last year, this will not work for this year and eventually give you an error message that the date is not valid...
    Dev.

  • Error messege in Background Job(SM37) -  Please enter a valid date

    Hi all,
    background job which is scheduled in sm37 is giving error for dated 01.01.2009 to 30.01.2009.
    But before 31.12.2008 it was working fine
    error messege-
    This is happening in Production and developement  client.
    While running the report it showing the error messege- Please enter a valid date
    One function module is used in the report for geting fiscal year from date.
    it is showing the following error messege for perticular date range- 01.01.2009 to 30.01.2009.
    GM_GET_FISCAL_YEAR
    Error
    Fiscal year variant V3 not defined or maintained for date 01.01.2009
    Thanks
    Susanta

    Hi,Because this datein the past

  • Current Month, Current Year Variable on Posting Date

    Hi,
    I need to construct a BEx variable that will return the Current Month of the Current Year based on Posting Date. I want to be able to compare Current Month of the Current Year with Current Month of the Prior Year. I know SAP delivers variables for this based on 0CALMONTH. Is there any way to create the variable off Posting Date without having to write a customer exit?
    Thanks,
    C

    I guess you could use replacement path variables for the same. No need to write customer exits.
    Create 2 variables, one on calmonth and the other on calyear.
    Variable on Calmonth -
    type - replacement path.
    Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 2 and offset length 2.
    Variable on calyear -
    type - replacement path.
    Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 4 and offset length 4.
    to get key figures for current month and previous year, restrict the key figure with calmonth variable created above and use offset on the calyear variable created above, like zcalyear - 1.

  • Problem mapping inputText field to a variable in a data control

    I have encountered the following problem. Please help. Any feedback is appreciated.
    I have a page that contains first name, last name, address, city, state zip and country input text fields and a submit button. When the submit button is clicked, user entered information will be commited to database. This is easily achieved by using a managed bean.
    Now I would like to achieve the same functionality by using data control. The reason I want to use data control is to avoid putting the controls (first name, last name, address, city, state zip and country) in the managed bean. I was hoping that they can be directly mapped to the data control variables. The data control is created from a Java object which contains attributes of first name, last name, address, city, state zip and country. The data control is dragged and dropped to a jsff page and the jsff looks like the following:
    <af:inputText label="First Name"
    value="#{bindings.firstName.inputValue}"
    required="true"
    maximumLength="25" autoSubmit="true"
    id="it10">
    </af:inputText>
    When I run the page, I can see the label First name but the input box was not shown. So I removed: value="#{bindings.firstName.inputValue}" and the input box appears.
    Why did that happen? Can I directly map a data control attribute to an input text field?
    Thank,
    Cecilia

    Thanks for the response, Shay. Really appreciate it.
    I tried your first solution - modified the property IsUpdateable to Updateable. However the input text box is still not appearing.
    My java class is just a simple Java class. In the class all I have is just a get method for a domain model object.
    In the jsff, if I assigned a value to the value attribute (value="Jane"), the input text box would appear as updateable.
    Any idea?

  • BOM Valid Date

    Hi,
    While creating BOM due to some human error we took wrong valid date.Now i want to change it.
    Please suggest me the T-code or any customization to change the same.
    "I am online"

    Dear Pawar
    This are the basic IMG settings in order to used the engineering change management
    features.
    x refers to a tick.
    First setup the control data in OS54.
    Revision sections
    Fields :-
    Revision level active            x
    Ext. revision level              x
    Higher revision level            x
    Object Management Record sections
    Fields :-
    Object maintenance               x
    Assign alternative date          x
    Overide value/assignment date sections
    Fields :-
    Only with leading change mst.    x
    Setting the Revision level active is to activate the engineering change management for
    material master.  If you do not want the engineering change management for materials,
    remove the tick.
    With a tick in "Higher revision level", the new revision level has to be always higher
    than the old revision.
    Secondly, setup the external number range in OS53.
    If you use the internal number range, then remove the external number range.
    Third, define the status for the change master records in transaction SM30 - V_T419S.
    Change No.     Chg        Date Chg     Dist. Lock      Description
    Status         Poss
      1             x            x             ' '         Active
      2            ' '          ' '            ' '         Inactive
      3            ' '          ' '             x          Locked
    Fourth, define modification parameters for the BOM in OS27.
    Fields :-
    BOM Validty Maint.               x
    EC Management Active             x
    History Requirement             ' '
    Unit Piece                      PC
    The rest of the fields are blank.
    If the History Requirement is tick, every time during creation of the BOM, SAP will
    prompt your for an ECN number as is compulsory.
    Lastly, define fields selection for routing in OP5A.
    PP task lists: initial screen -> Change number -> Transaction code -> Tick Req.
    Setting the Transaction code fields Required indicate that you have make the ECN number ........
    Hope this will help you one of our friends gave me this
    Pavan

  • Variable Size Item Data in Purchase Requisition

    Hi
    When ever the Purchase Requisition of the Variable size material is
    raised, how do i view,for reference,the Variable Size Item data from
    Bill of materials .
    Steps for the Reconstruction 
    1.Create a Variable size Item Bill of material.
    2.Run MRP agianst the Variable size material's dependent demand.
    3.View the Purchase requisition of the Variable size Item, to take a
    note of the Item Data.

    Thread closed

  • Regd : How to find Validity date for a user in central user system

    Hi Experts;
    I want to get the list of users with profile SAP_ALL  with following details like validity ,user type ,user name ,user id..
    I can get through SUIM for each individual systems.Its very difficult to login to each system ,generate the report.So I prefered to go for Central system
    But if I use central user system I have no option to find validity and user type for the system ( SUIM - > Cross system application )
    I have also tried to the table USRO2 ( which gives only the list of users in the central system )
    So is there any possible ways to find the Users with profile SAP _ALL with validity date in the central user system. So that I can easily generate it as one report instead of logging to each and every system
    Regards
    Sanjeev.S

    Hi Ruchit
    Thanks for your reply. I want to find the validity date of all users having SAP_ALL
    profile of all child system connected through central user system .So it is possible
    to do that in Centrals System by executing the report?
    If I execute that report in Central user system will it give the details of all child
    system connected to central system
    I think it will give only the result of Central system and not the child system connected to Central system.Please clarify me.
    I can execute the report by logging to each child system ,but it takes very long hours for me since there are many system in my landscape.
    Awaiting for your reply.'
    Thanks
    Sanjeev.S

  • IPhoto says it cannot import my photos b/c they may be an unrecognized file or the file may not contain valid data. The operation could not be completed. Error code is: ImageCaptureCoreError-9905.

    Unable to download photos from my camera. iPhoto returns an error message that states: The following files could not be imported (they may be an unrecognized file or the files may not contain valid data). FILE NAME: 100_0490.JPG      REASON: com.apple.ImageCaptureCoreError- 9905.  WHAT'S UP WITH THAT?  Did not have a problem importing photos under the LEOPARD OS, however, now that I have upgraded to Yosemite 10.10.3 the iPHOTO app is not performing the imports.

    Are you using Photos, or iPhoto? Maybe you've got a corrupt file on your camera. I would try using the image capture application to import the bad picture to my desktop. If it works and the picture looks ok,  then delete that pic from the camera, then try to import into iphoto again. You can then import the pic it was saying was bad from your desktop.
    Or, try downloading all the pics using image capture and then import from the download folder.

  • Validity date in RFQ

    Hi all,
    Can anyone explain me what is the correct definition of the Validity start date and end date in the RFQ.
    The reason I am asking this question is , If you eneter the start date and end date in the RFQ and create the PO with reference to RFQ, these dates gets copied on to the PO. if the document type of PO is NB then these fields are not visible on PO screen bu in the background the table EKPO is updated with these two filed. And the if you try to eneter the SES after these dates sysetm is not allowing and giving the message as SES date is beyond the valididty date.
    Has any one come across any such issue. Can any one suggest any solution to this.

    Hi Don,
    RFQ means...requesting quotation from a vendor. Validity date start and validity end means the quotation should be send before the validity end date from the vendor. Before getting the quotation and before knowing the rate, how could you make purchase order to that vendor. Before you rise PO, you should maintain the quotation in ME47. As per standard SAP, you should rise po w.r.to quotation.
    Regards,
    Prasath

  • Creation of OLAP Variable for Master data

    Dear BW Experts,
    How to Create OLAP Variable for Master data  in SAP BW? What is the use of OLAP Variable?

    The entry column Type (Variable) on the Select Data tabpage indicates a variable time frame in which the data should be requested. The variables are not replaced by concrete values until a request is made. There are eight options:
    Variable            Data request        Description
    0
                          Yesterday
                                            (12am – 12am)
    1
                         Last week
                                            (Monday-Sunday)
    2
                           Last month
                                            (1. (First day - last day of previous month)
    3
                           Last quarter
                                           (1. (First day - last day of previous quarter)
    4
                           Last year
                                          (01. (January 1 – Dec 31 of previous year)
    5
                      User time selection
                                               See below
    6
                       ABAP routines
                                               See below
    7
                         <b>OLAP variables</b>
                                                See below
    <b>Time selections with the help of the variables 0 to 4.</b>
    The variables 0-4 only refer to date fields of the data type DATS.
    <b>User time selection</b>
    Type 5 gives you a free selection of all fields.
    If you select this variable for a field, confirm the selection, and then choose Detail for Type, an additional dialog box appears. In this dialog box you can freely limit the values of the fields and determine the next period value and the number of periods until a repetition.
    Variables are placeholders for values and are not replaced by concrete values until a data request is made. You can also use a Variable for selections when requesting data for an InfoObject, if you choose type 7, confirm the selection, and then choose Detail for Type.

  • Mass extention of service entry sheet condition record validity date

    Hi all,
          I have immediate requirement. i need to extend the validity date for condition record related to the Service entry sheet. This has to done mass sheet changes.
         I am looking for Any bapi or Standard function module or any config changes.
    I am looking forward for your valuable inputs.
    Regards,
    Sreenivasa Sarma K

    Arun,
    This doesn't suprise me...
    I'm not sure if there is a standard solution, but you could do this via user-exit/BADI (see [here|http://www.sapfans.com/forums/viewtopic.php?p=648307] under maintenance plans )
    PeteA
    [www.pjas.com]

Maybe you are looking for