10-15-2014 11:04 AM
Hello every body,
I do extraction of documents number coming from the table BKPF.
I want to classify those document as following:
1- Ticket: receipt
2- Invoice
3- Simplified invoice : a small invoice like receipt, but with invoice number and VAT number
Can i use the following logic to classify those documents ?
if Transaction code(BKPF-TCODE) = 'FBCJ' than the document number is a Ticket ?
if Transaction code(BKPF-TCODE) = 'vf02' than the document number is a invoice ?
if Transaction code(BKPF-TCODE) = 'fb60' or 'fb03' than the document number is a Simplified invoice ?
Thank u.
10-21-2014 5:29 AM
Hi,
Yes you can use the above logic and implement it.
for e.g.
SELECT BUKRS BELNR GJAHR TCODE FROM BKPF
INTO TABLE IT_BKPF1 WHERE TCODE = 'FBCJ'.
SELECT BUKRS BELNR GJAHR TCODE FROM BKPF
INTO TABLE IT_BKPF2 WHERE TCODE = 'VF02'.
SELECT BUKRS BELNR GJAHR TCODE FROM BKPF
INTO TABLE IT_BKPF3 WHERE TCODE = 'FB60' OR TCODE = 'FB03'.
using it u can extract the documents in 3 different tables (in this case it_bkpf1,it_bkpf2,it_bkpf3.)