Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

The best way to check the stock of one entire plant?

$
0
0

We use MB52 to display the stock of one whole plant,which means we don't use the material number as the input Arguments.The Performance is so poor that most of the cases lead to runtime error 'TIME_OUT'.Some experts suggested copy the RM07MLBS to a Z_XXX in which replace the table MARD with MARA in line 1127,which the ABAP  code is as below:

 

* END INSERT n_759412

ENHANCEMENT-SECTION EHP604_RM07MLBS_09 SPOTS ES_RM07MLBS .

     SELECT mara~matnr werks xchar mtart matkl meins trame umlmc

            bwesb glgmg                          "AC0K020254 "912093

          mara~lvorm AS lvorm_mara

          marc~lvorm AS lvorm_marc

          INTO CORRESPONDING FIELDS OF TABLE t_mat

          FROM mara INNER JOIN marc

          ON mara~matnr = marc~matnr

          WHERE mara~matnr IN matnr

            AND werks IN werks

            AND mtart IN matart

            AND matkl IN matkla

            AND ekgrp IN ekgrup.

END-ENHANCEMENT-SECTION.


There  would be some difficulty with this solution:

1,The 'ENHANCEMENT-SECTION'  can't be copied.

2,there are some fields not included in MARD which is included in MARA,like MTART KATKL.

3,We had  discussed it with our PM,who suggested not use the tables MARD,MSPR &etc since we don't know the detailed logic in MB52 and may be there would be some dirty records in those tables.

So I wonder if there are any other solutions?My MB52 selection screen see my attachment.Thanks in advance.


Viewing all articles
Browse latest Browse all 8332

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>