Conversion GregorianCalendar to Date

Could you please tell me, how to convert java.util.GregorianCalendar to java.util.data
Thanks

GregorianCalendar.getInstance().getTime()

Similar Messages

  • Conversion of a data object of type "C" to type "l" is not supported

    Experts:
    i have below code in my FM; defined as remote-enabled module.
    when i execute i get the error analysis as:
      You attempted to move one data object to another.
    This is not possible here because the conversion of a data object
      of type "C" to type "l" is not supported.
    This at the line    move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
    what are the steps to debug this?  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE any.
      data:st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      loop at T_UPDATE into wa_ZSTRESULT.
        assign wa_ZSTRESULT-field to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign wa_ZSTRESULT-VALUE to <FS2>.
        move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

    resolved using GET REFERENCE.. code looks as below:  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE DATA.
      TYPES t_dref TYPE REF TO DATA.
      DATA dref TYPE REF TO DATA.
      DATA: TT_UPDATE TYPE ZTYRESULT.
      FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
      data:   st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      TT_UPDATE = T_UPDATE.
      loop at TT_UPDATE assigning <WA_UPDATE>.
        assign <WA_UPDATE>-FIELD to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign <WA_UPDATE>-VALUE  to  <FS2>.
        GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
    *    MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
        <wwa_mdm_name_value_pair>-VALUE = dref.
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

  • Conversion of user date to system format

    i have a problem in conversion of user date.
    i use a function module in which the user have to give the date as input. he can give the date in any format like MM/DD/YYYY or DD.MM.YYYY etc . how to convert the given date into the system date.

    hi,
    use FM CONVERT_DATE_TO_INTERNAL
    cheers,
    sasi

  • Conversion puts all data in one column

    conversion puts all data in one column on excel

    ok i created my own function
    CREATE OR REPLACE TYPE t_varchar2_tab AS TABLE OF VARCHAR2(4000);
    CREATE OR REPLACE FUNCTION tab_to_string (p_varchar2_tab IN t_varchar2_tab,
    p_delimiter IN VARCHAR2 DEFAULT ',') RETURN VARCHAR2 IS
    l_string VARCHAR2(32767);
    BEGIN
    FOR i IN p_varchar2_tab.FIRST .. p_varchar2_tab.LAST LOOP
    IF i != p_varchar2_tab.FIRST THEN
    l_string := l_string || p_delimiter;
    END IF;
    l_string := l_string || p_varchar2_tab(i);
    END LOOP;
    RETURN l_string;
    END tab_to_string;

  • COnVERSION ROUTINE in data element level

    how can we write the CONVERSION ROUTINE in data element level for a field in data dictionary ?.........plz if possible give the EXAMPLE code also?

    Hi,
    You can refer to any of the standard conversion routines like ALPHA to get an idea. It is used in case of work order (AUFNR).
    Regards
    Sayee

  • Mass conversion in master data

    i want to change mass conversion in item data in r3 assuming no transaction is done till now.Suppose there are nf items and i want to make additional purchase unit say kg and ikg=---pieces that is base unit,no transaction is done till now in these codes.
    regards
    vikas

    Dear Peai,
    Since you working with 4.0B version ,I dont know what T code is used for that
    version to carryout mass change,but try with this.
    Goto T code SE93,give MM* in the input field and press F4,you will get list of T
    codes used for materials related.
    After getting the list of T codes,check whether any T codes suits for your
    requirement.
    Regards
    Mangal

  • Conversion Exit for data type FLTP

    Can someone suggest me a conversion Exit for data type FLTP?

    Hi,
    CHAR_FLTP_CONVERSION
    FLTP_CHAR_CONVERSION
    Have a look at the function module documentation.
    Regards,
    Reema.
    PS. pl. award points to useful answers.

  • Currency Conversion  on Piticular date

    Dear All,
                   I have a requirement where in I have to convert the  Purchase Document Currency into USD on  PO Creation Date.
    I did the Currency Conversion in the BEX by creating a currency translation type using the tcode RSCUR. Following are the   settings I have Used for Conversion
    1. Exchange rate type  M
    2  target currency         USD.
    3 Time reference          Current Date.
    Problem is the values are not getting converted to USD on PO Creation date.
    Moreover I wanted the records whose values are more than 50,000 USD.
    Question.
    How to convert the currency from one to another on a Particular date.
    Date for each record is different from one another as stated above.
    Help me out in this case.
    Thank You All
    Regards
    Mahesh

    Dear Raj,
    Thank you for the reply.
    Iam using BI 7 and the tcode rrc1 is obselete in this version.
    So I went to the new tcode rscur and created the currency translation type with the settings below.
    1. Exchange rate type M
    2 Target currency USD.
    3 Time reference Current Date.
    Used this translation key in the Key figure properties for currency translation.
    I went to the source system and on context menu I transferred global settings.
    Do I need to maintain currency keys and exchange rates manually even after transferring global settings?
    I have set in the time reference the PO creation date
    as Special Info Object. Will this work?
    Please let me know.
    Regards,
    Mahesh

  • Mapping conversion error in Dates

    Hello Experts,
    I am doing date conversion in Message Mapping from ECC date will come in YYYYMMDD for target i need to convert to YYYY_MM_DD for this i am using date transfer function.Issue is when date is coming like 20110908 it is converting properly like 2011-09-08
    But when from ECC date is coming like 00000000 then by default it converting to 0002-11-30 how this date is coming i am not understanding actually it should convert like 0000-00-00 .
    Please help me

    Hi,
    I am not quite sure why the conversion works like that. That said, the date 0000-00-00 is not a valid date, as that date has never existed. That may be the reason for the strange behaviour by PI.
    I suggest you add fixed-values conversion before your dateConvert step in the mapping. Here you check for date 00000000 and map it to e.g. 00010101.
    This should solve the issue, if you can live with a result date of 0001-01-01 in these cases. 
    Br,
    Kenneth

  • Conversion of Vendor data from legacy to SAP

    Hi Gurus,
    In our conversion process, we have converted our legacy system vendors to SAP. After our conversion, during our validation, we have pulled data from LFA1 (pulled Vendor and Account Group), LFB1 (Pulled Vendor and Previous Account Number - ALTKN) and LFM1 (Pulled Vendor and Currency Code)
    We have observed that the number of vendor records in the three tables are different. Here are the results
    1) LFA1 - Number of records - 51,158
    2) LFB1 - Number of records - 51,164
    3) LFM1 - Number of records - 51,147
    Can anybody guess why the number of vendor records are different in different tables?
    Thanks

    Hi,
    I think the explanation is not so difficult:
    LFA1 key fields: MANDT (client), LIFNR (vendorID)
    LFB1 key fields: MANDT, LIFNR, BURKS (company code)
    LFM1 key fields: MANDT, LIFNR, EKORG (purchasing organisation)
    Relations:
    LFA1 - LFB1 > 1 : N
    LFA1 - LFM1 > 1 : N
    You always have to have a record for a vendorIDin LFA1, but you not always have to have a record for this vendorID in LFB1 and LFM1 if the vendor is not extended for any company code or any purchasing organisation.
    If the vendor is extended for a company a company code or purchasing organisation, it means you have a relevant record for the vendorID in LFB1 and LFM1.
    You have  more records (51 164) in LFB1 than in LFA1 (51 158) because one vendorID (only one record in LFA1) may be extended for several (more than one) company codes. Each extension of this vendorID for company code has a separate record in LFB1. (LFA1 > vendorA; LFB1 > vendorA-company code1 + vendorA-company code2)
    Less record in LFM1 means that you have such vendorIDs (records) in LFA1 that are not extended for any purchasing organisation.
    BR
    Csaba
    Edited by: Csaba Szommer on Jul 27, 2008 2:02 PM

  • JMS Adapter - data conversion xml- structured data has extra characters

    Further to [Using MQ / JMS adapter with legacy system to talk to SAP;, I am using the Module tab on my receiver JMS Adapter to convert the xml payload to a structured format. It converts to the mainframe ebcdic code set.  I am on PI 7.11, and the MQ Series (which JMS interacts with) is 6.0.  The code I have is comparable to the wiki:[http://wiki.sdn.sap.com/wiki/display/XI/HowTo...ContentconversionmodulewithJ2EEJMS+adapter], i.e. the example at the very bottom of that article.
    The issue we are having is that an extra character gets inserted at the end of each structure (within the message), i.e. our message contains 4 structures, but when we view the structured data on our mainframe system (that arrives from PI), the entire message is shifted by 4 characters... by 1 after the end of each structure.  On the mainframe, this extra character appears as '.'. It must be an end-of-line or something...
    Has anyone had the same issue?  If so, were you able to resolve? I could probably set up my message data type to just be one big declare (thus eliminating the use of structures within it), but that is something I'd rather not do.
    We are in the process of reviewing Note 856346, #6 but not sure if it applies.
    Regards,
    Keith

    Hi,
    check localejbs/SAP XI JMS Adapter/ConvertMessageToBinary Local Enterprise Bean convert_XI2Bin
    this is not CallJMSService.
    And also check the receiver Structure, if it is falt structure its ok, else
    see the below link if it has the complex structure , how to handle..
    See the below links
    /people/alessandro.guarneri/blog/2006/01/04/jms-sender-adapter-handling-too-short-lines
    /people/william.li/blog/2006/11/13/how-to-use-saps-webas-j2ees-jms-queue-in-exchange-infrastructure
    content conversion
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    Regards
    Chilla..

  • Conversion of JDBC date to SQL date!!

    I've a date format of "Sun Dec 03 01:18:11 IST 2006" (JDBC format)
    and want to convert in into "2006/12/03 01:18:11:00" (SQL format).
    I've tried with SimpleDateFormat, but it didn't work. It is not accepting that value or format.
    Could anyone help me out!!!!

    JDBC format? SQL format? Huh?
    You need to be working with java.sql.Date and PreparedStatements to properly escape the Date in the database.
    As for the SimpleDateFormat, what does "not work" look like?
    package cruft;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    * DateFormatTest
    * @author md87020
    * @since Dec 20, 2006
    public class DateFormatTest
       public static void main(String[] args)
          DateFormat formatter = new SimpleDateFormat("E MMM dd hh:mm:ss z yyyy");
          for (int i = 0; i < args.length; ++i)
             try
                Date date = null;
                date = formatter.parse(args);
    System.out.println(date);
    catch (ParseException e)
    System.err.println("i: " + i + " value: " + args[i]);
    e.printStackTrace();
    This program appears to be doing some Locale conversions for me, and I don't have time to sort it out.
    But the idea is that you should be sending java.sql.Date to the database. Let the JDBC driver handle any SQL conversions for you with PreparedStatements.

  • Conversion of one date format to another format..

    Hi all..
    Please help me out in this...
    I want to convert the following ...
    Fri May 25 17:49:34 2007 to[b] 2007-05-25 17:49:34
    Help me out of this ...
    Thanks in Advance .....

    Fri May 25 17:49:34 2007 to[b] 2007-05-25 17:49:34 If what you have already is of type java.util.Date, then just use formatting:
    new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(yourDate)If it's a String only, then you need to do conversion:
    SimpleDateFormat from = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
    SimpleDateFormat to = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    to.format(from.parse(yourString))

  • Binary to Voltage Conversion of encoder data on cRio 9073 using FPGA

    I am using FPGA with a cRio 9073 to acquire torque and absolute quadrature encoder values. It says in the FPGA instructions that the documentation for the 9073 should include the binary to voltage conversion, but when I looked at the documentation, it wasn't there. Where can I find the conversion value or function to convert binary encoder data back to voltage? The encoder is hooked up to an analog converter and is acquired with a 9215 AI (+-10V differential). Thanks

    There are individual formulas for one or a group of modules.
    LabView examples path:
    LabVIEW 2010\examples\CompactRIO\Basic IO\Analog Raw Host Calibration\AI Raw Host Calibration
    LabView help topic 
    Converting and Calibrating CompactRIO Analog Input Values (FPGA
    Interface)
    Best regards
    Christian

  • LSMW or BDC?? for conversion of huge data

    Hi,
    I am presently doing some conversion programs... I have recently got the functional specification and the Technical specification for converting lot of data, about 12 GB of data which is in MS Access format and I have to load it to SAP.  Now the questions is, with the Tech Specs, it says that I have to use LSMW, but I was just wondering whether using LSMW would be appropirate for such a huge conversion??? or should I opt BDC for converting the data.
    Also the data is generally, contact masters, accounts masters and general info...
    If I use, LSMW, which method should I use to load to R/3 whether BAPI, IDOCs or Batch/direct???
    Please guide me through this conversion project??
    Waiting for your reply,
    Thanks,
       -Ken

    Hi Ken!
    If you really have all 4 options open (not every object is supported in all versions in SAP), choose the one you are most (or at least enough) familiar with.
    If you never have used IDOC, then it's maybe to much struggle and problem with the new technic.
    Otherwise my favorite order would be:
    1) IDOC
    2) BAPI (there some IDOCs calling the BAPI inside, so identical field handling...)
    3) Direct input
    4) Batch input
    4) is probably to slow for your volume (hey, 12GB is really a lot of data!).
    You have 4 files -> in the three 'lower'-level files key-links have to be provided (position info to header number X). If you split (and you have to split into 10, maybe 20 or more portions), then the pairs have still to be in one run - positions without header or header without positions won't help you much. You would need to make a complete run (read data, convert data, create BDC / IDOC / direct input) with a chunk - otherwise you still end up with to much memory consumption. But you could wait with execution of IDOC / BDC until all were created.
    There is just one chance, you don't need so much splitting: most of the Access fields are not needed, you can define just a few input fields for your creation. If you would use e.g. 5% of given data, then you end up just with 600MB, that would be OK.
    Conversion rules: there are just some general rules like 'add leading zeros', 'date in format YYYYMMDD'. Most conversion rules are customer specific. It's something like 'old company code 113 is in SAP 1013'. You need someone, how can tell how to create the objects in SAP. The next step is searching the way to get the necessary data out of current data structures. For these two steps no much general help is possible.
    Later you can code this rules into LSMW. Here some help can be given by the forum.
    Hope you have a better picture now.
    Regards,
    Christian

Maybe you are looking for

  • SSI do not appear in design view; CS4

    All of a sudden..  my ssi's do not appear in design view in CS4.  This is occuring in multiple web sites that prevously DID display SSI's Yes..  I do have  Preverances --> Invisible Elements -->  Server Sides Includes: Show contents of  include file

  • Problem With File Crashing in Photoshop CS5

    Hello I have a design file that  I just created in Photoshop CS5 last night. I went in to do some editing today and it keeps craahing within a few seconds of being opened. I have never had this problem with a file before and I need it to turn in at w

  • Loading external Font

    Hi, I'm working on big site localized in 27 Europeans countries. I'm looking a way to dynamically load font(different fonts for each country's) at runtime and set then in Textfield. Maybe something like set a kind of class "Title_font" as Textfield f

  • Xerox Printer prints, but out comes pages and pages of garbled information!

    My office Xerox (DocuPrint 210) printer isnt on the list. And i have downloaded the drivers and installed them but it doesnt show up on the list either. However before i upgraded to SL, the printer worked perfectly! i forgot what settings i put and w

  • OS X 10.4.6 seems to go back a day after reboot or shutdown

    Hello my macbook is acting very weird. If i restart it seems like it didn't shutdown correctly and everything i have done is lost. EX i receve emails i have allreaddy gotten + files i create are gone... also i tried to update my os to 10.4.7 but when