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: 

distinguish purchase invoice / sales invoice / purchase invoice credit/ sales invoice credit

former_member445510
Active Participant
0 Kudos

Hello Every One,

Knows some how can i distinguish the following documents in SAP ?

- purchase invoice   - sales invoice   - purchase invoice  credit  -  sales invoice credit .

With other words, there is a way to distinguish those documents as following:

0 --> sales invoice

1 --> purchase invoice

2 --> sales invoice Credit

3 --> purchase invoice Credit

My used tables are the following: BKPF, BSET, T001, T005. And my first select is:


SELECT  bukrs belnr gjahr budat bldat blart waers FROM bkpf INTO  CORRESPONDING FIELDS OF TABLE it_bkpf
     WHERE bukrs = p_bukrs
           AND belnr IN p_belnr
           AND budat IN p_budat
           AND budat IN p_budat
           AND gjahr IN p_gjahr
           AND monat IN p_monat
           AND blart IN p_blart.


Please don't hesitate to gave me an answer if you any Idea.

Thanks u,

Ouail.


1 REPLY 1

Former Member
0 Kudos

Hi,

I suppose you want to determine which accounting document is for what document.

The field BLART and XBLNR will give you the details for the same.

Like

RV : Billing Document you will find Billing doc no in XBLNR

RE : Vendor Invoice against PO

You will need to drill a little with functional to find out more if Z types are created and hos the XBLNR is configured for update.

Regards