Catch the invoice no
In one section of my ABAP Program,i use the DN no to get the invoice such as:
SELECT SINGLE vbeln INTO itab-invoice
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?