cancel
Showing results for 
Search instead for 
Did you mean: 

The way an A/P Invoice and Outgoing Payment are related to each other

marour
Participant
0 Kudos

Hello together,

I do not really know if i can find an answer to my question here and if the Question is suitable at the first place but i will give a try 🙂

here we go :

An A/P Invoice is related to an Outgoing Payment through the field ReceiptNum in the A/P Invoice where the DocNum of the Outgoing Payment is saved. so far so good.

In the Relationship Map there can we see the Relation in a graphical way which is also nice 😄

I have this situation :

i was trying to book an A/P Invoice and i got to the step with the Outgoing Payment then i canceled it. and later on i booked the same A/P invoice so i got a new Outgoing Payment with a new Number. in the Field ReceiptNum in the A/P Invoice there will be the number of the new Outgoing Payment saved and not the old one which i already canceled with is okay as well. Now in the Relationship Map i can see the A/P Invoice related to two Outgoing Payments one of them is Canceled and the other not.

So there still be a relation between all of them but how can i get this relation out of this relationship Map ?

in the A/P Invoice itsself there is nothing about the Outgoing Payment that has been Canceled. and in the Outgoing Payment that has been canceled there is nothing about the A/P Invoice but in the Relationship Map they are still related...

I have the following Problem :

i have the DocNum of the canceled Outgoing Payment and i need to get some Data of the A/P Invoice that belongs to it but i can not because there is somehow no way to get into the A/P Invoice...

Any Ideas ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor

Hi,

I would start your search by VPM2, this table has all related documents to an outgoing payment, so you can use the VPM2.DocEntry and VPM2.InvType to identify your document

e.g.: SELECT OPCH.* FROM VPM2 INNER JOIN OPCH ON VPM2.DocEntry = OPCH.DocEntry WHERE VPM2.DocNum = [%0] AND VPM2.InvType = 18

VPM2.DocEntry is the key of your mkt document

VPM2.DocNum is used to join the OVPM, there is nothing to do with the documents paid

VPM2.InvType is used to identify the type of document your are paying

Answers (1)

Answers (1)

marour
Participant
0 Kudos

YOU ARE MY HERO 🙂

I was looking for weeks and weeks and weeks and I could not find this relation eventhough I knew that there is s relation as long as I could see it in the relationship Map 🙂

I did not even expect to get an Answer and i did not even expect that someone can understand what my Problem ist as long as it is not that commen.

Thank you so much Mr. Kasparian 🙂

former_member233854
Active Contributor
0 Kudos

I am glad it works 😃