Function Module to get Date and Time out of Timestamp
Hi,
Source system timestamp field CREATED_TS of Type DEC-15
BW PSA data in format 20.140.707.105.948
In DSO, I have created two target InfoObjects; one for Date and one for Time.
In transformation from PSA to DSO, in field level routine, I want to split timestamp into Date and Time.
There is a function module CACS_TIMESTAMP_GET_DATE in source system but it is not available in BW. Another function module ADDR_CONVERT_TIMESTAMP_TO_DATE which is available in BW but returns only Date.
Does anyone know a function module in BW which takes Timestamp (PSA data in format 20.140.707.105.948) and returns Date and Time.
Much better would be a FM which take timestamp and also Timezone and returns Date and Time.
Thanks
Ahmad
Timestamp to date time conversion (with time zone) is built into ABAP. Why use a function module?
Read the ABAP help on CONVERT.
Similar Messages
-
Function module to convert date and time
Hi ,
Requirment is i want to create a file in the application server.So the file name should be in the following format.
0XX-XXXX-YYYYMMDDHH.format.
in this HH-hours.I need to take current date and time.so is there any function module to convert into this format.If it is not there how to create file name in this format.
Thanks,
MRREPORT ZTEST_CONV.
data: time_stamp TYPE timestampl.
GET TIME STAMP FIELD time_stamp.
You can try with GET TIME STAMP
But it will be in Different format. -
Function module for comparing dates and times
Hi,
I have a date and time stamp in one filed for example as below:
20070125183045
(the first 8 are date in YYYYMMDD format, the next 6 is time in HHMMSS format). Now I want to compare this value to another such value in terms of date and time. First I want to compare dates and then times. Do you know any function module that can serve this purpose?
Thanks very much!You can compare these using the function module DURATION_DETERMINE. This fuction will give you the difference, and it can be in a view different units, such as the difference in days, months, etc.
Funciton module takes in Start date and time and end date and time.
Regards,
RIch HEilman -
Function Module to get BEGIN and END date of a month?
Hello everybody,
Is there any function module to get BEGIN and END date of a month
GIVEN EITHER THE CURRENT SYSTEM DATE or MONTH?
Regards,
Sanghamitra.A.hi
CALL FUNCTION 'PA03_PERIODDATES_GET'
EXPORTING
f_abkrs = p_abkrs1
IMPORTING
f_permo = wf_permo
f_current_begda = wf_begda
f_current_endda = wf_endda
CHANGING
f_current_period = wf_pabrp
f_current_year = wf_pabrj
EXCEPTIONS
pcr_does_not_exist = 1
abkrs_does_not_exist = 2
period_does_not_exist = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this is the function module to get the first date and last date of a particular month
if u have any doubts ask
regads
karthik
reward points if useful -
Get date AND time to show in the menu bar
What is that technique to get date AND time to show in the menu bar please?
Install iStat Menu
System Preferences -> iStat Menus -> Date & Time
\[X] Show Date & Time
Format .... \[Edit]
(*) Custom (drag tokens to build a custom format)
Drag a light blue token into the edit line below the token selections. If you want a space a colon a dash, etc... just type that character(s) before after draging a token into place.
I created: 9:35 PM Sat 1-Aug-2009
You can create anything you like in any order you like.
The other alternative (if you happen to be a fan of the Unix strftime() function) would be to use the % formatting characters in the Expert time format expression box. Use the Terminal "man strftime" to find out all the available % formatting codes.
But I think the Custom Drag & Drop section is the easiest to use.
However, if this doesn't work for you, then I guess it is just a case of "Your Mileage May Vary". -
How do I get date and time component from a DATE object?
Hi All,
I need to get date and time separately from a DATE object, does
anyone know what function I should call? GetDate()? GetTime()?
I need this in a SELECT statement.
Thanks in advance and looking forward to your early reply.
Regards.
Gladywin
30/11/2001Hello,
See following SQL.
select to_char(sysdate,'dd/mm/rrrr') today_date,
to_char(sysdate,'hh24:mi') now_time
from dual
Adi -
Function module to get 'Date one year in the past' in APO
Hi,
Required function module to get date one year in the past in APO.
Thanks and regards,
M.R.Reddy.Hi Reddy,
Try these function modules
/SAPAPO/DATE
/SAPAPO/FISCAL_BDATE
/SAPPO/MAPI_MAP_CREATDATE
/SAPPO/MAPI_MAP_POSTDATE
/SAPAPO/LCP_CALC_DATE
/SAPAPO/VS_ORDER_GET_DATES
/SAPAPO/PERIOD_CONVERT_DATE
/SAPAPO/PERIOD_DATE_GET_FROMTO
/SAPAPO/PERIOD_GET_DATE_RANGE
/SAPAPO/PERIOD_GET_FOR_DATE
/SAPAPO/PERIOD_GET_FROM_TODATE
Regards
R. Senthil Mareeswaran. -
Required function module to get date one year in the past.
Hi,
Required function module to get date one year in the past.
Thanks and regards,
M.R.Reddy.Hello,
You can check this:
DATA:
V_DATE1 TYPE D,
V_DATE2 TYPE D.
V_DATE1 = SY-DATUM.
TRY.
CALL METHOD CL_HRPAD_DATE_COMPUTATIONS=>SUBTRACT_YEARS_FROM_DATE
EXPORTING
START_DATE = V_DATE1
YEARS = 1
RECEIVING
DATE = V_DATE2.
CATCH CX_HRPA_VIOLATED_POSTCONDITION .
ENDTRY.
WRITE:
/ V_DATE1, / V_DATE2.
Hope this helps.
Br,
Suhas -
Hi Gurus,
Issue: At present the Shipment Execution time is defaulting to Local Time but the requirement is to always populate Eastern Standard Time (EST). Right now if the shipment creates in US West coast, shipment Execution Date and Time populates with that local time but I need to populate EST.
I need a function module which will take input as 'Time Zone' like EST and return Date and Time (OR) the input could be 'Country' and State and return the local time.
Thanks in Advance.
Regards,
ananth.Here is your solution.
The function module IB_CONVERT_INTO_TIMESTAMP is used to convert the time to the GMT. The input parameters are DATE, TIME and the TIMEZONE(user's time zone, default value SY-ZONLO). The output parameter is the timestamp in GMT.
The function module IB_CONVERT_FROM_TIMESTAMP is used to get the time in required time zone. The input parameters for this are the timestamp obtained from the above function module and the time zone, to which the time needs to be converted.
The output parameters are the date, time in the required time zone. -
Getting Date and Time to Show in the Menu Bar
I have the OS setup to set the date and time automatically and the clock set to "show date and time in the Menu Bar. I have the international set up for the Day of Week, Month, Date and Year, but the menu bar only shows "Fri X:XX:XX PM" is there any way to get it to show me Fri May XX, 2008 X:XX:XX PM"?
Thanks for any help.
JohnI use iClock too. It is much more customizable than the Time & Date clock provided with the system. I have used it for several years and it has been very stable for a third-party application.
Although I have only used it for a couple of months, I also really like another third-party application you may like, to put weather conditions on the menubar called WeatherDock (freeware). It accesses Weather.com to provide the current temperature (of course) but it can include several other weather conditions (depending on how much space you have on your menubar). In addition to temperature, I have it show the weather condition (currently partly cloudy, typical in Houston), wind direction and speed (I ride a bike to the office and this tells me if I’ll be fighting it or aided), and humidity (also a Houston favorite). It will also speak the weather conditions when they change. -
Function module to get attribute and value from organisation model
Hi
I need a function module to get the attribute and its corresponding values set on the sales org stucture.The export parameter will be the Sales Org Id.
Please reply ASAP.
Edited by: prem kumar on Apr 16, 2009 9:37 AMHi Prem,
If it helps, we use FM RHGA_READ_ATTRIBUTES for that in version 4.
Kind regards,
Garcia -
Function Module to get date wise weekly offday of employee
Hi all,
Is there any standard function module which imports PERNR and DATE and returns the weekly off dates on the basis of
the work schedule (IT0007)?
If there is no such Fn Mo, please let me know what tables to look for to do this.
<<Text removed by moderator>>
For your information I have already found function module HRPERSONAL_WORK_SCHEDULE.But it is not returning for entire period (say 01.10.2010-31.10.2010)._
I have also found table relationship but it is not serving my purpose. Table T552A for monthly work schedule.
Thanks
SouravHi Anand,
Thanks for your reply.
This fn mo is returning the first three days(01.10.2010,02.10.2010,03.10.2010).
Rest days of the month (Oct 2010) are not coming.
According to display work schedule(transaction PT03) this func module is returning the first row bcoz first row contains
01.10.2010,02.10.2010,03.10.2010.
Here is my code snippet.
DATA: it_ptpsp TYPE STANDARD TABLE OF ptpsp INITIAL SIZE 0,
wa_ptpsp TYPE ptpsp.
DATA : gd_warning LIKE sy-subrc.
CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'
EXPORTING
pernr = '00100007'
begda = '20101001'
endda = '20101031'
* KUG =
* REFRESH = 'X'
* WORKING_HOURS = 'X'
* SWITCH_ACTIV =
* MODIFY_ENTRIES = 'X'
* I0001_I0007_ERROR = '0'
* READ_CLUSTER =
IMPORTING
warning_occured = gd_warning
TABLES
* I0000 =
* I0001 =
* I0002 =
* I0007 =
* I0049 =
* I2001 =
* I2002 =
* I2003 =
perws = it_ptpsp "Stores employees work schedule
* I0003 =
EXCEPTIONS
error_occured = 1
abort_occured = 2
OTHERS = 3. -
Getting date and time format through RIDC call
Hello,
i want to set date and time features to my document , how can i get the date and time from RIDC call
Regards
Mayur MitkariHello
I am performing this operation for getting date
username = Util.getInstance().getCurrentUser().toString();
IdcClient myIdcClient = Util.getInstance().getUCMConnection();
IdcContext myIdcContext = new IdcContext(username);
DataBinder binder = myIdcClient.createBinder();
binder.putLocal("IdcService", "COLLECTION_GET_COLLECTIONS");
binder.putLocal("hasCollectionID", "true");
binder.putLocal("dCollectionID", parentNodeID);
idcResponse = myIdcClient.sendRequest(myIdcContext, binder);
DataBinder serverBinder = idcResponse.getResponseAsBinder();
DataResultSet resultSet = serverBinder.getResultSet("COLLECTIONS");
folderInfoList = new ArrayList<String>();
resultInfoList = new ArrayList<List>();
Iterator itr = resultSet.getRows().iterator();
while (itr.hasNext())
String dCreateDate = dataObject.get("dCreateDate").toString();
but i am getting date in this format "2012-05-22 08:26:52Z"
if i want the date in local timezone what can i do
Regards
Mayur Mitkari -
Function that check if date and time between to dates and time
hi
is there any function that can check if date and time are between to dates and time ?
thanks
AmiYou can check using IF condition.
DATA : d1 TYPE datum, d2 TYPE datum, d3 TYPE datum.
IF d1 BETWEEN d2 AND d3.
d1 = d1 + 1.
ENDIF.
where d1, d2 and d3 are dates.
Similarly you can check for Time and Timestamp.
regards,
Jinson -
How to get Date and time of the server?
Hi, How can we get the date and time of the server while submitting a form using JSP? i.e I need the date and time , when the user is submittig a registration.
UmaUpon receiving your data in your servlet, you can do the following to get the date,
Calendar calendar = Calendar.getInstance();
int dd = calendar.get(Calendar.DAY_OF_MONTH);
int mm = calendar.get(Calendar.MONTH) + 1;
int yyyy = calendar.get(Calendar.YEAR);
String dd_mm_yyyy = dd + "/" + mm + "/" + yyyy;
To get the time, simply take a look at the Calendar API to get the corresponding field.
Maybe you are looking for
-
Wierd issue with Sound Blaster Z and Windows 8.1
I have just started having an issue with my sound card. For the past year it has been working perfectly fine with no issues. There have been no recent changes to the computer, but within the past week, if I am in the middle of a game or listening to
-
what are the xml methods in sap-xi
-
Hello, When I creating datatype for JDBC Receiver adapter, I need to have SQL statement as follows. Select * from employee_tbl where employee_id <b>in</b> (1, 8, 176, 49285, 935, 35478) Now my question is how do I define datatype to generate IN as pa
-
Net value on condition tab in a STO
Dear Guru's I have manage to get the valuation price displayed in the STO PO condition tab in condition P101. I've also managed to get the P101 condition to display in the net value field in the condition tab when pressing the "update price" button i
-
Processing in my application requires adding huge double values, for instance i am adding 36561584400629760 and 1152062986011661 and instead of getting 37713647386641421 I get 37713647386641424. Does somebody have a clue as to what the problem could