How to create a function to get the 16th of the current month and the 15th of the next month
I need to create a function to get the 16th of the current month and 15th of the next month to use it in the fast formula to calculate the sick leave.
Example:
If an employee takes a sick leave from 16 feb 2015 to 17 feb 2015 , I want it to affect march's payroll not February.
Please help and thanks in advance.
Below statement gives you the result. Use the concept and write your PL/SQL function.
select TO_DATE('16-'||TO_CHAR(SYSDATE, 'MON-RRRR')), TO_DATE('15-'||TO_CHAR(add_months(SYSDATE, 1), 'MON-RRRR')) from dual;
Or you can use same construct directly in the fast formula by changing syntax accordingly.
Regards,
Peddi.
Similar Messages
-
How to create a button to get the image form MPMoviePlayerController?
I get the workspaces from the samples.(iOS Developer Library).But I want to create a button on OverlayView in order to snapshot the movie being played. I want to know how to do it.Thanks a lot.
I don't have a clue what you're asking, but I suspect the question would be better directed to the Developers Forum, since you are referring to iOS Developer Library.
-
How to create a formula to get the month name based on userresponse
Hi,
I have created a report using E-Fashion - Actually i need a report like - For ex i need 4 months data from 12 months
My report should display the 4 months data along with starting & end month data in the next 2 columns
I have used the prompt to fetch the data & i have created a formula in the cloumn like below:
For the column haader i have given = Tonumber(userresponse("Enter start:")) - I am getting the Month number in the header But i need the month name in the header.Please guide me
Regards
KarthikaHi Ram,
Thanks for your Help.I tried in an another way like I created 2 Variable -
Start Date =UserResponse("Enter Month(Start):"
End Date = =UserResponse("Enter Month(End):"
I have created the column header for
start date:
=If([start Date] = "1";"January";If( [start Date] = "2"; "February";If([start Date] = "3";"March";If([start Date] = "4";"April";If([start Date] = "5";"May";If([start Date] = "6";"June";If([start Date] = "7";"July";If([start Date] = "8";"August";If([start Date] = "9";"September";If([start Date] = "10";"October";If([start Date] = "11";"November";If([start Date] = "12";"December"))))))))))))
End Date:
=If([End Date] = "1";"January";If( [End Date] = "2"; "February";If([End Date] = "3";"March";If([End Date] = "4";"April";If([End Date] = "5";"May";If([End Date] = "6";"June";If([End Date] = "7";"July";If([End Date] = "8";"August";If([End Date] = "9";"September";If([End Date] = "10";"October";If([End Date] = "11";"November";If([End Date] = "12";"December"))))))))))))
For the Datas in the column:
Start Date:
=[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(Start):")))
End Date:
=[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(End):")))
I got the Report format as i required
Thanks
Karthika -
How to create a function to finish the step add and decrease
Hi,sirs,
Can you give a simple example that uses a function to finish the step add and decrease? In fact, I am doing the following job:
I hope to use "while" frame to implement "step add":
when the "i" in the "while" frame increases, a value should be increased accordingly and then be output. However, after the value reached a Max value, it should be decreased while the "i" continues increasing.
Can you give me a simple program for that? I am using Labview 6.0.
Thanks a lot.Here's a slightly different version. In this one, you can specify the minimum and maximum count values, the starting count, start count direction, and even have different values for incrementing and decrementing. There is also a Pause and a reset control.
It reverses count direction when either the min or max count is reached.
It's saved in LabVIEW 6.0.2. This one is designed to be used as subVI.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Attachments:
Up-Down_Counter_(DBL).vi 61 KB -
Pls give some ideas? how to create a function.
Make an MS-Access form to accomplish:
Use a list box to display part-time employees and their assignments (SSN, Hours, FullName). Include only those who currently work a total of less than 40 hours/week.
SSN , Hours and FullName are stored in 2 different table.
I have no idea how to implement this function. How to create this function to get SSN, Hours and LastName and FirstName (RecordSet which will be used in application)?
Thanks alot!I'm afraid this is an Oracle forum, not an MS-Access forum.
;) -
How to get the spool id or how to create a spool id for the report .
hi,
how to get the spool id or how to create a spool id for the report .
this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
my requirement is to download a pdf file from the alv grid list.Hi Raghu,
Execute this program.
REPORT ZTEST_3318 .
tables: usr01.
perform send_report_to_spool.
*& Form send_report_to_spool
text
form send_report_to_spool.
data: loc_dest like pri_params-pdest,
wf_listname type char12,
wf_listtext like PRI_PARAMS-PRTXT,
wf_copies type i,
wf_days type i,
wf_PARAMS LIKE PRI_PARAMS, " achieving file PRI_PARAMS.
wf_valid type c.
clear : wf_listname , loc_dest , wf_listtext .
move: 'AP interface' to wf_listname .
move: 'AP interface' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
EXPORTING
destination = loc_dest
copies = 1
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = 1
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
endform. "send_report_to_spool
*& Form write_summary
text
--> p1 text
<-- p2 text
FORM write_summary .
data: begin of itab occurs 0,
matnr type matnr,
end of itab.
select matnr
from mara
into table itab
up to 10 rows.
loop at itab.
write: / itab-matnr.
endloop.
ENDFORM. " write_summary
This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
After that use that spool for your purpose.
If Useful award point -
seem to have lost my WiFi profile on my Macbook air. How do I create another profile, or get the old one back?
The profile will automatically be added back again when you connect to the network again. Here, I assume that you have a check mark in the box next to Remember networks this computer has joined.
If the box is checked and the network does not appear, then there may be an operating system problem with your Mac.
That would be beyond the scope of what we handle here with the AirPort Express, AirPort Extreme or Time Capsule, so you would want to post in the appropriate operating system community to follow up on that.
Mac OS & System Software -
How to Create a Functiona Query
Dear all,
Could any body detail me how to create a functional query. Please give me step by step procedure to create a query.
I would appreciate if you can give me a material with screen shots. Your help will be highly appreciated.
Thank you
Raghu RamHi Raghu,
Go through this document it may help you,
SAP Query
Step 1: Create User Group SQ03
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
a) In the User Group: Initial Screen -
Enter User Group Code (self named)
Click on Create
b) In the User Group (Code): Create or Change pop-up window -
Enter the User Group Description
Click on Save
c) In the Create Object Directory Entry pop-up window -
Ö Click on Local Object button
Ö The User Group Created is saved
Step 2: Create User Group SQ02
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Infosets
a) In the Infoset: Initial screen -
Ö Enter Infoset Code (self named)
Ö Click on Create button
b) In the Infoset: Title & Database Screen -
Ö Enter Description of Infoset in the Name field
Ö In the Data Source selection: Select appropriate Data Source by clicking
the radio button
· Source the data can either be multiple tables OR single table. There are 4
options for the user to select from
Ö Click on Continue (Enter)
Ö Selected Table gets displayed in the Infoset : Initial Screen
c) In the Infoset: Initial Screen -
Ö Click on Insert Table button
d) In the Add Table Screen -
Ö Enter the Table Name that is to be inserted
Ö Click Continue (Enter)
e) In the Infoset: Initial Screen -
Ö Click on Back button
f) In the Field Group Defaults pop-up Screen -
Ö Select Appropriate Field Group Option by clicking on the radio button
· there are 3 options to select from. User can select Empty Field Group
option and then select the data fields in the steps explained further.
Alternatively, User can select an option which clubs all the data fields
From all the tables selected
Ö Click Continue (Enter)
g) In the Change Infoset Screen -
· the left side lists the Tables that the user has selected in step b, c & d
· In the right side, system creates field groups, one for each table listed in the
left part. Initially, the Field Groups are empty
Ö In the Left Side, Click on the arror next to the table name and expand and
display all the data fields in the table
Ö Select a Data Field from the expanded Table view, which is to be added to
the Field Group on the right.
Ö Select a Field Group on the right side, in which Data Field selected above
has to be added
Ö Right click on the Data Field selected and click on Add Field to Field Group
Ö The selected Data Field gets added to the selected Field Group, which is
indicated by an arrow next to the Field Group.
Ö Carry out the steps above to add the required Data Fields to the respective
Field Groups
Ö After transferring Data Fields to Field Groups click on Generate button
h) In the Create Object Directory Entry Screen -
Ö Click on Logical Object button to generate the infoset
i) In the Change Infoset Screen -
Ö Click on the Back button
j) User is taken back to the Infoset: Initial Screen which displays the
created Infoset record.
Step 3: Assigning User Group to Infoset SQ03
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
a) In the User Groups: Initial screen -
Ö Enter the User Group for which Infoset is to be assigned
Ö Click on Assign Users & Infosets button
b) In the User Group: Assign Users Screen -
Ö Click on Assign Infosets button
c) In the next screen, select the Infoset, which needs to be attached to the
User Group selected
d) Click on the Back button
Step 4: Creating Query SQ00 & SQ01
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Queries
a) In the Query from User Group: Initial Screen -
Ö Click on Other User Groups button
Ö In the pop-up screen, User Groups, select the User Group for which the
Query has to created. The pop-up screen closes.
Ö Enter the Query Code in the Query field
Ö Click on Create button
b) A pop-up screen Restrict Value Range shows the list of Infosets assigned to
the User Group
Ö Select the Infoset for which Query has to be created
c) In the new screen Create Query: Title, Format -
Ö Enter the Description of the Query in the Title field
Ö Click on the Next Screen button
d) In the Select Field Group screen
Ö Select the Field Groups from which Data Fields have to be selected for the
Output
Ö Click on the Next Screen button
e) In the Select Field screen -
Ö Select the Data Fields, which should appear in the output
Ö Click on the Next Screen button
f) In the Screen Selection -
Ö Select the Data Fields for the selection criteria
Ö Enter the sequence in which the selected fields would appear in the input
screen of the query.
Ö Define if the selection criteria should be Single Value or Multiple Value Range
by clicking in the appropriate check boxes
Ö Click on the Basic List button
g) In the screen Query Layout Design -
Ö Select the Output Fields from the Data Fields section by clicking the
appropriate check box
Ö Change the sequence of Data Field columns if required
Ö Click on the Test button to test the query created
h) On the Test Query screen click Continue
i) In the Query screen -
Ö Enter the selection criteria
Ö Click on Execute button
j) Save the Query created
Step 5: Running the Query SQ00
a) In the Query From User Group: Initial screen
b) Click on Other User Groups button to select the User Group
c) In the pop-up screen User Groups select the User Group
d) System lists all the queries created for the User Group
e) Select the appropriate Query
f) Click on Execute button
g) User is taken to the Selection screen
h) Enter the selection criteria and click on Execute button
i) System runs the query and gives the output
Regards,
Murali. -
How can i stop user to get the same screen while entering same T code
hi experts,
how can i stop user to get the same screen while entering same T code (_Means i want user enter same t code but got different different screen how it is possible.)_
i want to know how can we set a authorization is such a manner ...
Through different different login id user got different different screen while entering same T-code.
for example if there is two functional login id mum & noida...
then user login through that and
enter any same functional tcode (for getting purchase order)
but get different different window...so how come it is possible.....
plz explain in brief
thanks in advance...plz do reply as soon as possibleFor a custom transaction this is easy, you need to ask your developers to be able to direct users to different screens based on the results of an authorisation check. You could have an auth field e.g. ZSCREEN which is checked in the program & decides what screen the user has access to.
For standard transactions, unless already coded, I would forget it & do what is recommended by Subramaniam and create transaction variants as required. Assign each variant to a custom t-code and users access it that way.
What I am interested is is why do you want to do this? -
How to get the Next Material Document Number
Hi,
Please let me know How to get the next Material Document Number using Functional Module,
Material Document number are in MSEG table.
Regards,
GaneshHi Ganesh,
if you want the next matrial number then first of all you have to define it as a number range in transaction snro.After creating the number range you have to define the interval.
now you can use your number range by calling the function module
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01' " here you have to give the number range number which you have defined in number range
object = 'ZPRODLOG' " Number Range
IMPORTING
number = wa_prod_error_log-seqnr " sequence number generated,in your case material number field
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
each and every time next number will get generated .
i hope this will help you.
Thanks,
Tanmaya -
How do I get the Next Button to appear on a form?
I have a form built off of a view. I pass a parameter from a report through a link to launch the form with the appropriate values. I would like user to then be able to navigate to the next set of information from the report without having to navigate all the way back to the report. I tried to activate the Next button with the onClick event and doNext function but the button never appears to the user. Thank you for any assistance!
Samuel,
The reason that you don't get the "Next" button is that the query that the form is running on returns only one row. Take a look at EXAMPLE_APP.EXAMPLE_SQL_REPORT and EXAMPLE_APP.EXAMPLE_FORM. You'll find that this form also does not show the "NEXT" button when called from the report. However if you edit the report and change the link parameter from empno to deptno, you'll find that the button comes up in the form.
I guess the best option you have is to create a custom button that simulates the functionality of the NEXT button i.e. have some logic to find out which empno must be the next one and then call the form like this :
l_empno := <whatever logic you have come up with>
l_url:=<portal_schema>.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=<module_id of the form>&p_arg_names=empno&p_arg_values='||l_empno||'&p_arg_names=_empno_cond&p_arg_values='||<portal_schema>wwv_standard_util.url_encode('=');
<portal_schema>.wwa_app_module.set_target(l_url, 'CALL');
Hope that helps,
Hsiu -
How to create a generalized version of the detailed polygons?
How to create a generalized version of the detailed polygons?
I have a table of detailed polygons (100+ vertices) and I want to get generalized version of these polygons.
For example, assume I have a polygon with 100 vertices. Distance between vertex n and n+1 is 1.0.
I want to get geometry (generalized polygon, line or point) where distance between vertex n and n+1 is 10.0 or more (I want vertices to be considered as one vertex if distance between them is less then 10.0).
Is it possible to create generalized version of polygons on the fly?
Any help is appreciated.
Thanks.Scenario A:
If all of your polygons have no interaction among them (No polygon shares any boundary with any other ones).
In this case you can use the sdo_util.simplify in 10g to reduce the vertices in your polygons which returns new polygon geometries on the fly.
If you found that simplify is not doing exactly what you want, you can always roll out your own implementation using PL/SQL or the new SDOAPI JGeoemtry class in Java. Both will give you complete access to the coordinate arrays in a polygon and update them back to the database after you have simplified them in your code.
Scenario B:
If your polygons share boundaries, then the above methods will not work since the simplification process may not preserve the topology among your polygons. What you can do then is to use the Java topo package to create a new topology by adding all of your polygons to to an empty topology (which you first create in the database and then load into memory using oracle.spatial.topo.TopoMap). Once you have a topology built in the memory, you can use methods such as oracle.spatial.topo.TopoMap.changeEdgeCoords() to simplify the edges of your polygons. You can then recreate the simplified polygons from the topology. This is just a rough guide; for more details you need to check out the java doc for the various packages mentioned above which are shipped with 10g spatial. -
How to create a temp table in the memory, not in disk?
in sql server, you can create a temp table in the memory instead of disk,
then you can do the insert, delete,update and select on it.
after finishing, just release it.
in Oracle,
I am wonderfing how to create a temp table in the memory, not in disk?
thanks,Thanks for rectifying me Howard.
I just read your full article on this too and its very well explained here:
http://www.dizwell.com/prod/node/357
Few lines from your article
It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
Thanks and Regards -
How to create some columns dynamically in the report designer depending upon the input selection
Post Author: ekta
CA Forum: Crystal Reports
how to create some columns dynamically in the report designer depending upon the input selection
how export this dynamic report in (pdf , xls,doc and rtf format)
report format is as below:
Element Codes
1
16
14
11
19
10
2
3
Employee nos.
Employee Name
Normal
RDO
WC
Breveavement
LWOP
Sick
Carers leave
AL
O/T 1.5
O/T 2.0
Total Hours
000004
PHAN , Hanh Huynh
68.40
7.60
76.00
000010
I , Jungue
68.40
7.60
2.00
5.00
76.00
000022
GARFINKEL , Hersch
66.30
7.60
2.10
76.00
In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
Can anybody help me how do I design such report....
ThanksHi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
Use SQL function to get the original order number using the invoice number
Hi All,
wondering is someone can help me with this challenge I am having? Often I need to return the original order numbers that created the resulting invoce. This is a relatively simple seriese of joins in a query but I am wanting to simplify it using a SQL function that can be referenced each time easily from with in the SELECT statement. the code i currently have is:
Use SQL function to get the original order number using the invoice number
CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
RETURNS nvarchar(200)
AS
BEGIN
DECLARE @OrderList nvarchar(200)
SET @OrderList = ''
SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
FROM OINV AS T1 INNER JOIN
INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
ORDR AS T6 ON T5.DocEntry = T6.DocEntry
WHERE T1.DocNum = @InvNum
RETURN @OrderList
END
it is run by the following query:
Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
From OINV T1
Where T1.DocNum = 'your invoice number here'
The issue is that this returns the order number for all of the lines in the invoice. Only want to see the summary of the order numbers. ie if 3 orders were used to make a 20 line inovice I only want to see the 3 order numbers retuned in the field.
If this was a simple reporting SELECT query I would use SELECT DISTINCT. But I can't do that.
Any ideas?
Thanks,
MikeThanks Gordon,
I am trying to get away from the massive table access list everytime I write a query where I need to access the original order number of the invoice. However, I have managed to solve my own problem with a GROUP BY statement!
Others may be interested so, the code is this:
CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
RETURNS nvarchar(200)
AS
BEGIN
DECLARE @OrderList nvarchar(200)
SET @OrderList = ''
SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
FROM OINV AS T1 INNER JOIN
INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
ORDR AS T6 ON T5.DocEntry = T6.DocEntry
WHERE T1.DocNum = @InvNum
GROUP BY T6.DocNum
RETURN @OrderList
END
and to call it use this:
Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
From OINV T1
Where T1.DocNum = 'your invoice number'
Maybe you are looking for
-
I created a text box by dragging the horizontal text tool. But when I start typing, the text aligns along the upper border of the box instead of being written inside of it. It looks like this. How can I fix this, so that the text is inserted inside t
-
Duplicated my entire music library by mistake
I don't know how I did it, but I somehow duplicated all my itunes songs in my library. I think I did something when I tried to put all my music into one library in Windows 7. How do I get rid of the duplicates without have to delete each song individ
-
How do i delete everything off of my macbook air?
How do I delete everything off of my MacBook Air?
-
Doing sendRedirect in doPost gives me the standard error
Hi, When I use response.sendRedirect within doPost I get the following error .. message HTTP method GET is not supported by this URLbut when I change that to doGet, the redirect works fine. How do I resolve this issue, as I need to use doPost in my a
-
Help for an intro in my video i'm creating in movie maker
Hi, can anyone help, I am wanting an intro for my video that I'm creating in windows movie maker and wondering if anyone can help??? It would be really helpful and much appreciated many thanks.