Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SK document indicator

Former Member
0 Kudos

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.




1 REPLY 1

Former Member
0 Kudos

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.)