How to find Weekday or Holiday?
hi,
can any one tell me for a given date how to find whether it is a holiday or Weekday? are there any function modules avulable for this purpose? if any please let me know.
thanks,
Prasad.
Hi kvr,
1. DATE_CHECK_WORKINGDAY
This is one useful FM
2. Try this code (just copy paste)
IT DOES EXACTLY WHAT U REQUIRE.
REPORT abc.
data : num type i.
parameters : frdate type sy-datum default '20051216'.
parameters : todate type sy-datum default '20051221'.
perform getinfo using frdate todate changing num.
break-point.
*& Form getinfo
text
FORM getinfo USING fromdate todate CHANGING numofdays type i.
DATA : d TYPE sy-datum.
d = fromdate - 1.
DO.
d = d + 1.
IF d > todate.
EXIT.
endif.
CALL FUNCTION 'DATE_CHECK_WORKINGDAY'
EXPORTING
date = d
factory_calendar_id = '01'
message_type = 'I'
EXCEPTIONS
date_after_range = 1
date_before_range = 2
date_invalid = 3
date_no_workingday = 4
factory_calendar_not_found = 5
message_type_invalid = 6
OTHERS = 7.
IF sy-subrc = 0.
numofdays = numofdays + 1.
write :/ d.
ENDIF.
ENDDO.
ENDFORM. "getinfo
I hope it helps.
Regards,
Amit M.
Similar Messages
-
How to find out public holiday between two days.
Can any one let me know FM to find out public holiday between two days.
for example: i am entering two days as 10-08-2009 to 20-08-2009. We have 15-08-2009 is a holiday. FM should say that 15th August is the public holiday.
Regards,
Manoj.hi,
you can use HOLIDAY_CALENDAR_GET FM to get the holiday calendar id .
Then pass that calender id and date to FM HOLIDAY_CHECK_AND_GET_INFO.
Rgds.,
subash -
How to write a function to find weekday
my code as follow:
create or replace function getweekday(arg_day_IN VARCHAR2)
RETURN varchar2
IS
arg_day VARCHAR2(8) := arg_day_IN;
ls_week VARCHAR2(1);
ls_week_name VARCHAR2(4);
ls_date_1 date;
BEGIN
ls_date_1 := to_char(SUBSTR(arg_day, 5, 2) || '-' || SUBSTR(arg_day, 7, 2) )|| '-' ||SUBSTR(arg_day, 1, 4));
ls_week := OMWB_emulation.utilities.WEEKDAY(ls_date_1);
RETURN ls_week;
END getweekday;
There is a problem that when i execute this function it returns a error code ora-01843, it shows that it is not a valid month.
How can I know what is a valid month format? How to find the correct month format?
Which one is the valid date format- 02-01-2004 or 02-Jan-2004 or 02-January-2004.
Please help me to solve this problem. Thanks a lot.If the input parameter format is 'yyyymmdd' you can do:
create or replace function getweekday(arg_day_IN VARCHAR2)
RETURN varchar2
IS
ls_week VARCHAR2(1);
BEGIN
ls_week := to_char(to_date(agr_day_IN,'yyyymmdd'),'D');
RETURN ls_week;
END getweekday; -
How do I add US holidays to my calander?
HOw do I add US holidays to my iPhone 5?
From here:
To add holidays to your calendar:
On iCal's menu bar, choose Calendar / Find Subscriptions...
You will be taken to a page on Apple's website that lists shared calendars.
For US Holidays, click here. For other countries you will have to browse around some in the Alphabetical tab.
When you have found the calendar you want to add to iCal, click the Download button.
You will be taken back to iCal. Click Subscribe.
The next dialog shows options for the calendar. Two of them are important:
If you have MobileMe and share your calendar with iDevices and/or other Macs, change Location from On My Mac to Calendars. (If this doesn't work, make sure that Calendar sharing is checked on the MobileMe preference pane.)
Change Auto-refresh to Every week. This will make sure that you have holidays on your calendar for the years ahead.
Click OK. The holidays will be added to iCal.
In addition to holiday calendars, you can also subscribe to US sports team schedules, US movie releases, moon phases and several other types of calendar.
Also check out the iCalShare.com website that claims over 3500 shared calendars in 40 categories -
How do I add US holidays to my iCal?
How do I add US holidays to my iCal?
From here:
To add holidays to your calendar:
On iCal's menu bar, choose Calendar / Find Subscriptions...
You will be taken to a page on Apple's website that lists shared calendars.
For US Holidays, click here. For other countries you will have to browse around some in the Alphabetical tab.
When you have found the calendar you want to add to iCal, click the Download button.
You will be taken back to iCal. Click Subscribe.
The next dialog shows options for the calendar. Two of them are important:
If you have MobileMe and share your calendar with iDevices and/or other Macs, change Location from On My Mac to Calendars. (If this doesn't work, make sure that Calendar sharing is checked on the MobileMe preference pane.)
Change Auto-refresh to Every week. This will make sure that you have holidays on your calendar for the years ahead.
Click OK. The holidays will be added to iCal.
In addition to holiday calendars, you can also subscribe to US sports team schedules, US movie releases, moon phases and several other types of calendar.
Also check out the iCalShare.com website that claims over 3500 shared calendars in 40 categories -
How to find last date of month
Dear All,
Can anybody tell me how to find last date of month I need it to check some validations
helpful answer will definatly rewarded
Regards
ShashikantHi,
RP_LAST_DAY_OF_MONTHS Determine last day of month
HR-D: Payroll Germany code
RP_LAST_DAY_OF_MONTHS
HR-D: Determine last day of month
DATE_CONVERT_TO_FACTORYDATE
Returns factory calendar date for a date Calculates and returns factory calendar date for a date (if CorrectOption = '+');
Checks if the date is work day (if CorrectOption = '-').
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND. -
Discoverer Report: How to find Business Area name from Report Name.
Hi
I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
So I know Report name but don’t know which Business Area it belongs to.
How to find Business Area Name from Report Name?
Cheers
VijayHi,
There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
select distinct doc_name, obj.obj_name folder_name, bas.ba_name
from eul_us.eul5_documents doc
, eul_us.eul5_elem_xrefs xref
, eul_us.eul5_expressions exp
, eul_us.eul5_objs obj
, eul_us.eul5_ba_obj_links bol
, eul_us.eul5_bas bas
where xref.ex_from_id = doc.doc_id
and doc.doc_name = &your_report
and xref.ex_to_id = exp.exp_id
and obj.obj_id = exp.it_obj_id
and bol.bol_obj_id = obj.obj_id
and bas.ba_id = bol.bol_ba_id
Rod West -
How to find a specific word in sentence in each line?
How to find a specific word in sentence in each line and output will show start from the beginning from specific word plus with small description from each sentence?
For example: I need to find a "+Wednesday+" and "+Thursday+" word in each sentence by line by line from "myfile.txt".
Go ballet class next Wednesday.
On the Wednesday is going to swim class.
We have a meeting on Thursday at Panda's.
Then it will show the output:
Wednesday : ballet class
Wednesday : swim class
Thursday: meeting at Panda's
I am going to figure out in Java console to read from a file for specific word from each line and how to make it output in correct way. I know already to make input/file codes.I got it and understand much better. Thank you very much. There is a problem with it because I knew how to make
a specific word in sentence but how I should make Output for specific word and some words from sentence.
For example:
Input:
+"On Thursday go to ballet class"+
+"Swim class on Friday one time a month at 2 p.m."+
I used the codes for that:
class FindSchedule{
String firstline = "On Thursday go to ballet class ";
String secondline = "Swim class on Friday one time a month ";
FindSchedule(){
System.out.println(firstline + findTheIndex("Thursday", firstline));
System.out.println(secondline + findTheIndex("Friday", secondline));
public int findTheIndex(String word, String sentence){
int index;
index = sentence.indexOf(word);
return index;
public static void main (String[] args){
new FindSchedule();
}The output will be:
Thursday: ballet class
Friday: 14:00 swim class one time a week
Notice that time is changing in output complete different from input.
I need to find out how to extract some words from each sentence for output. Do you know how to do it? -
How to find out the user-exits?
hi.
how to find out the user-exits?
regards
eswar.Hi,
*& Report ZEXITFINDER
*report zexitfinder.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Regards -
How to find out the Transactions used per month & the USER who used that
Hi,
1)How to find out the Transactions used per month & the USER who used that?
2)and can i get the above same for minimum 20 month?
System : SAP- Enterprise Core Component.You can use my program...
*& Report Z_ABAP_TCODE_MONITOR
*****& Program Type : Report *
*****& Title : Z_ABAP_TCODE_MONITOR *
*****& Transaction code : ZTCODE_USAGE *
*****& Developer name : Shailendra Kolakaluri *
*****& Deveopment start date : 26 th Dec 2011 *
*****& Development Package : ZDEV *
*****& Transport No : DEVK906086 *
*****& Program Description : This program is to display
*List all tcodes executed during previous day.
*& Show the number of users executing tcodes
*& Modification history
REPORT Z_ABAP_TCODE_MONITOR.
*& List all tcodes executed during previous day.
*& Show the number of users executing tcodes
TYPE-POOLS : slis.
DATA: ind TYPE i,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
layout TYPE slis_layout_alv,
variant TYPE disvariant,
events TYPE slis_t_event WITH HEADER LINE,
heading TYPE slis_t_listheader WITH HEADER LINE.
*REPORT z_report_usage.
TYPES: BEGIN OF zusertcode,
date TYPE swncdatum,
user TYPE swncuname,
mandt TYPE swncmandt,
tcode TYPE swnctcode,
report TYPE swncreportname,
count TYPE swncshcnt,
END OF zusertcode.
*data : date type n.
DATA: t_usertcode TYPE swnc_t_aggusertcode,
wa_usertcode TYPE swncaggusertcode,
wa TYPE zusertcode,
t_ut TYPE STANDARD TABLE OF zusertcode,
wa_result TYPE zusertcode,
t_result TYPE STANDARD TABLE OF zusertcode.
PARAMETER: month TYPE dats DEFAULT sy-datum.
*PARAMETER: date TYPE dats.
*select-options : username for wa_usertcode-account.
START-OF-SELECTION.
PERFORM get_data.
PERFORM get_fieldcatalog.
PERFORM set_layout.
PERFORM get_event.
PERFORM get_comment.
PERFORM display_data.
FORM get_data .
*date = sy-datum - 2 .
After start-of-selection add this line (parameter Month required 01 as day).
concatenate month+0(6) '01' into month.
CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
EXPORTING
component = 'TOTAL'
ASSIGNDSYS = 'DEV'
periodtype = 'M'
periodstrt = month
TABLES
usertcode = t_usertcode
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
wa-date = month.
*wa-date = date.
wa-mandt = sy-mandt.
wa_usertcode-account = username.
LOOP AT t_usertcode INTO wa_usertcode.
wa-user = wa_usertcode-account.
IF wa_usertcode-entry_id+72 = 'T'.
wa-tcode = wa_usertcode-entry_id.
wa-report = space.
ELSE.
wa-tcode = space.
wa-report = wa_usertcode-entry_id.
ENDIF.
COLLECT wa INTO t_ut.
ENDLOOP.
SORT t_ut BY report ASCENDING.
CLEAR: wa, wa_result.
endform.
FORM get_fieldcatalog .
fcat-tabname = 't_ut'.
fcat-fieldname = 'DATE'.
fcat-seltext_l = 'Date'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'MANDT'.
fcat-seltext_l = 'Client'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'USER'.
fcat-seltext_l = 'User Name'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'TCODE'.
fcat-seltext_l = 'Transaction Code'.
fcat-key = 'X'.
APPEND fcat.
ENDFORM.
*& Form SET_LAYOUT
text
--> p1 text
<-- p2 text
FORM set_layout .
layout-colwidth_optimize = 'X'.
ENDFORM. " SET_LAYOUT
*& Form GET_EVENT
text
--> p1 text
<-- p2 text
*FORM get_event .
events-name = slis_ev_top_of_page.
events-form = 'TOP_OF_PAGE'.
APPEND events.
*ENDFORM. " GET_EVENT
**& Form GET_COMMENT
text
--> p1 text
<-- p2 text
*FORM get_comment .
DATA: text(30).
text = 'Billing Report'.
heading-typ = 'H'.
heading-info = text.
APPEND heading.
*ENDFORM. " GET_COMMENT
**& Form top_of_page
text
--> p1 text
<-- p2 text
*FORM top_of_page .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading[]
I_LOGO =
I_END_OF_LIST_GRID =
*ENDFORM. " top_of_page
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
sort t_ut[].
DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = layout
it_fieldcat = fcat[]
i_save = 'A'
is_variant = variant
it_events = events[]
TABLES
t_outtab = t_ut
EXCEPTIONS
program_error = 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.
ENDFORM. " DISPLAY_DATA -
How to find out the person who did a transport.
How to find out the person who did a transport.
There are 3 basis admins in our Org.
so is there a way of tracing out , who did what transport.
Regards,- Goto import Overview (STMS)
- Import Queue
- Select DEV req (goto Import History)
- Edit - Display More
It will show the user who did the transport
Rgds -
How to find out the user who has created a new field in the custom table.
How to find out the user details who has created a new field in the custom table.
Thanks,
JoanHi Jesudasan ,
You can know the user details with version management.Please find the
below procedure to know.
Go to table->Utilities tab->version->Version management->Compare the previous one .
Hope this solves the issue,Let me know if you have any issues.
Thanks,
Rajani -
How to find out web-inf path from the physical drive?
How to find out web-inf path from the physical drive?
I have some user profiles in web-inf directory.SO I want to know the path from root directory like
d:/program files/allaire/jrun/appname/web-inf/profiles/username like that.
Presently I am able to get the path upto the application directory and from that I am concatinationg web-inf/profiles/username .
But it is giving problems when it is deployed under unix or linux.Because web-inf there it treats as WEB_INF
SO I want to get the path of web-inf directory with out hard coding.
ThankuString path = application.getRealPath("/WEB-INF/profiles/username");
Note sure why you need this, but you don't need the real path to read the file - you can get an InputStream using the relative path. See ServletContext getResource() and getResourceAsStream(). -
How to find out appropriate user exit
Hi,
I want to know how to find out the user exit that matches to the requirement. Suppose for a material master program, there are so many include programs hence im unable to find call custer-function and even unable to debug an appropriate include. Please help me out how to learn user exits in a rightious way.
Thanks
BasuLook for program SAPICSS_ in your system and run it. This program can also be found under CMOD menu: Utilities -> SAP enhancements.
This will only give you the CMOD user exits.
There is a program someone made that searches for all sorts of user-exits (including BADI's etc.). I remember that it was posted on sapfans.com
Edited by: Maen Anachronos on Apr 6, 2009 3:22 PM -
How to find out FICO user exits that are used by User
How to find out the FICO user exits that are used by user.
Go to tcode CMOD. In the project field drop down your list there. Put a Z* there and run the list. These should be all the exits that are activated. Search for the ones that pertain to FI. You can also search by development class. You need a little ABAP knowledge to search easily. You get this by going to the tcode then to status then to the program then to the attributes. There you find the development class. Ie FBAS.
pls assign points if helpful as a way to say thanks.
Maybe you are looking for
-
Unable to capture video with MSI StarForce 822 GeForce 3!
I have a MSI StarForce 822 GeForce3 graphics card with 64 MB DDR SDRAM on it. I have VGA Out, as well as TV-out (AV), TV-out (S-video), and TV-in(?) (S-video). This brings me to two questions: First, I have NEVER been able to figure out how to use th
-
Ipod classic not connecting (not even showing 'do not disconnect' on Ipod)
Help! I have an ipod classic and, since I upgraded to itunes 9, I have noticed that, all of a sudden, my ipod won't connect at all. When I connect the USB cable to the ipod, the screen lights up but does not start charging nor does it show 'do not di
-
How to Fax with SAP R/3 4.7
Hey guys, i have to configure our SAP R/3 release 4.7 system, so that it is able to send a Fax. I have read about SAPconnect and the SMTP PlugIn from WebAS. I found many information about the configuration at the SAP system, but nothing about server
-
Template properties not reflecting in some iviews based on that template
Hi , I have a template which is based on a PAR .I have some drop down in this template which has three values .Now there are around 40 iviews which are based on this template in these iviews i get only 2 values in the drop down .Also in PAR i hav
-
Need the TABLE where SALES TEXT of a material is stored
I need the table where the sales text of a material is stored. This can be onbtained from MM03 --> SALES TEXT. Here we can pick it up from the language.I need the table where it is stored.