DATE FORMAT IN SAP

HI TO ALL ,
MY CLIENT IS AN US CLIENT AND WANT THE DEFAULT DATE AS
APR,20,2007 .THAT IS THEY WANT FIRST INITIAL THREE CHARACTERS FROM MONTH AND THEN DATE AND THEN YEAR.
I TRIED TO CHANGE THE USER SETTINGS BUT I AM ABLE TO GET ONLY
04/20/2007. CAN YOU HELP ME OUT TO GET THIS DATE FORMAT.
THANKS ,
LEKHRAM

Hi,
Check these.
Date = YYYYMMDD
Concatenate date4(2) ‘ /’ date6(2) ‘/’ date(4) into Date2.
or
data : l_date(10) type c .
concatenate sy-datum6(2) '/' sy-datum4(2) '/' sy-datum(4) into l_date.
write : l_date.
or
data :l_date(10) type c
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = SY-DATUM
IMPORTING
DATE_EXTERNAL = l_date.
this function module converts date from 20050601 to external format which is specified in user profile
or
PARAMETERS: P_DATE LIKE SY-DATUM.
DATA: T_MONTHS LIKE STANDARD TABLE OF T247 WITH HEADER LINE.
DATA: DATE LIKE AUSP-ATWRT.
CALL FUNCTION 'MONTH_NAMES_GET'
TABLES
MONTH_NAMES = T_MONTHS.
READ TABLE T_MONTHS WITH KEY MNR = P_DATE+4(2).
DATE(2) = P_DATE+6(2).
DATE+2(3) = T_MONTHS-KTX.
DATE5(2) = P_DATE2(2).
WRITE DATE.
Regards,
Laxmi

Similar Messages

  • Date format in SAP Knowledge management

    Hi Friends,
    Is there an option to change the Date format in SAP Knowledge management. I want to change the date format from MM/DD/YY to DD/MM/YY for the created and modified date for a document in KM.
    Found below information in help.sap. I searched in KM configuration -> Global Service for the setting. But I am not sure how or where to cheange it.
    Date and Time Specification for Properties - Knowledge Management - SAP Library
    Can you any one help me with this.
    Netweaver version is 7.00 SP24.
    Thank you in advance.
    Thank you
    ~Kamesh~

    Hello Kamesh,
    if you look at the SAP Help link, you see that it is a part of the "Property Metadata Service" (the point one level up). There you see, where you can find the service itself in the portal and if you look at the "Related Areas" you should find "Property Metadata" (at least I do in my 7.31 portal ).
    From there the link you found yourself should guide you well to do the changes you wish.
    Regards,
    Steffi.

  • How to convert date format into sap standard format?

    Hi All,
    In SAPUI5 screen i have one simple form in form i have date field which is format  (MM/DD/YYYY). but i am getting POST error while inserting the data in to sap table.
    I want convert date format in sap format (YYYY/MM/DD).
    One more issue, when i am fetching the data from sap table,but  the date display with time and time zone.
    eg. Sat Aug 02 2014 05:30:00 GMT+0530 (India Standard Time)
    I want to display only date.
    Thanks,
    Prashant.

    Now i am using <DatePicker id="Emp_fsdate" displayFormat="yyyy-MM-dd"/>
    I checked in console, but date is display like mm/dd/yy
    In my controller.js file i have written code
    OData.request
               requestUri: "http:sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata", 
               method: "GET",
               headers:
               "X-Requested-With": "XMLHttpRequest",
               "Content-Type": "application/atom+xml",
               "DataServiceVersion": "2.0",       
               "X-CSRF-Token":"Fetch"
           function (data, response){
            var header_xcsrf_token = response.headers['x-csrf-token'];
                       OData.request
                            requestUri:
                             "http://sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata", 
                            method: "POST",
                            headers:
                          "X-Requested-With": "XMLHttpRequest",                     
                            "Content-Type": "application/atom+xml",
                            "DataServiceVersion": "2.0",
                            "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",
                            "X-CSRF-Token": header_xcsrf_token
                            data:
                                   Empid:Emp_id,
                                   Empname:Emp_name,
                                   Start_Date:Emp_sdate,
    //                              End_Date:Emp_edate,
                                   Status:Emp_status,
                                   City:Emp_city,
                                   Location:Emp_location,
    and in my CREATE_ENTITY method
    method ES_SODATA_CREATE_ENTITY.
         DATA: ls_request_input_data TYPE zcl_zservice_final_mpc=>ts_et_sodata,
             ls_userinfo TYPE zsodata.
       DATA ls_temp TYPE sy-datum.
    * Read Request Data
       io_data_provider->read_entry_data( IMPORTING es_data = ls_request_input_data ).
    * Fill workarea to be inserted
       ls_userinfo-Empid   = ls_request_input_data-Empid.
       ls_userinfo-Empname   = ls_request_input_data-Empname.
       ls_userinfo-Start_Date   = ls_request_input_data-Start_Date.
       ls_userinfo-End_Date   = ls_request_input_data-End_Date.
       ls_userinfo-Status   = ls_request_input_data-Status.
       ls_userinfo-City   = ls_request_input_data-City.
       ls_userinfo-Location   = ls_request_input_data-Location.
    * Insert Data in table ZUSERINFO
       INSERT zsodata FROM ls_userinfo.
       IF sy-subrc = 0.
         er_entity = ls_request_input_data. "Fill Exporting parameter ER_ENTITY
       ENDIF.
       endmethod.
    But still i am getting an error
    POST http://sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata 500 (Internal Server Error)
    I am able to insert all field except date field. How to insert date field in sap table.

  • Date Format in SAP chart customizing - Gantt

    Hello Everybody,
    I have problems with date format in Gantt chart coding in
    ABAP using xml concatenate,
    when i am customizing the xml from chart designer.
    I want Time(X) axis  in Days but its showing in quarters or weeks.
    I also tried with LineFormat but i could not get control over it.
    can anybody please help me!!!
    here is my code:
    xml = '<?xml version="1.0" encoding="utf-8" ?><SAPChartCustomizing version="2.0">'.
      CONCATENATE xml '<GlobalSettings><Dimension>PseudoThree</Dimension>' INTO xml.
      CONCATENATE xml '  <TransparentColor>None</TransparentColor>' INTO xml.
      CONCATENATE xml '  <ColorPalette>Tradeshow</ColorPalette>' INTO xml.
      CONCATENATE xml '  <ColorOrder>Default</ColorOrder>' INTO xml.
      CONCATENATE xml '<Defaults><ChartType>Gantt</ChartType></Defaults></GlobalSettings>' INTO xml.
    CONCATENATE xml '<Values><Series><LineType>Direct</LineType><LineType1>Year</LineType1>
    <LineType2>Month</LineType2><LineType3>Day</LineType3><LineWidth>2</LineWidth>
    <MarkerShape>None</MarkerShape></Series></Values></SAPChartCustomizing>'
    INTO xml.
    *SEND CUSTOMIZING TO CHART ENGINE:
      lo_chart->set_customizing( data = xml ).
    Thanks in advance
    Bobby

    Hi Vijay,
    It's for ABAP only could you please post the solution.
    here i would like to share how i have given my series values:
    xml = '<?xml version="1.0"?>'.
      CONCATENATE xml '<ChartData>' INTO xml.
      CONCATENATE xml ' <Categories>' INTO xml.
      CONCATENATE xml '   <Category>Mat 1</Category>' INTO xml.
      CONCATENATE xml '   <Category>Mat 2</Category>' INTO xml.
      CONCATENATE xml '   <Category>Mat 3</Category>' INTO xml.
      CONCATENATE xml ' </Categories>' INTO xml.
      CONCATENATE xml ' <Series label="Op10" Customizing="Op10">' INTO xml.
      CONCATENATE xml '   <Point><Value type="time">20010101</Value>' INTO xml.
      CONCATENATE xml '   <Value type="time">20010115</Value>' INTO xml.
      CONCATENATE xml '   <Value type="time">20010120</Value>' INTO xml.
      CONCATENATE xml '   <Value type="time">20010130</Value></Point>' INTO xml.
      CONCATENATE xml '   <Point><Value type="time">20010101</Value>' INTO xml.
      CONCATENATE xml '   <Value type="time">20010125</Value></Point>' INTO xml.
      CONCATENATE xml ' </Series>' INTO xml.
    Thanks again.
    Bobby

  • Urgent ......regarding date format in SAP Script

    In my MAIN WINDOW  I have date fields like Date of Manifacture, created date and Expiry date.
    So, currently  I am using SET DATE MASK = 'YYYY-MM' and it is printing same format for all fields.
    But now my requirement is I want to show date for Expiry Date like 'YYYY-MM-DD'. For this I defined one temparary variable in the form like below
    DEFINE &outdate& = &mchar-vfdat&
    SET &outdate& MASK = 'YYYY-MM-DD'.
    but still it is showing format YYYY-MM...
    Plz help me how to print my desired date format...
    I am waiting for ur reply...
    Regards,
    Kumar

    Hi Kishore kumar,
    What you can do is befor printing the Expiry date set the date Mask as 'YYYY-MM-DD' and after printing your Expiry Date again set the DATE MASK to 'YYYY-MM'
    i.e.
    /: SET DATE MASK = 'YYYY-MM-DD'
       &mchar-vfdat&
    /: SET DATE MASK = 'YYYY-MM'
    Regards,
    Sunil

  • SAP BI DATE FORMAT

    Hello Experts,
    I have made a flat file extractor .  Flat file is coming from Another third part database.
    Date format in flat file is in form DD/MM/YYYY  .  but in BI we do not have date dormat DD/MM/YYYY.
    My Question is how we can add this date format in BI.
    I cannot change the flat file date format because this file comes daily and placed in AL11 automatically.
    its also very difficult first downlaod file from AL11 change the datw format in another form  then load the file.
    dates Format in SAP BI are available.
    Thanks,
    Mohit.

    Hi,
    You use routine to update DATE required format
    Data: w_day(2) type n,
             w_month(2) type n,
             w_year(4) type n.
    Clear: w_day,w_month, w_year.
    w_day = DATE+0(2).
    w_month = DATE+2(2).
    w_year = DATE+4(4).
    and then CONCATENATE required format.
    Examples
    1 CONCATENATE  w_month w_day w_year into REQ_DATE
    2 CONCATENATE  w_Year w_day w_month into REQ_DATE
    Write this routine in transformation for DATE infoobject.
    Thank you,
    Nanda

  • SAP data format

    Hi All,
    What is the standard data format in SAP?
    Is it in unicode, ascii, or binary?
    Can you also tell me the difference between the 3?
    More specifically, what is the data format for a document downloaded from SAP via GUI_DOWNLOAD?
    Thanks.

    Hi,
    I'd just like to say that FM GUI_DOWNLOAD can output file in many format.
    The output format is handled in FILETYPE parameter in the FM.
    By default, if the calling program doesn't pass any value to this FILETYPE parameter, the FM is producing output file in ASCII.
    FYI, these info can be found in the FM documentation.
    But for your convenience, hereby I attached the function module help, specific to this FILETYPE parameter:
    <<Removed by moderator>>
    Edited by: Matt on Feb 3, 2010 8:45 AM - please do not reproduce SAP Help.

  • Date format in BI query

    Hi,
    We need to display a single date format independent of date format of SAP User settings. For ex: as below.
    In a current query the  date, depending on the user's configuration could appear as:
    dd.mm.yyyy (English format)         or        yyyy-mm-dd (Swedish format)        or        mm.dd.yyyy (American format)
    I need to change some of the queries date format as below.
    a) Change all dates in query outputs and parameters to the format YYYYMMDD
    b) Change all months in query outputs and parameters to the format YYYYMM
    c) Change all financial periods in query outputs and parameters to the format YYYYPPP
    Thanks,
    Jitu

    Hi
    I think u have to use the ABAP code at the query level.
    First take the date in one variable zdate_var  and then if u want the below , then
    data : zdate_var_year type d,
               zdate_var_mm type d,
              zdate_var_dd type d.
    zdate_var_year = zdate_var(4).
    zdate_var_mm = zdate + 4(2).
    zdate_var_dd = zdate + 6(2).
    YYYYMM = zdate_var_year , zdate_var_mm.
    LIke this u can have ur o/p as per ur wish,
    Hope u got it ,
    Thanx & Regards,
    RaviChandra

  • Date format conversion issue in BW

    Hi Experts,
    I have 2 custom date fields for which I'm getting the values from oracle database through DB Connect in MM/DD/YYYY format (e.g values 10/20/2007 and 3/5/2007). But I want to convert this date format into SAP BW internal format (YYYYMMDD). I've defined the above 2 date fields in BW with a data type DATS (8 digits length) and wrote a code in the TRs as below. Both these fields are defined as a character with a length of 10 in the oracle system.
    data zresult(10) type C.
    data :  lv_day(2) type c,
    lv_month(2) type c,
    lv_year(4) type c.
    zresult =  tran_structure-spring_norm_date.
    lv_day = zresult+3(2).
    lv_month = zresult+0(2).
    lv_year = zresult+6(4).
    CONCATENATE lv_year lv_month lv_day into result.
    But still the data load is getting failed due to wrong date format and error in the routine. It says the value for the characteristic 0DATE doesn't have 8 spaces. Is there anything wrong with the routine?
    Could someone please share some inputs on this.
    Thanks,
    Krish

    Hi Narasimha,
    Thanks a lot for your prompt response and inputs. I used this code as below in my TR for the date field. But its still giving an error message saying "Value '20072109' of characteristic 0DATE is not possible and error when assigning SID". The value what I can see in the source system (oracle table) and in PSA for this record is '9/21/2007'. Am I still missing something here?
    DATA: get_date TYPE sy-datum,
    s1(2) TYPE c,
    s2(2) TYPE c,
    s3(4) TYPE c,
    lv_length TYPE i,
    lv_length1 TYPE i.
    SPLIT TRAN_STRUCTURE-FALL_NORM_DATE AT '/' INTO s1 s2 s3.
    lv_length = STRLEN( s1 ).
    IF lv_length = 1.
    CONCATENATE '0' s1 INTO s1.
    ENDIF.
    lv_length1 = STRLEN( s2 ).
    IF lv_length1 = 1.
    CONCATENATE '0' s2 INTO s2.
    ENDIF.
    CONCATENATE s3 s2 s1 INTO get_date.
    RESULT = get_date.
    Could you please help me on this?
    FYI, I have defined my date field in ODS with the data type DATS in order to display the output in YYYYMMDD format.
    Thanks,
    Krish

  • Problem in converting legacy date format

    Hello all,
    I am having a legacy file in which the date format is yyddd (  e.g  07129 ).
    Can any of you experts suggest me how can i convert these date format in SAP date format i.e YYYYMMDD.
    Please  suggest.
    Arun

    Hi, Arun
    May be the following code will help you in this way,
    data: date like sy-datum,
          year(4),
          month(2),
          day(2).
    year = '2006'.
    month = '12'.
    day = '01'.
    date+0(4) = year.
    date+4(2) = month.
    date+6(2) = day.
    Replay if any problem,
    Kind Regards,
    Faisal
    Edited by: Faisal Altaf on Jan 6, 2009 11:00 PM

  • String to DATS format conversion in XI.

    Hello Experts,
    I am using Powerbuilder system to get my Legacy data.In Powerbuilder Date needs to be supplied in STRING format.So I am giving String Format (dd-mmm-yyyy).
    However, at SAP end, Date needs to be in DATS format (Standard SAP yyyymmdd) .
    In Message Mapping I have given I/P structure as String and O/P structure as DATS format. When I test mapping in XI, it gives me Parseable error.
    Can anybody tell me, is there any way in XI to convert from String to DATS format so that I do not get Parseable error.
    Please Help!!!!

    Lokesh,
    With XI there is a date transformation function under date category there you need to provide source date format and target date format..
    I have used the same for fetching the data from oracle..and posting into SAP..it works fine..
    Try this ..this will solve ur problem....you just need to see what is the exact date format used by powerbuilder internally...
    Regards,

  • String to DATS format Conversion

    Hello Experts,
    I am using Powerbuilder system to get my Legacy data.In Powerbuilder Date needs to be supplied in STRING format.So I am giving String Format (dd-mmm-yyyy).
    However, at SAP end, Date needs to be in DATS format (Standard SAP yyyymmdd) .
    In Message Mapping I have given I/P structure as String and O/P structure as DATS format. When I test mapping in XI, it gives me Parseable error.
    Can anybody tell me, is there any way in XI to convert from String to DATS format so that I do not get Parseable error.
    Please Help!!!!

    Lokesh,
    With XI there is a date transformation function under date category there you need to provide source date format and target date format..
    I have used the same for fetching the data from oracle..and posting into SAP..it works fine..
    Try this ..this will solve ur problem....you just need to see what is the exact date format used by powerbuilder internally...
    Regards,

  • Upload data from excel( XLS/xs format) in SAP CRM

    Upload data from excel( XLS/xs format) in SAP CRM  7.0 as there is no *ALSM*EXCEL*ITAB* like FM there unlike ECC 6.0...?

    hello Buddy,
    plz go through below links
    http://wiki.scn.sap.com/wiki/display/CRM/CRM+Web+UI+-+Uploading+data+from+Excel+files
    http://scn.sap.com/docs/DOC-50732
    http://scn.sap.com/docs/DOC-31985
    Hope This will Help You...

  • Working with SAP Data Format yyyy.mm.dd in data services

    Hi,
    I had 2 questions about date formats coming from SAP to DS .
    1) I am trying to convert date fieild from SAP that is formated to yyyy.mm.dd to mm/dd/yyyy but I am not having any luck .. I am using the to_date function when I run this below I get null values in my template table . I think it has to do with me not stating my input date format but cannot seem to get the correct syntax's any ideas ?
    2) Does Data Services recognize dates which are formatted as  yyyy.mm.dd ?? When I put  I added a column to a template table and added the sys date command it returned the sys date as yyyy.mm.dd BUT when I try a fiscal_day function (which should brings back the number of days between the input (my SAP source date ) and the sys date which are formatted the same (yyyy.mm.dd) I get a format error  (input parameter 2009.03.10 is not valid) .  any ideas ?
    Thanks for your time,
    Brett

    Hello Brett
    to_date convert STRING to date based on input format.
    As i understand your source data not in string format.Is this correct?
    Use combination to_char->to_date for your transformation
    Regards
    Kanstantsin Chernichenka

  • Getting SAP user Date format

    Hi All,
    I have a webdynpro java application which i am using in ISA B2B. I need to show a date format of the backend user. Is there any way where i can fetch the SAP backend user date format in webdynpro java application using API. Kindly suggest me an idea on this?
    Thanks and Regards,
    Saravanan

    Hi Saravanan,
    You need to fetch data through RFC function module in webdynpro. You need costom build functiona module for user information.
    Refer to Linking [Remote Function Call to Web Dynpro - Model|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90]
    Regards
    Arun Jaiswal

Maybe you are looking for

  • Songs on your IPod can't be updated because the playlists don't exist?

    When I put my iPod in a window comes up saying, "Songs on the iPod "Alaina's iPod" cannot be updated because all of the playlists selected for updating do not exist" . All of my playlists are still there, and there are no songs on my iPod anymore...

  • File not found after socket transfer

    I have code written to upload a file to the server. the file uploads fine when i dont specify the dir. It uploads to the server current dir, but when i try to upload it to directory "tmp/uniqueDir/filename" that i create in my code i get filnotfound

  • Delete a line in a header in Pages

    Hello! I'm using Pages 5.5 (2109) on OSX Yosemite.  I've got a late year 2009 iMac 21". I have a resume document with a header that contains my name, address, phone, and email address.  My question is, how do I delete one of the phone numbers listed

  • [SOLVED] Help to compile qutim 0.2 please!

    Hello everybody, I'm trying to compile a package "qutim 0.2" messenger, the best lightweight linux gui messenger out there. Help needed as I can't compile it from AUR package and from source. here is what I get: [100%] Building CXX object CMakeFiles/

  • Help to optimize file load (clobs involved) via pl/sql

    Hello. I have written a procedure that loads a table from a file, this table has five clob columns and the file has 7024 rows (which means 5*7024 clobs are loaded in the table). Every record in the file ends in "\r\n\r\n" (I mean chr(13)||chr(10)||ch