on 10-21-2008 8:21 AM
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!
Hi Stephen
Ask your ABAP guy to write a condition to exclude the VBRK-VBELN where VBRK-FKSTO = X.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ABAP would have been the correct forum to post....
Instead of Select Single.... do a Select * from VBFA.... into internal table. Loop on this internal table to check whether FKSTO eq X (billing document is cancelled or not) in VBRK table for each VBELN. Delete the record from internal table if the billing document is cancelled. After the loop is completed the internal table will have only the billing documents which are not cancelled.
Regards,
GSL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.