Discount Query
how can i map the req Existing customers get 5% discount provided there are no overdue payments and they placed an order previously during the last 6 months.
Thx in advance
Hi...........
Welcome to SAP Forum.......
Here you ca do one thing. Define the Special discount as per Business Partner.
Now create the Query Based Approval Procedure where condition would be the Payment Overdue so that its upto the approver whether he wants to approve Order for such customer or not. And whenever you select this customer by default Discount will come.......
Regards,
Rahul
Similar Messages
-
Hello Experts,
I am trying to query the list of all Open AP Invoices which are eligible for Cash Discounts.
Scenario : For Instance in OEC Computers,I have the following Open documents in SAP
DocNum CardCode PostingDate DueDate PaymentTerms
110 V10000 06/18/2010 07/19/2010 2P10Net30 ( Eligible for 2 % discount if paid within 10 days from posting date)
114 V20000 06/18/2010 08/09/2010 2P10Net45 ( Eligible for 2 % discount if paid within 10 days from posting date)
Let us say a user wants to run a check today and would like to know what documents are eligible for cash discounts based on duedate 07/02/10.
I am using the following query but does not seems to be working exactly:
select t0.DocNum,t0.CardCode,t0.CardName
,t0.DocTotal as Amount
,t0.DocDate as PostingDate
,t0.DocDueDate as DueDate
,t1.PymntGroup as PaymentTerms
,t2.Discount
,t1.ExtraDays
,t2.NumOfDays
from OPCH t0 inner join OCTG t1 on t0.GroupNum=t1.GroupNum
inner join CDC1 t2 on t1.DiscCode=t2.CdcCode
where T0.DocDate>= '[%0]' AND T0.DocDueDate<= '[%1]'+DATEADD(DAY,10,t0.DocDate) and t0.DocStatus='O'
Any help would be appreciated.
Thanks,
PraneethHi Gordon,
This works fine , but the user needs to input Due Date. Based on the due date, the query should return the documents that are eligible for cash discounts.
For Instance :
Assume that there are two Open AP Invoice Documents 110,114 which has a posting date of 06/18/10.
There are eligible for cash discounts if paid with in 10 days from posting date i.e in this case 06/28/10.
Now the user wants to input the due date as 07/02/10 , because he would like all open AP Invoices that are eligible for cash discount with in this due date.
Since 06/28/10 falls with in the range of the user due date 07/02/10 the query should retrieve data.
Any advise would be appreciated.
Thanks,
Praneeth -
Dear All,
I am having Query regarding Freight:
Vendor is sending material (A) on which VAT is applicable
Let us say he sends Qty 1000 @ 10
So BAsic Price is 10000
Vat @ 4% 400
1) So Price inclusive VAT is 10400 Rs
The Freight is Applicable on the MAterial But the thing is that Vendor sends the Bill of 10400 less freight 500 Rs
i.e Net amount payable to Vendor is 9900 Rs
And when the MAterial Comes to Clients Premises then he pays the actual Freight Charges to Transporter Let us say Actual Freight is 550 Rs i.e my client is bearing 50 Rs Loss.
Awaiting for your rreplies
regards
shaileshHi
In ur case is ur price inclusive of freight in which case it will go the material vendor if is included in the basic price.
Also is VAT applicable on freight amount. If so then calculation will vary
Basic price 1000*9.5=9500 rs
Freight 500 Rs ( Maintain separately as a condition and enter the freight vendor in PO)
Total 10000 Rs
Tax 400 Rs
Total with tax 10400 Rs
Net payable to material vendor 9880 Rs
Net payable to freight vendor 520 Rs
Total with tax 10400 Rs
If VAT not applicable on freight amount
Basic price 1000*9.5=9500 rs
Freight 500 Rs ( Maintain separately as a condition and enter the freight vendor in PO)
Total 10000 Rs
Tax 380 Rs (For 9500 Rs)
Total with tax 10380 Rs
Net payable to material vendor 9880 Rs
Net payable to freight vendor 500 Rs
Now when u pay extra 50 Rs to the freight vendor enter the same in unplanned delivery cost while passing the freight vendor bill in MIRO and this will add to the inventory also.
Reg
Raja -
My daughter is starting a Graphics College Course in September 2011 and we are hoping to be able to get her a 17" MacBook Pro for this.
We have been told about student discount via Apple - wonder if she would qualify as she will be 16 when starting the course.
Many thanks.There is not an age limit on buying a mac for your student, you can buy a system today utilizing the education discount. To see what that would save you, go to the online Apple store, click on the education store on the left of the screen, choose the school, and you can then see what your cost would be with the education discount.
-
Hello, I bought Lightroom 5. Now I want to migrate to CC. Can you get any discount? Thanks!
Hi ormandez,
Please contact the Adobe Sales team for the pricing/discount query:
Adobe | Sales Inquiries
Regards,
Sheena -
Hi
I have string i/p say : '1.5/15 N60'
i am using functions to split it like this
SUBSTR(NVL('1.5/15 N60', '000'),
1,
instr('1.5/15 N60', '/') - 1) Ans:1.5
SUBSTR(NVL('1.5/15 N60', '000000'),
instr('1.5/15 N60', '/') + 1,
2) Ans:15
REPLACE(SUBSTR(NVL('1.5/15 N60', '000000000'), instr('1.5/15 N60', 'N')+1, 3),
'N',
'') Ans:60
so for an input '1.5/15 N60' it is spliting like this 1.5 15 and 60
but for an input '1.00/10 NET 30' it should split like this 1.00,10 and 30 but it is splitting it in to 1,00,10 and ET.
and for inputs '2.00/15 NET 75 TIERS' it should split has 2.00,15 and 75
For input like 'N60' the functions should split it in to 0,0 and 60
For input like '10 DAYS NO DISCOUNT' o/p should be 0,0 and 10
Thanks&Regards,This function could fit you need. It outputs a collection.
CREATE OR REPLACE TYPE NUM_TABLE IS TABLE OF VARCHAR2(30)
CREATE OR REPLACE FUNCTION GET_NUMBERS(
STRING IN VARCHAR2
RETURN NUM_TABLE
AS
IDX INTEGER;
I INTEGER;
L INTEGER;
S VARCHAR2(30);
OUT_TAB NUM_TABLE;
BEGIN
OUT_TAB := NUM_TABLE();
I := 0;
L := 0;
IDX := 0;
LOOP
IDX := regexp_INSTR(string,'([0123456789])+(\.[0123456789])?',IDX+L+1);
IF IDX = 0 THEN
RETURN OUT_TAB;
END IF;
OUT_TAB.EXTEND();
I := I+1;
S := regexp_SUBSTR(string,'([0123456789])+(\.[0123456789])?',IDX);
L := LENGTH(S);
OUT_TAB(I) := S;
END LOOP;
END;
Processing ...
select *
from table (GET_NUMBERS('1.5/15 N60'))
Query finished, retrieving results...
COLUMN_VALUE
1.5
15
60
3 row(s) retrieved
Processing ...
select *
from table (GET_NUMBERS('10 DAYS NO DISCOUNT'))
Query finished, retrieving results...
COLUMN_VALUE
10
1 row(s) retrieved
Processing ...
select *
from table (GET_NUMBERS('NO NUMBERS'))
Query finished, retrieving results...
COLUMN_VALUE
0 row(s) retrievedBye Alessandro -
Special Price + Formatted Search for Special Price.
Hi all,
Appreciate some help here. Our client is using SAP B1 2007 Patch 38. AU/NZ localization, Local Currency = AUD.
Scenario:
Item A, Price List 1 = $2795, Price List display = 4 decimals, Price List Currency = USD
Special price for Item A has been set up as follows:
Step 1 - Go to Item> Price List> Price and Volumne Discount
Step 2 - The price and volumn discount screen opened. From the drop down, select price list and then select Item A by double clicking the line.
Step 3 - Period Discount screen opened. Valid from = 9th July 2008. Price = $2795.
Step 4 - Double click the line, Volume Discount Price List open, with the following details maintained.
Quantity=1, Discount=0, Special Price = $2795.
Quantity = 10, Discount=7.1556, Special Price = $ 2595.0010
Quantity = 100, Discount=10.0179, Special Price=$ 2514.9997
Question: we intend to put in Special price = $2595 and $2515, but SAP just does its own round up. Is there a way to work around?
Scenario 2:
To deal with the problem from Question 1, we have created a formatted search in the sales order and formatted search to round up the value in Line Total.
Column = Line Total
Trigger by = Quantity
Query = SELECT (case when $[$63.0.0]='USD' then Round($[$38.23.number],0) else $[$38.23.number] end)
Column = Quantity
Trigger by = Discount%
Query = SELECT $[$38.11.1]
The above set up works fine, if the user enter the quantity correctly the first time.
Eg:
User enter Qty = 10, SAP will display Discount = 7.1556 % and Line Total = $25,950.00 (Round up from $25950.01).
If user notice the quantity is wrong and then enter new quantity = 100, the discount remains at 7.1556%, it should be 10.0179%.
Question: Is there a way to work around this?Hi Shawn ,
1.First check the decimal setting
a.Administration --> system intilisation --Document setting -- currency or by document --
b.System initiliaisation ---> general settng --->Display
c.Administration set up->Financial currency ---rounding --???
Currency setting overides the rounding method of procedure B
Scenario2
Since your trigger is dicount percentage , You will not get the desired output from the formatted search . Try to get the trigger at quantity .
Hope that helps
Bishal -
How does cc teams work with upgrades (CS3+)?
We had a break in and all our computers were stolen, we are now looking at CC teams.
My question is, how does this work with the upgrade solution? Do we need a serial for each seat we add?
Also what if a person leaves and we delete that seat and add a new seat for a new user, does the discount apply to the new seat?OtherDamonG wrote:
Any insight into the discount query?
You should be able to get all information here: www.creative.adobe.com/plans
OtherDamonG wrote:
Also you are allowed to have 2 installs under one seat. are there any restrictions on that, that you know of?
Yes, One user is allowed to install it on Two Computer's
Cheers
LP -
Query for report to show Invoices, Payments and Discounts
Hi All
I am hoping someone can help me with this query.
What the customer needs is the invoices for a specific date range, the payments applied to the invoices and the discount amount
Eg...
Invoice payment discount
100 90 10
This would be easy to get from the ORCT and RCT2 tables.
However, sometime the users add the payment on account and reconciles the invoices and a manual journal for the discounts.
So it would be best to look at the OITR and ITR1 tables?
This is what I have so far and it almost balances...
I am using this query to create the report in crystal,
To create the discount amount from the incoming payment window i said (T0.ReconSum - T3.TrsfrSum)
I also took out the vat amount within that formula.
With the amounts from the manual journal, i just took the amount as is.
select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
from ITR1 T0
inner join OCRD T2 on T0.Shortname = T2.CardCode
left outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs and T3.CardCode = T0.ShortName
inner join OITR T4 on T4.ReconNum = T0.ReconNum
left outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjAbs and T0.ShortName = T5.ShortName
inner join OCTG T6 on T6.GroupNum = T2.GroupNum
where T3.DocDate <= getdate() or T5.ContraAct = '1127331'
the account 1127331 is the Discount GL account.
Based on the example the Payment + discount = Invoices
however not all the customers are balancing..
any ideas? it looks like my query is getting only the invoices where a payment has been done. The amounts just dont seem to match.
Thank you
Jerushahi
I think your join with OJDT is wrong in this part : T5.ObjType = T0.SrcObjAbs
you should write
T5.ObjType = T0.SrcObjTyp
(I think you don't need this part at all )
try this:
select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
from
ITR1 T0
inner
join OITR T4 on T4.ReconNum = T0.ReconNum
inner
join OCRD T2 on T0.Shortname = T2.CardCode
left
outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs and T3.CardCode = T0.ShortName
left
outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjTyp and T0.ShortName = T5.ShortName
inner
join OCTG T6 on T6.GroupNum = T2.GroupNum
where
T3.DocDate <= getdate() or T5.ContraAct =
'1127331'
please let me know if it works now
shachar -
Query that show total discount on A/R Invoice
Dear all,
I would like to have query that show summary of each invoice number that show 'Total of discount' ( 'Total of discount' = total of discount in line item + discount of total invoice ). Data that I would like to show on this query is as follow :
Invoice No, Invoice Date, Customer Code, Total before discount, 'Total of discount', Total Amount, Vat amount
Please kindly suggest the way to get this data.
Thanks you in advanced.
AngnamHi Angnam K,
Try This one...hope this will serve your purpose.
SELECT DocEntry, DocNum, CardCode, CardName, DocDate, [Total Before Discount] , [Totaldiscount]+ [OinvDiscount] as [Total of discount], VatSum [Total Tax] FROM (
SELECT T0.DocEntry,T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], SUM(T1.[LineTotal])[Total Before Discount],
SUM(T1.[PriceBefDi] * T1.Quantity *T1.[DiscPrcnt])/100 as [Totaldiscount]
,Case When T0.[DiscPrcnt] <> 0 Then (SUM(T1.[LineTotal])/ T0.[DiscPrcnt]) Else 0 end [OinvDiscount] ,T0.VatSum
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
Group By T0.DocEntry,T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[DiscSum] ,T0.[DiscPrcnt],T0.VatSum )Sales
thanks,
Kumar
Edited by: itskumaramit on Jul 13, 2011 12:43 PM -
Discount Groups Query Question
My goal is to create a query that shows all BP's that have a Discount by Group set for them that is greater than zero. I get output that repeats every discount group for every unique discount that exists in the system.
I need help to enhance this query to strip out the redundant and inaccurate records.
Query Code:
SELECT T2.[CardCode] AS 'BP Code', T1.[CardName] AS 'BP Name', T0.[ItmsGrpNam] AS 'Group Name', T2.[Discount] AS 'Discount' FROM [dbo].[OITB] T0 , [dbo].[OCRD] T1 INNER JOIN [dbo].[OSPG] T2 ON T2.[CardCode] = T1.CardCode WHERE T2.[Discount] > 0
Thanks,
GlenHi Glen,
The OSPG table holds special price data for Item Groups, Item Properties and Companies. SBO identifies these different types using the ObjType column in this table. The database reference in the SDK Help Center will show you the constraints on this column:
52 = Item Group
8 = Item Property
43 = Companies
Depending on the ObjType, the ObjKey field will then contain the key for linking back to the relevant table (eg if the ObjType is 52 then the ObjKey will contain the Item Group code to link to the OIBT table). Put this together and you get:
OIBT T0 inner join OSPG T2 on T2.ObjType = 52 and T2.ObjKey = T0.ItmsGrpCod
This join therefore is quite specific to how the OSPG table links to other related tables.
For a full list of object types in the database and for the DI API, you can look at the BoObjectTypes enumeration in the DI API reference in the SDK Help Center.
Hope this helps,
Owen -
Approval Query on multi-level line discounts
Hi Experts,
I have this query that is attached in the A/R Reserve Invoice> free text field that triggers different values corresponding to the to approval levels of the management. The query is triggered when a discount is manually change. Also, the free text returns a null value, if the item chosen is defined in period & volume discounts table (OSPP & SPP1).
However, the issue arises when the client creates first a Sales Quotation which has an item defined in OSPP (promo item), upon copying to RI, the FMS returns a value instead of null, especially if the item copied is a promo item.
I need help to modify this query to consider also if the item (promo) is copied from a base document.
Thanks,
Don
If CONVERT(real,$[$38.15.11]) > 0.00 AND
NOT EXISTS (
SELECT DISTINCT ItemCode FROM OSPP WHERE ItemCode = $[$38.1.11] AND ListNum=1
AND Discount <> 0.00)
OR
NOT EXISTS (
SELECT DISTINCT ItemCode FROM SPP1 WHERE ItemCode = $[$38.1.11] AND ListNum=1
AND Discount <> 0.00 AND (CONVERT(smalldatetime,$[$10.0.Date],101) >= CONVERT(smalldatetime,FromDate,101))
AND (ToDate IS NULL OR CONVERT(smalldatetime,$[$10.0.Date],101) <= CONVERT(smalldatetime,ToDate,101)))
Begin
DECLARE @discprct1 as real, @discprct2 as real
SELECT @discprct1 = 0.00, @discprct2 = 0.00
SELECT @discprct1 = ISNULL(OITM.U_DiscLimit1,0.00) FROM OITM WHERE OITM.ItemCode = $[$38.1.11]
SELECT @discprct2 = ISNULL(OITM.U_DiscLimit2,0.00) FROM OITM WHERE OITM.ItemCode = $[$38.1.11]
If @discprct2 <> 0
Begin
If CONVERT(real,$[$38.15.11]) > @discprct2 SELECT 'Level3 Approval'
ELSE
SELECT CASE WHEN (CONVERT(real,$[$38.15.11]) <= @discprct2) AND
((@discprct1 = 0.00) OR (CONVERT(real,$[$38.15.11]) > @discprct1))
THEN 'Level2 Approval' ELSE
(SELECT CASE WHEN (CONVERT(real,$[$38.15.11]) <= @discprct1) AND @discprct1 <> 0.00 THEN 'Level1 Approval' ELSE '' END)
END
End
Else
If @discprct1 <> 0
SELECT CASE WHEN CONVERT(real,$[$38.15.11]) > @discprct1 THEN 'Level2 Approval' ELSE 'Level1Approval' END
ELSE SELECT 'Level1 Approval'
End
ELSE SELECT ''Hi Ravi,
The users don't want to restrict the whole report on a specific customer or material. The only user input variable that will be available is the customer order date.
The restriction has to be on the value of caracteristics coming from each individual sales orders that appear on the report.
Exemple: I ask for sales order for a specific date and it gives me 2 sales orders with different customers and materials:
Customer order list:
- Ord# 1000241, Cust#100, Mat #A01, $100, <b>128$, 95$</b>
- Ord# 1000244, Cust#115, Mat #B02, $100, <b>119$, 118$</b>
The amount 128$ is restricted by date, and customer #100
The amount 95$ is restricted by date, and material #A01
The amount 119$ is restricted by date, and customer #115
The amount 118$ is restricted by date, and material #B02
Thanks in advance,
Regards, -
Query Regarding Cash discount In F110
Dear all,
We have a payment terms 0003(14 days 3% cash Discount,20 Days 2% cash discount & within 30 days due net).
I have posted vendor invoice with this payment terms on 15.09.2009 & making payment to the vendor on the same day to avail 3% cash discount through F110 but when we go to edit proposal after scheduling proposal the system through an error Company codes XXXX/XXXX do not appear in proposal 15.09.2009 TEST; correct.
It do not allow us to make payment to vendor until the invoice becomes due.because of this we cannot take cash discount from vendors.
We have checked Max cash discount in All company codes in FBZP.
Regards,
D RANAHi Deepak,
Try giving the next run date after the due date say after 35 days or si and keep the other parameters as you are using now. The payment should get included. Normally, SAP will check if the the document is getting over due or not in the next payment run date and includes it in the current only then.
Please revert.
Thanks and Regards,
Anit -
Query to show BP and discount groups where appropriate
Hi Experts,
I need some help in setting up a query to show me whether or not a BP has anything in special prices for business partners.
Essentilly I just need to report the BP Code, BP Name and Y or N as to whether they have item codes in special prices for BPs.
Thanks
JonHi Jon,
Try this one:
SELECT T0.CardCode, T0.CardName, Case WHEN (T0.CardCode NOT IN (SELECT T1.CardCode FROM OSPP T1)) THEN 'N' ELSE 'Y' END AS 'Y/N'
FROM dbo.OCRD T0
Thanks,
Gordon -
Hi all,
I am working for a client who is not regisrede under excise. Hence the credit on import duties ( CVD etc.) can not be availed. But the same is availed ( paased on to ) by subcontractor to whom this material is sent.
On the finished goods sent by the vendor he is paying excise duty. In his books he has credit for CVD passed on by client, so the final cost he bears is only the difference between these two. To consider this in the pricing of the finished product we n eed to add a condition which is of the nature discount, but will come into picture after the tax conditions.
How this condition can be configured?
Regards
PrashantDear Prashant,
As per your query, Imports duty i.e. CVD can't be availed and Subcontractor can avail the benefits.
In what and which way sub-contracor can avail this benefits. Bill of entry on which name....Company Name or Sub-Contractor name?
What ever solutions come out from this Forum, SAP should support as well Company Auditors (internal and external) should satisfy if we give work around solutions.
With out knowing above details, we can't give any solutions.
Bye,
Muralidhara
Maybe you are looking for
-
[GDI PLUS and win32] - why i only get a black image?
heres my image class: class image private: ULONG_PTR m_gdiplusToken; Gdiplus::GdiplusStartupInput gdiplusStartupInput; HDC hdcimage=CreateCompatibleDC(NULL); Gdiplus::Graphics *graphic; Image *img; int imageheight=0; int imageweight=0; int framecount
-
Cross company code downpayment posting error
Hi, When I am posting cross company code downpayment in F-48 getting below error. "Balancing field "Profit Center" in line item 001 not filled". Vendor A/c (Company A) Bank clearing A/c(Company B) - Profit center 25000 Problem it is not deriving the
-
New 15 i7 mbp getting too hot on small tasks
When I'm browsing through firefox, the CPU temp goes from 51 to 55 degree celsious. the left side palmrest seems to be hotter than the right side palmrest. Is it me, or are these normal temps if browsing through firefox? HD Macintosh: 37 CPU: 54 CPU
-
Material Availablity check for production order - function module?
I have a production order with Material BOM, which has more than 30 components in it. Please suggest me if there is any function module to do the material availability check of a production order. I need the missing component list as output of that f
-
Restore ovi store icon/app to home screen
Hi, I accidentally deleted the OVI STORE icon/shortcut on one of my homescreen. Is there a way to add the shortcut back to the home screen? Please advise. I am aware that I can still access OVI STORE from the menu option but would prefer to use the