2007 Apr 24 8:20 AM
Hi All,
There was a report which extracts all changes in materials and displays the report. (Not through change pointers) It's taking lot's of time to execute. Now they came with the new option like date FROM and TO for the material, so that when we executes the report it should extract only materials between the range.
We are extracting materials related info from the tables MVKE, MARC, MAKT, MARA, MBEW. Now i want the date feild in MVKE so that i can restrict the values from that table.
regards
raghu.
Hi All,
There was a report which extracts all changes in materials and displays the report. (Not through change pointers) It's taking lot's of time to execute. Now they came with the new option like date FROM and TO for the material, so that when we executes the report it should extract only materials between the range.
We are extracting materials related info from the tables MVKE, MARC, MAKT, MARA, MBEW. Now i want the date feild in MVKE so that i can restrict the values from that table.
regards
raghu.
2007 Apr 24 8:24 AM
i dont know what u are getting out of these table ?i think u are putting logic on change date ?
how can u link MVKE with all other tables ?
better to break all inner joins what u are using ?
Regards
Prabhu
2007 Apr 24 8:28 AM
Hi Prabhu,
Even i also have the same impression, but they looking based on the MATNR.
Here u can check the code.
form select_from_mvke.
select vkorg matnr bonus provg sktof vrkme prodh pmatn kondm
mvgr1 mvgr2 mvgr4 mvgr5 mtpos vmsta aumng
into table i_mvke
from mvke
where matnr in s_matnr
and vkorg eq p_vkorg
and vtweg eq p_vtweg
and lvorm eq space.
sort i_mvke by vkorg matnr.
endform.
*-----------------------------------------------------------------------
* FORM FORM SELECT_FROM_MAKT
*-----------------------------------------------------------------------
*
*-----------------------------------------------------------------------
form select_from_makt.
check not i_mvke[] is initial.
select matnr maktx
from makt
into table i_makt
for all entries in i_mvke
where matnr eq i_mvke-matnr
and spras eq sy-langu.
sort i_makt by matnr.
endform.
*-----------------------------------------------------------------------
* FORM SELECT_FROM_MARA
*-----------------------------------------------------------------------
*
*-----------------------------------------------------------------------
form select_from_mara.
check not i_mvke[] is initial.
select
matnr mtart matkl meins bstme brgew ntgew gewei volum voleh
spart eannr ean11 vabme satnr attyp
laeng breit hoehe meabm
from mara
into table i_mara
for all entries in i_mvke
where matnr eq i_mvke-matnr.
sort i_mara by matnr.
endform.
*-----------------------------------------------------------------------
* FORM SELECT_FROM_MEAN
*-----------------------------------------------------------------------
*
*-----------------------------------------------------------------------
form select_from_mean.
check not i_mvke[] is initial.
select matnr ean11
from mean
into table i_mean_8
for all entries in i_mvke
where matnr eq i_mvke-matnr
and eantp in s_eantp
and hpean eq c_x.
sort i_mean_8 by matnr.
select matnr ean11 eantp
from mean
into table i_mean_13
for all entries in i_mvke
where matnr eq i_mvke-matnr
and meinh eq c_pc
and ( eantp eq c_he or eantp eq c_uc ).
sort i_mean_13 by matnr eantp.
endform.
*-----------------------------------------------------------------------
* FORM SELECT_FROM_MBEW
*-----------------------------------------------------------------------
*
*-----------------------------------------------------------------------
form select_from_mbew.
check not i_mvke[] is initial.
select matnr bwkey bwtar verpr
from mbew
into table i_mbew
for all entries in i_mvke
where matnr = i_mvke-matnr
and bwkey = i_mvke-vkorg
and bwtar = space.
sort i_mbew by matnr bwkey bwtar.
endform. " SELECT_FROM_MBEW
<b>Now i need restrict values only for particular range</b>
2007 Apr 24 8:27 AM
Hi,
Check these fields in MVKE- VDVFL Date from which sold in the store
VDBFL Date to which sold in the store,
VDVZL, VDBZL
there are somr more fields related to date in this table.
Check them
Regards,
Sonika
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |