Date depreceted methods

I'm using date, but all the methods are depreceted.
    private boolean canExecute()
         if(lastDate != null)
              Date now = new Date();
              Date changeSession = new Date(now.getYear(), now.getMonth() , now.getDay() , 3 , 0 , 0);
              if(now.after(changeSession) && lastDate.before(changeSession) )
                   return false;
              else
                   return true;
         else
              return false;
    }How should I do that?

Notice that when objects/methods are depricated, the new API says they are depreicated and what to use in their place.

Similar Messages

  • Bind an inputFile value to a data control methods parameter

    Hello I am trying to create a InputFile (ADF Faces) which is linked to a data control method. The method reads a specified file and returns the content which is then displayed in table form.
    <br><br>
    I have a filereader Class with the following method:
    <i>public List<FileInQuestion> returnFileContents(String fileName)</i>
    <br><br>
    I have created a data control based on this Class. From the JSF page, under the data control palette I can drag on may parameter 'FileName' (as input text) and my method (as command button) and finally the return type 'FileInQuestion' (as read only table). This all works fine and when I type a filename in and hit the button it displays the contents in a table.
    <br><br>
    Now the problem is that I want to base the input parameter on the value of the InputFile component. But when I drag and drop the 'fileName' parameter onto the canvas, it doesn't give me the option to create as an input file!
    <br><br>
    Please could someone tell me how I manually link (bind) the inputFile component to the 'fileName' parameter?
    <br><br>
    Sorry if a bit long winded!!
    <br><br>
    Thanks Dan
    Message was edited by:
    user593073

    Thanks Frank but I need to get at the text value returned from the inputfile component. I did what you said with the following results:
    <br><br>
    I started with a inputtext field, command button and read only table. When I entered a value (in this case 'C:\data\contacts.txt' ) into the inputtext field and hit the command button the table displayed the expected results (for logic please see my 1st post).
    <br><br>
    I then convert the inputtext component to a inputfile component in the way you suggested. I now rerun the application, browse to the same file and hit the command button, and then nothing!! no results.
    <br><br>
    I'm I missing something here?
    <br><br>
    Thanks
    <br><br>
    Dan

  • ABAP Dataflow using FTP data transfer method

    Hi,
    I am facing this error while executing the ABAP dataflow, the datastore configuration has FTP as data transfer method.
    I wanted to know if the ABAP program is generated succesfully and the error is while executing the ABAP program or there is an issue with the generation of ABAP program itself... Please help me understand the issue.
    Since I am unable to attach the doc, please see the error message below.
    Job name: Job_Module4_ECC_To_BW
    (12.2) 02-28-11 11:14:45 (E) (16396:17152) R3C-150607: |Data flow DF_Module4_ECC_To_BW
                                                           Execute ABAP program <C:/TEMP/ZECC_To_BW> error <    Open File Error -- 
    madap8004\tmp/SAPECC_To_BW_ZCUST_NAME.txt>.
    (12.2) 02-28-11 11:14:45 (E) (16772:15444) R3C-150607: |Data flow DF_Module4_ECC_To_BW
                                                           Execute ABAP program <C:/TEMP/ZECC_To_BW> error <    Open File Error -- 
    madap8004\tmp/SAPECC_To_BW_ZCUST_NAME.txt>.
    Regards,
    Sri
    Edited by: srilakshmi.ponnada on Feb 28, 2011 11:58 AM

    Hi,
    I am really not clear with your question. This is the first time i am executing the ABAP interface with FTP data transfer method. The madap8004 is the FTP server name. and the path is where the file whould be generated I belive. Is it the problem with any read/write permissions on the server?
    -Sri

  • Default due date , payment method when posting invoice with Special G/L

    Hi Gurus,
    I have a question is when I am posting an invocie to a vendor (FB60), Due On date, payment method  are automatically calculated based on the defaulted baseline date and the payment term in the vendor master. But when I am posting the invocie to the same vendor with Special G/L indicator, Due On date, payment method are not automatically calculated and system are expecting me to enter this date manually. Is there a way we can default this Due On date, payment thod based on payment term like it happens when posting to other invoices without Sp GL indicator ?
    Thanks
    Edited by: Ngoc Hoang on Nov 29, 2011 8:30 AM

    Dear Ngog,
    In general, special G/L transactions are used to map special processes
    to be stated separately in the balance sheet.So if you use special GL
    indicator, the fields relevant to payment terms (including baseline
    date) are not displayed. This is not controlled by field status.
    To make the fields You need ready for input for posting
    with special G/L indicator, the following Customizing setting is
    necessary:
    Financial Accounting -> Accounts Receivable and Accounts Payable
    ->Business Transactions -> Outgoing Payments -> Automatic Outgoing
    Payment-> Payment Method/Bank Selection -> Configure payment program ->
    All company codes -> double-click on corresponding company code -> under
    Vendor -> 'Sp. G/L transactions to be paid' you should enter the special
    G/L indicator A,B, etc.
    As explained in SAP note 4683, the only standard possibility to get the
    field payment terms on creating a posting with a special G/L indicator
    is by setting in the payment program configuration (trans. FBKP) for
    'All company codes' for customers/vendors 'Sp. G/L transaction to be
    paid'.
    Mauri

  • Class-data versus data and methods versus class-methods in OO ABAP

    Hi
    I was going thorugh following OO ABAP code.
    CLASS vessel DEFINITION.
      PUBLIC SECTION.
        METHODS: constructor,
                 drive IMPORTING speed_up TYPE i,
                 get_id RETURNING value(id) TYPE i.
        CLASS-METHODS: start,
                       objects,
                       inheritance,
                       interfaces,
                       events.
      PROTECTED SECTION.
        DATA: speed TYPE i,
              max_speed TYPE i VALUE 100.
      PRIVATE SECTION.
        CLASS-DATA object_count TYPE i.
        DATA id TYPE i.
    ENDCLASS.
    Whats is difference between methods and class-methods ?
    What is the difference between data and class-data ?

    Hi Rajesh,
    There are two types of componenets in a class
    1)Static components
    2) Instance components
    Instance components exist for every instance of the class, while static exist only once for any number of instances of the class.
    Components of the class are methods, attributes, events etc.
    static attributes are represented by CLASS-DATA and instance attributes are represented by DATA.
    static methods hence are done by CLASS-METHODS and can access only static attributes.
    Instance methods are done by METHODS and can access any attribute.
    For eg: supposing that in a class, there is a static attribute. Suppose after one instance is created, we are setting this static attribute value as 10. Now we are creating another instance of the same class. Now when you try to display the value of this attribute, it will be 10.ie. it needs to be initialized once and can be shared between instances.
    Just go through this document..You will get nice info from this.
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    If you want to go deeper, like object persistence and all, just refer this document.
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    Regards,
    SP.

  • Prefered data storage method for AIR apps?

    So I'm starting on my AIR application journey, in the end I would like to develop applications for Droid.  I'm used to developing for the web and mostly use MySQL, I've been looking at SQLite and XML as data repositories.  I feel that for most of my applications at this point XML files would most likely do the job, but is there a prefered data storage method for AIR applications?
    EDIT:  I've been looking around for a primer on Flash & SQLite interaction if someone could point me in the right direction it would be very thankful.
    Thank you much!

    For document management, I believe simple file/Directory would be sufficient. have files under a file server, with your app do the proper indexing, concurrency etc from that file server folder, which shall properly stores and index the documents.

  • Two Data transfer methods

    Hi Gurus
    Can any body tell if i will be asked like What are two data transfer methods? Which is the preferred method and why?
    thanks in advance
    murali

    Hi,
    The two data transfer methods are PSA and IDoc. In PSA, the number of fields is limited to a maximum of 255 when using TRFCs to transfer data. The length of the data record is limited to 1962 bytes when you use TRFCs.
    refer this help link
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/724d3caa70ea6fe10000000a114084/frameset.htm
    Regards,
    R.Ravi

  • Data Transfer methods

    Hi all,
    Can anyone please explain me what are synchronous and asychronous data transfer methods?
    Where are the settings to be done in R/3 to get data to BI ?
    Thanks in advance

    Data Transfer
    Definition
    Synchronous Data Transfer
    Data is transferred directly (simultaneously, synchronously) from program to program via CPI-C communication.
    Both communications partners must be available at the same time. Because the central SAP system in a typical SAP installation does not run round the clock, but the linked systems are frequently in operation 24 hours a day, asynchronous data transfer is necessary.
    Synchronous data transfer has the following disadvantages:
    Transfer is not possible is the partner system or the line is not available.
    A data backlog in the reciever system causes a data backlog in the sender system. Processing in the application is delayed.
    If a connection is broken, it may be necessary to perform a recovery in both systems.
    Asynchronous Data Transfer
    With asynchronous, or buffered, data transfer, data is temporarily stored in a sequential queue.
    Asynchronous transfer has the following advantages:
    Wait times in the sender system are avoided.
    A recovery is automatically performed in the sender system.
    Transfer need not be performed during online time. This avoids placing unnecessary load on the system and thus helps to reduce costs.
    The Queue Application Programming Interface (Q-API) is an SAP interface for asynchronous data transfer.
    Data is buffered sequentially and processed immediately or later by an asynchronously running process.
    One possible processing method is to send data to an external partner system via CPI-C. Data units that belong together can be stored in accordance with transaction and sent to a communications partner.
    Data is buffered in queues before it is transferred to the target system.
    In an R/3 System, the queues are stored in a relational database. All R/3 database systems are supported.

  • Unable to Data Collection Methods in CCMS/RZ20

    Hi gurus,
    There are lot of Montoring Objects for which there are no data collection methods already assigned which I am trying to do.
    I am able to do method assignments only to data analysis and auto reaction methods but not " data collection " which remains in display only mode even after using the edit option,
    Kindly let me know how to proceed.
                                                                                    Regards,
    Sandeep.

    Hi,
    in the past there was the option to change the data supplier. After several customers accidentally entered analysis or auto-reaction methods, the changed that to read-only, because its completely preconfigured - no need to change. And: you cannot know the name of a data supplier to be entered.
    NO METHOD does not mean: There is no data supplier. There are a lot of MTEs being refreshed with data, although there is NO METHOD being entered. These MTEs are refreshed by so called active data suppliers - they run independently from the CCMS Moni Infra.
    Example: Syslog. Data collection method: NO METHOD. Real data supplier: The SAP kernel, which reports into syslog (when there is something to be reported) and into CCMS in parallel. All changes to that MTE would cause a problem in data supplying.
    So please feel free to open a n SAP call, whenever an MTE in CCMS is white (no data), and you are interested in that information. Sometimes we disable data supplying by default - then we can tell you how to enable it.
    Best regards
    Christoph Nake
    PM CCMS

  • What data storage method should I use?

    I am currently writing a program and among other things need to store data.
    The program listens to two computers talking to each other in a known protocol (the program know what protocol it is,the user give the program the protocol structure ), if the packet that arrived to the program has unseen value in one or more of the fields
    it add it to the database.
    I am not sure what data storage method(such as sql server,xml etc.) to choose since I don't know whether the data stored in the database would be large or not, it depends on the computer's conversation
    Also I will need to be able to get all the data from the database with no trouble and might need to extract some data and not the other (for example all the packets with the value 24 in field x)
    By protocol I can't just give you one because the user of the program defines which protocol the conversation is in.
    By conversation I mean that two computers talk to each other it doesn't matter if a user operate the computers or not.
    The maximum number of entries in the database would be the number of variations that the packet in the certain protocol can be. I mean if the protocol is 8 bytes long the maximum number of entries would be 2^64 but if the header is longer the number goes up,
    but the number of entries could be less depending on the conversation and it is out of my control.
    The program will only store unique headers, I mean that the same combinations of values in the header won't be in the DB twice, the program store the header if it is unique and it isn't stored in the DB
    I thought of using a sql server such as mysql but I am not sure what data storage method would suit this situation the most?

    Since access to the data storage will not be concurrent and given only the "monitoring" program will write to it (according to your answers to some comments), my recommendation is:
    The safe way to go now seems to be a database, but you shouldn't be concerned right now with the administration of one
    Use SQLite locally
    in the machine the monitor runs in, and steer your effort towards improving and/or completing the protocol part
    If SQLlite database grows to large, rename it, archive it and create it again empty
    Later you can move to another database engine with no change of code ( if you do things the standard way ).

  • CCMS - Data collector method development

    We need to develop a monitoring object using DATA COLLECTOR METHOD for ABAP SHORT DUMPS in CCMS. The documentation says use the reference call function SALT_TOOL_REFERENCE_MODULE to develop a custom call function.
    Has anyone worked with the template? Can you share your template(source code) using the above call function?
    Thanks,

    Check the program RSDSSMPL
    - Cheers

  • BAdI UC_DATATRANSFER for BCS Mapping in "Load from Data Stream" method

    Hello Everyone,
    I need some help on finishing up the code for the UC_DATATRANSFER BAdI.
    I have looked up in the SDN and other places, but could not get comprehensive breakdown of documentation except for the "F1" documentation available on the BAdI.
    So, any help would be appreciated.
    The Steps so far completed,
    1. Have activated the BAdI and have created the filter value for the BAdI.
    2. After the BAdI has been activated, I was able to go into the MAP method and have written the logic for profit center derivation from consolidation hierarchy.
    The issue is there are four components for the Map method,
    IT_DATA_SOURCE
    IS_DATA_TARGET
    ES_DATA_TARGET
    ET_DATA_TARGET
    The data is available from Source system in the table IT_DATA_SOURCE.
    But this is not changeable as it is "Importing" type. Whereas the actual ET_DATA_TARGET which is passed over into FINALIZE method of the BAdI is not filled initially.
    When I try to do a MOVE-CORRESPONDING from the IT_DATA_TARGET into ET_DATA_TARGET I continuously am getting the short dumps as both the tables length is not the same.
    Did anyone else face the same issue as above when trying to do the BAdI implementation for Mapping.
    I will really appreciate if any one can provide me a sample code if possible.
    Let me know if you need additional information.
    Thanks
    Dharma.

    Hello,
    Thanks for looking into the question.
    I already had tried doing that, I get the Short dump stating the object tables are not convertible.
    When I looked into the table structures, I found out that the table structures "IS_DATA_TARGET", "ES_DATA_TARGET" & "ET_DATA_TARGET" belong to the same category in terms of these structures being flat structures or tables of length 484 as per the debugger.
    Whereas the structure "IT_DATA_SOURCE" has the length 404.
    Due to this reason when I say,
    ET_DATA_TARGET = IT_DATA_SOURCE, I keep getting the short dumps.
    Also, is your consolidation process legal or managerial.
    Our Consolidation process is legal and we have the Company and Profit Center fields assigned to the Consolidation Unit role in the Data Basis definition.
    Can you please let me know what is the structures length in your system.
    Thanks
    Dharma.

  • Data transfer method

    Hai gurus,
    I am new to Abap field.
    Kindly confirm whether i had to use LSMW or BDC for the following data transfer.
    Production and Planning:
    1) Bill of material creation-
    2) Recipe creation-
    3) Resource creation-
    Quality Control.
    1) Quality plan
    2) Quality sampling procedure.
    3) Quality info record.
    4) Master Inspection Characteristics.
    5) List of material with inspection status
    6) Inspection Method.
    7) Sampling plan
    waiting for the positive reply.
    Regards,
    sc

    Hi Sekar,
    If you have huge number of records & the process is onetime process, you can go for LSMW, no ABAP knowledge is required for this.
    Hope this helps.
    Rdgs,
    Sripal

  • How do I use oracle.jbo.domain.Date truncate() method?

    Hello -
    I want to get the equivalent of "trunc(SYSDATE)" in the form of an oracle.jbo.domain.Date instance.
    I think I can do this by getting the current date and truncating the time portion:
    Date myDate = Date.getCurrentDate();
    myDate.truncate(some_precision_string);
    Issue is: what do I use for the precision string? (Javadoc for class (and its parent) is not helpful...)
    Thanks,
    -- Scott

    Nevermind. Apparently these methods don't really exist.
    (Although documentation in 9.0.3.3 JDev under Help -> Help Topics -> Contents Tab -> Reference -> Business Components Oracle Domains (this one is a javadoc page) say that they do....)

  • ADF Mobile: WebService data control method call with array

    JDev 11.1.2.3
    ADF Mobile deployed to Android emulator
    Hello All,
    I am trying to invoke a method in my Web Service data control and get the following exception
    Caused by: ERROR [oracle.adfmf.framework.exception.AdfInvocationRuntimeException] - Cannot serialize: [I@1dbae822
            at oracle.adfmf.dc.ws.soap.SoapTransportLayer.invokeSoapRequest(Lorg/ksoap2/SoapEnvelope;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Loracle/adfmf/dc/ws/soap/SoapGenericType;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.JavaBeanOperation.execute(Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.WebServiceDataControlAdapter.invokeOperation(Ljava/util/Map;Loracle/adfmf/bindings/OperationBinding;)Z(Unknown Source)
            at oracle.adfmf.bindings.dbf.AmxMethodActionBinding.execute()Ljava/lang/Object;(Unknown Source) This method is an AppModule method exposed as a service interface and the parameter for this method is a List<oracle.jbo.domain.Number>. The schema definition for the input is as follows:
    <element name="acceptTask">
       <complexType>
         <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="taskID" type="decimal"/>
         </sequence>
       </complexType>
    </element>For the input to my binding, I have tried int[], Integer[] and List<Integer>. All of these result in similar errors.
    I have also tried invoking this through a regular ADF application and that works fine with an int[]. It looks like something specific to the ADF Mobile SOAP layer.
    Is this a bug or a restriction in the framework? Any workarounds that has worked for anyone?

    No luck. A WS DC method call with a simple parameter (java.lang.String or java.lang.Integer) works fine but I can't get it to work when there is an array input.
    I have tried WS methods with int arrays and simple string arrays without any luck. All of them result in a cannot serialize error.
    I can't figure out what I am doing wrong. Are there any working WS Datacontrol samples with array inputs?

Maybe you are looking for

  • Is there a CM SDK portlet for Portal 10g Release 2 ?

    I originally posted this under the content topic within the Oracle Portal forum and someone suggested that I post it here. Has anyone found or developed a portlet that can be used to access content stored in a CM SDK repository? We have a substantial

  • Discoverer and Standby Database Summary Tables

    Are there any known problems with Discoverer attempting to write to read-only Standby database summary tables? Has anyone been successful running Discoverer against a Standby database? Regards, Chad

  • My music app wont bring up music

    When I try to access the factory installed music app at the bottom of the touch, i hit it, it opens just a blank white screen, after 10 seconds or so it just goes back to the main itouch menu. I have not been able to access musis for about a week. An

  • MySQL DB open port 3306

    Hey, When I try to configure MySQL I get this error message: Error Nr. 1045 Access denied for user 'root'!'localhost' (using password:YES) ...I have a corporate firewall installed on my computer. However, even if I turn it off I still get the same me

  • Mac yes, hulu no, network is OK

    we watched a movie from my Mac, which was fine.  then we went to watch something from hulu.  nada. restared 3x. nada. tried other internet services, nada.  network showed fine with 5 bars. so I decided to "forget" the network and reconnect. that fixe