Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Material changes to find out...

Former Member
0 Likes
696

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.

3 REPLIES 3
Read only

Former Member
0 Likes
633

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

Read only

0 Likes
633

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>

Read only

former_member632991
Active Contributor
0 Likes
633

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