‎2008 Nov 20 9:52 AM
Given GRN no for 105 movement in mseg ,how can i know FI document ?
‎2008 Nov 20 10:21 AM
Hi,
aditya use BKPF-BELNR
and try to access it using BSEG_BELNR.
Hope magic Works!
Regards,
Purvesh Patel.
‎2008 Nov 20 10:26 AM
How can i do i am having GRN say 5000377301,i cant pass it to bkpf or bseg.I want FI doc no itself
that you are asking me to pass.
‎2008 Nov 20 10:30 AM
‎2008 Nov 20 10:33 AM
‎2008 Nov 20 10:39 AM
1. Query the goods receipt in tcode MB03.
2. Switch on ST05 performance trace in another session.
3. Click on the MB03 option to display accounting document.
The trace will show you how to find the accounting document.
‎2008 Nov 20 10:40 AM
>
It is conceptually also not ok.
what do you mean?
then identify a document-pair (one from MSEG, one from BSEG) and search for common fields (for example check BKPF-AWKEY, usually that is some kind of concatenation of relevant document numbers + company code + plant). Unfortunately there is no MM where I am, so I cannot check on my own
‎2008 Nov 20 10:46 AM
I was coming to that the field AWKEY ie YYYYGRNNO.
Here i find if i try querying the table BKPF by giving AWKEY ,BUKRS ,GJAHR,retrieval is damn slow.
Infact it is better to retrieve all FI docs of complete year and then filter internal table matching that AWKEY within ABAP scope.
Here can anybody give a better tip to optimize fast retrievaL
‎2008 Nov 20 11:04 AM
Hello Aditya,
May be you can use AWTYP = 'MKPF'. Hope this will reduce data fetch time )
I donot think selecting all the docs for the CoCd & Fiscal Yr and filtering will be a good idea.
Plz correct me if i am wrong.
BR,
Suhas
‎2008 Nov 20 11:07 AM
just check what is the value for BKPF-AWTYP (will be the same all the time for all documents come from MSEG) and hardcode that in the selection (there is a secondary index for AWTYP, AWKEY, ... for BKPF)
SELECT ...
INTO...
FROM bkpf
WHERE awtyp EQ '...'
AND AWKEY EQ ....
‎2008 Nov 20 12:42 PM
‎2008 Nov 25 9:59 AM