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

Not getting the output using for all entries-

$
0
0

Pls rely me....the values are not fetching for this select query...............


SELECT MAtnr

       MTART

       MBRSH

       MATKL

       MEINS

       GEWEI

       SPART

   from mara

   INTO TABLE it_mara

   where matnr in s_matnr.

 

IF  sy-subrc = 0.

   SELECT MATNR

            BWKEY

            VPRSV

            STPRS

        FROM mbew

        INTO TABLE it_mbew

        FOR ALL ENTRIES IN it_mara

        where matnr = it_mara-matnr.

     endif.

   IF sy-subrc = 0.

     SELECT MATNR

             SPRAS

       FROM makt

       INTO TABLE it_final

       FOR ALL ENTRIES IN it_mara

       WHERE matnr = it_mara-matnr.

 

   ENDIF.

   IF sy-subrc = 0.

        SELECT matnr

               werks

               ekgrp

          FROM marc

          INTO TABLE it_marc

          FOR ALL ENTRIES IN it_mara

          where matnr = it_mara-matnr.

   ENDif.

LOOP AT it_mara INTO wa_mara.

     READ TABLE it_mara INTO wa_mara WITH KEY matnr = wa_mara-matnr.

   wa_final-matnr = wa_mara-matnr.

   wa_final-Mtart = wa_mara-mtart.

   wa_final-mbrsh = wa_mara-mbrsh.

   wa_final-matkl = wa_mara-matkl.

   wa_final-meins = wa_mara-gewei.

   wa_final-spart = wa_mara-spart.

     READ TABLE it_mbew INTO wa_mbew with key matnr = wa_mara-matnr.

   IF sy-subrc = 0.

     wa_final-stprs = wa_mbew-stprs.

     wa_final-vprsv = wa_mbew-vprsv.

     wa_final-bwkey = wa_mbew-bwkey.

   ENDIF.

   READ TABLE it_marc INTO wa_marc WITH key matnr = wa_mara-matnr.

   IF sy-subrc = 0.

     wa_final-werks = wa_marc-werks.

     wa_final-ekgrp = wa_marc-ekgrp.

   ENDIF.

   READ TABLE it_makt INTO wa_makt WITH KEY matnr = wa_mara-matnr.

   IF sy-subrc = 0.

     wa_final-spras = wa_makt-spras.

   ENDIF.

 

   APPEND wa_final to it_final.

CLEAR wa_final.

ENDLOOP.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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