Function Module to find difference of Fiscal Year period
Hi,
I have a requirement wherein a user enters 2 variables for Start and End Fiscal year period and I need to calculate the difference ( ie: I need to calculate the number of periods ).
I also need to pass the Fisc Year variant 'K4' as the Input parameter.
Any standard function module for it?
Rgds
Shyam
DATA: I_FYV1 LIKE T009-PERIV.
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = i_billno-bukrs
COMPANY_CODE = S_BUKRS-LOW
IMPORTING
FISCAL_YEAR_VARIANT = I_FYV1
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'ME_DETERMINE_GJAHR'
EXPORTING
I_BSTYP =
I_BEDAT = P_DATE
I_PERIV = I_FYV1
IMPORTING
E_H_MONAT =
E_H_GJAHR = GJAHR1
E_H_DATUM =
Similar Messages
-
Function module to find the previous tax year.
Hi,
Is there any fumction module to find the previous tax year if i give sy-datum.
Thanks & Regards,
Soumya.Hello,
check this
HR_GB_TAX_YEAR HR-GB: Calculate Tax Year
HR_GB_TAX_YEAR_DATES HR-GB: Determine the begin and end dates of the tax year
or TAXYEAR* f4 in the tcode se37.
Thank u,
santhosh -
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 get the Fiscal period using date
Hi Experts,
I am need of getting fiscal period and year from the given date. Is there any function module exists. Please advise.
Thanks in advance,
VivenDATA: I_FYV1 LIKE T009-PERIV.
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = i_billno-bukrs
COMPANY_CODE = S_BUKRS-LOW
IMPORTING
FISCAL_YEAR_VARIANT = I_FYV1
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'ME_DETERMINE_GJAHR'
EXPORTING
I_BSTYP =
I_BEDAT = P_DATE
I_PERIV = I_FYV1
IMPORTING
E_H_MONAT =
E_H_GJAHR = GJAHR1
E_H_DATUM = -
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 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. -
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 for the differences
Hi,
Can you pl let me know the function module to find the difference between two times.
<b>Input</b> time1(hours:minits:seconds) time2 (hours:minits:seconds)
Need <b>output</b> in hours:minits:seconds
Regards
Badariuse fm.
<b>'SD_DATETIME_DIFFERENCE'</b>
<b>or
SD_CALC_DURATION_FROM_DATETIME</b>
ex-
data : date1 type sy-datum,
date2 type sy-datum,
time1 type sy-uzeit,
time2 type sy-uzeit,
v_datediff type p,
v_timediff type p.
date1 = '20060101'.
date2 = sy-datum.
time1 = '010101'.
time2 = sy-uzeit.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
EXPORTING
DATE1 = DATE1
TIME1 = TIME1
DATE2 = DATE2
TIME2 = TIME2
IMPORTING
DATEDIFF = v_DATEDIFF TIMEDIFF = v_TIMEDIFF
*EARLIEST = EARLIEST
EXCEPTIONS
INVALID_DATETIME = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.ENDIF. -
Function Module to find 3 months Old Date
Is there any function module to find out 3 months old date for a todays date....Pls Help me......
Hi,
use function module : J_1H_CAL_DATE_IN_INTERVAL
use code as below :
data : date type sy-datum, out_date type sy-datum.
date = '20070702'.
CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'
EXPORTING
date = date
days = '00'
months = '03'
SIGNUM = '-'
years = '00'
IMPORTING
CALC_DATE = out_date.
write :/ out_date.
Sandeep Kaushik
Message was edited by:
Sandeep Kaushik -
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 -
Formula to calculate two fiscal year/period difference for non null quantit
We'd like to have a query result like the following:
Person -- Jan_2007 -- Feb_2007 -- Mar_2007 -- No. of Months
Tom --- 21 --- 54 --- 10 --- 2
John --- 0 --- 3 --- 15 --- 1
In the above query, the row is sales persons, the 1st three columns list the sales quantity by each sales person restricted by fiscal year/period and we would like to create 4th column "No. of Months" to calculate (will use formula) the month span (difference) for each sales person from his last sale activity (the last month he performed sales) and the 1st sale activity (the first month he performed sales) as listed in the above query result, e.g., Tom performed his first sales (sales quantity: 21) in the month of January of year 2007, and he performed his last sales (sales quantity of 10) in the month of March, 2007, then the "No. of Months" column value for Tom is 2. The calculation formula will be performed based on the last quantity value (> 0) to trace it's corresponding column fiscal year/period value (max of the fiscal year/period value with quantity value >0) and on the 1st quantity value (>0) to trace it's corresonding column fiscal year/period value (min of the fiscal year/period value with quantity value >0) and then do the subtraction between the max of the fiscal year/period value and the min one.
Would be appreciated if BEx experts here give the detailed steps on how to build up this formula to calculate the number of month difference and we will give you reward points!
Edited by: Kevin Smith on Mar 18, 2008 1:47 PMhi Danny,
I only gave an example of 3 columns, but actually, yes, the report can have more than 12 months, e.g. from Jan_1999, Feb_1999, ..., Mar_2011, Apr_2011.
In our simple example of 3 columns for the three consecutive months, if John had (3)(0)(15), then the No. of Months is 2, or the last month value he performed sales and 1st month he performed sales.
You said macro in Excel sheet? Not sure if macro will work on web since we will eventually run the reports on web browser, therefore we still prefer using Formula.
Any idea/solution?
Thanks! -
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 -
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 -
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
Maybe you are looking for
-
How to export an XML file from oracle database?
plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database? thanks in advance, Bala. Edited by: user3523292 on Nov 14, 2008 5:43 AM
-
Ipad won't automatically download iphone apps
I have an iphone and an ipad. Both sync with the same computer (an Imac). I usually use my iphone to download apps while the ipad is powered off. I want tthe iphone apps to automatically download to the ipad when the ipad is connected to my home w
-
AS2 Timeline Function Parameters
Hi all I am a newby to Flash AS2 and I am working on my first game. The majority of the game I have been able to put together from tutorials and a book I bought. The problem I have is that in the game the hero thows melons and when they hit an enemy
-
Can not restore/use my Touch
I have been having problems with my first gen 16GB Touch running 2.0, so I restored it to its original factory settings and let iTunes install the latest update. After finishing the updates, I keep getting a message: "iTunes has detected an iPod in r
-
The way to create a password protected realm with the Server Admin seems to involve the creation of a new user for the username of the realm (thus taking up one of my limited number of users on OS X Server!). All I really want to do is to protect a f