cancel
Showing results for 
Search instead for 
Did you mean: 

Outgoing Payment on Account Report?

Former Member
0 Kudos
161

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.

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Experts,

below is a query i did, but i need some touches to this query to update my UDF.

declare sapupdate cursor for SELECT  T1.[AcctName]

FROM OVPM T0  INNER JOIN VPM4 T1 ON T0.[DocEntry] = T1.[DocNum]

WHERE T0.[DocType] ='A'

declare @ucc varchar(20)

open sapupdate

fetch sapupdate into  @ucc

while @@FETCH_STATUS =0

begin

if @ucc <>''

begin

update OVPM set u_ActName =(@ucc )

end

fetch sapupdate into @ucc

end

close sapupdate

deallocate sapupdate

Regards

Justice

former_member212181
Active Contributor
0 Kudos

Hi Justice
Are you talking about to update old records or upcoming records.
If its old records, DTW is suggestable compare to updating thru SQL even though its UDF.
If it is upcoming records, you can use Formated search.

Regards

Unnikrishnan

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Update through SQL statement  is against SAP support policy. If any inconsistency due to this, you will lose SAP support.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

@Nagarajan,what you have showed in the pic is what i want .

I want the account code and name to be automatically filled in the UDF at OVPM title.

former_member212181
Active Contributor
0 Kudos

Hi
Try this query to assign formatted search.
You may need to put one store procedure to ensure that this udf has filled if document type is "Account"

for Line level first acct code
SELECT Top 1 $[$-71.8.0]


For line level first acct name
SELECT Top 1 $[$-71.2.0]

Regards

Unnikrishnan

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

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

former_member212181
Active Contributor
0 Kudos

Hi
I'm not able to understand your requirement fully.
Try below mentioned query and give your feedback as well as detailed explanation of your requirement.
replace UDF field name if this query is okey for you.

SELECT T0.[DocDate],T0.[DocNum],T1.[AcctCode]'Expense Acct', T1.[AcctName] 'Expense Acct name',T0.U_BP_DocNr[UDF GLAcct], T0.U_BP_Seque[UDF GLAcct Name], T0.[CashAcct], T0.[CashSum], T0.[CheckAcct], T0.[CheckSum], T0.[TrsfrAcct], T0.[TrsfrSum], T0.[DocTotal]
FROM OVPM T0
INNER JOIN VPM4 T1 ON T0.DocNum = T1.DocNum

Regards

Unnikrishnan