Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Catch the invoice no

Dear experts

In one section of my ABAP Program,i use the DN no to get the invoice such as:

SELECT SINGLE vbeln INTO itab-invoice

FROM vbfa

WHERE vbelv = sitab-dn

AND vbtyp_n = 'M'

AND vbtyp_v = 'J' .

But if the invoice is be canceled,there are will be more than one record exist,my ABAP program aboved will catch the first invoice.

Actually i want to catch the latest record.

How can i get it?

TKS!

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question