Payment Terms (90 days net + 2 % for each 30 days)
Hi
Is it possible to configure payment term with the below req.
90 days net + 2% for each 30 days
(please note that under payment term 1 and 2 is active and the third is not available)
Regards
Prasad
Make the following entries in Tcode OBB8
Baseline date
Fixed date = 31
Payment terms
Term 1
No of days = 90
Arvind
Similar Messages
-
Using pl/sql function for each day between two dates.
Hi,
create TABLE EMP(
ID_EMP NUMBER,
DT_FROM DATE,
DT_TO DATE,
CREATE_DATE DATE);
into EMP(ID_EMP, DT_FROM, DT_TO, CREATE_DATE)
Values(100, TO_DATE('07/01/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/30/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),TO_DATE('05/08/2009 14:11:21', 'MM/DD/YYYY HH24:MI:SS'));
I have a function called elig_pay_dates(date p_date), which returns the code for person payment eligibility for a particular date. For paid dates it's 'P' and for unpaid dates it's 'N'.
How can I check this function between two dates for each day. Example : 07/01/2008 to 04/30/2010.
By using this function with select I needs to display the dates when there is a change in status.
I am expecting data in following manner from above logic(this is example):
07/01/2008 --- 07/01/2009 ---'P'
07/02/2009 -- 07/25/2009 ----'N'
07/26/2009 -- 01/01/2010 ---'P'
01/02/2010 -- 01/13/2010 --'N'
01/14/2010 -- 01/18/2010 --'P'
01/19/2010 -- 04/30/2010 -- 'N'
I thought of looping for each day date but that seems to be expensive for online application. Is there any way that I can achieve this requirement with sql query ?
Thanks for your help,Certainly not the best way to code the requirement, but it does achieve the result you are looking for in a fairly quick time
create or replace
function test_ret_paid_unpaid (p_date in date)
return varchar2
is
v_ret varchar2(1);
begin
if ( (p_date between to_date('07/02/2009', 'MM/DD/YYYY') and to_date('07/25/2009', 'MM/DD/YYYY') ) or
(p_date between to_date('01/02/2010', 'MM/DD/YYYY') and to_date('01/13/2010', 'MM/DD/YYYY') ) or
(p_date between to_date('01/19/2010', 'MM/DD/YYYY') and to_date('04/30/2010', 'MM/DD/YYYY') )
then v_ret := 'N';
else
v_ret := 'Y';
end if;
return v_ret;
end;
Wrote file afiedt.buf
1 with get_paid_unpaid as
2 (
3 select dt_from start_date, dt_to end_date, dt_from + level - 1 curr_date, test_ret_paid_unpaid(dt_from + level - 1) paid_unpaid,
4 row_number() over (order by dt_from + level - 1) rn_start,
5 row_number() over (order by dt_from + level - 1 desc) rn_end
6 from test_emp
7 connect by level <= dt_to - dt_from + 1
8 ),
9 get_stop_date as
10 (
11 select start_date init_date, end_date, curr_date, paid_unpaid,
12 case when paid_unpaid != lag(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
13 then curr_date
14 else null
15 end start_date,
16 case when paid_unpaid != lead(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
17 then curr_date
18 else null
19 end stop_date
20 from get_paid_unpaid
21 )
22 select period, paid_unpaid
23 from (
24 select init_date, curr_date, start_date, end_date, stop_date,
25 case when paid_unpaid = lead(paid_unpaid) over (order by curr_date)
26 then nvl(start_date, init_date) || ' - ' || lead(stop_date, 1, end_date) over (order by curr_date)
27 else null
28 end period,
29 paid_unpaid
30 from get_stop_date
31 where stop_date is not null or start_date is not null
32 )
33* where period is not null
12:06:10 SQL> /
PERIOD PAID_UNPAID
01-JUL-08 - 01-JUL-09 Y
02-JUL-09 - 25-JUL-09 N
26-JUL-09 - 01-JAN-10 Y
02-JAN-10 - 13-JAN-10 N
14-JAN-10 - 18-JAN-10 Y
19-JAN-10 - 30-APR-10 N
6 rows selected.
Elapsed: 00:00:00.35 -
Want to create an add-in/webpart that can enable comments for each day in TimeSheet
Hi,
Want to create an add-in/webpart that can enable comments for each day in timesheet.
I need help how can I achieve that programmatically.
Regards,
MeharHi,
I already developed this kind of customization. The system offered the possibility to clic on a cell (Project Center, or My Task, or Timesheet), to input a value to store in a custom field, or in a database.
After clicking, a Popup with different textbox, etc...is displayed: it is possible to put values, comments, or whatever.
The benefits is that with this method, you don't have to redevelop the complete timesheet grid, which would be really complex.
Instead of that, you develop a part of javascript code, which displays a popup containing asp.net code. From the aspx page, you can make what you want: modifying the value of an task/assignment customfield for exemple.
To start, you can search for the Project Server 2010 SDK, Customize Project Center: it would be a good start point.
In case of big difficulty, ask again here, and we could get in touch to give more explanations.
Hope it helps,
Sylvain -
SQL help: return number of records for each day of last month.
Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
Thanks
RayPeter: thanks. That helps but not completely.
When I run the query to include only records for July using a statement such as following
============
SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
FROM EVENT_DATA ED
WHERE AGENT_ID = 160
AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
=============
I get the following
COUNT(ED.UTIMESTAMP) DATA
1 07/20
1 07/21
1 07/24
2 07/25
2 07/27
2 07/28
2 07/29
1 07/30
2 07/31
Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
Thanks
Ray -
I have several recuring alarms set up on iCal for each day of the week. In the past few weeks, an alarm will occasionaly notify me roughly 15 minutes to an hour and a half late. These daily alarms are identical and repeat every day and there seems to be no apparent pattern to why or when an alarm happens after the event is past.
I assume you meant iCal rather than iTunes? Yes, iCal the time zone is correct. The delayed alarms only happen sporadically. Since I posted this message, the problem stopped happening every day at the same time, but it still happens occasionally with no rhyme or reason as to when. It's gotten so that I can't depend on my iCal alarms anymore.
-
Hi
I have a query ,it gives total count of month
select count(*) from w_srvreq_d where status='Closed' and trunc(close_dt)>'01-may-2003' AND trunc(close_dt)<='31-may-2003'
COUNT(*)
82
I want count for each day
ex
date count
1/5/03 1
2/5/03 2
31/5/03 12
Regards
MohanHi
select count(*) from w_srvreq_d where status='Closed' and trunc(close_dt)>'01-may-2003' AND trunc(close_dt)<='31-may-2003'
COUNT(*)
82
My scnerio is want to join w_day_d and w_srvreq_d dimension and populate in to fact table .This below query populate the data in bt_fault_snapshot_f table,But i want count for each day
date count sr_cat_type_cd x_bt_current_queue
1/5/03 1 complaint unspecifie
2/5/03 2 Fault unspecified
SELECT dlr.sr_cat_type_cd,
dlr.x_bt_current_queue,dlr.x_bt_line_of_business ,
day.snapshot_date AS snapshot_date FROM
( SELECT w_day_d.day_dt AS snapshot_date
FROM (SELECT to_date(nvl(max(date_wid),'20030531'),'yyyymmdd')+1
AS snapshot_date
FROM bt_fault_snapshot_f) f ,
w_day_d , (SELECT CASE WHEN to_number(to_char(sysdate,'hh24')) <18 THEN trunc(sysdate - 1)
ELSE trunc(sysdate)
END AS lastdate FROM dual) currdate
WHERE w_day_d.day_dt >= f.snapshot_date
AND w_day_d.day_dt <= currdate.lastdate) day
, ( SELECT DISTINCT sr_cat_type_cd,x_bt_current_queue,x_bt_line_of_business
FROM w_srvreq_d) dlr
Regards
Mrao -
SAP has a table that maintains Stock on Hand for each day
SAP has a table that maintains Stock on Hand for each day
do u know which table is that
as i need to find data on stock on handHI Arunraj
if there is any specific time of the day that you want to extract the data, you can copy the data from the order series key figure (assuming that you want to extract the data from the order series keyfigure) to a time series key figure and extract the data from the time series key figure into a cube, etc.
I mention a specific time of the day because the stock situation is likely to change multiple times of the day due to stock movements on account of various reasons. Hence if you can establish a rule or a cut-off time of the stock situation, you can use the above route.
Hope this helps.
Thanks, Sandeep -
Select last value for each day from table
Hi!
I have a table that stores several measures for each day. I need two queries against this table and I am not quite sure how to write them.
The table stores these lines (sample data)
*DateCol1 Value Database*
27.09.2009 12:00:00 100 DB1
27.09.2009 20:00:00 150 DB1
27.09.2009 12:00:00 1000 DB2
27.09.2009 20:00:00 1100 DB2
28.09.2009 12:00:00 200 DB1
28.09.2009 20:00:00 220 DB1
28.09.2009 12:00:00 1500 DB2
28.09.2009 20:00:00 2000 DB2Explanation of data in the sample table:
We measure the size of the data files belonging to each database one or more times each day. The value column shows the size of the database files for each database at a given time (European format for date in DateCol1).
What I need:
Query 1:
The query should return the latest measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 150 DB1
27.09.2009 1100 DB2
28.09.2009 220 DB1
28.09.2009 2000 DB2Query 2:
The query should return the average measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 125 DB1
27.09.2009 1050 DB2
28.09.2009 210 DB1
28.09.2009 1750 DB2Could someone please help me to write these two queries?
Please let me know if you need further information.
Edited by: user7066552 on Sep 29, 2009 10:17 AM
Edited by: user7066552 on Sep 29, 2009 10:17 AMFor first query you can use analytic function and solve it.
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select dt, val, db
from (
select row_number() over(partition by trunc(dt), db order by dt) rno,
count(*) over(partition by trunc(dt), db) cnt,
t.*
from t)
where rno = cntFor second you can just group by
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select trunc(dt) dt, avg(val) val, db
from t
group by trunc(dt), db
order by trunc(dt) -
Opening stock of a material for each day for a month
Hi ,
Is it possible to get a opening stock of a material for each day for a month . For Example for the month of Feb From 01/02/2014 to 28/02/2014 i want to see the opening stock for each day .
Thanks .
Message was edited by: Jürgen LIf you give 01.02.2014 to 28.02.2014 in MB5B report, then you will got the opening stock for 01.02.2014 and closing stock for 28.02.2014...
the MB5B report designed like that
It will give you the opening stock for from date and closing stock for end date...
If you want to see the opening stock per each day, then you have to give the date each date in MB5B report...
Like as for opening for 02.02.2014, you have to enter the from date as 02.02.2014..
You can make your own report from copy the existing program RM07MLBD and you can add you additional code...
Make the program output will be for each day... -
I need a query that selects the amount of records for each day in a table.
I need a query that selects the amount of records for each
day in a table.
Eg the result would be:
date 1 14
date 2 3
etc
Any ideas?sorted:
SELECT count([commentID]),convert(varchar, dateAdded, 112)
FROM COMMENTSgroup by convert(varchar, dateAdded,
112) -
SQL Selecting the first and last entries for each day
Hello SQL experts,
I hope you can help with this.. I have a table (could have 1M or more rows in it) see structure below. I am looking to get the first and last date/times for each employee for each day. I also need the location GUID for the first read.
EmployeeGUID (uniqueidentifier datatype)
LocationGUID (uniqueidentifier datatype)
DateTime (DateTime datatype)
12345678-0000-0000-0000-000000000000
11111111-0000-0000-0000-000000000000
04/12/2014 07:00:01
12345678-0000-0000-0000-000000000000
22222222-0000-0000-0000-000000000000
04/12/2014 10:40:05
12345678-0000-0000-0000-000000000000
22222222-0000-0000-0000-000000000000
04/12/2014 17:04:02
44422222-0000-0000-0000-000000000000
22222222-0000-0000-0000-000000000000
04/14/2014 08:00:00
44422222-0000-0000-0000-000000000000
22222222-0000-0000-0000-000000000000
04/14/2014 14:00:03
44422222-0000-0000-0000-000000000000
33333333-0000-0000-0000-000000000000
04/15/2014 07:49:00
44422222-0000-0000-0000-000000000000
11111111-0000-0000-0000-000000000000
04/15/2014 09:00:01
This would be the ideal output (I can do without the TotalTimeInHours):
EmployeeGUID (uniqueidentifier datatype)
LocationGUID (uniqueidentifier datatype)
FirstRead (DateTime datatype)
LastRead (DateTime datatype)
TotalTimeInHours
12345678-0000-0000-0000-000000000000
11111111-0000-0000-0000-000000000000
04/12/2014 07:00:01
04/12/2014 17:04:02
Total in hours between the first and last read.
44422222-0000-0000-0000-000000000000
22222222-0000-0000-0000-000000000000
04/14/2014 08:00:00
04/14/2014 14:00:03
44422222-0000-0000-0000-000000000000
33333333-0000-0000-0000-000000000000
04/15/2014 07:49:00
04/15/2014 09:00:01
I would post what I have tried so far but I have been trying many different types of queries over the last few days. In short I need the employees first and last reads for each date. They could have many entries per date or just 1. I am certain that this
is a trivial thing for a SQL expert but not trivial for me :).
Thank you in advance!Thank you!
This is almost what I need. The LocationGUID has to be included in the output. When I include it, I have to put it in the Group By clause. When I do that the reads are based on the LocationGUID (see below).
** I added a few more data entries and included the LocationGUID in the output.
***** SQL ***********
CREATE TABLE test( EmployeeGUID uniqueidentifier, LocationGUID uniqueidentifier, DateTimeCol DateTime )Insert into test values
('12345678-0000-0000-0000-000000000000','11111111-0000-0000-0000-000000000000','04/12/2014 07:00:01')
,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 10:40:05')
,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 17:04:02')
,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/12/2014 19:00:00')
,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/14/2014 08:00:00')
,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/14/2014 14:04:03')
,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/15/2014 07:49:00')
,('44422222-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/15/2014 09:00:01')
,('12345678-0000-0000-0000-000000000000','11111111-0000-0000-0000-000000000000','04/13/2014 10:40:05')
,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/13/2014 17:04:02')
,('12345678-0000-0000-0000-000000000000','22222222-0000-0000-0000-000000000000','04/13/2014 19:00:00')
;with mycte as (
SELECT *, row_number() OVER(partition by EmployeeGUID, Cast(DateTimeCol as date) Order by DateTimeCol) rnASC,
row_number() OVER (partition by EmployeeGUID, Cast(DateTimeCol as date) Order by DateTimeCol DESC) rnDESC
FROM test)
Select EmployeeGUID ,Cast(DateTimeCol as date) dt,LocationGUID,
Max(Case when rnASC=1 Then DateTimeCol End) minDateTimeCol
,Max(Case when rnDESC=1 Then DateTimeCol End ) maxDateTimeCol
,Datediff(minute, Max(Case when rnASC=1 Then DateTimeCol End) ,Max(Case when rnDESC=1 Then DateTimeCol End ) )/60.0 TotalTimeInHours
from mycte
Group by EmployeeGUID, LocationGUID,Cast(DateTimeCol as date)
Order by dt,EmployeeGUID
drop TABLE test
**** OUTPUT **********
EmployeeGUID
dt
LocationGUID
minDateTimeCol
maxDateTimeCol
TotalTimeInHours
12345678-0000-0000-0000-000000000000
2014-04-12
11111111-0000-0000-0000-000000000000
2014-04-12 07:00:01.000
NULL
NULL
12345678-0000-0000-0000-000000000000
2014-04-12
22222222-0000-0000-0000-000000000000
NULL
2014-04-12 19:00:00.000
NULL
12345678-0000-0000-0000-000000000000
2014-04-13
11111111-0000-0000-0000-000000000000
2014-04-13 10:40:05.000
NULL
NULL
12345678-0000-0000-0000-000000000000
2014-04-13
22222222-0000-0000-0000-000000000000
NULL
2014-04-13 19:00:00.000
NULL
44422222-0000-0000-0000-000000000000
2014-04-14
22222222-0000-0000-0000-000000000000
2014-04-14 08:00:00.000
2014-04-14 14:04:03.000
6.066666 -
Get avg prices per day, in Excel, when each day has a different number of prices
There is an average formula 'average' that will do just this
Do you have an example spreadsheet?I have a CSV file that has dates and prices for a stock.
The stock is not traded every day (so dates are not contiguous). Each day may have only one price, or it may have several prices for the day (one price per trade).
I need to find the avg price per day for the stock for each day.
Is there a formula that I could use in Excel 2013 to get the avg price per day, considering this data set?
This topic first appeared in the Spiceworks Community -
Payment terms - check not to pay before 30 days ( MM )
Dear Team ,
When you create terms of payment , say if the payment terms is 30 days or more for payment to vendor......how to make sure that the vendor will not be paid within 30 days ?
Thanks ,
MikeDuring FI payment via F110 the system will allow only the open line items whihc are having status due in FBL1N.
So no need for any setting from MM side. FBL1N has different dtatus like Due, Overdue, not due etc. -
Payment Terms - Only specify sales text for payment terms for customers !
What is wrong with the format in the attached screen shot ?
Do I have to Choose Customer & Vendor ?Hi Emad,
This error “Only specify sales text for payment terms for customers" appears because this payment term is not applicable for customer. There are two choices either to delete the description text and make the payment term applicable only to vendor,However if you want to keep the description text, then make payment term applicable to customer as well by tick mark.
Regards,
Sam -
Payment terms not modifiable in PO for particular order type
Hi Gurus
My client wants the payment terms should not be modified while creating a PO. It should be picked from vendor master. But this requirement is for a particular order type ZIN only. I tried in SPRO but then it is affecting all the order types. Is there any user exit or solution for this.
Regards,
YuvarajHi,
STEP 1:
Spro>Materials Management>Purchasing>Purchase Order>Define Screen Layout at Document Level
Create a new " Field Selection Key" for ur doc type
(ex: Standard NB doc type the "Field Selection Key" would be "NBF", you can make a copy of it)
Just Double click on that
then click on "Terms of delivery and payment", there you can see the "Terms of payment" field.
against that field you can see three options, Reqd.entry Opt. entry Display...
Here tick the field "Display", So that You will get this field display only for the document type ZIN.
STEP 2:
Spro>Materials Management>Purchasing>Purchase Order>Define Document Types
Here Assign the newly created "Field Selection Key" against the your PO doc type ZIN
Maybe you are looking for
-
Hi! We have an array of 2 TMG servers in the configuration of multicast NLB + 1 TMG EMS server that contains the configuration of TMG. As a result of changes to the rules, one of the servers no longer apply the changes (synchronization status constan
-
Setting connectionProperties on OracleConnectionPoolDataSource
Hi all, we are using on our project the SAP Netweaver 2004, Java 1.4 and the Oracle database with the JDBC driver 10.2.0.4. Netweaver as application server supports the use of JNDI datasources. The configuration is as follows: Factory: oracle.jdbc.po
-
Cannot install PSE 9 on Windows 7
I am installing Elements 9 on a new Win 7 laptop via the purchased CD. When inserting the CD, nothing happens. I've tried clearing the temp files, and looking through the contents nof the CD, but nothing opens up. Antivirus is disabled. Any help
-
HT1498 My rented movie won't play, even though it shows "rented". What gives?
My rented movie won't play, even though it shows "rented". What gives?
-
Ladies and Gentlemen: It has been a little over a year since I started struggling with EBS. I have tried it on Windows XP and I have tried it with Linux. It is my humble conclusion that Oracle EBS is a sub-standard program that works only half of the