on 04-24-2007 6:42 AM
Hi
We are working on a custom report, in which we need to print purchasing details (from EKPO, EKKO & EKBE) as well as accounting details (from BSEG & BKPF). We need to hit BKPF/BSEG with the accounting document number, since it is the only key field (though PO number is there in BKPF, we can not use this because it is not a key field)
My question from which table we get the accounting document number ? We need to provide a link between purchasing & accounting through accounting document number, but how to find the accounting document number. ?
Thanks
Venkat.
Hi,
You will get the material document number from EKBE. using this Material document number check in MSEG to get hte accounting document number. so you will find the link between PO number and accounting document number.
Regards,
Ramakrishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PO no --> Material document : Table EKBE (Purchase order history)
Material document --> Accounting document : Table BKPF (Accounting Document Header) here you need to apply logic Doc type = WE (Goods Receipt), Ref. procedure = MKPF (Mat doc header table)
In BKPF table the object key will be the material document number + YEAR.
Hope this helps.
Regards
Arif Mansuri
Venkat,
I guess you are trying to fetch Accouting Documents for goods receipt against PO.
To do this, you need to look at the PO History table (EKBE) and find out the Corresponding material document (VGABE = 1 for good receipt).
Get the value of BELNR and GJAHR.
Concatenate BELNR and GJAHR into your refernce key (like BKPF-AWKEY).
Then use this key to read table BKPF with the following key
AWTYP = 'MKPF' for Material document
AWKEY = reference key generated above.
AWSYS = the value of the logical system (if used) or blanks
This will get you quicker access as compared to what you've described below. In this case, the system uses a standard SAP Index "Index by application type and key" to fetch the relevant records.
Hope this helps.
Hi,
First take Table MKPF field MBLNR.
Go to BKPF table and search search key AWKEY this id nothing but Material document number.in same table u can find Accounting number BELNR.
table BSEG in this table u can find Purchasing document or BSET.
Pls give me points if this is usefull.
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu
You are right. But we want to got BKPG/BSEG with the accounting document number. Because material document number/PO doc. number are not a key fields in these fields. Getting accounting document number through material doc. number would take lottt of time, since this field is not a key field.
If you know to find accounting doc number in anyother way, please let us know
Thanks
Venkat.
Hi
It is located in a structure (RF05L) field name is BELNR.
regards
Yogesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
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.