07-24-2013 10:55 AM
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.
07-26-2013 10:35 AM
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