How to write a PCR for this ?
Hi SAP-HR Experts .
Dear friends , My Company Requires a specific requiremnt that at the date of any Employee's
B'day his one day salary should get doubled and he is entitled to get one leave on his B'day .
I do not know how to write a PCR for this ?
May some Body tell me how to meet this requirement Please .
tell me please step by step how to go through ...
It will be great help for me .
Best regards : rajneeesh
I think you can make it with something like this:
Write a PCR in schema, you can call the rule with "actio";
000860 ACTIO 9BIR AR Birthday
Rule 9BIR
9BIR Rule for Birthday
NUM=FG C Set " F (fixed indicator for deadline calculation); G (Birth date from infotype 0002);C (complete months)
NUM/12 División " Number of completed months divided by 12
NUMV0O2L Off.Lng en arg.var. " the last two places of the number are entered in the variable argument.
" if the rest is not 00, there is nothing to do
00 " if the rest is 00
ZERO= N AmtNumRteZeit = 0 "
AMT= 1002 Set " wagetype of salary
AMT/TKDIVI División " divides the amount by Partial Period Parameter Whole Month
ADDWTI1002 Input table " accumulates into 1002
Example: an employee with birthday 01.01.1977 in IT0002
Payrroll in january 08
wagetype 1002 before rule 9BIR:
3 1002 Salario Bas01 30,33 30,00 909,90
Rule 9BIR
NUM=FG C Set; NUM= 372
NUM/12 ; 372/12= 31 rest=00
AMT=1002 ; AMT= 909,90
AMT/TKDIVI ; 909,90/31= 29,35
ADDWTI1002 ; 909,90 + 29,35= 939,25
wagetype 1002 before rule 9BIR:
3 1002 Salario Bas01 30,33 30,00 939,25
Hope this helps. Manuel
Similar Messages
-
How to write Select statement for this codition
I need to check whether SGTXT contains BELNR value.
SGTXT is a text field and It should be matched with BELNR
How to write select statement for this.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT should have the given BELNR Value.
Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.Hi,
data temp(12).
concatenate '%' belnr '%' into temp.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT like temp.
If belnr is having multiple values,just create a internal table as follows.
types : begin of ty,
belnr....
temp(12),
end of ty.
data itab_ type standard table of ty.
data wa type ty.
loop at itab into wa.
concatenate '%' wa-belnr '%' into wa-temp.
modify itab from wa index sy-tabix transporting temp.
endloop.
Change your select statement accordingly.
Kindly reward poits if it helps. -
How to write complex sql for this
Hi ALL,
I have a requirement like this
I have 5 tables which i have to join to get the result
but there no join column to 2 other table.
I want to get all the applications using cobal,running on UNIX.
How to write the query for this
1.APP
APP_i DESC
1 Accounts
2 Payments
3 order transfer
4 Order processing
2.Techgy
techid techdesc
1 cobal
2 Java
3.APP_Techgy
APP_I Techid
1 1
2 1
3 1
4 2
4.Pltfrm
pltfmid pltfrmdesc
1 Windows NT
2 UNIX
5.APP_Pltfrm
APP_I pltfrmid
1 1
2 1
3 2
4 2
ouput must be
APP_i Desc techDESC pltfrmdesc
3 ordertranfer Cobal UNIX
Thanks in advanceThis ('descr' in place of 'desc')?
SQL> select a.app_i, a.descr, t.techdesc, p.pltfrmdesc
from app_techgy atc,
app a,
techgy t,
app_pltfrm ap,
pltfrm p
where atc.techid = t.techid
and atc.app_i = a.app_i
and atc.app_i = ap.app_i
and ap.pltfrmid = p.pltfmid
order by a.app_i
APP_I DESCR TECHDESC PLTFRMDESC
1 accounts cobal windows nt
2 payments cobal windows nt
3 order transfer cobal unix
4 order processing java unix
4 rows selected. -
How should i write a pcr for this requirement?
Dear Friends,
Can any tell me whether we can write a pcr in such a way that if the person resigns the company on any day after 15th his full absence quota(for that month) should be accrued.
if yes can you tell me
what are the key decision parameters i have to use in writing the pcr.
waiting for you kind reply.
Regards,
Sai Prasad.Hai Prasad,
I can give you the logic, cannot write exact rules.
While genegarting absence quota
- Check for termination action using OUTWPMASSN
- If yes
Check for Action year current year. (HRS=YSAY, HRS?CURYR)
- If its equal to 0
Check for current month (HRS=YSAO, HRS?CURMO)
- if its equal to 0
check for current day (HRS=YSAA, HRS?CURDY
- if its >=15
generate quota
- Exit
(Note: for this logic you have to generate monthly quota)
With regards
Shyam V -
How to write select query for this
Hi,
I had a html form and in the for i had drop down box and it needs to select multiple values from the drop down box. When i select multiple values then i have to write the SQL select statement query .
When i try to write the select statement and trying to run i am getting error.
select * from Table
where emo_no = '1,2,3'
this is how i write query please suggest me how to write query for selecting multiple values from the drop down box.
Thanksselect * from Table
where emo_no in ( 1,2,3)
for integer values
select * from Table
where emo_no in ('1','2','3')
for characters
If we talk about large scale applications that may have millions of records, I would suggest this.
declare @t table (v int)
insert into t (v) values (1)
insert into t (v) valves (2)
insert into t (v) values (3)
select *
from table
inner join @t t on table.emo_no = t.v
Using "in" for a where clause is not so bad for filtering on a few values, but if you are filtering a lot of rows and a lot of values (emo_no) the performance degrades quickly for some reasons beyond the scope of this.
This is just one solution, I'll through this out as well, instead of an in memory (@t) table, doing a disk based temp table (#t) and creating an index on the column "v".
create table #t (v int)
insert into #t (v) values (1)
insert into #t (v) valves (2)
insert into #t (v) values (3)
create index ix_t on #t (v)
select *
from table
inner join #t t on table.emo_no = t.v
drop table #t
Pardon any syntax errors and careful using a drop statement.
Sometimes in memory tables work better than disk temp tables, it takes some testing and trial and error depending on your datasets to determine the best solution.
Probably too much info ;-)
Byron Mann
[email protected]
[email protected]
Software Architect
hosting.com | hostmysite.com
http://www.hostmysite.com/?utm_source=bb -
How to write a query for this output
I have a string ' if i know good acting , I am a hero '
now if 'hero' is present in the string it will return ' i am hero' else
'you are hero'
How to write a sql query to return the same .SQL> select (case
2 when '&a' like '%hero%' then 'I am hero'
3 ELSE 'u r hero'
4 end) output from dual;
Enter value for a: if i know good acting , I am a hero
old 2: when '&a' like '%hero%' then 'I am hero'
new 2: when 'if i know good acting , I am a hero ' like '%hero%' then 'I am hero'
OUTPUT
I am hero
SQL> /
Enter value for a: jkhkh
old 2: when '&a' like '%hero%' then 'I am hero'
new 2: when 'jkhkh' like '%hero%' then 'I am hero'
OUTPUT
u r hero
Hope this helps. -
How to write a class for this?
how do i write a different class for this? how do i implement the "a.add(b)"? it code is to test basic arithmetic operations.
System.out.print ("Arithmetic: enter two integer numbers: ");
Integer a = new Integer (Integer.parseInt(kbd.readLine()));
Integer b = new Integer (Integer.parseInt(kbd.readLine()));
System.out.println (a + "+" + b + "-" + b + "*" + a + "/" + a + "%" + b + " is: " + a.add(b).sub(b).mul(a).div(a).rem(b));public class arthOperation{
add()
sub()
sub(){
mul()
mul(){
div()
div(){
rem()
rem(){
is it write? -
How to write a query for this data??
In this table i have column dob which is DATE type,for example 12-jan-89 I want output like this
Year Day
12-jan-89 Thusrs_day
12-jan-90 Friday
upto
12-jan-14 sundaykrishnagopi wrote:
No not like that ,I want up to 2014 year
Ok, so lets say you have table like this
SQL> create table my_table(dob date);
Table created.
SQL> insert into my_table (dob) values( to_date('12-jan-1989', 'dd-mon-yyyy'));
1 row created.
SQL> commit;
Commit complete.
SQL> select * from my_table;
DOB
12-JAN-89
You can write a query like this
select dob + (level -1) dob
, to_char(dob + (level -1), 'fmDay') day_
from my_table
connect
by level <= (dob + interval '25' year) - dob + 1; -
How to write a DTD for this scenario?
hi,
consider the following xml
<set after = "A">
<item name="A" ></item>
<item name="B" ></item>
</set>
The DTD for the "item" element is
<!ATTLIST item name (A | B| C| D| E ) #REQUIRED >
The attribute "after" of "set" can hold a single valid name like
<set after = "A">
or
a collection of valid names seperated by coma like <set after = "A,B,C">
how to write DTD for the "after" attibute such that it will contain a single valid name or collection of names?
Regards,
Ajay.I could be wrong, but I'm pretty sure that DTD doesn't support that. You're probably better off declaring the name attribute to be of type PCDATA and tokenizing the value manually in code.
-
How to write SQL hints for this query?
The query is like:
select * from foo, t
where foo.name in
(select name from bar
where id in (
select id from car
where date < sysdate
and foo.a = t.b;
I want the innermostsubquery 'select id from car ...' to be executed first, and the subquery 'select name from bar ...' to be execute second, and the outermost query 'select * from foo,t ...' to be executed the last. How can I write the Oracle sql hints to force the order?
Thanks.user553560
You might be able to create a large set of hints to force the access path you want - but unless you really know what you are doing with hints, you may find that your solution is very unstable (it might be luck rather than correctness that let's it work to start with).
The difficulty in this query is the double layer of IN subqueries, so if you can rewrite the query, you might try manually unnesting as follows:
select
t1.*. t.*
from
select
distinct t2.name
from t2
where t2.id in (
select t3.id
from t3
where t3.dated < sysdate
) v,
t1,
t
where
t1.name = v.name
and t1.a = t.bDepending on your indexing and statistics, you may find that a simple /*+ unnest */ hint in the first subquery will be sufficient to do this for your. Again depending on the statistics you may find that you have to put extra hints into the above to make Oracle use the join method and indexes you think appropriate.
N.B. The first step (as others have noted) is to check that your statistics are good before you start manipulating the code or using hints.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
How to write a query for this situation
Hi ,
Can any one help me to write a query.I have a table with three columns like char_id_1,char_id_2,char_id_3,these data have to insert into some other table but in the target table the data should be comma seperated like (10,8,2),here blank space indicates null.In source table the columns are numbers,but in target table it is varchar2.
source table:
CHAR_ID_1 CHAR_ID_2 CHAR_ID_3
10 8 2
7 1 5
4 11
6 1
2 8
6 12 7
Target table:
CHAR_IDS
10,8,2
7,1,5
4,11
6,1
2,8
6,12,7I started doing it to_char way, and thought of some different version, and ended up with an ugly solution which works only if you have three columns. Thought of not posting, but posting it anyway:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> with t as(
2 select 10 c1,8 c2,2 c3 from dual union all
3 select 7,1,5 from dual union all
4 select 4,null,11 from dual union all
5 select null,6,1 from dual union all
6 select 2,8,null from dual union all
7 select null,8,null from dual union all
8 select null,null,10 from dual union all
9 select 2,null,null from dual union all
10 select null,null,null from dual union all
11 select 6,12,7 from dual )
12 --
13 select nvl2(c1,
14 c1 || nvl2(c2,',' || c2 || nvl2(c3,',' || c3,null),nvl2(c3,',' || c3,null)),
15 nvl2(c2, c2 || nvl2(c3,','|| c3,null),nvl2(c3,c3,null))) col_concat
16 from t;
COL_CONCAT
10,8,2
7,1,5
4,11
6,1
2,8
8
10
2
6,12,7
10 rows selected.
SQL> -
I have 2 tables
emp_master (emp_id, emp_name)
dept_master (dept_id, dept_name, emp_id (references emp_id in emp_master)Now there are 30 departments and each department can have maximum 5 employees.
Now I want a query that would list a department and all its employees in one line and if there are less than 5 employees it would show null for the rest of columns.
Dept_id emp_1 emp_2 emp_3 emp_4 emp_5
1 1 2 -- -- --
2 3 4 5 6 7
3 8 -- -- -- --
Please help me out
Thanks...One solution may be
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL>
SQL> SELECT e.department_id, e.employee_id
2 FROM employees e
3 WHERE e.department_id IN (10, 20, 40, 60, 90)
4 /
DEPARTMENT_ID EMPLOYEE_ID
90 100
90 101
90 102
60 103
60 104
60 105
60 106
60 107
10 200
20 201
20 202
40 203
12 rows selected
SQL>
SQL> SELECT ee.department_id, ee.emp_1, ee.emp_2, ee.emp_3, ee.emp_4, ee.emp_5
2 FROM (SELECT MAX(CASE
3 WHEN MOD(r, 5) = 1 THEN
4 e.employee_id
5 ELSE
6 NULL
7 END) emp_1,
8 MAX(CASE
9 WHEN MOD(r, 5) = 2 THEN
10 e.employee_id
11 ELSE
12 NULL
13 END) emp_2,
14 MAX(CASE
15 WHEN MOD(r, 5) = 3 THEN
16 e.employee_id
17 ELSE
18 NULL
19 END) emp_3,
20 MAX(CASE
21 WHEN MOD(r, 5) = 4 THEN
22 e.employee_id
23 ELSE
24 NULL
25 END) emp_4,
26 MAX(CASE
27 WHEN MOD(r, 5) = 0 THEN
28 e.employee_id
29 ELSE
30 NULL
31 END) emp_5,
32 e.department_id
33 FROM (SELECT row_number() over(PARTITION BY department_id ORDER BY employee_id) r,
34 department_id,
35 employee_id
36 FROM employees
37 WHERE department_id IN (10, 20, 40, 60, 90)) e
38 GROUP BY e.department_id) ee
39 /
DEPARTMENT_ID EMP_1 EMP_2 EMP_3 EMP_4 EMP_5
10 200
20 201 202
40 203
60 103 104 105 106 107
90 100 101 102
SQL> Regards... -
How to write Dynamic SQL for this SQL ?
EXECUTE IMMEDIATE 'select COUNT(*) from dba_Tab_privs@' ||db_link|| ' WHERE Grantee <> 'DELETE_CATALOG_ROLE'
AND Table_Name = 'LINK$'
AND Grantee NOT IN (SELECT Grantee
FROM dba_Role_privs
WHERE Granted_Role = 'DBA')' into i using x;Hi bapalu,
I take that x is the name of your db_link?
If so,
DECLARE
i NUMBER;
x dba_db_links.db_link%TYPE;
stmt VARCHAR2(255);
BEGIN
x := 'some_link';
stmt :=
'SELECT count(*)
FROM dba_tab_privs@:db_link
WHERE grantee <> ''DELETE_CATALOG_ROLE''
AND table_name = ''LINK$''
AND grantee NOT IN(SELECT grantee
FROM dba_role_privs
WHERE granted_role = ''DBA'')';
EXECUTE IMMEDIATE REPLACE(stmt, ':db_link', x)
INTO i;
dbms_output.put_line('The count: ' || i);
END;Also, I think this is maybe not what you want:
AND table_name = ''LINK$''Regards
Peter -
How to write a PCR to calculate 10% of Tax on Gross Amount
Hi Experts,
I have a scenario, which came from my client that, tax(10%) had to be calculated on gross amount, need to be deducted from the gross and should shown in deductions part of remuneration statement.
Do I need to write a PCR for this r not?
if PCR where i need to insert in Payroll Schema?
Do I need to create a Wage Type?
Can you please help me in, to do this process.
Awaiting for your valuable suggestions and replies.
regards,
K. SrinivasHi,
Please create a wage type ABCD by copying MVT1
write a PCR
/101
amt= /101
amt*.10
addwt ABCD
write one more PCR
HR-IN: Voluntary tax deduction
|- *
|-ABCD Over writeITax
|---ELIMI * Elim.time period ID
|---ADDWTE* RT Results table
|---AMT-S /460 Subtraction
|---ADDWT /460 OT Output table
|---RTE= /4ME Set
|---AMT=* Set
|---MULTI ARA Multipl.amt/no/rate
|---ZERO= R AmtNumRteTime = 0
|---AMT/100000 Division
|---SUBWT /4MT OT Output table
|---AMT-S /4ME Subtraction
|---ADDWT /4ME OT Output table
|---AMT=Z /4ME Set
|---AMT=* Set
|---RTE= /4MH Set
|---AMT=* Set
|---MULTI ARA Multipl.amt/no/rate
|---ZERO= R AmtNumRteTime = 0
|---AMT/100000 Division
|---SUBWT /4MT OT Output table
|---AMT-S /4MH Subtraction
|---ADDWT /4MH OT Output table
|---AMT=* Set
|---RTE= /4MS Set
|-" RTE?0 Comparison
|-" *
| |---AMT-S /4MT Subtraction
| |---ADDWT /4MT OT Output table
|-" >
|---MULTI ARA Multipl.amt/no/rate
|---ZERO= R AmtNumRteTime = 0
|---AMT/100000 Division
|---AMT-S /4MS Subtraction
|---ADDWT /4MS OT Output table
|---SUBWT /4MT OT Output table
|---AMT=* Set
|---ADDWT /4MT OT Output table
Insert this two PCR in subschema INN1 after INTAX function and endif, if line.
regards,
Balaji -
How to write sql query for counting pairs from below table??
Below is my SQL table structure.
user_id | Name | join_side | left_leg | right_leg | Parent_id
100001 Tinku Left 100002 100003 0
100002 Harish Left 100004 100005 100001
100003 Gorav Right 100006 100007 100001
100004 Prince Left 100008 NULL 100002
100005 Ajay Right NULL NULL 100002
100006 Simran Left NULL NULL 100003
100007 Raman Right NULL NULL 100003
100008 Vijay Left NULL NULL 100004
It is a binary table structure.. Every user has to add two per id under him, one is left_leg and second is right_leg... Parent_id is under which user current user is added.. Hope you will be understand..
I have to write sql query for counting pairs under id "100001". i know there will be important role of parent_id for counting pairs. * what is pair( suppose if any user contains both left_leg and right_leg id, then it is called pair.)
I know there are three pairs under id "100001" :-
1. 100002 and 100003
2. 100004 and 100005
3. 100006 and 100007
100008 will not be counted as pair because it does not have right leg..
But i dont know how to write sql query for this... Any help will be appreciated... This is my college project... And tommorow is the last date of submission.... Hope anyone will help me...
Suppose i have to count pair for id '100002'. Then there is only one pair under id '100002'. i.e 100004 and 100005Sounds like this to me
DECLARE @ID int
SET @ID = 100001--your passed value
SELECT left_leg,right_leg
FROM table
WHERE (user_id = @ID
OR parent_id = @ID)
AND left_leg IS NOT NULL
AND right_leg IS NOT NULL
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
Free goods - No stock for main item , GI happens for Free goods
Hello gurus, While creating sales order, main item is entered. The free goods gets created as sub item. Now even though there is no stock of main item, during creation of delivery, system brings the free goods in the delivery without getting the main
-
I set up an apple id for my 12 year old, a verfication email was sent, but google has locked her out because of age. How do I get the verfication email? Should each person in my house have their own apple id and password? Can each of the different I
-
Query report for account with the check no.
Hi, I need a report where it should have the posting date,duedate,check no.,row details which is available in JDT1,Debit amt,balance of a g/l account. I couldn't retrive the check no. for that account.. Kindly help me.
-
HT2905 How do i find duplicate items in iTunes 11?
Where did the remove duplicate from iTunes 10 go?
-
Dreamweaver 8 - Height of tables keeps changing when images added to another table
Greetings! i have a rather annoying problem on my hands with dreamweaver. Currently for a small college project i am being asked to design a small yet effective website to show students in the future what will be expected. So i've drawn up my templat