Function module to find time difference
Can any body help me to find the function module to find the time diff: between two times, time is in 24hrs
Hi again,
1. Difference is always returned in SECONDS.
2. use this code (just copy paste in new program)
REPORT abc.
data : t1 type sy-uzeit.
data : t2 type sy-uzeit.
DATA : DIFF TYPE I.
t1 = '090000'.
t2 = '100000'.
DIFF = T2 - T1.
WRITE :/ DIFF.
regards,
amit m.
Similar Messages
-
Function Module to find the Difference between two times.
Hi All,
Wud you plz let me know the Function Module to find the Difference between two times.
Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
Need Output in Hours:Minutes only . ( No seconds Needed )
Ex :
Input :
06:00 to 18:00 Output : 12:00
and 20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
Thanks,
N.L.Narayanacheck this .
data : p_timel like sy-uzeit,
p_timeh like sy-uzeit,
diff like sy-uzeit,
di(8) type c .
p_timel = '200000'.
p_timeh = '060000'.
diff = p_timeh - p_timel.
concatenate diff+0(2) ':' diff+2(2) into di.
write:/ di.
also check for this.
p_timel = '060000'.
p_timeh = '180000'.
see if this can be implemented in ur code .
or else u can try with Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
hope this helps regards,
vijay -
Function Module for Date/ Time difference in Working Days
Hi all,
Are there any function modules which will calculate the difference between a date AND time, but in working days?
I can use the FIMA_DAYS_BETWEEN_TWO_DATES_2 FM for the dates, but I need to include times in this as well.
This is for situations where the 'starting date' is a non-working day, and the 'end date' is a working day. In this situation I need to take all the hours and minutes into account, which happened on the working day. To give an example -
Start date: 04.07.2010 (Sunday - Non working day)
Start time: 21:12:36
End date: 05.07.2010 (Monday - Working day)
End time: 04:47:24
I realise there is a Time option in this function module, but when I test it, it doesn't seem to be returning the desired results (returns 0 for days and time). I am using '5' as the I_STGMETH and 'GB' as the I_SKALID.
I need a calcuation which will return the time, post midnight on the working day - in this example, 4 hours, 47 minutes (seconds are optional!).
Can anyone help? - can I still use FIMA_DAYS_BETWEEN_TWO_DATES_2 but with different parameters?
Thanks
Mischa
Edited by: Mischa Gulseven on Jul 20, 2010 10:40 AMHi,
Thanks but this FM does not seem to account for working days.
For example, if I use:
DATE1 04.07.2010 (non working day)
TIME1 04:00:00
DATE2 05.07.2010 (working day)
TIME2 21:00:00
It will give the following results -
DATEDIFF 1
TIMEDIFF 17
EARLIEST 1
I don't want to account for the non-working day so the result I actually want would be to calculate from midnight on 05.07 to 21:00 on 05.07 which should be 21 hours.
I suspect I probably need to include the STGMETH and the factory calendar somewhere in the FM?
Does such a FM exist, or could anyone help me with some ABAP for this?
thanks
Mischa -
Hi Experts,
Is there any function module to find time difference between two given time.
Thanks
RRtry using this 1.
SD_CALC_DURATION_FROM_DATETIME -
Function Module to find the Diff bt Two Times : O/p : Hours:Minutes only
Hi All,
Wud you plz let me know the Function Module to find the Difference between two times.
Input Time1( Hours:Minutes:Seconds) Time2 ( Hours:Minutes:Seconds)
Need Output in Hours:Minutes only . ( No seconds Needed )
Thanks,
N.L.NarayanaHi
Please use FM
<b>SD_DATETIME_DIFFERENCE</b> -
Function Module to find date by passign the Planning Calendar
Hi All,
Can you tell me is there any function Module to find date by passign the Planning Calendar?
The requirement is i have a planning calender assigned to the Material in the MRP2 view.
Example: Material XXXXXX is assigned a Planning Calendar Z01.
Z01 is defined such that Delivery is on Monday only. This calendar says that the material is received from the Vendor only on Mondays.
So whenever i punch a Sales Order for Material XXXXXX, a PR is automatically geenrated when saving the sales order and the calculation of Delivery dates is also happening at this level.
Basing on this PR a PO is raised to a Vendor for procuring the Material XXXXXX, now my problem is for example the PO is raised today (30.04.2008), but the Materail XXXXXX is available only on next monday in my plant (05.05.2008) basing on my Planning Calendar assigned in the Materail Master, so i have to inform this dealy to my customer at the time of punching the sales order.
So is there any function Module to find date by passign the Planning Calendar?
Thanks for your valuable inputs.
Regards,
SudarshanHi Jorge,
Thanks for your reply.
I am unable to open the Function module which you have mentioned below.
I am working on 4.6 c version of SAP.
Any ways i have found one function module which is useful to my requirement as stated below:
DATE_GET_PERIOD
Thanks and Regards,
Sudarshan -
Function module to get the difference of dates ..
Hi ,
Can somebody pls help me with the function module to get the difference between two dates?
I need to find the difference value and delete records if >1.
Thanks in advance.
Regds,
Leeza.Leeza,
When I tested the FM in my Program, it is <b>working</b>!!!!!
Note that the Two Input Dates are to be in the format of <b>DATS</b> type (Eg: <b>vimimv-dmibeg</b>).
U can want the Day which u have specified in the parameter I_DATUM_BIS (eg: 20050101) to be included for
the calculation , then put X in the parameter I_KZ_INCL_BIS.
Sample Code :
report zkam01.
data:
<b>sav_nlaufz like rf60v-nlaufz,
date1 type vimimv-dmibeg,
date2 type vimimv-dmiend.</b>
date1 = '20050101'.
date2 = '20051001'.
call function 'MONTHS_BETWEEN_TWO_DATES'
exporting
i_datum_von = date1
i_datum_bis = date2
i_kz_incl_bis = 'X'
importing
e_monate = sav_nlaufz.
write:
date1,
/ date2,
/ sav_nlaufz.
Please allot points if the problem is solved.
Thanks
Kam
Message was edited by: Kam -
Function Module to find the Last Execution date of Back ground Job
Hi,
Is there any function module to find the <b>last execution date of back ground job</b>.
So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
thanks in advance.
Eswar.Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.
-
Function Module to find out the release value in contract
Dear All,
I have to upload the contract with new accoutn assignment without changing the existing contract. For that i have to download all the existing contract data with value.
In that case i have some issues regarding the value.
For example : In the system old contract is created with value 1000 and the released value as 500.
In that case i have to uload the new contract with all the details of existing contract with value of 500 (1000-500=500).
How can i get the value (500) and from which table.Is there any functional module to find out the release value in contract.
Thanks and regads,
PM
Edited by: PM on Jan 21, 2010 8:40 AM
Edited by: PM on Jan 22, 2010 9:48 AMHi
You need to link the table VBFA and VBAK.
For a contract you can check all the subsequent document (which you can filter whether you want to see Order / delivery / Billing) in VBFA and then from there pick the subsequent document no. and then from VBAK you can pick the Net value of these subsequent documents, and so you will have both the values (value of Contract and value in subsequent document) and you can determine the balance value.
Regards
Amitesh Anand -
Function Module to find out detail of open period of Finance (FI)
Hi All,
I have a query that I want to know the existing function module to find out
FI period detail thatis detail of opened period in FI.
Regards,
RishiHi Rishi
Go to transaction SE37 and you can see the list of FM.
Thanks
Ashok
Assign points for useful answer -
Function module to find the Credit limit of a Customer based on Credit Area
hi Experts,
Is there any function module to find the Credit limit of a Customer based on Credit Area.
Regards,
Dheepakhi
try this:
select single * from KNKK INTO zzKNKK
where KUNNR = xkunnr and KKBER = xkkber.
credit limit: zzKNKK-KLIMK...
regards,darek -
Table Name or Function Module to find out all the Screens & Subscreens for
Hello Experts,
Table Name or Function Module to find out all the Screens & Subscreens for all T-Codes
Helpful Answer will b rewarded
Arif ShaikHi Balaji,
But TSTC only Gives the Program Name , T-Code and Screen but not all the Subscreen details
Any other which U know -
Function module to find both sold and ship to party
Is there any function module to find both sold-to-party and ship-to-party based on the sales Area.
That is if i give sales org , distribution channel , division as input . I must get Sold-to-party and Ship-to-party as output.
Regards,
S.VelsankarHi,
You can find sold to and ship to party customer from KNVP Table as below:-
SELECT KUNNR
FROM KNVP
INTO w_sold_to_party
WHERE VKORG = YOUR SALES ORG
AND VTWEG = dist channel
AND SPART = division
AND PARVW = 'SP'. "Sold to party depneds of how its configured in your system
Check TPAR table for description Sold to part and pass the PARVW value.
Similarly for ship to party
SELECT KUNNR
FROM KNVP
INTO w_sold_to_party
WHERE VKORG = YOUR SALES ORG
AND VTWEG = dist channel
AND SPART = division
AND PARVW = 'SH'. "Sold to party depneds of how its configured in your system
Regards,
Subhashini -
Function Module to find Fully Invoice PO
Hi all,
Is there any function module to find Fully Invoice PO?
Or
Tell me the tables from where can i get the details of Fully Invoiced PO?Hi,
My requirement is like this.
I have a company code on selection screen.
I have to take PO's based on company code.
Then I need to check whether that PO is fully invoiced or not.
Initial i was checking EKKO table. But I found that is not the correct table to find out. -
QM : is there any function module to find inspection lot characterstics
Hi All,
is there any function module to find all characterstics for an inspection lot.
i need exact data which qe51n transaction is fetching .
thanks in adv ,
VarmaHi uvs,
1. we can use the fm BAPI_INSPOPER_GETCHAR.
regards,
amit m.
Maybe you are looking for
-
How can I indent a paragraph WITHOUT creating spaces above or beneath?
I am using Dreamweaver CS3 on a G5 Macintosh running OS 10.5.5. I selected a new HTML document (Dreamweaver opened it as a CSS) and pasted text from a MS Word document. When I "Indent" ALL of the text everything stays the same except that it is ALL i
-
Report at Material level(for all the plants)?
Hi Experts, We have simple query which gives following output. &Plant&Material No&Creation Date&Issue date&QTY issued& P1 M1 01/10/2004 01/01/2005 10 P2 M1 01/12/2004 15/12/2004 20 P3 M1 01/0
-
The file download window keep coming up wheneven i...
Wheneven i opened the skype, it will come out a file download asking me to open or save the index.html or chatwidget.html and recently skype require me to change password so after that i cant log in anymore because everytime i go inside if i click ca
-
DV camera loses output connection
I recently upgraded to FCE 401, and since than when editing the image on my TV the screen picture keeps going off to black, and has to be brought back using the 'reset devices command'. I have a panasonic NS250B which is a few years old but worked pe
-
Why summaries are converted to character when exported to excel??
Hi, When i export my discoverer workbooks to excel, all of my summaries are converted to character type and excel gives error messages for each cell and asks to convert them back to numbers. Its not possible to do so because Discoverer plus is a clie