Outgoing payment UDF Query
Hi experts,
i kindly need a query that when an outgoing payment is made with doctype (S OR C),
the invoice numatcard and invoice remarks will be picked into the two UDF's created.
Urgent help will be appreciated.
Regards
Justice
Hi Justice,
Create 2 UDF at Row Level in Outgoing payment, First for AP Invoice Remark and Second for AP Invoice NumAtCard.
Then Place below two Query in Respective Columns..
This FMS is for Remarks
Select T0.[Comments] From OPCH T0 Where T0.DocNum = $[$20.1.0]
This FMS is for NumAtCard
Select T0.[NumAtCard] From OPCH T0 Where T0.DocNum = $[$20.1.0]
After putting both FMS in Respective Column then Make these to FMS on Auto Refresh on Customer Name.
Hope this helps
Regards::::
Atul Chakraborty
Similar Messages
-
Hello everybody,
Is there any way to calculate the duedate of a check I want to create in outgoing payment object according to some a/p invoices that had marked in the outgoing payment.
I want to calculate duadate of three a/p invoices. every invoice has a diferent total value and different duedate.
I tried to create a FMS with a UDF , but I don't know how to get the marked records from VPM2 before the outgoing payment is saved.
Thank you all,
JosephHi Joseph,
you can try this query and see if you get the desired result. Let me know.
select T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName, T1.CheckNum,T1.DueDate 'Check due date', T1.CheckSum, T1.BankCode + ' ' + T1.Branch + ' ' + T1.AcctNum Account
from ovpm T0 inner join vpm1 T1 on T1.DocNum = T0.DocEntry
inner join jdt1 T2 on T2.TransId = T0.TransId
inner join dsc1 T3 on T3.BankCode = T1.BankCode and T3.Branch = T1.Branch and T3.Account = T1.AcctNum
where T0.Canceled = 'N'
and T2.Ref3Line = T1.CheckNum
and T2.ExtrMatch = 0
and T2.Account = T3.GLAccount
order by T0.DocNum, T1.CheckNum
however, this query will get you a list of all the outgoing payments done!!
Best Regards,
Joseph Antony -
Hi All,
i need a report for the outgoing payment where i could display the account details, the doc remarks, row total and also the payment mode, whther by cash or by cheque. I have a query but i dont know how to get the mode of payment and also how to get the row total??
SELECT T0.[DocNum], T0.[DocDate], T1.[AcctName], T1.[Descrip], T0.[CashAcct], T0.[CheckAcct] FROM OVPM T0 INNER JOIN VPM4 T1 ON T0.DocEntry = T1.DocNum WHERE T0.[DocDate] = [%0]
How do i get the row total and the mode of payment incorporated in the query? apart from the doc date, can i also get a selection criteria for the mode of payment as well?? Can anyone please suggest a better query??
Thanks in advance,
JosephTry this one to start:
SELECT T0.DocNum, T0.DocDate, T1.AcctName, T1.Descrip, T0.CashAcct, T0.CheckAcct, T0.DocTotal, CASE WHEN T0.CashSum > 0 THEN 'Cash' WHEN T0.CreditSum > 0 THEN 'CC' WHEN T0.TrsfrSum > 0 THEN 'WIRE' ELSE 'Check' END AS 'Mode'
FROM dbo.OVPM T0
LEFT JOIN dbo.VPM4 T1 ON T0.DocEntry = T1.DocNum
WHERE T0.DocDate = [%0\] AND T0.JrnlMemo != 'Cancelled'
Thanks,
Gordon -
AP Outgoing Payment Query with Crystal Report
Hi Experts, I'm trying to make query for AP Outgoing Payment followings. However, I couldn't get result of Outgoing Payment Number, TrsfrSum, CashSum, CheckSum. Is anyone could advise for this matter? Thanks,
SELECT
T0.DocDate as 'Posting Date',
T0.DocNum as 'AP Invoice Number',
T0.CardName as 'Supplier Name',
T0.DocDate as 'Payment Date',
T1.DocNum as 'Outgoing Payment Number ',
T0.DocTotal as 'AP Invoice Total',
(T0.[DocTotal] - T0.[PaidToDate]) as 'AP Sum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END AS 'TrsfrSum',
CASE
WHEN T1.CashSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CashSum
END AS 'CashSum',
CASE
WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CheckSum
END AS 'CheckSum',
CASE
WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CreditSum
END AS 'CreditSum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END 'Paid To Date',
T2.CheckNum as 'Cheque Number'
FROM OPOR T0
LEFT JOIN OVPM T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN VPM1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
UNION ALL
SELECT
T0.DocDate as 'Posting Date',
T0.DocNum as 'AP Invoice Number',
T0.CardName as 'Supplier Name',
T0.DocDate as 'Payment Date',
T1.DocNum as 'Outgoing Payment Number ',
T0.DocTotal * -1 as 'AP Invoice Total',
T0.PaidToDate * -1 as 'AP Sum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END AS 'TrsfrSum',
CASE
WHEN T1.CashSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CashSum
END AS 'CashSum',
CASE
WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CheckSum
END AS 'CheckSum',
CASE
WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CreditSum
END AS 'CreditSum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END 'Paid To Date',
T2.CheckNum as 'Cheque Number'
FROM ORPC T0
LEFT JOIN OVPM T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN VPM1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
ORDER BY 'CreditSum', 'CheckSum', 'CashSum', 'TrsfrSum', 'AP Sum'Hi Stephan,
Try:
SELECT
T0.DocDate as 'Posting Date',
'AP Invoice' as 'Type',
T0.DocNum as 'AP Number',
T0.CardName as 'Supplier Name',
T0.DocDate as 'Payment Date',
T1.DocNum as 'Outgoing Payment Number ',
T0.DocTotal as 'AP Invoice/CR Total',
(T0.DocTotal - T0.PaidToDate) as 'AP Sum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END AS 'TrsfrSum',
CASE
WHEN T1.CashSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CashSum
END AS 'CashSum',
CASE
WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CheckSum
END AS 'CheckSum',
CASE
WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CreditSum
END AS 'CreditSum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END 'Paid To Date',
T2.CheckNum as 'Cheque Number'
FROM OPCH T0
LEFT JOIN OVPM T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN VPM1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
UNION ALL
SELECT
T0.DocDate as 'Posting Date',
'AP Credit Memo',
T0.DocNum as 'AP Number',
T0.CardName as 'Supplier Name',
T0.DocDate as 'Payment Date',
T1.DocNum as 'Outgoing Payment Number ',
T0.DocTotal * -1 ,
T0.PaidToDate * -1 as 'AP Sum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END AS 'TrsfrSum',
CASE
WHEN T1.CashSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CashSum
END AS 'CashSum',
CASE
WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CheckSum
END AS 'CheckSum',
CASE
WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.CreditSum
END AS 'CreditSum',
CASE
WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
ELSE T1.TrsfrSum
END 'Paid To Date',
T2.CheckNum as 'Cheque Number'
FROM ORPC T0
LEFT JOIN OVPM T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN VPM1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
ORDER BY 'CreditSum', 'CheckSum', 'CashSum', 'TrsfrSum', 'AP Sum'
Thanks,
Gordon -
Query for Journal Entry as Incoming/Outgoing Payment
Hi all,
I need a query that returns all journal entries that are incoming/outgoing payments.
I have not found anything in the journal entries tables that marks it as a payment.
thanks,
Lucas.Hi Lucas,
I am afraid 2 queries could be more meaningful. That might be more convenient:
Incoming:
SELECT T0.TransId as [Journal Entry#],
T0.RefDate as [Posting Date],
T0.BaseRef as [Incoming Payment #],
Isnull(T1.AcctName,T0.ShortName) as [GL Account Name/Vendor Code],
T0.Credit
from JDT1 T0
Left JOIN OACT T1 ON T1.AcctCode= T0.ShortName
where T0.TransType=24 AND
T0.Credit > 0
Order By T0.RefDate
Outgoing:
SELECT T0.TransId as [Journal Entry#],
T0.RefDate as [Posting Date],
T0.BaseRef as [Outgoing Payment #],
Isnull(T1.AcctName,T0.ShortName) as [GL Account Name/Vendor Code],
T0.debit
from JDT1 T0
Left JOIN OACT T1 ON T1.AcctCode= T0.ShortName
where T0.TransType=46 AND
T0.debit > 0
Order By T0.RefDate
Thanks,
Gordon -
Query print layout on Incoming/Outgoing Payment
Hi, i'm working on the QPL, and i've done doing the incoming and outgoing payment for customer/vendor... but when i have the 'payment on account' it doesn't show anything...
i check the query, everything is alright... the layout works fine with other outgoing payment which is not payment on account. It just doesn't work at all using the same query and layout for document which has payment on account...
what should i do?
Thnx for help...
MartinSELECT T0.DocNum, T0.DocDate, T0.DocCur, T0.NumAtCard,
T0.DocTotal, T0.DocTotalFC,T1.DocNum, T1.CardCode,
T1.CardName, T1.DocDate, T1.Comments,
T1.TrsfrRef as 'Cheque No', T2.BankCode' '
T2.AcctNum as 'Bank Code', T2.CheckSum, T0.Address,
T2.CheckNum, T2.Currency , T3.Phone1, T3.CntctPrsn, T0.PaidSum, T0.PaidSumFc, T1.DocTotal, T1.DocTotalFc,
T4.SumApplied, T4.AppliedFC
FROM OVPM T1 LEFT OUTER JOIN VPM1 T2 ON
(T2.DocNum = T1.DocNum)
LEFT OUTER JOIN VPM2 T4 ON
(T4.DocNum = T1.DocNum)
LEFT OUTER JOIN OPCH T0 ON
(T0.DocNum = T4.DocEntry)
LEFT OUTER JOIN OCRD T3 ON
(T3.CardCode = T0.CardCode)
WHERE T1.DocNum = [%0] AND T4.Invtype = '18'
Union
SELECT T0.DocNum, T0.DocDate, T0.DocCur, T0.NumAtCard,
-(T0.DocTotal), -(T0.DocTotalFC),T1.DocNum, T1.CardCode,
T1.CardName, T1.DocDate, T1.Comments,
T1.TrsfrRef as 'Cheque No', T2.BankCode' '
T2.AcctNum as 'Bank Code', T2.CheckSum, T0.Address,
T2.CheckNum, T2.Currency , T3.Phone1, T3.CntctPrsn, T0.PaidSum, T0.PaidSumFc, T1.DocTotal, T1.DocTotalFc,
T4.SumApplied, T4.AppliedFC
FROM OVPM T1 LEFT OUTER JOIN VPM1 T2 ON
(T2.DocNum = T1.DocNum)
LEFT OUTER JOIN VPM2 T4 ON
(T4.DocNum = T1.DocNum)
LEFT OUTER JOIN ORPC T0 ON
(T0.DocNum = T4.DocEntry)
LEFT OUTER JOIN OCRD T3 ON
(T3.CardCode = T0.CardCode)
WHERE T1.DocNum = [%0] AND T4.Invtype = '19'
Yea, it doesn't show me anything...except the free text document field in the layout... others like formula, database and variable didn't appear...
i suspect that there's something goes wrong when i do ' payment on account'
thnx for response... -
Query of Outgoing Payments Monthwise
Hi Gurus,
I have a written a simple query which gives me a summarized outgoing payment list group by vendor with date range. Query is working fine, now I want that report in monthwise (column) format from the given date range. Cau u help me how do I write this ...
Select T0.CardCode, T0.CardName, T1.GroupCode,T2.GroupName, sum(T0.DocTotal) as 'Total Sum'
from OVPM T0, OCRD T1, OCRG T2
where T0.CardCode = T1.CardCode and T1.GroupCode =T2.GroupCode and T0.DocDate>=[%0] and T0.DocDate <=[%1]
Group by T1.GroupCode, T2.GroupName
What I want is : If I give Date range of From 01-08-2011 to 31-10-2011 then the out come will be like as
Group Name August September October
Group A 100 150 125
Group B 200 150 0
Group C 500 150 200
Please help me find the way.
Regards,
SKTry this..
select p.GroupCode,p.GroupName,
sum([1]) as [Jan],
sum([2]) as [Feb],
sum([3]) as [Mar],
sum([4]) as [Apr],
sum([5]) as [May],
sum([6]) as [Jun],
sum([7]) as [Jul],
sum([8]) as [Aug],
sum([9]) as [Sep],
sum([10]) as [Oct],
sum([11]) as [Nov],
sum([12]) as [Dec]
from(Select
T0.CardCode, T0.CardName,
T1.GroupCode,T2.GroupName,
(T0.DocTotal) as 'Total',MONTH(T0.Docdate)as month
from OVPM T0, OCRD T1, OCRG T2
where T0.CardCode = T1.CardCode and T1.GroupCode =T2.GroupCode
and T0.DocDate>='[%0]' and T0.DocDate <='[%1]'
)S
PIVOT (sum(Total) FOR [month] IN
([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
group by p.GroupCode,p.GroupName
ORDER BY P.[GroupCode] -
Outgoing payment query assistance.
Hi experts,
Can you please assist me with a query that addresses my request.
My request is, during the outgoing payment process in the payment means we choose a G/L account.
I want the query to show the G/L account code and it's corresponding name whether check or cash or bank transfer.
Please this query is urgent and I need help.
Regards
JusticeHi Justice,
I am not able to Understand Correct Requirement but Please check below Query which will give you All Modes of Account and Account Name. Please check below
SELECT T0.[DocNum], T0.[DocDate], T1.[CheckAct] AS Check_Account, T2.[AcctName] AS Check_Account_Name, T0.[CashAcct] AS Cash_Account, T3.[AcctName] AS Cash_Account_Name, T0.[TrsfrAcct] AS Transfer_Account, T4.[AcctName] AS Transfer_Account_Name FROM OVPM T0 LEFT JOIN VPM1 T1 ON T0.[DocEntry] = T1.[DocNum] LEFT JOIN OACT T2 ON T1.[CheckAct] = T2.[AcctCode] LEFT JOIN OACT T3 ON T0.[CashAcct] = T3.[AcctCode] LEFT JOIN OACT T4 ON T0.[TrsfrAcct] = T4.[AcctCode]
Hope this help
Regards:::::
Atul Chakraborty -
Approval Query for Outgoing Payment
Hi All Experts,
I have to Create Approval for Outgoing Payment where payment means is Cash,Cheque or Bank Transfer but not Credit Card.
In other words approval should be raised for all payment means other than Credit card payment means.
For which I have Created Query as follows
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum=0 And T1.CreditAcct is null
payments goes for approval but Credit Card payment also goes for Approval which is not required.
Please Help me to Correct the Query.
Regards,
Gayatri Shukla.Hi,
Little modification to your query. Try this.
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum = 0
Regards,
Amrut Sabnis. -
Dear Experts
I am making a Pld report on outgoing payment in which i want to display payment method ..cash or bank..
how can i distinguish between cash and bank payment because in OVPM table when cash payment is made it stores G/L
Code..in case of bank payment it stores the bank detail...also i want to print the related account name of the G/L code..
warm regards
anandHi Anand,
IF you to print the Transaction Outgoing Payments Type in PLD.
Try to create UDF in Outgoing Payments and Assign the FMS(CASE Query).
OR
Try to Create Query Print Layout Designer(QPLD)
Check the thread,
Re: Issue in PLD of Out going Payment
Re: PLD - Outgoing Payment
Regards,
Madhan. -
Outgoing Payment on Account Report?
Hello Experts,
i have a question i want to ask you for you for your urgent assistance.
A customer wants to see the G/L account code and Name on the outgoing payment report when they do payments on doctype='A', that is on account.
I want someone to help me with a query that will automatically pick the G/L account code and name on a UDF i have created on the title of the payments.
So that i use the OVPM to bring out the Account code and name.
Please urgent help is needed.
ThanksHi,
I have tried with FMS to get account code and name, not getting desired result. It may not be possible due to limitation of FMS.
are you looking for this?
Thanks & Regards,
Nagarajan -
Bank Name Within Outgoing Payment PLD
Dear All,
My Client is working on SAP B1 2007 B PL10. Now my client wants Bank Name to be displaced in the Header Level of the Outgoing Payment PLD.
Please guide me in this matter.
Regards
Hitesh ParsawalaHi Hitesh,
Try this,
->> Create 1 System Variable Field in Page Header on PLD.
Bank Name
Variable -> 126.
->> Goto Properties Window and put the Tick mark in Description on Content Tap.
OR
Try to Create FMS Query and assign the FMS in UDF.
Create UDF in Header on Outgoing Payments.
->> Choose Tools on Top menu.
->> User - Defined Fields. -> User Manage Fields.
->> Open the User Manage Fields Widnow.
->> Payments -> Title.
->> Select Title and Click Add button in Bottom on User Manage Fields Window.
->> Create Bank Name UDF(Code, Discription and Type - Character) and Add the UDF.
Create FMS in Query Generator and Save as Query Manager then Assign the FMS in UDF for Bank Name.
->> Adminstration.
->> Reports. -> Query Generator.
->> Open the Query Generator and put the below FMS query.
SELECT T0.BankName
FROM ODSC T0, VPM1 T1
WHERE
T1.BankCode= T0.BankCode
AND
T1.DocNum= $[OVPM.DocNum]
->> Assign the FMS in UDF on Outgoing Payments.
->> Auto Refresh of REMARKS or other require field
Ex.
1. Goto the UDF and Clcik ShiftAltF2.
2. Select the SEARCH BY SAVED QUERY.
3. Assign the FMS Query.
4. Select the AUTO REFRESH WHEN FIELD CHENGES.
5. Select REMARKS.
6. Check the Display Saved Values.
Use this UDF field in Page Header on Outgoing Payments PLD.
Regards,
Madhan. -
Approver name for outgoing payment
Hi Friends,
I want a query for outgoing payment with the Username of the person who approved this and along with requester (originator) name .To print on crystal report one for requester name and other approved person name.Hi Pradyuman,
Please check below Query for Approver Name for Outgoing Payment.
SELECT T3.U_NAME
FROM OVPM T0
INNER JOIN OWDD T1 on T0.DocEntry = T1.DocEntry
INNER JOIN WDD1 T2 on T1.WddCode = T2.WddCode
INNER JOIN OUSR T3 ON T2.UserID = T3.USERID
WHERE T2.Status = 'Y' and T1.ObjType = 46 And T0.DocNum = $[OVPM.DocNum]
Please try below Query for User Name for Login User.
SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER] FOR BROWSE
Please put above Two FMS in Two Different UDF to Get Result of above FMS.
Please also check below links.
Approved by User name query
Name of authorizers within an approval procedure
Hope this helps
Regards::::
Atul Chakraborty -
How to Print the Account Balance in Outgoing Payment PLD
Hello Experts
How to Print the Account Balance in Outgoing Payment PLD
Dixit PatelHi,
you can use udf in the outgoing payment to record the vendor's account balance and then using the query FMS ;
select balance from ocrd where cardcode = $[$4.0.0]
Assign the query in the UDF so that each time after entering the vendor code, the balance appears.
After add the payment, the balance is recorded.
In PLD, you can create the UDF field to make the balance appears in the outgoing report.
Rgds,
JimM -
JE details after posting outgoing payment can't captured in the Form
Hi Everyone,
Im using both SAP B1 2005B PL32 and PL40. I got this problem.
Our client ask me to customize the AP Invoice and Outgoing payment forms primarily because they wanted to make the GL entries be included during form printing. However only the AP Invoice is working after customizing the two forms.
Im using OJDT and JDT1 tables to capture the GL entries after posting the transactions. I really wonder why, Outgoing Payment form is not working when in upon posting of this transaction it still goes to OJDT and JDT1 tables.
Anyone can help me out. huhuhu..This is really ASAP!
Regards,
BethHi Lilibeth,
What customization you have done ? Are they one of these following:
1. SDK code UI/DI ?
2. Query report ?
3. Formatted search in UDF ?
OJDT/JDT1 are the tables to record the JE transaction posted to general ledger for outgoing payment document. So there is certainly link field among them.
Rgds,
Maybe you are looking for
-
CiscoWorks LMS 4.0.1 - Database inconsistency
Hello all, I have a problem with LMS 4.0.1. In the Inventory / Device Administration, I see all the devices, monitoring works perfect (highutilization, operationallydown, etc.). User Tracking works fine for 85% of the devices (15% is the newer device
-
Exchange Server 2013 and Office 365 Integration
If we are using Exchange Server 2013 on premise, can we have 2 of our users integrated with Office 365 so that they can utilize their Exchange Server email account with the apps and features of Office 365?
-
Resize question...
Ok... I have been using java for a few months self taught... I have a Swing project that I have done that works completely. What I want to implement now is a resize code for it that basicly reads the screensize resizes the frame to it then resizes al
-
Final Cut Pro 5.1 Not Recognizing My Deck!
I just upgraded to FCP Studio 5.1 in the hopes that it would allow me to open a project that get a general error message when opening on my 4.5 (but not on my friend's computer or at the mac store!) Well the general error message still comes up so I
-
If you right click an image on a website and choose "save image", it will be downloaded again. It is already in the browser cache though. There are addons which let you pick it from the cache. Why doesn't Firefox just save the cached image and instea