2006 Dec 19 4:10 PM
In my report
i need to display how many gr and gi have been created for a perticular
period of time(user input as s_date)
input on the selection screen
==============================
matnr (mara)
matkl (mara)
date (this date has to be compared with the mkpf-bldat)
data selection :
=================
mara : matnr (pkey)( user input on selecion screen) (output)
matkl ( user input on selecion screen) (output)
lvorm (output)
makt : matnr (pkey)
maktx
mseg : mblnr(pkey)
bwart
matnr
mkpf : mblnr
bldat (This field has to be compared to with the analysis date)
mbew : bwkey (output)
bwtar (output)
lbkum (output)
In output i need to display the following fields .
==================================================
mara-matnt
mara-matkl
mara-lvorm
makt-maktx
count_gi
count_gr
mbew-bwkey
mbew-bwtar
mbew-lbkum
Somebody tell me what should be stratedy to select data
which table to hit when in a sequence so as to get
the required data.Remembering system load should be less
as a point.
Thanks and regards
2006 Dec 19 4:55 PM
hi,
I believe gi: goods issue and gr: goods receipt.
strategy:
1. select mblnr from mkpf into table btab where budat ( bldat) in s_date
2. loop at btab.
select matnr mblnr bwart menge meins shkzg from mseg into table itab where matnr in s_matnr and mblnr = btab-mblnr.
endloop.
so depending on movement type u can calculate goods receipt and goods issue.
shkzg = 'S' then + and shkzg = 'H' then ' - '.
hope this helps.
If the problem is solved..pls close the thread and reward to all helpful answers.
Regards
CNU
2007 Jan 11 7:41 PM
Performance point of view, it is better to have a join between MKBF and MSEG tables OR use For All Entries statement. Avoid selecting the data from MSEG inside the loop.
Thanks
Viswa