Function Module to find the Begin Date of the Year
Hi Experts,
Could you let me know if there is a FM to find the "Begin Date of the Year".
I appreciate your help.
Thanks a lot.
Hi,
Do you want the Begin date of the <b>current</b> year..Try this..
DATA: V_DATE TYPE SY-DATUM.
V_DATE = SY-DATUM.
V_DATE+4(4) = '0101'.
WRITE: / 'Beginning date of the year ' , v_date.
If you are mentioning about the Fiscal year..Then you can use the FM PERIOD_DAY_DETERMINE
Thanks,
Naren
Similar Messages
-
FUNCTION MODULE TO FIND LAST WORKING DY OF THE MONTH
FM to find the month end working day , if the month end falls on sunday or saturday or any other public holiday, it shud exclude that day and give me the last working day of that month.
Example: Octoberr 2004 month end falls on saturday and sunday. hence the last working day of the month will be 29 october 2004.
Pls provide me this FM , concerned points will eb awarded.
Rgds
Ramadahi,
kindly use this FM.
it will help u.
data : your_cal_id like t001w-fabkl,
max_date like sy-datum.
CALL FUNCTION 'LAST_FACTORYDATE_GET'
EXPORTING
factory_calendar_id = your_cal_id
IMPORTING
DATE = max_date
EXCEPTIONS
FACTORY_CALENDAR_NOT_FOUND = 1
FACTORY_CALENDAR_ID_MISSING = 2
CALENDAR_BUFFER_NOT_LOADABLE = 3
OTHERS = 4
rgds
anver
if hlped mark points -
Function module for finding differens in date
HI,
Friends can any one help me in finding out difference in date in select option .
i having problem when difference became negative .My requirement is to find out monthly report for a material . so i need to find out difference of date and need to add one month from the given date to require date.
Regards,
Mahendra.try the following fms
SD_DATETIME_DIFFERENCE
DAYS_BETWEEN_TWO_DATES
MONTHS_BETWEEN_TWO_DATES..
sample code is
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
<u><i><b>DATE DIFF W/O FM</b></i></u>
LOOP AT itab.
v_number_of_days = itab-date2 - itab-date1.
IF v_number_of_days > 1.
DELETE itab.
ELSE.
*-- Do something else.
ENDIF.
ENDLOOP.
regards
navjot
REWARD IF HELPFULL
Message was edited by:
navjot sharma -
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 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 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 out DATA BASE size, free space, used size
Is there any function module to find out DATA BASE , free space, used size
FM that gives all the details of the Date base
what data base, what is the size, free space, used space etc...
instead of writing case by case for each data base. based on CASE SY-DBSYS.Hi,
Check this FM:
DB02_ORA_SELECT_DBA_SEGMENT
alternatively u can check the tcode: DB02
thanks|
Mahesh -
Function Module to find the day
Hi,
I have a date S_DATE with me.
I need to find the day of that date.
I hope there is a function module for this.
Please reply me if you know the name of the Function Module to find the date.
Thanks in advance.Hi Rajesh,
Thanks for the reply. Your answer solved my problem. -
Function module to find out the changed values from tables
What is the standard function module to find out the changed values (the old & new values) from tables in SAP ?
Hi Harish,
Please elaborate your requirement...
Please have a look on CDHDR AND CDPOS tables... it contains changed data... but all chages are not being tracked using it..
Try Below FMs as well..
For Header Level...
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = cdhdr-utime
username = cdhdr-username
TABLES
i_cdhdr = icdhdr
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
For Item Level
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = icdhdr-changenr
IMPORTING
header = cdhdr
TABLES
editpos = icdshw
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
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 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 the path of application server
Hi can any one say me what is the function module to find the path of the application server
Hi ,
What i understand from ur question is that u need path for application server from the presentation layer i.e user screen.
u can achive the path this way
parameter: file type filename-fileintern.
when user presses F4 here, it will show the directories and path in the AL11.
I didnt find any FM which will get the path of Al11.
revrt back if any issues,
Regards,
Naveen -
Function module to find the attachment list for an accounting document?
Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
<b><REMOVED BY MODERATOR></b>
Thanks,
Ning
Message was edited by:
Alvaro Tejada GalindoHi,
i_object1-typeid = 'YARSATTA'. "<<< Give your Object id name
i_object1-catid = 'BO'.
i_object1-instid = i_yarsitem-docno. "<<<< Document Number
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
For link you need to check for table SRGBTBREL
and also please check class CL_GOS*
a®
Maybe you are looking for
-
Is there a way of putting firefox bookmarks folder on the dock
Is there a way of putting firefox bookmarks folder on the dock. not just one bookmark. i have done that. but i want all of them in stack or something.. similar to how windows did it in the start menu. its annoying that you have to open firefox first
-
Airport Extreme Connected to Internet, Yet No Longer to Powerbook G4
Airport was connected over a cable modem to the internet just fine until last night. It stopped working--no browser or email. I can still connect fine directly from the cable modem though. Internet Connect seems to think I have a strong connection, b
-
CAN I BURN MY MP3'S TO DVD & PLAY THEM ON CD MACHINE?
My question is : Can i back up my itunes library to a dvd and then play the whole library on the dvd on an ordinary cd player? I would like to back up my MP3 library to a portable & playable format & am hoping that dvd's are essentially very big cd's
-
I forgot my security questions and it will not let me reset them
I forgot my answers to my security questions and when I try to reset them it will not let me. It is telling me that I have to wait a week to get in touch with someone from apple to fix this problem.
-
Satellite M30 - How to replace hinges?
Hello! Has anyone replaced the hinges on Satellite M30? Any help or link to a manual would be helpful. Thnx!